From: Vincent Lefevre <vincent@vinc17.net>
To: 71074@debbugs.gnu.org
Subject: bug#71074: 29.3; When doing a backup, the file is missing during interactive questions
Date: Mon, 20 May 2024 03:07:48 +0200 [thread overview]
Message-ID: <20240520010748.GB323381@qaa.vinc17.org> (raw)
When doing a backup, GNU Emacs renames the file (according to strace).
Under some conditions, the file can be lost.
I noticed that due to a bug in the combination between Emacs and gpg,
where the "save" operation cannot be completed.
To reproduce with "emacs -Q", do for a file that is not under version
control (otherwise --eval="(setq vc-make-backup-files t)" is needed):
1. emacs -Q file.gpg
2. Modify the file.
3. Save with C-x C-s
At this point, gpg gets interactive, with a question
Untrusted key [...]. Use anyway? (y or n)
and one can see that the file "file.gpg" has been renamed to
"file.gpg~".
And it may happen that the save operation will never be completed,
e.g. because of a bug like
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1071372
(where gpg never terminates) or because Emacs may be killed before
the user could complete the save operation.
In short, the file may have silently disappeared. There is a backup,
but the backups may be cleaned up before the user realizes the issue.
Note: I put the backups in a specific directory with
(defun find-backup-file-name (fn)
(list (concat "~/.poub/" (file-name-nondirectory fn) "~")))
but I look at it only when I know I've done something wrong or if
I get an error message about the save operation. Having a missing
file during interactive questions is bad.
Note: I'm using Debian's package emacs-gtk 1:29.3+1-3.
--
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
next reply other threads:[~2024-05-20 1:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-20 1:07 Vincent Lefevre [this message]
2024-05-20 11:30 ` bug#71074: 29.3; When doing a backup, the file is missing during interactive questions Eli Zaretskii
2024-05-21 8:44 ` Vincent Lefevre
2024-05-21 12:12 ` Eli Zaretskii
2024-05-21 12:42 ` Eli Zaretskii
2024-05-22 11:08 ` Vincent Lefevre
2024-05-22 13:25 ` Eli Zaretskii
2024-05-23 14:50 ` Vincent Lefevre
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=20240520010748.GB323381@qaa.vinc17.org \
--to=vincent@vinc17.net \
--cc=71074@debbugs.gnu.org \
/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).