all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* The real difference between get-buffer-create and with-output-to-temp-buffer
@ 2024-09-04 22:11 alexbuhl via Users list for the GNU Emacs text editor
  2024-09-05  4:37 ` tomas
  0 siblings, 1 reply; 3+ messages in thread
From: alexbuhl via Users list for the GNU Emacs text editor @ 2024-09-04 22:11 UTC (permalink / raw)
  To: help-gnu-emacs@gnu.org

Is there a real difference between doing

(get-buffer-create "Questor")

and

(with-output-to-temp-buffer "Questor"

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

* Re: The real difference between get-buffer-create and with-output-to-temp-buffer
  2024-09-04 22:11 The real difference between get-buffer-create and with-output-to-temp-buffer alexbuhl via Users list for the GNU Emacs text editor
@ 2024-09-05  4:37 ` tomas
  2024-09-05 11:27   ` Heime
  0 siblings, 1 reply; 3+ messages in thread
From: tomas @ 2024-09-05  4:37 UTC (permalink / raw)
  To: alexbuhl; +Cc: help-gnu-emacs@gnu.org

[-- Attachment #1: Type: text/plain, Size: 572 bytes --]

On Wed, Sep 04, 2024 at 10:11:11PM +0000, alexbuhl via Users list for the GNU Emacs text editor wrote:
> Is there a real difference between doing
> 
> (get-buffer-create "Questor")
> 
> and
> 
> (with-output-to-temp-buffer "Questor"

With-output-to-temp-buffer calls get-buffer-create and redirects standard
output to it.

If you want to do /other/ things with your new buffer, you'll need the
first function.

Try looking up its docstring (C-h f with-output-to-temp-buffer), perhaps
follow the link to its source. It's short and sweet.

Cheers
-- 
t

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

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

* Re: The real difference between get-buffer-create and with-output-to-temp-buffer
  2024-09-05  4:37 ` tomas
@ 2024-09-05 11:27   ` Heime
  0 siblings, 0 replies; 3+ messages in thread
From: Heime @ 2024-09-05 11:27 UTC (permalink / raw)
  To: tomas; +Cc: alexbuhl, help-gnu-emacs@gnu.org

On Thursday, September 5th, 2024 at 4:37 PM, tomas@tuxteam.de <tomas@tuxteam.de> wrote:

> On Wed, Sep 04, 2024 at 10:11:11PM +0000, alexbuhl via Users list for the GNU Emacs text editor wrote:
> 
> > Is there a real difference between doing
> > 
> > (get-buffer-create "Questor")
> > 
> > and
> > 
> > (with-output-to-temp-buffer "Questor"
> 
> 
> With-output-to-temp-buffer calls get-buffer-create and redirects standard
> output to it.
> 
> If you want to do /other/ things with your new buffer, you'll need the
> first function.

Including text properties seems to make with-output-to-temp-buffer fail.
Are text properties part of those other things where I would need 
get-buffer-create ?
 
> Try looking up its docstring (C-h f with-output-to-temp-buffer), perhaps
> follow the link to its source. It's short and sweet.
> 
> Cheers
> --
> t



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

end of thread, other threads:[~2024-09-05 11:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-04 22:11 The real difference between get-buffer-create and with-output-to-temp-buffer alexbuhl via Users list for the GNU Emacs text editor
2024-09-05  4:37 ` tomas
2024-09-05 11:27   ` Heime

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.