From: Manuel Giraud via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: basil@contovou.net, 71264@debbugs.gnu.org
Subject: bug#71264: 30.0.50; Dired deletion moves point under auto-revert
Date: Mon, 17 Jun 2024 11:29:01 +0200 [thread overview]
Message-ID: <875xu7hq8y.fsf@ledu-giraud.fr> (raw)
In-Reply-To: <86h6duvb8q.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 15 Jun 2024 11:52:37 +0300")
[-- Attachment #1: Type: text/plain, Size: 654 bytes --]
Eli Zaretskii <eliz@gnu.org> writes:
> I think we should install this, but byte-compiling it produces a
> warning:
>
> In dired-internal-do-deletions:
> dired.el:4021:28: Warning: Unused lexical variable `auto-revert-mode'
>
> Can you fix this and resubmit?
Thanks Eli. Here is an updated version of this patch. I also removed
the setting of `dired-auto-revert-buffer' that has nothing to do with
this bug and added a reference to the bug number in the comments.
> Also, I presume all the Dired tests in the test suite still pass after
> the change?
I have attached the following logs: dir-tests.log, dired-aux-tests.log
and dired-x-tests.log.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Prevent-auto-revert-when-deleting-entry-bug-71264.patch --]
[-- Type: text/x-patch, Size: 1409 bytes --]
From b4b3e32a7f1375ff228bc25311a56062d64aa049 Mon Sep 17 00:00:00 2001
From: Manuel Giraud <manuel@ledu-giraud.fr>
Date: Mon, 17 Jun 2024 11:06:28 +0200
Subject: [PATCH] Prevent auto-revert when deleting entry(bug#71264)
* lisp/dired.el (require): Require "autorevert" for
`auto-revert-mode' usage.
(dired-internal-do-deletions): Temporarily prevent auto-revert.
---
lisp/dired.el | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/lisp/dired.el b/lisp/dired.el
index c51e5e42c29..0adf06f471e 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -36,6 +36,7 @@
(eval-when-compile (require 'subr-x))
(eval-when-compile (require 'cl-lib))
+(eval-when-compile (require 'autorevert))
;; When bootstrapping dired-loaddefs has not been generated.
(require 'dired-loaddefs nil t)
(require 'dnd)
@@ -4015,7 +4016,11 @@ dired-internal-do-deletions
(dired-move-to-filename)
(let ((inhibit-read-only t))
(condition-case err
- (let ((fn (car (car l))))
+ (let ((fn (car (car l)))
+ ;; Temporarily prevent auto-revert while
+ ;; deleting entry in the dired buffer
+ ;; (bug#71264).
+ (auto-revert-mode nil))
(dired-delete-file fn dired-recursive-deletes trash)
;; if we get here, removing worked
(setq succ (1+ succ))
--
2.45.2
[-- Attachment #3: dired-tests.log --]
[-- Type: text/plain, Size: 2146 bytes --]
Running 16 tests (2024-06-17 11:19:04+0200, selector ‘(not (or (tag :expensive-test) (tag :unstable) (tag :nativecomp)))’)
passed 1/16 dired-autoload (0.000141 sec)
Marking matching files...
Checking /home/manuel/emacs-repo/test/bug22694/test
1 matching file marked
passed 2/16 dired-test-bug22694 (0.085776 sec)
Copy: 1 of 1
Copy: 1 file done
Copy: 1 of 1
Copy: 1 file done
passed 3/16 dired-test-bug25609 (0.034042 sec)
Saved pos: ((#<buffer emacs-test-tp9Za3-dired> nil 4) nil nil)
Saved pos: ((#<buffer emacs-test-tp9Za3-dired> "/tmp/emacs-test-tp9Za3-dired/test-subdir" 4) ((#<window 1 on emacs-test-tp9Za3-dired> "/tmp/emacs-test-tp9Za3-dired/test-subdir" 4)) nil)
Saved pos: ((#<buffer emacs-test-tp9Za3-dired> "/tmp/emacs-test-tp9Za3-dired/test-subdir" 4) ((#<window 1 on emacs-test-tp9Za3-dired> "/tmp/emacs-test-tp9Za3-dired/test-subdir" 4)) nil)
Saved pos: ((#<buffer emacs-test-tp9Za3-dired> "/tmp/emacs-test-tp9Za3-dired/test-subdir" 4) ((#<window 1 on emacs-test-tp9Za3-dired> "/tmp/emacs-test-tp9Za3-dired/test-subdir" 4)) nil)
Saved pos: ((#<buffer emacs-test-tp9Za3-dired> "/tmp/emacs-test-tp9Za3-dired/test-subdir" 4) ((#<window 1 on emacs-test-tp9Za3-dired> "/tmp/emacs-test-tp9Za3-dired/test-subdir" 4)) nil)
passed 4/16 dired-test-bug27243-01 (0.042852 sec)
passed 5/16 dired-test-bug27243-02 (0.041971 sec)
passed 6/16 dired-test-bug27243-03 (0.094497 sec)
passed 7/16 dired-test-bug27631 (0.013950 sec)
passed 8/16 dired-test-bug27940 (0.086650 sec)
passed 9/16 dired-test-bug27968 (0.021243 sec)
passed 10/16 dired-test-bug59047 (0.037082 sec)
passed 11/16 dired-test-bug7131 (0.088727 sec)
passed 12/16 dired-test-directory-files (0.003667 sec)
passed 13/16 dired-test-directory-files-and-attributes (0.002743 sec)
passed 14/16 files-tests-bug-50630 (0.010067 sec)
passed 15/16 files-tests-insert-directory-shows-files (0.009958 sec)
passed 16/16 files-tests-insert-directory-shows-free (0.010036 sec)
Ran 16 tests, 16 results as expected, 0 unexpected (2024-06-17 11:19:05+0200, 0.585970 sec)
[-- Attachment #4: dired-aux-tests.log --]
[-- Type: text/plain, Size: 729 bytes --]
Running 5 tests (2024-06-17 11:19:04+0200, selector ‘(not (or (tag :expensive-test) (tag :unstable) (tag :nativecomp)))’)
passed 1/5 dired-guess-default (0.000328 sec)
/tmp/emacs-test-6LIEqx-dired-aux
/tmp/emacs-test-6LIEqx-dired-aux
/tmp/emacs-test-6LIEqx-dired-aux
/tmp/emacs-test-6LIEqx-dired-aux
ls: .//tmp/emacs-test-6LIEqx-dired-aux: No such file or directory
/tmp/emacs-test-6LIEqx-dired-aux
passed 2/5 dired-test-bug27496 (0.046338 sec)
passed 3/5 dired-test-bug28834 (0.003451 sec)
passed 4/5 dired-test-bug30624 (0.023089 sec)
passed 5/5 dired-test-highlight-metachar (0.000178 sec)
Ran 5 tests, 5 results as expected, 0 unexpected (2024-06-17 11:19:04+0200, 0.074519 sec)
[-- Attachment #5: dired-x-tests.log --]
[-- Type: text/plain, Size: 453 bytes --]
Running 2 tests (2024-06-17 11:19:05+0200, selector ‘(not (or (tag :expensive-test) (tag :unstable) (tag :nativecomp)))’)
Marking matching files...
2 matching files marked
2 marks removed
Marking matching files...
6 matching files marked
passed 1/2 dired-test-bug25942 (0.025861 sec)
passed 2/2 dired-x--string-to-number (0.000086 sec)
Ran 2 tests, 2 results as expected, 0 unexpected (2024-06-17 11:19:05+0200, 0.026748 sec)
[-- Attachment #6: Type: text/plain, Size: 18 bytes --]
--
Manuel Giraud
next prev parent reply other threads:[~2024-06-17 9:29 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-29 21:48 bug#71264: 30.0.50; Dired deletion moves point under auto-revert Basil L. Contovounesios
2024-05-31 9:29 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-31 9:42 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-31 12:10 ` Basil L. Contovounesios
2024-05-31 12:54 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-31 15:48 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-01 17:19 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-01 17:59 ` Eli Zaretskii
2024-06-02 14:59 ` Basil L. Contovounesios
2024-06-02 15:23 ` Eli Zaretskii
2024-06-02 17:02 ` Basil L. Contovounesios
2024-06-03 18:53 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-03 19:02 ` Eli Zaretskii
2024-06-03 20:00 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-04 14:26 ` Eli Zaretskii
2024-06-04 19:51 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-07 10:11 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-08 16:11 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-15 8:52 ` Eli Zaretskii
2024-06-17 9:29 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2024-06-22 8:53 ` Eli Zaretskii
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=875xu7hq8y.fsf@ledu-giraud.fr \
--to=bug-gnu-emacs@gnu.org \
--cc=71264@debbugs.gnu.org \
--cc=basil@contovou.net \
--cc=eliz@gnu.org \
--cc=manuel@ledu-giraud.fr \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.