emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* (prepend-to-buffer "buffer-name" "string")
@ 2008-09-17  1:11 Parker, Matthew
  2008-09-17  3:03 ` Bernt Hansen
  0 siblings, 1 reply; 6+ messages in thread
From: Parker, Matthew @ 2008-09-17  1:11 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 296 bytes --]

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


[-- Attachment #1.2: Type: text/html, Size: 2033 bytes --]

[-- Attachment #2: Type: text/plain, Size: 204 bytes --]

_______________________________________________
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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: (prepend-to-buffer "buffer-name" "string")
  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
  0 siblings, 1 reply; 6+ messages in thread
From: Bernt Hansen @ 2008-09-17  3:03 UTC (permalink / raw)
  To: Parker, Matthew; +Cc: emacs-orgmode

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: (prepend-to-buffer "buffer-name" "string")
  2008-09-17  3:03 ` Bernt Hansen
@ 2008-09-17  3:06   ` Parker, Matthew
  2008-09-17  4:17     ` Nick Dokos
  0 siblings, 1 reply; 6+ messages in thread
From: Parker, Matthew @ 2008-09-17  3:06 UTC (permalink / raw)
  To: Bernt Hansen; +Cc: emacs-orgmode

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.


-----Original Message-----
From: Bernt Hansen [mailto:bernt@norang.ca] 
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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: RE: (prepend-to-buffer "buffer-name" "string")
  2008-09-17  3:06   ` Parker, Matthew
@ 2008-09-17  4:17     ` Nick Dokos
  2008-09-17 12:46       ` Bernt Hansen
  0 siblings, 1 reply; 6+ messages in thread
From: Nick Dokos @ 2008-09-17  4:17 UTC (permalink / raw)
  To: Parker, Matthew; +Cc: Bernt Hansen, emacs-orgmode

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
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: RE: (prepend-to-buffer "buffer-name" "string")
  2008-09-17  4:17     ` Nick Dokos
@ 2008-09-17 12:46       ` Bernt Hansen
  2008-09-17 14:09         ` Parker, Matthew
  0 siblings, 1 reply; 6+ messages in thread
From: Bernt Hansen @ 2008-09-17 12:46 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: emacs-orgmode, Parker, Matthew

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: RE: (prepend-to-buffer "buffer-name" "string")
  2008-09-17 12:46       ` Bernt Hansen
@ 2008-09-17 14:09         ` Parker, Matthew
  0 siblings, 0 replies; 6+ messages in thread
From: Parker, Matthew @ 2008-09-17 14:09 UTC (permalink / raw)
  To: Bernt Hansen, nicholas.dokos; +Cc: emacs-orgmode

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-09-17 14:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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

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