* Email "cut here" code snippets
@ 2015-01-29 12:06 Tory S. Anderson
2015-01-29 13:26 ` Rainer M Krug
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Tory S. Anderson @ 2015-01-29 12:06 UTC (permalink / raw)
To: emacs list
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.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Email "cut here" code snippets
2015-01-29 12:06 Email "cut here" code snippets Tory S. Anderson
@ 2015-01-29 13:26 ` Rainer M Krug
[not found] ` <mailman.18902.1422538022.1147.help-gnu-emacs@gnu.org>
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Rainer M Krug @ 2015-01-29 13:26 UTC (permalink / raw)
To: Tory S. Anderson; +Cc: emacs list
[-- Attachment #1: Type: text/plain, Size: 952 bytes --]
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.
It is in message.el:
,----
| message-mark-inserted-region is an interactive compiled Lisp function
| in `message.el'.
|
| It is bound to C-c m.
|
| (message-mark-inserted-region BEG END &optional VERBATIM)
|
| Mark some region in the current article with enclosing tags.
| See `message-mark-insert-begin' and `message-mark-insert-end'.
| If VERBATIM, use slrn style verbatim marks ("#v+" and "#v-").
`----
I think I defined the keyboard shortcut myself.
Hope this helps,
Rainer
>
>
--
Rainer M. Krug
email: Rainer<at>krugs<dot>de
PGP: 0x0F52F982
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 494 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Email "cut here" code snippets
[not found] ` <mailman.18902.1422538022.1147.help-gnu-emacs-mXXj517/zsQ@public.gmane.org>
@ 2015-01-29 13:28 ` Sebastien Vauban
0 siblings, 0 replies; 6+ messages in thread
From: Sebastien Vauban @ 2015-01-29 13:28 UTC (permalink / raw)
To: Rainer M Krug; +Cc: emacs list
Rainer M Krug wrote:
> torys.anderson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org (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.
>
> It is in message.el:
>
> ,----
> | message-mark-inserted-region is an interactive compiled Lisp function
> | in `message.el'.
> |
> | It is bound to C-c m.
> `----
>
> I think I defined the keyboard shortcut myself.
C-c M-m is the default one.
Best regards,
Seb
--
Sebastien Vauban
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Email "cut here" code snippets
2015-01-29 12:06 Email "cut here" code snippets Tory S. Anderson
2015-01-29 13:26 ` Rainer M Krug
[not found] ` <mailman.18902.1422538022.1147.help-gnu-emacs@gnu.org>
@ 2015-01-29 13:30 ` Glyn Millington
2015-01-30 22:01 ` Grant Rettke
2015-01-29 13:46 ` Marcin Borkowski
3 siblings, 1 reply; 6+ messages in thread
From: Glyn Millington @ 2015-01-29 13:30 UTC (permalink / raw)
To: help-gnu-emacs
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Email "cut here" code snippets
2015-01-29 12:06 Email "cut here" code snippets Tory S. Anderson
` (2 preceding siblings ...)
2015-01-29 13:30 ` Glyn Millington
@ 2015-01-29 13:46 ` Marcin Borkowski
3 siblings, 0 replies; 6+ messages in thread
From: Marcin Borkowski @ 2015-01-29 13:46 UTC (permalink / raw)
To: emacs list
On 2015-01-29, at 13:06, Tory S. Anderson <torys.anderson@gmail.com> wrote:
> 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.
Did you try C-c M-m in message mode (message-mark-inserted-region)?
Hth,
--
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Email "cut here" code snippets
2015-01-29 13:30 ` Glyn Millington
@ 2015-01-30 22:01 ` Grant Rettke
0 siblings, 0 replies; 6+ messages in thread
From: Grant Rettke @ 2015-01-30 22:01 UTC (permalink / raw)
To: glyn.millington; +Cc: Emacs Help
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
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-01-30 22:01 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-29 12:06 Email "cut here" code snippets Tory S. Anderson
2015-01-29 13:26 ` Rainer M Krug
[not found] ` <mailman.18902.1422538022.1147.help-gnu-emacs@gnu.org>
[not found] ` <mailman.18902.1422538022.1147.help-gnu-emacs-mXXj517/zsQ@public.gmane.org>
2015-01-29 13:28 ` Sebastien Vauban
2015-01-29 13:30 ` Glyn Millington
2015-01-30 22:01 ` Grant Rettke
2015-01-29 13:46 ` Marcin Borkowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).