emacs-devel
[Top][All Lists]
Advanced

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

Re: Changes for emacs 28, Re: Changes for emacs 28


From: Robert Pluim
Subject: Re: Changes for emacs 28, Re: Changes for emacs 28
Date: Mon, 14 Sep 2020 18:01:36 +0200

>>>>> On Mon, 14 Sep 2020 16:53:07 +0200, Thibaut Verron 
>>>>> <thibaut.verron@gmail.com> said:

    Thibaut> The save button runs save-buffer, so it should DTRT already, no?
    >> 
    >> Sorry, yes. The 'new' button forces you to choose a filename for the
    >> buffer, so saving it works (that will teach me to talk about features
    >> I donʼt use)

    Thibaut> I think that you missed a message in the long thread.

No doubt. Itʼs a *very* long thread.

    Thibaut> To clarify, currently, the "new" button is "find-file", so it does
    Thibaut> expect a file name and a path.
    Thibaut> The suggestion is to maybe replace it with a function creating an
    Thibaut> anonymous buffer, leaving the choice of a path (if necessary) to 
the
    Thibaut> point of saving.

    Thibaut> In essence, something like

    >> (defun my/new-buffer ()
    >> (interactive)
    >> (let ((buffer (generate-new-buffer "*unnamed*")))
    >> (pop-to-buffer buffer)
    >> (setq buffer-offer-save 'always)))

Oh. Is that what non-emacs-experienced users really expect?

    Thibaut> Save-buffer should still work as expected, just as if you were 
calling
    Thibaut> it from a normal non-file buffer, and so should save-some-buffers 
and
    Thibaut> the like.

    Thibaut> But kill-buffer will not offer to save, as of now, as you pointed 
out.

Right, so if we find a good way to fix that itʼs fine, although Iʼm
not sure whether thereʼs any good reason for us to do it other than
'other programs do it' ; the current behaviour seems consistent
enough.

    >> 
    Thibaut> Restoring them as-is is what notepad++ does (or did when I last 
used it
    Thibaut> 10 years ago). I personally did not like this behavior, and I 
didn't have
    Thibaut> remotely as many open files in notepad++ as I do in a typical 
emacs session.
    >> 
    >> Itʼs a behaviour thatʼs become strongly expected, mainly because
    >> people have become conditioned to 'restart where I left off' behaviour
    >> from web browsers, I suspect.

    Thibaut> There are packages going in that direction, if you are interested, 
but
    Thibaut> it is really a complicated matter. Anonymous user-generated buffers
    Thibaut> are not the biggest problem there. Web-browsers can just reload the
    Thibaut> content of most of their "buffers", that's a luxury emacs does not
    Thibaut> have.

    >> The toolbar does not let you create such buffers (I thought it did,
    >> but it doesnʼt).

    Thibaut> That illustrates how confusing the current situation is, I 
believe. :)

Only to people who create buffers, and then later decide whether to
put stuff in a file. Thatʼs not your typical newcomer to emacs.

Robert



reply via email to

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