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: Thibaut Verron
Subject: Re: Changes for emacs 28, Re: Changes for emacs 28
Date: Mon, 14 Sep 2020 18:34:51 +0200

Le lun. 14 sept. 2020 à 18:01, Robert Pluim <rpluim@gmail.com> a écrit :
>
> >>>>> 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?

As you said below, other programs do it. That's not, per se, a reason
to do it too, but that's a reason for users to expect it to work in a
certain way.
And it is what you and me and others, all experienced Emacs users with
very little experience of the tool bar, expected when we saw the
button.
So it seems reasonable to me that it is what people, in general, expect.

For a specific use case, I regularly see people fire up Word or
Libreoffice to draft an e-mail. They might choose a file name early in
the process, but usually, choosing a path comes much later, at the
time of saving, and at that point they can just decide to discard the
changes.


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

The main reason is not that "other programs do it", it's that Emacs
does it, and that Emacs users do it regularly. If there is a workflow
that is common in the Emacs paradigm (C-x b "asdf") *and* other
programs already do it (and make it their entry point, in a lot of
cases*), I believe that it is a very good reason to give it a VIP
place on the tool bar.

It looks like the only difficulty is to also properly expose all the
necessary buffer-related features: auto-saving, maybe also renaming,
etc. There seems to be multiple possibilities, but for example
Stefan's suggestion to just use actual files could work, with a little
bit of UI and auto-cleaning.

*. To be clear, I do not think that Emacs should offer a blank,
auto-saved file document on start, as other programs do.



reply via email to

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