* how to insert this?
@ 2007-11-23 22:42 someusernamehere
2007-11-24 19:26 ` Exal de Jesus Garcia Carrillo
0 siblings, 1 reply; 5+ messages in thread
From: someusernamehere @ 2007-11-23 22:42 UTC (permalink / raw)
To: help-gnu-emacs
Hey, I have see many times lines such as:
--8<---------------cut here---------------start------------->8---
how to do so?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: how to insert this?
2007-11-23 22:42 how to insert this? someusernamehere
@ 2007-11-24 19:26 ` Exal de Jesus Garcia Carrillo
2007-11-24 20:31 ` Drew Adams
2007-11-25 23:02 ` Bastien
0 siblings, 2 replies; 5+ messages in thread
From: Exal de Jesus Garcia Carrillo @ 2007-11-24 19:26 UTC (permalink / raw)
To: help-gnu-emacs
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
someusername escreveu:
> Hey, I have see many times lines such as:
> --8<---------------cut here---------------start------------->8---
>
> how to do so?
You can insert it with M-x message-mark-inserted-region RET or message-mark-insert-file,
are functions in message.el.
- --
Spam protection:
In my e-mail replace the words `no-spam' with `exal'.
.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8+ <http://mailcrypt.sourceforge.net/>
iD8DBQFHSHrzoZmxoVJRtGIRArakAJ997xqfY7cmcw3aBE+shbpFxV908QCeLR0F
ApNHlISHuoQW3bQBLDoc3+g=
=ZEIS
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: how to insert this?
2007-11-24 19:26 ` Exal de Jesus Garcia Carrillo
@ 2007-11-24 20:31 ` Drew Adams
2007-11-25 3:10 ` William Xu
2007-11-25 23:02 ` Bastien
1 sibling, 1 reply; 5+ messages in thread
From: Drew Adams @ 2007-11-24 20:31 UTC (permalink / raw)
To: help-gnu-emacs
> > Hey, I have see many times lines such as:
> > --8<---------------cut here---------------start------------->8---
> > how to do so?
>
> You can insert it with M-x message-mark-inserted-region RET or
> message-mark-insert-file, are functions in message.el.
If you just want to insert it, then you don't need the message marking done
by `message-*'.
Here are two ways to do what you request:
1. Put the text in a file `cut', then use `C-x i cut' (command
`insert-file').
2. Put the text in a string, then use a command that calls `insert' to
insert it:
(defcustom cut-string
"--8<---------------cut here---------------start------------->8---\n"
"My cut string" :type 'string)
(defun insert-cut-string ()
"Insert `cut-string'." (interactive) (insert cut-string))
If you use this a lot, #2 might be handier. You can bind `insert-cut-string'
to a key.
Learn to fish. Some ways to find out about things like this yourself:
1. Use `C-u C-h a insert RET'. You will see all functions whose names
contain `insert', including `insert-file' and `insert'. To see only names
that begin with `insert', use `C-u C-h a ^insert RET'.
2. Use `C-h f insert TAB TAB'. You will see all functions whose names start
with `insert', including `insert-file' and `insert'. Unlike `C-h a', you
don't see any descriptions, however, and you will not know which are
commands (interactive functions).
3. Use `i' in the Emacs manual (or the Elisp manual), then `insert TAB TAB'.
You will see all index entries related to `insert'. But that is less helpful
in this particular case.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: how to insert this?
2007-11-24 20:31 ` Drew Adams
@ 2007-11-25 3:10 ` William Xu
0 siblings, 0 replies; 5+ messages in thread
From: William Xu @ 2007-11-25 3:10 UTC (permalink / raw)
To: help-gnu-emacs
"Drew Adams" <drew.adams@oracle.com> writes:
> Here are two ways to do what you request:
>
> 1. Put the text in a file `cut', then use `C-x i cut' (command
> `insert-file').
>
> 2. Put the text in a string, then use a command that calls `insert' to
> insert it:
>
> (defcustom cut-string
> "--8<---------------cut here---------------start------------->8---\n"
> "My cut string" :type 'string)
>
> (defun insert-cut-string ()
> "Insert `cut-string'." (interactive) (insert cut-string))
Alternatively, you can use abbrev-mode. I myself use "xcut" for
expanding something similar.
--
William
http://williamxu.net9.org
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: how to insert this?
2007-11-24 19:26 ` Exal de Jesus Garcia Carrillo
2007-11-24 20:31 ` Drew Adams
@ 2007-11-25 23:02 ` Bastien
1 sibling, 0 replies; 5+ messages in thread
From: Bastien @ 2007-11-25 23:02 UTC (permalink / raw)
To: help-gnu-emacs
Exal de Jesus Garcia Carrillo <no-spam@gnu.org> writes:
> someusername escreveu:
>
>> Hey, I have see many times lines such as:
>> --8<---------------cut here---------------start------------->8---
>>
>> how to do so?
>
> You can insert it with M-x message-mark-inserted-region RET or
> message-mark-insert-file, are functions in message.el.
Yes. The advantage of using this solution (C-c M-m) is that it takes
care of replacing "start" by "end" at the end of the inserted region.
--
Bastien
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-11-25 23:02 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-23 22:42 how to insert this? someusernamehere
2007-11-24 19:26 ` Exal de Jesus Garcia Carrillo
2007-11-24 20:31 ` Drew Adams
2007-11-25 3:10 ` William Xu
2007-11-25 23:02 ` Bastien
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).