From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Jorge P. de Morais Neto 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 18:04:48 -0300 Message-ID: <87v9pofg9b.fsf@disroot.org> References: <87tv58mo8d.fsf@disroot.org> <87y2ukxt0r.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="75311"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 38993@debbugs.gnu.org To: Eric Abrahamsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jan 06 22:06:14 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 1ioZZl-000JNM-PK for geb-bug-gnu-emacs@m.gmane.org; Mon, 06 Jan 2020 22:06:13 +0100 Original-Received: from localhost ([::1]:34044 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ioZZk-0000iN-AK for geb-bug-gnu-emacs@m.gmane.org; Mon, 06 Jan 2020 16:06:12 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42278) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ioZZc-0000gP-Um for bug-gnu-emacs@gnu.org; Mon, 06 Jan 2020 16:06:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ioZZa-0005ng-I5 for bug-gnu-emacs@gnu.org; Mon, 06 Jan 2020 16:06:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40922) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ioZZa-0005mr-6M for bug-gnu-emacs@gnu.org; Mon, 06 Jan 2020 16:06:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ioZZZ-0001oN-Vc for bug-gnu-emacs@gnu.org; Mon, 06 Jan 2020 16:06:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Jorge P. de Morais Neto Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 06 Jan 2020 21:06: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.15783447066897 (code B ref 38993); Mon, 06 Jan 2020 21:06:01 +0000 Original-Received: (at 38993) by debbugs.gnu.org; 6 Jan 2020 21:05:06 +0000 Original-Received: from localhost ([127.0.0.1]:46895 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ioZYg-0001nB-GU for submit@debbugs.gnu.org; Mon, 06 Jan 2020 16:05:06 -0500 Original-Received: from knopi.disroot.org ([178.21.23.139]:35324) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ioZYe-0001md-Uo for 38993@debbugs.gnu.org; Mon, 06 Jan 2020 16:05:06 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 556B622709; Mon, 6 Jan 2020 22:05:00 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at disroot.org Original-Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gy-xuFfT8rNt; Mon, 6 Jan 2020 22:04:58 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1578344698; bh=kgBpiJgIq6EC1HLcfWs9bYNcLadK/95p45J1dZ6Uu5I=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=D5pHeD0n+ovmtRJnNtDH4ISGN4A9k9SXwEmmTKnCzzJb+C2cQTqIYKE4tsoRgEsOL eo/b4s/pRf/SQbZb2HdZkRnq7Pv6tVwU3aHQbnC848atpAW+AET0nJR7RXmPVOInzw BVefdsXzJsL30aRImu54ikODVq+UD5eFUfiqO8k3fmQqLLtyankG/FUtRDq7J8n+33 WRLPqxqn0wEZwy3VBA78ig10wDuffIkmnrcmeZZyy4QiAQ9qbCNuolzWT7nZDIxyAQ iE/J0tqsYJLrHwOXCE8eGXfjKa1uFnnKPlgJCA5Jlx7w6yIjYgSIVdPzvq43e9YaFW pbHr0G92NRb6A== In-Reply-To: <87y2ukxt0r.fsf@ericabrahamsen.net> 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:174270 Archived-At: 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 -- - - 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?]]