|
From: | Paul Eggert |
Subject: | bug#46397: 27.1; Cannot delete buffer pointing to a file in a path that includes a file |
Date: | Thu, 11 Feb 2021 18:20:44 -0800 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 |
On 2/11/21 2:14 PM, Matt Armstrong wrote:
The issue isn't confined to exiting Emacs. It appears that once in a "tricky situation where the file can't be unlocked for whatever reason" Emacs will refuse to kill the buffer because unlock_file() signals an error.
kill-buffer already asks the user something like "Buffer XXX modified; kill anyway? (yes or no)" when killing a buffer that's been changed without being saved. Perhaps it should also ask "File XXX cannot be unlocked; kill buffer anyway? (yes or no)" if the file can't be unlocked.
Note that shut_down_emacs() calls Fdo_auto_save() just before unlock_all_files() and that call succeeds. Fdo_auto_save() also calls report_file_errno, throwing an errno 13 (Permission denied), but that recovers and continues.
Presumably shut_down_emacs should recover and continue if unlock_all_files fails when it directly calls unlock_all_files.
[Prev in Thread] | Current Thread | [Next in Thread] |