GNU bug report logs - #38993
26.3; EBDB saves the database on Emacs exit even when told not to

Previous Next

Package: emacs;

Reported by: jorge+list <at> disroot.org (Jorge P. de Morais Neto)

Date: Mon, 6 Jan 2020 18:32:01 UTC

Severity: minor

Found in version 26.3

Done: Eric Abrahamsen <eric <at> ericabrahamsen.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eric Abrahamsen <eric <at> ericabrahamsen.net>
To: Jorge P. de Morais Neto <jorge+list <at> disroot.org>
Cc: 38993 <at> debbugs.gnu.org
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
Jorge P. de Morais Neto <jorge+list <at> disroot.org> 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




This bug report was last modified 5 years and 175 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.