help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: [External] : Make new buffer from menu


From: Jean Louis
Subject: Re: [External] : Make new buffer from menu
Date: Sun, 4 Dec 2022 17:20:21 +0300
User-agent: Mutt/2.2.9+50 (c79959e) (2022-11-21)

* Heime <heimeborgia@protonmail.com> [2022-12-04 10:21]:
> Anyway, when making new buffer, Emacs should just make a temporary
> one, then the user can save it if one wants.

You can do that:

Do this:

C-x b "ENTER NAME OF YOUR BUFFER" like anything "nfj"

then do this to save:

C-x C-w

The temporary buffer in Emacs Lisp sense, it has different
meaning and, I am not even sure if you could access it, 

(with-temp-buffer
  (current-buffer)) ➜ #<killed buffer>

Can I switch to it?

(with-temp-buffer
  (switch-to-buffer (current-buffer))) ➜ #<killed buffer>

Let me see?

(with-temp-buffer
  (insert "Hello")
  (switch-to-buffer (current-buffer))
  (sleep-for 10)) ➜ nil

And I did not see "Hello", so those are really temporary buffers.

Emacs is not one making decisions like human user, as human user
can also decide about "temporary file", but for a file system it
is just file, so for Emacs too, any buffer is just buffer.

Me as user I call some buffers temporary as that is designation I
keep to know that I do not really need to save them. THough I
did couple them with file names automatically, in case that I
wish to quickly save them.

-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



reply via email to

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