From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.bugs Subject: bug#38993: 26.3; EBDB saves the database on Emacs exit even when told not to Date: Mon, 06 Jan 2020 13:33:55 -0800 Message-ID: <87y2ukw9q4.fsf@ericabrahamsen.net> References: <87tv58mo8d.fsf@disroot.org> <87y2ukxt0r.fsf@ericabrahamsen.net> <87v9pofg9b.fsf@disroot.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="201782"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 38993@debbugs.gnu.org To: Jorge P. de Morais Neto Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jan 06 22:35:12 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1ioa1n-000qLa-No for geb-bug-gnu-emacs@m.gmane.org; Mon, 06 Jan 2020 22:35:11 +0100 Original-Received: from localhost ([::1]:37122 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ioa1l-0002Hk-KL for geb-bug-gnu-emacs@m.gmane.org; Mon, 06 Jan 2020 16:35:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55392) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ioa1f-0002Dn-Ei for bug-gnu-emacs@gnu.org; Mon, 06 Jan 2020 16:35:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ioa1e-0004Rh-9B for bug-gnu-emacs@gnu.org; Mon, 06 Jan 2020 16:35:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40938) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ioa1e-0004R3-5H for bug-gnu-emacs@gnu.org; Mon, 06 Jan 2020 16:35:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ioa1e-0002Vm-0k for bug-gnu-emacs@gnu.org; Mon, 06 Jan 2020 16:35:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eric Abrahamsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 06 Jan 2020 21:35:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38993 X-GNU-PR-Package: emacs Original-Received: via spool by 38993-submit@debbugs.gnu.org id=B38993.15783464459583 (code B ref 38993); Mon, 06 Jan 2020 21:35:01 +0000 Original-Received: (at 38993) by debbugs.gnu.org; 6 Jan 2020 21:34:05 +0000 Original-Received: from localhost ([127.0.0.1]:46911 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ioa0j-0002UV-H3 for submit@debbugs.gnu.org; Mon, 06 Jan 2020 16:34:05 -0500 Original-Received: from ericabrahamsen.net ([52.70.2.18]:50742 helo=mail.ericabrahamsen.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ioa0h-0002U0-5Q for 38993@debbugs.gnu.org; Mon, 06 Jan 2020 16:34:03 -0500 Original-Received: from localhost (c-73-254-86-141.hsd1.wa.comcast.net [73.254.86.141]) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id 8346DFA080; Mon, 6 Jan 2020 21:33:56 +0000 (UTC) In-Reply-To: <87v9pofg9b.fsf@disroot.org> (Jorge P. de Morais Neto's message of "Mon, 06 Jan 2020 18:04:48 -0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:174271 Archived-At: Jorge P. de Morais Neto writes: > Em [2020-01-06 seg 11:51:48-0800], Eric Abrahamsen escreveu: > >> Probably you've also got `ebdb-save-on-exit' set to t -- that adds a >> save hook to `kill-emacs-hook'. > > Yes, it was t (the default). I actually had read about it on the EBDB > manual, but, since Emacs was asking whether to save, I interpreted that > variable as whether Emacs would ask at all. That is, I thought that if > the variable was t then Emacs would ask whether to save, and if it was > nil then Emacs would exit without saving and without any question. I suppose I could have it do that (prompt for saving) rather than saving silently. I guess I just assumed that in most cases users would want the database saved, rather than discarding changes. I don't have very strong feelings about it, though. >> What you're seeing is the `buffer-offer-save' mechanism, which kicks >> in both when you run `save-some-buffers' and before you kill Emacs. >> So there's sort of two potential save mechanisms when you exit Emacs. >> If that's annoying I could also provide an option for not offering to >> save the database. [...] > Isn't it peculiar to EBDB that Emacs offers to save the > computer-generated contents of the *EBDB* buffer on exit? IIRC, when I > exit Emacs it does not offer to save my Org Agenda (only the actual Org > files from which it generated the agenda), nor Dired buffers, nor any > other computer-generated buffer. This is an error, either in Emacs or EBDB, I'm not sure. I originally implemented the ability for special-mode buffers to offer themselves as saveable, but the idea was that, if they saved themselves using their own function, Emacs wouldn't then *also* save the buffer itself in a file. Either my code in Emacs or my code in EBDB has a bug, I haven't gone and figured out which. I'll try to do that soon. Eric