From: Bernt Hansen <bernt@norang.ca>
To: nicholas.dokos@hp.com
Cc: emacs-orgmode@gnu.org, "Parker, Matthew" <MParker@seic.com>
Subject: Re: RE: (prepend-to-buffer "buffer-name" "string")
Date: Wed, 17 Sep 2008 08:46:34 -0400 [thread overview]
Message-ID: <87iqsvvt1x.fsf@gollum.intra.norang.ca> (raw)
In-Reply-To: <19748.1221625073@gamaville.dokosmarshall.org> (Nick Dokos's message of "Wed\, 17 Sep 2008 00\:17\:53 -0400")
save-excursion is used to save your location when you temporarily move
somewhere else to do something
(save-excursion
(with-current-buffer "buffer"
(goto-char (point-min))
(insert "Stuff at the front of the buffer\n")))
-Bernt
Nick Dokos <nicholas.dokos@hp.com> writes:
> Parker, Matthew <MParker@seic.com> wrote:
>
>> Yes, but this would require I first move to the buffer to write to, do
>> the insert, then move back to the buffer I'm searching in.
>>
>
> That's what with-current-buffer is for I believe:
>
> (with-current-buffer <some-buffer> (insert "foo"))
>
> HTH,
> Nick
>
>>
>> -----Original Message-----
>> From: Bernt Hansen [mailto:bernt@norang.ca]=20
>> Sent: Tuesday, September 16, 2008 11:03 PM
>> To: Parker, Matthew
>> Cc: emacs-orgmode@gnu.org
>> Subject: Re: (prepend-to-buffer "buffer-name" "string")
>>
>> See the builtin function 'insert'
>>
>> (insert "string to insert")
>>
>> -Bernt
>>
>>
>> "Parker, Matthew" <MParker@seic.com> writes:
>>
>> > I've reviewed a lot of the docs, but maybe missed something... Is
>> there a
>> > function that allows you to just insert text into a buffer. i.e. just
>> like
>> > (prepend-to-buffer buffer-name start stop)... but instead of passing a
>> start and
>> > a stop, you can just pass a string.
>> >
>> > Thanks,
>> >
>> > matt
>> >
>> >
>> > _______________________________________________
>> > Emacs-orgmode mailing list
>> > Remember: use `Reply All' to send replies to the list.
>> > Emacs-orgmode@gnu.org
>> > http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>>
>>
>> _______________________________________________
>> Emacs-orgmode mailing list
>> Remember: use `Reply All' to send replies to the list.
>> Emacs-orgmode@gnu.org
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>>
next prev parent reply other threads:[~2008-09-17 12:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-17 1:11 (prepend-to-buffer "buffer-name" "string") Parker, Matthew
2008-09-17 3:03 ` Bernt Hansen
2008-09-17 3:06 ` Parker, Matthew
2008-09-17 4:17 ` Nick Dokos
2008-09-17 12:46 ` Bernt Hansen [this message]
2008-09-17 14:09 ` Parker, Matthew
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87iqsvvt1x.fsf@gollum.intra.norang.ca \
--to=bernt@norang.ca \
--cc=MParker@seic.com \
--cc=emacs-orgmode@gnu.org \
--cc=nicholas.dokos@hp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.