unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Thibaut Verron <thibaut.verron@gmail.com>
To: Robert Pluim <rpluim@gmail.com>
Cc: Ergus <spacibba@aol.com>,
	caiohcs0@gmail.com, emacs-devel <emacs-devel@gnu.org>,
	rekado@elephly.net, Stefan Monnier <monnier@iro.umontreal.ca>,
	Gregory Heytings <ghe@sdf.org>, Eli Zaretskii <eliz@gnu.org>,
	Drew Adams <drew.adams@oracle.com>
Subject: Re: Changes for emacs 28, Re: Changes for emacs 28
Date: Mon, 14 Sep 2020 18:34:51 +0200	[thread overview]
Message-ID: <CAFsi02TuNSvOKpoNNsWxMWUPjc8ZNv=S23htCNcgZSjEKh3p-g@mail.gmail.com> (raw)
In-Reply-To: <m2mu1sl53z.fsf@gmail.com>

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	other threads:[~2020-09-14 16:34 UTC|newest]

Thread overview: 97+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20200910231420.kvqg6ohvxetpup5c.ref@Ergus>
2020-09-10 23:14 ` Changes for emacs 28 Ergus
2020-09-11  1:38   ` Caio Henrique
2020-09-11  6:58     ` Eli Zaretskii
2020-09-11 13:57       ` Robert Pluim
2020-09-11 14:04         ` Eli Zaretskii
2020-09-11 14:24           ` Robert Pluim
2020-09-11 14:40             ` Eli Zaretskii
2020-09-11 16:12               ` Caio Henrique
2020-09-11 16:30                 ` Robert Pluim
2020-09-12 18:29                   ` Caio Henrique
2020-09-12 20:03                     ` Ergus
2020-09-12 20:08                       ` Caio Henrique
2020-09-11 15:16           ` Thibaut Verron
2020-09-11 15:21             ` Eli Zaretskii
2020-09-11 15:36               ` Thibaut Verron
2020-09-11 15:49                 ` Eli Zaretskii
2020-09-11 16:20                   ` Thibaut Verron
2020-09-11 18:24                     ` Eli Zaretskii
2020-09-14  7:37                       ` Robert Pluim
2020-09-14  7:53                         ` Thibaut Verron
2020-09-14 11:54                           ` Robert Pluim
2020-09-14 12:15                             ` Thibaut Verron
2020-09-14 14:35                               ` Changes for emacs 28, " Robert Pluim
2020-09-14 14:53                                 ` Thibaut Verron
2020-09-14 16:01                                   ` Robert Pluim
2020-09-14 16:34                                     ` Thibaut Verron [this message]
2020-09-14 17:13                                   ` tomas
2020-09-14 13:18                         ` Stefan Monnier
2020-09-14 15:12                           ` Andreas Schwab
2020-09-11  6:39   ` Eli Zaretskii
2020-09-11 10:10     ` Dmitry Gutov
2020-09-11 10:33       ` Eli Zaretskii
2020-09-11 10:36         ` Dmitry Gutov
2020-09-11 10:41           ` Eli Zaretskii
2020-09-11 11:09             ` Dmitry Gutov
2020-09-11 11:19               ` Ergus
2020-09-11 12:32                 ` Dmitry Gutov
2020-09-11 12:04               ` Eli Zaretskii
2020-09-11 12:19                 ` Ergus
2020-09-11 12:35                   ` Eli Zaretskii
2020-09-11 12:57                     ` Ergus
2020-09-11 13:04                       ` Eli Zaretskii
2020-09-11 13:13                         ` Eli Zaretskii
2020-09-12 12:15                           ` Arthur Miller
2020-09-11 21:00                         ` Dmitry Gutov
2020-09-11 21:17                           ` Ergus
2020-09-11 22:29                             ` Dmitry Gutov
2020-09-12  2:01                               ` Ergus
2020-09-12 12:59                                 ` Dmitry Gutov
2020-09-13  3:57                                 ` Richard Stallman
2020-09-13  9:49                                   ` Yuri Khan
2020-09-13 14:30                                     ` Eli Zaretskii
2020-09-13 17:36                                       ` Dmitry Gutov
2020-09-13 17:43                                         ` Eli Zaretskii
2020-09-13 10:24                                   ` Dmitry Gutov
2020-09-14  3:51                                     ` Richard Stallman
2020-09-14 17:43                                       ` Dmitry Gutov
2020-09-14 18:01                                         ` Stefan Monnier
2020-09-15  4:43                                         ` Richard Stallman
2020-09-15 11:16                                           ` Dmitry Gutov
2020-09-16  5:05                                             ` Richard Stallman
2020-09-13 11:59                                   ` Arthur Miller
2020-09-13 12:37                                     ` Stefan Kangas
2020-09-13 14:02                                   ` T.V Raman
2020-09-11 23:02                             ` Drew Adams
2020-09-12  6:12                           ` Eli Zaretskii
2020-09-12 11:51                             ` Dmitry Gutov
2020-09-12  3:21                   ` Richard Stallman
2020-09-12 11:36                     ` Dmitry Gutov
2020-09-12 12:42                       ` Ergus
2020-09-12 16:37                         ` Dmitry Gutov
2020-09-12 16:46                           ` Ergus
2020-09-12 16:56                             ` Dmitry Gutov
2020-09-11 12:21                 ` Dmitry Gutov
2020-09-12  3:21             ` Richard Stallman
2020-09-11 10:59       ` Ergus
2020-09-11 11:17         ` Dmitry Gutov
2020-09-13  8:36           ` Juri Linkov
2020-09-11 10:15     ` Ergus
2020-09-11 10:35       ` Eli Zaretskii
2020-09-11 14:02         ` Caio Henrique
2020-09-11 14:16           ` Eli Zaretskii
2020-09-11 14:47           ` Ergus
2020-09-11 21:29             ` Caio Henrique
2020-09-12  3:22               ` Ergus
2020-09-12  6:30                 ` Eli Zaretskii
2020-09-12  8:27                   ` Ergus
2020-09-12  8:38                     ` Eli Zaretskii
2020-09-12  9:38                       ` Ergus
2020-09-12  9:57                         ` Eli Zaretskii
2020-09-12  3:20   ` Richard Stallman
2020-09-12  3:28     ` Ergus
2020-09-13  4:07       ` Richard Stallman
2020-09-13 10:47         ` Dmitry Gutov
2020-09-14  3:51           ` Richard Stallman
2020-09-12 14:28   ` Achilles Yuce
2020-09-12 14:38     ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAFsi02TuNSvOKpoNNsWxMWUPjc8ZNv=S23htCNcgZSjEKh3p-g@mail.gmail.com' \
    --to=thibaut.verron@gmail.com \
    --cc=caiohcs0@gmail.com \
    --cc=drew.adams@oracle.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=ghe@sdf.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=rekado@elephly.net \
    --cc=rpluim@gmail.com \
    --cc=spacibba@aol.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).