From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Manuel Giraud via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#71264: 30.0.50; Dired deletion moves point under auto-revert Date: Sat, 08 Jun 2024 18:11:53 +0200 Message-ID: <87h6e3wh12.fsf@ledu-giraud.fr> References: <87zfs8waqx.fsf@epfl.ch> <87mso61g92.fsf@ledu-giraud.fr> <87ikyu1fo5.fsf@ledu-giraud.fr> <87sexygp0t.fsf@epfl.ch> <874jactwbz.fsf@ledu-giraud.fr> <86h6eco86x.fsf@gnu.org> <87h6eb75lg.fsf@epfl.ch> <86ed9fmkqm.fsf@gnu.org> <87sexv5lcw.fsf@epfl.ch> <877cf5x3gl.fsf@ledu-giraud.fr> <868qzlluj5.fsf@gnu.org> <87wmn5vlsg.fsf@ledu-giraud.fr> <867cf4lr6d.fsf@gnu.org> <878qzko5af.fsf@ledu-giraud.fr> <87r0d9m5af.fsf@ledu-giraud.fr> Reply-To: Manuel Giraud Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23310"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: basil@contovou.net, 71264@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jun 08 18:13:00 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sFyge-0005pW-I6 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 08 Jun 2024 18:13:00 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sFygS-0007WU-Gg; Sat, 08 Jun 2024 12:12:48 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sFygQ-0007WE-SJ for bug-gnu-emacs@gnu.org; Sat, 08 Jun 2024 12:12:46 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sFygQ-00086J-Kb for bug-gnu-emacs@gnu.org; Sat, 08 Jun 2024 12:12:46 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sFygg-000266-F9 for bug-gnu-emacs@gnu.org; Sat, 08 Jun 2024 12:13:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Manuel Giraud Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 08 Jun 2024 16:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71264 X-GNU-PR-Package: emacs Original-Received: via spool by 71264-submit@debbugs.gnu.org id=B71264.17178631488011 (code B ref 71264); Sat, 08 Jun 2024 16:13:02 +0000 Original-Received: (at 71264) by debbugs.gnu.org; 8 Jun 2024 16:12:28 +0000 Original-Received: from localhost ([127.0.0.1]:39285 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sFyg7-000259-GD for submit@debbugs.gnu.org; Sat, 08 Jun 2024 12:12:27 -0400 Original-Received: from ledu-giraud.fr ([51.159.28.247]:23133) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sFyfs-00024j-Sp for 71264@debbugs.gnu.org; Sat, 08 Jun 2024 12:12:26 -0400 DKIM-Signature: v=1; a=ed25519-sha256; c=simple/simple; s=ed25519; bh=Y1sebdsJ bsXpPS3El2LDLXpcHWgMf73zsIjWz03VZOw=; h=date:references:in-reply-to: subject:cc:to:from; d=ledu-giraud.fr; b=PvxouYokRxJhxCXufl/7TBJ18rFwCD 86BINrD6t93NWJ3WuXUJwJqFwlm8DdhxLtP35oL1e4OJWIQ9ncr+s3BA== DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=rsa; bh=Y1sebdsJbsXpPS3E l2LDLXpcHWgMf73zsIjWz03VZOw=; h=date:references:in-reply-to:subject: cc:to:from; d=ledu-giraud.fr; b=Jd+9ZO7r2Hw+J5Trp7q3Y2jrTs9SFCXI9PBI11 8swLXxvlNuD2cmGPUoxH9ChQ1UbIenfPrYox1STTitwU7zpEaKI8MTbCUitE6s3TD5wtSG IiGvQ4Nqhc3w1frUveVz4g5MkTQq+DCTdnIoHf+1Vxf2m8Wrl/gLk7qHHt6e2WVboaj0md fc3h9jRPk+fbNsfkudANb+xCZzftHtDltAhsYfZyWpu6qNj6UigYrasBZ764sGXnXMs/aP 4OnC+F52nCVWqNFfAtKubE1GPG3+2lzb0xCjojQSsVSZN98zJjTsjpxq++GNdnB7RMgoy3 D2OYNDD03fVHlor6Io3p/v/w== Original-Received: from computer ( [10.1.1.1]) by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id 04c02345 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Sat, 8 Jun 2024 18:11:55 +0200 (CEST) In-Reply-To: <87r0d9m5af.fsf@ledu-giraud.fr> (Manuel Giraud's message of "Fri, 07 Jun 2024 12:11:04 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:286869 Archived-At: --=-=-= Content-Type: text/plain Hi, I don't know if this is the right approach but the following patch gives me the expected behaviour. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Prevent-auto-revert-when-deleting-entry-bug-71264.patch >From 4aa18aa0e60a8af0bbc8d333fc5e07caf6b3ab0a Mon Sep 17 00:00:00 2001 From: Manuel Giraud Date: Sat, 8 Jun 2024 18:08:28 +0200 Subject: [PATCH] Prevent auto-revert when deleting entry(bug#71264) * lisp/dired.el (dired-internal-do-deletions): Temporarily prevent auto-revert. --- lisp/dired.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/dired.el b/lisp/dired.el index c51e5e42c29..67683c4ab93 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -4015,7 +4015,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. + (auto-revert-mode nil) + (dired-auto-revert-buffer nil)) (dired-delete-file fn dired-recursive-deletes trash) ;; if we get here, removing worked (setq succ (1+ succ)) -- 2.45.1 --=-=-= Content-Type: text/plain -- Manuel Giraud --=-=-=--