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 Date: Mon, 14 Sep 2020 09:53:28 +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: multipart/alternative; boundary="0000000000002551a205af41550e" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6780"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Ergus , caiohcs0@gmail.com, emacs-devel , rekado@elephly.net, ghe@sdf.org, 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 09:54:16 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 1kHjJX-0001dg-TI for ged-emacs-devel@m.gmane-mx.org; Mon, 14 Sep 2020 09:54:16 +0200 Original-Received: from localhost ([::1]:53726 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kHjJW-0004AR-Uv for ged-emacs-devel@m.gmane-mx.org; Mon, 14 Sep 2020 03:54:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57286) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kHjJ1-0003kE-Tt for emacs-devel@gnu.org; Mon, 14 Sep 2020 03:53:43 -0400 Original-Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]:36567) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kHjJ0-0006V1-6t; Mon, 14 Sep 2020 03:53:43 -0400 Original-Received: by mail-wr1-x432.google.com with SMTP id z1so17563971wrt.3; Mon, 14 Sep 2020 00:53:41 -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; bh=MzUexsfe7A/7lBBM8JM6hWMAn+vkiLtxCDlUzlXu5VU=; b=N1n3GALqyz1i87/cz4USsVXoY7+lSpcABIIMCMBNX9vD27DybyD8PSIfweDjtK8lL5 qDXKc7dRLyrNJ/OWyTZEhTsR39Dp/T/9Ac6p0ZdIT+dCj4nPv9BR60uCdUExCXsGv+dZ 62R7YHYzNEFh8kJG3MVtrdsjgkPmFLlSWHuMvxTQX01UmCHprd+JsK4Qwc713Rg+KY1z gFEpzREJ6QOc/7R/Vy32UOJ49a8TSbVwuMkUdKbhZgVZh1LbPUNl97YQvQ9M2oDWJIdT qghD1oK02bI+kyjrBM7vFVgTWaZo8FZjPYUsvtLazOVuyCorLpsY0npbCdFuUIFeGA14 m4DQ== 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; bh=MzUexsfe7A/7lBBM8JM6hWMAn+vkiLtxCDlUzlXu5VU=; b=oH0V/DJ7vFHkZCAnXjQKcNkw68lVVJX/VFk0/7qV7nzPOo7Jd3jtGtpdZKzPQRpYzJ FswcmFybmCDANLsDnQMTwgDXXrI5N0W1fUwAurDmCHe34PUzv+07gzemZbhIbKZt5P7u eyuZSUM9QKeMBEmrcQzzueHK0SmQ41uDBsKPsLws+RYRdnVsBRdR32KuUVMHHqpq9NpG 53vBZA1V3mov7raA/1V9MajQcn7ObVWDSl3oBNUHLAGKUiNIw4YweX4TNr+cip22iHqB yZlhvf4Sj+OAaGsXyPptjvxVJJTnauPeBrGViyGaEzIWrzsCF7iI0vmjuovKQIqMc+IW vJ1w== X-Gm-Message-State: AOAM531340v3xFQCh0uA/HwumWeVYFYbPBJqk++48rCCAKuPkmgXHYxs g/4sRCI/IxXDaVifFc7QPA4Lf7xTkvko4emyiCc= X-Google-Smtp-Source: ABdhPJzxJ7BJNo0Y9XyK7GhUQe4pudnrKzkQBQDMFEQVMsThG68jEUVWQfu9THVK0Cuvzei3sGVJ9Nzk1QowjqABkHQ= X-Received: by 2002:a5d:4581:: with SMTP id p1mr14929373wrq.345.1600070019796; Mon, 14 Sep 2020 00:53:39 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=thibaut.verron@gmail.com; helo=mail-wr1-x432.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, HTML_MESSAGE=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:255613 Archived-At: --0000000000002551a205af41550e Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Le lun. 14 sept. 2020 =C3=A0 09:37, Robert Pluim a =C3= =A9crit : > >>>>> On Fri, 11 Sep 2020 21:24:17 +0300, Eli Zaretskii > said: > > >> From: Thibaut Verron > >> 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 doe= s > >> 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. --0000000000002551a205af41550e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Le=C2=A0lun. 14 sept. 2020 =C3=A0=C2=A009= :37, Robert Pluim <rpluim@gmail.com<= /a>> a =C3=A9crit=C2=A0:
>>>>> On Fri, 11 Sep = 2020 21:24:17 +0300, Eli Zaretskii <eliz@gnu.org> said:

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

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

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

There is alrea= dy a (buffer-local) variable buffer-offer-save which, set to 'always, c= auses save-some-buffers to query for save the corresponding buffer, if non-= empty.=C2=A0

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

It really looks as if thi= s scenario is already planned, but just not for entry from the tool-bar.
--0000000000002551a205af41550e--