From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Thibaut Verron Newsgroups: gmane.emacs.devel Subject: Re: Changes for emacs 28, Re: Changes for emacs 28 Date: Mon, 14 Sep 2020 18:34:51 +0200 Message-ID: References: <20200910231420.kvqg6ohvxetpup5c.ref@Ergus> <20200910231420.kvqg6ohvxetpup5c@Ergus> <875z8lhz3p.fsf@gmail.com> <83tuw4hkad.fsf@gnu.org> <83tuw4flzy.fsf@gnu.org> <83h7s4fier.fsf@gnu.org> <83d02sfh58.fsf@gnu.org> <83a6xwf9ym.fsf@gnu.org> Reply-To: thibaut.verron@gmail.com Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6718"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Ergus , caiohcs0@gmail.com, emacs-devel , rekado@elephly.net, Stefan Monnier , Gregory Heytings , Eli Zaretskii , Drew Adams To: Robert Pluim Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Sep 14 18:36:47 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kHrTC-0001dp-S7 for ged-emacs-devel@m.gmane-mx.org; Mon, 14 Sep 2020 18:36:46 +0200 Original-Received: from localhost ([::1]:52122 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kHrTB-0006Zq-SK for ged-emacs-devel@m.gmane-mx.org; Mon, 14 Sep 2020 12:36:45 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34010) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kHrRa-0005BQ-6D for emacs-devel@gnu.org; Mon, 14 Sep 2020 12:35:06 -0400 Original-Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]:35855) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kHrRY-0007bh-5Y; Mon, 14 Sep 2020 12:35:05 -0400 Original-Received: by mail-wr1-x42f.google.com with SMTP id z1so369743wrt.3; Mon, 14 Sep 2020 09:35:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:reply-to:from:date:message-id :subject:to:cc:content-transfer-encoding; bh=9068XUG3e7IDKr9PBKWxVIGi/Lst/DCd0JRgku0nF1E=; b=FnkzWd++rJvdM5HCcFm+bowuIoayAYsf1O3wQ0mawOivJgDDLzp8LWrmMQ0lPIvjp2 1dwLnuIzjtDsEbT52GqEiRl3i/P20ViJpjTy80sOnPdhw+7S3oFT+hFOaEpvoltM30ET DB0PbKLG8O+qXVK8aT3EDgMMVOYHZvKnreTVQNdYVpRRZzUH7UQ5/eH+gESrv8/eMNPV K/NbrrM87blZ7rujs5/NofFkFjShiVhelrEtim8citi/zFh9+yFmqQhYV8PBMix+cs3j b9iggzfrI5LWma+a1/5LnPw4SfO2xz3Rmz2UIzZYgEzkBQUy7qjJ/4OzuRf7HG1hs6Hw L8HA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc:content-transfer-encoding; bh=9068XUG3e7IDKr9PBKWxVIGi/Lst/DCd0JRgku0nF1E=; b=H2MQF0tAqoGFXvClngfBvZ/k/9gYbHQ2utwgqLvRt/4uC43V7xog8aNqg0qqLjEqCW YjjVHzFvYQSpPnFNsAMjk8MiTPLFSPIkSko9TaLMveArBm5PvSTayz0Z4jfoHDVXHEfl QnOMT9dZszy35TsPxl/O4eKQOrO2IML865ptFL0CuA9lG31U/ryGAYjzjj1ZDouFXgUj yGCSttjIUUnkDd3qmFzdNy2J+5ITrJb9vVO2eqG7ib6p5T5dcYggVF3IUi8Zh/lycnCC gLySXNtLeR12CW9Bu8OIslyUrZgz9Emw0+Cj1pr09Jv3Dxe/sudy2ukSrHtDif/G5wly ZLNg== X-Gm-Message-State: AOAM53103DPUYVbXJsguhWs4vmJgxOZoQB3nqSgsdlTe9eZygdx0Llvv /BBTpD8/k9sxYlSIE2OGVCai86hkywX2pvkFQqU= X-Google-Smtp-Source: ABdhPJzqbRPnrrMgkC+i5RkB79/Qn6G90R8s7vVRPTzs3fNPGcqDc0vtx/Ip1TOUfzQcj3pqC1Q9juMmj6YYQ7PNIZE= X-Received: by 2002:a5d:570b:: with SMTP id a11mr17203966wrv.139.1600101302376; Mon, 14 Sep 2020 09:35:02 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=thibaut.verron@gmail.com; helo=mail-wr1-x42f.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:255663 Archived-At: Le lun. 14 sept. 2020 =C3=A0 18:01, Robert Pluim a =C3= =A9crit : > > >>>>> On Mon, 14 Sep 2020 16:53:07 +0200, Thibaut Verron 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 t= he > >> buffer, so saving it works (that will teach me to talk about featu= res > >> I don=CA=BCt use) > > Thibaut> I think that you missed a message in the long thread. > > No doubt. It=CA=BCs a *very* long thread. > > Thibaut> To clarify, currently, the "new" button is "find-file", so i= t does > Thibaut> expect a file name and a path. > Thibaut> The suggestion is to maybe replace it with a function creati= ng 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 we= re calling > Thibaut> it from a normal non-file buffer, and so should save-some-bu= ffers and > Thibaut> the like. > > Thibaut> But kill-buffer will not offer to save, as of now, as you po= inted out. > > Right, so if we find a good way to fix that it=CA=BCs fine, although I=CA= =BCm > not sure whether there=CA=BCs 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.