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 12:00:53 +0900 Message-ID: References: <69AD1F67-BA40-4342-996E-CAC6CC545E2A@traduction-libre.org> <83lfr0v4ib.fsf@gnu.org> <3B5C95CE-77A8-48DA-BD5D-6BD8D8828C30@traduction-libre.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="252822"; 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 04:01:18 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 1ikJOo-0013RT-BM for ged-emacs-devel@m.gmane.org; Thu, 26 Dec 2019 04:01:18 +0100 Original-Received: from localhost ([::1]:50684 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ikJOh-0006EQ-FJ for ged-emacs-devel@m.gmane.org; Wed, 25 Dec 2019 22:01:11 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40824) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ikJOb-0006EG-IS for emacs-devel@gnu.org; Wed, 25 Dec 2019 22:01:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ikJOZ-0007wA-Ro for emacs-devel@gnu.org; Wed, 25 Dec 2019 22:01:05 -0500 Original-Received: from relay11.mail.gandi.net ([217.70.178.231]:47435) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ikJOZ-0007uh-IT for emacs-devel@gnu.org; Wed, 25 Dec 2019 22:01:03 -0500 Original-Received: from [10.63.200.67] (unknown [61.199.159.175]) (Authenticated sender: jean.christophe.helary@traduction-libre.org) by relay11.mail.gandi.net (Postfix) with ESMTPSA id F1769100005 for ; Thu, 26 Dec 2019 03:00:58 +0000 (UTC) In-Reply-To: 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.178.231 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:243638 Archived-At: > On Dec 26, 2019, at 11:29, arthur miller = wrote: >=20 > I Think that you are missing one important thing: users are generally = not idiots. It is not about being idiots or not. But about how self-contained should = the documentation be. If you show me the place in the documentation where the default behavior = is described then I'll need to worry about why I did not find it. > Emacs does have its dark corners, but I don't think saving buffers Indeed, saving buffers is not an issue. It is killing buffers that is. Jean-Christophe > -------- Originalmeddelande -------- > Fr=C3=A5n: Jean-Christophe Helary = =20 > Datum: 2019-12-26 01:54 (GMT+01:00) > Till: emacs-devel =20 > =C3=84mne: Re: *scratch* buffer documentation >=20 >=20 >=20 > > 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. >=20 > 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. >=20 > So, I just checked the documentation (emacs manual) and here is what I = found: >=20 > 19 Using Multiple Buffers >=20 > =E2=86=92 nothing about that default behavior >=20 > 19.1 Creating and Selecting Buffers >=20 > =E2=86=92 nothing about that default behavior >=20 > 19.4 Killing Buffers >=20 > Buried at the bottom of the info about C-x k: >=20 > "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." >=20 > If that is how/where the default behavior is specified, maybe it ought = to be in a more preeminent location. >=20 > also, on the same page: >=20 > " 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." >=20 > which kind of suggests that modified buffers would not be killed and = thus contradict the above "default". >=20 > 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. >=20 > 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). >=20 > 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. >=20 > Or am I still missing something ? >=20 > JC >=20 >=20 > >>> 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 >=20 > Jean-Christophe Helary > ----------------------------------------------- > http://mac4translators.blogspot.com @brandelune Jean-Christophe Helary ----------------------------------------------- http://mac4translators.blogspot.com @brandelune