emacs-orgmode
[Top][All Lists]
Advanced

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

RE: [Orgmode] RE: (prepend-to-buffer "buffer-name" "string")


From: Parker, Matthew
Subject: RE: [Orgmode] RE: (prepend-to-buffer "buffer-name" "string")
Date: Wed, 17 Sep 2008 10:09:25 -0400

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

-----Original Message-----
From: Bernt Hansen [mailto:address@hidden 
Sent: Wednesday, September 17, 2008 8:47 AM
To: address@hidden
Cc: Parker, Matthew; address@hidden
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 <address@hidden> writes:

> Parker, Matthew <address@hidden> 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:address@hidden
>> Sent: Tuesday, September 16, 2008 11:03 PM
>> To: Parker, Matthew
>> Cc: address@hidden
>> Subject: Re: (prepend-to-buffer "buffer-name" "string")
>> 
>> See the builtin function 'insert'
>> 
>> (insert "string to insert")
>> 
>> -Bernt
>> 
>> 
>> "Parker, Matthew" <address@hidden> 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.
>> > address@hidden
>> > http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>> 
>> 
>> _______________________________________________
>> Emacs-orgmode mailing list
>> Remember: use `Reply All' to send replies to the list.
>> address@hidden
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>> 




reply via email to

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