GNU bug report logs - #71264
30.0.50; Dired deletion moves point under auto-revert

Previous Next

Package: emacs;

Reported by: "Basil L. Contovounesios" <basil <at> contovou.net>

Date: Wed, 29 May 2024 21:49:02 UTC

Severity: normal

Found in version 30.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #26 received at 71264 <at> debbugs.gnu.org (full text, mbox):

From: Manuel Giraud <manuel <at> ledu-giraud.fr>
To: "Basil L. Contovounesios" <basil <at> contovou.net>
Cc: 71264 <at> debbugs.gnu.org
Subject: Re: bug#71264: 30.0.50; Dired deletion moves point under auto-revert
Date: Sat, 01 Jun 2024 19:19:12 +0200
[Message part 1 (text/plain, inline)]
Hi Basil,

I think I'm onto something regarding this bug.  We can observe the same
misbehavior with the following patch:
[my.diff (text/x-patch, inline)]
diff --git a/lisp/dired.el b/lisp/dired.el
index f2a75df6ef1..325c61627c2 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -4100,9 +4100,7 @@ dired-clean-up-after-deletion
     (let ((buf (get-file-buffer fn)))
       (and buf
            (or (and dired-clean-confirm-killing-deleted-buffers
-                    (funcall #'y-or-n-p
-                             (format "Kill buffer of %s, too? "
-                                     (file-name-nondirectory fn))))
+                    (sit-for 0.3))
                (not dired-clean-confirm-killing-deleted-buffers))
            (kill-buffer buf)))
     (let ((buf-list (dired-buffers-for-dir-or-subdir
[Message part 3 (text/plain, inline)]
It seems to me that the 'y-or-n-p' call gives the opportunity of a time
window for the dired buffer to be reverted.  But then, when this revert
happen the file "foo" has already disappeared so it cannot be found and
the point ends up at the BOB.

I don't know how to prevent this yet.
-- 
Manuel Giraud

This bug report was last modified 332 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.