help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Email "cut here" code snippets


From: Grant Rettke
Subject: Re: Email "cut here" code snippets
Date: Fri, 30 Jan 2015 16:01:59 -0600

Me, too.

(defun gcr/chs ()
  "Insert opening \"cut here start\" snippet."
  (interactive)
  (insert "--8<---------------cut here---------------start------------->8---"))

(defun gcr/che ()
  "Insert closing \"cut here end\" snippet."
  (interactive)
  (insert "--8<---------------cut here---------------end--------------->8---"))

One more person confesses and one of us will turn it into a package.

On Thu, Jan 29, 2015 at 7:30 AM, Glyn Millington
<glyn.millington@gmail.com> wrote:
> torys.anderson@gmail.com (Tory S. Anderson) writes:
>
>> I use GNUs and notice that some people include "---8<-- cut here" type
>> snippets, which are specially formatted in my view. Where can I find
>> this behavior documented, and is there a predefined shortcut for
>> inserting these? I haven't spotted anything on it in the GNUs manual or
>> online searches.
>
> I have had this in my init.el/.emacs for ever!  It's not mine and I can't
> remember where it came from but it works
>
>
>
> ;;;; SCISSORS
> (defvar scissors "8<------"
>   "string to insert in \\[scissors]")
>
> (defun scissors ()
>   "Insert a line of SCISSORS in the buffer"
>   (interactive)
>   (or (bolp) (beginning-of-line 2))
>   (while (<= (current-column) (- (or fill-column 70) (length scissors)))
>     (insert scissors))
>   (newline))
>
> (bind-key "s-s" 'scissors)
>
>
> hth
>
>
> Glyn
>
>



-- 
Grant Rettke
gcr@wisdomandwonder.com | http://www.wisdomandwonder.com/
“Wisdom begins in wonder.” --Socrates
((λ (x) (x x)) (λ (x) (x x)))
“Life has become immeasurably better since I have been forced to stop
taking it seriously.” --Thompson



reply via email to

[Prev in Thread] Current Thread [Next in Thread]