unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Jorge P. de Morais Neto <jorge+list@disroot.org>
To: Eric Abrahamsen <eric@ericabrahamsen.net>
Cc: 38993@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 18:04:48 -0300	[thread overview]
Message-ID: <87v9pofg9b.fsf@disroot.org> (raw)
In-Reply-To: <87y2ukxt0r.fsf@ericabrahamsen.net>

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.

> 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.

The current behavior is a bit counter-intuitive.  Not only for the
reason I provided above, but because, when I answer the question
positively (that I do want to save the buffer), Emacs asks for a file to
save the *EBDB* buffer.  It then saves _that_ buffer (with its human
readable contents) to the just-specified file, and also appears to save
the actual database to its file, even though for my test I had
previously set `ebdb-save-on-exit' to nil.  Apparently, answering
positively the buffer-offer-save question causes two saves.
Counter-intuitive.  And what if the user is confused -- thinking that
Emacs was asking whether to save the _actual database_ -- and then
provides the path of the database file?  Would not EBDB then save the
*EBDB* buffer there, overwriting the actual database, causing data loss?

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.

Regards
-- 
- <https://jorgemorais.gitlab.io/justice-for-rms/>
- I am Brazilian.  I hope my English is correct and I welcome feedback.
- Please adopt free formats like PDF, ODF, Org, LaTeX, Opus, WebM and 7z.
- Free/libre software for Replicant, LineageOS and Android: https://f-droid.org
- [[https://www.gnu.org/philosophy/free-sw.html][What is free software?]]





  reply	other threads:[~2020-01-06 21:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-06 18:30 bug#38993: 26.3; EBDB saves the database on Emacs exit even when told not to Jorge P. de Morais Neto
2020-01-06 19:51 ` Eric Abrahamsen
2020-01-06 21:04   ` Jorge P. de Morais Neto [this message]
2020-01-06 21:33     ` Eric Abrahamsen
2020-01-07 11:53       ` Jorge P. de Morais Neto
2020-01-07 18:42         ` Eric Abrahamsen
2020-01-08 13:28           ` Jorge P. de Morais Neto
2020-01-08 18:54             ` Eric Abrahamsen
2020-01-11 21:15               ` Jorge P. de Morais Neto
2020-01-12 17:38                 ` Eric Abrahamsen
2020-01-14 14:12                   ` Jorge P. de Morais Neto
2020-01-14 22:53                     ` Eric Abrahamsen
2020-01-18 19:38                       ` Eric Abrahamsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87v9pofg9b.fsf@disroot.org \
    --to=jorge+list@disroot.org \
    --cc=38993@debbugs.gnu.org \
    --cc=eric@ericabrahamsen.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).