[Top][All Lists]

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

Re: Changes for emacs 28

From: Thibaut Verron
Subject: Re: Changes for emacs 28
Date: Mon, 14 Sep 2020 09:53:28 +0200

Le lun. 14 sept. 2020 à 09:37, Robert Pluim <rpluim@gmail.com> a écrit :
>>>>> On Fri, 11 Sep 2020 21:24:17 +0300, Eli Zaretskii <eliz@gnu.org> said:

    >> From: Thibaut Verron <thibaut.verron@gmail.com>
    >> Date: Fri, 11 Sep 2020 18:20:57 +0200
    >> Cc: rpluim@gmail.com, spacibba@aol.com, caiohcs0@gmail.com,
    >> emacs-devel@gnu.org, rekado@elephly.net, ghe@sdf.org, drew.adams@oracle.com
    >> > They call it "new document" rather than "new file" for this reason, I guess.
    >> And ask you where to save it when you exit.  That's what Emacs does
    >> with file-visiting buffers.
    >> Yes but if you don't want to save it, you can just click discard and never input a path. With the current setting
    >> you need to choose a path before you can write text.

    Eli> But with a buffer that doesn't visit a file, you don't get any prompt
    Eli> at all.

We could set 'kill-buffer-hook' to a querying function in buffers
created via the toolbar.

There is already a (buffer-local) variable buffer-offer-save which, set to 'always, causes save-some-buffers to query for save the corresponding buffer, if non-empty. 

And save-buffers-kill-emacs calls save-some-buffers with the second argument set to t, aka, "also save some non-file buffers".

It really looks as if this scenario is already planned, but just not for entry from the tool-bar.

reply via email to

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