emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Parker, Matthew" <MParker@seic.com>
To: Bernt Hansen <bernt@norang.ca>, nicholas.dokos@hp.com
Cc: emacs-orgmode@gnu.org
Subject: RE: RE: (prepend-to-buffer "buffer-name" "string")
Date: Wed, 17 Sep 2008 10:09:25 -0400	[thread overview]
Message-ID: <9E067A1AECCB154485D4CF7E4BEF4D8E09C52EDF@post07.corp.seic.com> (raw)
In-Reply-To: <87iqsvvt1x.fsf@gollum.intra.norang.ca>

Sorry, I reviewed that in 'intro to lisp' but promptly forgot about it.
Thanks.

-----Original Message-----
From: Bernt Hansen [mailto:bernt@norang.ca] 
Sent: Wednesday, September 17, 2008 8:47 AM
To: nicholas.dokos@hp.com
Cc: Parker, Matthew; emacs-orgmode@gnu.org
Subject: Re: [Orgmode] RE: (prepend-to-buffer "buffer-name" "string")

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
>> 

      reply	other threads:[~2008-09-17 14:09 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
2008-09-17 14:09         ` Parker, Matthew [this message]

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

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9E067A1AECCB154485D4CF7E4BEF4D8E09C52EDF@post07.corp.seic.com \
    --to=mparker@seic.com \
    --cc=bernt@norang.ca \
    --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 public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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).