From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Jean-Christophe Helary Newsgroups: gmane.emacs.devel Subject: Re: *scratch* buffer documentation Date: Thu, 26 Dec 2019 09:54:02 +0900 Message-ID: <3B5C95CE-77A8-48DA-BD5D-6BD8D8828C30@traduction-libre.org> References: <69AD1F67-BA40-4342-996E-CAC6CC545E2A@traduction-libre.org> <83lfr0v4ib.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.40.2.2.4\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="26741"; mail-complaints-to="usenet@blaine.gmane.org" To: emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Dec 26 01:54:23 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1ikHPx-0006rC-Mj for ged-emacs-devel@m.gmane.org; Thu, 26 Dec 2019 01:54:21 +0100 Original-Received: from localhost ([::1]:50140 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ikHPv-0000cQ-UT for ged-emacs-devel@m.gmane.org; Wed, 25 Dec 2019 19:54:19 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40998) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ikHPp-0000c1-Op for emacs-devel@gnu.org; Wed, 25 Dec 2019 19:54:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ikHPo-0007mc-3C for emacs-devel@gnu.org; Wed, 25 Dec 2019 19:54:13 -0500 Original-Received: from relay6-d.mail.gandi.net ([217.70.183.198]:48441) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ikHPn-0007m1-QK for emacs-devel@gnu.org; Wed, 25 Dec 2019 19:54:12 -0500 X-Originating-IP: 182.251.133.105 Original-Received: from [172.20.10.3] (KD182251133105.au-net.ne.jp [182.251.133.105]) (Authenticated sender: jean.christophe.helary@traduction-libre.org) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id B2038C0004 for ; Thu, 26 Dec 2019 00:54:08 +0000 (UTC) In-Reply-To: <83lfr0v4ib.fsf@gnu.org> X-Mailer: Apple Mail (2.3608.40.2.2.4) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 217.70.183.198 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:243636 Archived-At: > On Dec 25, 2019, at 23:55, Eli Zaretskii wrote: >=20 >> From: Jean-Christophe Helary = >> Date: Wed, 25 Dec 2019 08:58:45 +0900 >>=20 >> I am not seeing anything in the Emacs manual that says a modified = *scratch* buffer does not trigger a "buffer modified. Kill anyway ?" = message when quitting. >=20 > This is a standard Emacs behavior with any buffer that doesn't visit a > file, so I'm not sure why you expected to see anything special in this > case. Interesting. I've used emacs on and off for more than 20 years, and much = more in the last few years, and I was never aware of that. I always = thought it was a property of the *scratch* buffer. I guess it's because = I was mostly using buffer from files or saving new buffers to files. So, I just checked the documentation (emacs manual) and here is what I = found: 19 Using Multiple Buffers =E2=86=92 nothing about that default behavior 19.1 Creating and Selecting Buffers =E2=86=92 nothing about that default behavior 19.4 Killing Buffers Buried at the bottom of the info about C-x k: "If you ask to kill a file-visiting buffer that is modified, then you = must confirm with =E2=80=98yes=E2=80=99 before the buffer is killed." If that is how/where the default behavior is specified, maybe it ought = to be in a more preeminent location. also, on the same page: " The command =E2=80=98M-x clean-buffer-list=E2=80=99 is a convenient = way to purge them; it kills all the unmodified buffers that you have not = used for a long time." which kind of suggests that modified buffers would not be killed and = thus contradict the above "default". And that's it, as far as I can tell. No other part of the Buffer chapter = give relevant information about what would happen to modified/unmodified = buffers that are killed. Maybe the information is located some place = else, but then we need to worry about how that information about buffers = would be discovered there. It seems to me that a default behavior should be very clearly defined = very early in the manual. Buffers are a huge part of Emacs (and a huge = difference with other text editors, that basically expect a user facing = "buffer" to be saved after modification) and user have a strong = expectation that user modified data is safe and warning will be issued = when that data is at risks (in most reasonable cases). So, would it be possible to have a strong clarification about the = default behavior and ephemeral quality of the buffers in the opening = paragraphs of "19 Using Multiple Buffers" ? That would be tremendously = helpful. Or am I still missing something ? JC >>> Isn't that manifestly implicit on the first line of *scratch* ? : >>>=20 >>> ;; This buffer is for text that is not saved >>=20 >> No, because it is possible to save the buffer to a file. Also, the = value of this text can be changed, so there is no guarantee that the = user sees it. >=20 > Let's clarify the "is not saved" part of the text that is in the > buffer, it's much more efficient than any documentation anywhere. >=20 > If that text is changed, whoever changes it is expected to know what > he or she is doing, so let's not argue about that use case. >=20 > Thanks. >=20 Jean-Christophe Helary ----------------------------------------------- http://mac4translators.blogspot.com @brandelune