GNU bug report logs -
#32214
[PATCH] 'message-kill-buffer': fix backup delete question
Previous Next
Reported by: Sven Willner <sven.willner <at> gmail.com>
Date: Thu, 19 Jul 2018 15:18:02 UTC
Severity: minor
Tags: patch
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Sven Willner <sven.willner <at> gmail.com> writes:
> also, the 'when' part should only include the actual deletion of the
> backup file
>> (ignore-errors
>> (delete-file auto-save-file-name))
> rather than also draft diassociation
>> (let ((message-draft-article draft-article))
>> (message-disassociate-draft)))
> also fixed in the updated patch.
> Subject: [PATCH] 'message-kill-buffer': fix backup delete question
>
> Before 'message-kill-buffer' would ask to delete backup file if draft has been
> saved regardless if a backup file has actually been created. Now only ask if
> a backup file exists.
> + (when (and auto-save-file-name
> + (file-exists-p auto-save-file-name)
> + file-name
> + (file-exists-p file-name)
Does it still make sense to check for file-name here? If we're just
deleting the auto save file, we should probably check for that only (but
see below, I'm not sure if this is actually correct).
> + (progn
> + ;; If the message buffer has lived in a dedicated window,
> + ;; `kill-buffer' has killed the frame. Thus the
> + ;; `yes-or-no-p' may show up in a lowered frame. Make sure
> + ;; that the user can see the question by raising the
> + ;; current frame:
> + (raise-frame)
> + (yes-or-no-p (format "Remove the backup file%s? "
> + (if modified " too" "")))))
I wonder if "backup" is meant to refer to the draft copy (as far as I
can tell (through the many layers of indirection), the draft
"dissociation" is also some kind of deletion). If so, then I think this
change isn't a "fix" at all.
> + (ignore-errors
> + (delete-file auto-save-file-name)))
> + (let ((message-draft-article draft-article))
> + (message-disassociate-draft))
> (message-do-actions actions))))
This bug report was last modified 6 years and 47 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.