From unknown Wed Jun 18 23:04:11 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#71264 <71264@debbugs.gnu.org> To: bug#71264 <71264@debbugs.gnu.org> Subject: Status: 30.0.50; Dired deletion moves point under auto-revert Reply-To: bug#71264 <71264@debbugs.gnu.org> Date: Thu, 19 Jun 2025 06:04:11 +0000 retitle 71264 30.0.50; Dired deletion moves point under auto-revert reassign 71264 emacs submitter 71264 "Basil L. Contovounesios" severity 71264 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Wed May 29 17:48:31 2024 Received: (at submit) by debbugs.gnu.org; 29 May 2024 21:48:31 +0000 Received: from localhost ([127.0.0.1]:56390 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sCR9q-00008n-Ml for submit@debbugs.gnu.org; Wed, 29 May 2024 17:48:31 -0400 Received: from lists.gnu.org ([209.51.188.17]:36116) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sCR9l-00008V-6A for submit@debbugs.gnu.org; Wed, 29 May 2024 17:48:27 -0400 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 1sCR9a-0003nS-JI for bug-gnu-emacs@gnu.org; Wed, 29 May 2024 17:48:14 -0400 Received: from mail-ed1-f45.google.com ([209.85.208.45]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sCR9W-0003BU-2M for bug-gnu-emacs@gnu.org; Wed, 29 May 2024 17:48:14 -0400 Received: by mail-ed1-f45.google.com with SMTP id 4fb4d7f45d1cf-5785c98c218so25956a12.0 for ; Wed, 29 May 2024 14:48:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717019288; x=1717624088; h=mime-version:user-agent:message-id:date:subject:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=WUY+ER2dS1/4RExYZJDaNOW7CE5XSIvn97nXkGWChKM=; b=PFUcXM2YhoZrfd2VYSYv49RKnmg/JjBb1Xk3xXwGqAtVFCT34Fo6lj0pBn9bVR+cls 6TCF5XH1qiQ3FqupNGPCgeg0qfuJy6OmgV7RO6dpYD4awrGf/eC+94WJ0l4tmM2Lr7vP 4Xd9Kbtg5BXmCw8vFU/rhCIPoorLE45N1fxqjNmC14jtQKtoNw33/KEgNosi4XOOlAPn 0+NhgKPAGzvrzZEiJEzH7zea2LoPwUnjOiA+oDm9e1V7Axbd8spQ0IQaUNnCMagiWteW sdmb27/RQy1uWXdFb+77M/IUTtCnRisREfRBgkEQttK/e/JDY0c1wJq/pu2Pc7Vi2Mc/ FfjA== X-Gm-Message-State: AOJu0YwR3kmRJO64TRcaw6tFz8YXXeySrqAvLRAl2ib1u++fStKGp8lv Q/fdMkaLobw7M5Q3MPix9PPMffB1jKk18Qwu7UJlHpSg1jygmdNpmNUUwQ== X-Google-Smtp-Source: AGHT+IHX227EAHEM2pVt3mGbSYI4v6Zzn1oAOgkp2qzgUAP172jkURpwlak555RqaAAz+yMPc9575Q== X-Received: by 2002:a50:f61a:0:b0:572:d841:1179 with SMTP id 4fb4d7f45d1cf-57a1796a444mr157005a12.3.1717019287712; Wed, 29 May 2024 14:48:07 -0700 (PDT) Received: from localhost ([2001:620:618:5c0:2:80b3:0:65c]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-57852495de0sm8737523a12.61.2024.05.29.14.48.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 May 2024 14:48:07 -0700 (PDT) From: "Basil L. Contovounesios" To: bug-gnu-emacs@gnu.org Subject: 30.0.50; Dired deletion moves point under auto-revert Date: Wed, 29 May 2024 23:48:06 +0200 Message-ID: <87zfs8waqx.fsf@epfl.ch> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=209.85.208.45; envelope-from=basil.conto@gmail.com; helo=mail-ed1-f45.google.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.1 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) 0. emacs -Q 1. M-: (add-hook 'dired-mode-hook #'auto-revert-mode) RET 2. M-: (require 'dired-x) RET 3. C-x d /tmp RET 4. C-x C-f foo RET C-x C-s C-x C-j 5. d x yes RET y Point is now at BOB instead of the line from which the file was deleted. Both steps 1 and 2 are needed to reproduce. Emacs 24.5 does not reproduce; 25.3 and 26.3 behave like 30. Thanks, -- Basil In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo version 1.18.0, Xaw3d scroll bars) of 2024-05-29 built on tia Repository revision: a9af70849d2d9ad2b6d2b81ba4ef4d4342bff6d8 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12101011 System Description: Debian GNU/Linux trixie/sid Configured using: 'configure 'CFLAGS=-Og -ggdb3' -C --prefix=/home/blc/.local --enable-checking=structs --without-native-compilation --with-file-notification=yes --with-x-toolkit=lucid --with-x' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XAW3D XDBE XIM XINPUT2 XPM LUCID ZLIB Important settings: value of $LANG: en_IE.UTF-8 value of $XMODIFIERS: @im=ibus locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t minibuffer-regexp-mode: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message mailcap yank-media puny dired dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068 epg-config gnus-util text-property-search time-date subr-x mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd touch-screen tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic indonesian philippine cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting cairo x-toolkit xinput2 x multi-tty move-toolbar make-network-process emacs) Memory information: ((conses 16 39827 22028) (symbols 48 5369 0) (strings 32 13400 2255) (string-bytes 1 316857) (vectors 16 9317) (vector-slots 8 111126 10072) (floats 8 23 25) (intervals 56 267 0) (buffers 992 10)) From debbugs-submit-bounces@debbugs.gnu.org Fri May 31 05:29:46 2024 Received: (at 71264) by debbugs.gnu.org; 31 May 2024 09:29:46 +0000 Received: from localhost ([127.0.0.1]:53216 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sCya1-0003by-T6 for submit@debbugs.gnu.org; Fri, 31 May 2024 05:29:46 -0400 Received: from ledu-giraud.fr ([51.159.28.247]:25855) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sCyZz-0003bp-JT for 71264@debbugs.gnu.org; Fri, 31 May 2024 05:29:45 -0400 DKIM-Signature: v=1; a=ed25519-sha256; c=simple/simple; s=ed25519; bh=nB3BqshU FGKO1Ke29Pq/jcHt6k/KtxK15f+8XUkC4zI=; h=date:references:in-reply-to: subject:cc:to:from; d=ledu-giraud.fr; b=RU31D6gcA87Pmv3/bNxfGSe6NqRL8j U5eD/BSfAXf1ARDPolIAAJq8ZNLIZ5H1HeSdZumiTQUST5EFC8FhNbCA== DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=rsa; bh=nB3BqshUFGKO1Ke2 9Pq/jcHt6k/KtxK15f+8XUkC4zI=; h=date:references:in-reply-to:subject: cc:to:from; d=ledu-giraud.fr; b=1Rg6uENhtNzu4PmbyJQhNVPYJAC61hwXkHOfrC sGczyT6mgAr1hogI0RpqOG8tUZ4i9ZrNO+iUTqCgTBz5nMCPD0HioBTqqUk6vIWS8PWvi6 lRAW/l2q3lVWbmWW57FYHHG+d9hShN+8aZcqNOjNahCL+n8ydkRWFRmR/4Al/IzNE74Yvv 6NkHn2wVhqNT3fUXtKXBy5GD+1hhfbvQKho/fNphCDjbS7hnbsEjvxWWjMM4oLhOaAUavm YHLxWH3UwXHmLPg8bYRtjMfCrV3unlc2gEjh6BCCfet9WBoA9UTbEgPjCKhTiqvE/fFOdO eoJTGL7YurEBpoIvcXk7yYyQ== Received: from computer ( [10.1.1.1]) by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id 12c47ae9 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Fri, 31 May 2024 11:29:30 +0200 (CEST) From: Manuel Giraud To: "Basil L. Contovounesios" Subject: Re: bug#71264: 30.0.50; Dired deletion moves point under auto-revert In-Reply-To: <87zfs8waqx.fsf@epfl.ch> (Basil L. Contovounesios's message of "Wed, 29 May 2024 23:48:06 +0200") References: <87zfs8waqx.fsf@epfl.ch> Date: Fri, 31 May 2024 11:29:29 +0200 Message-ID: <87mso61g92.fsf@ledu-giraud.fr> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 71264 Cc: 71264@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) "Basil L. Contovounesios" writes: > 0. emacs -Q > 1. M-: (add-hook 'dired-mode-hook #'auto-revert-mode) RET > 2. M-: (require 'dired-x) RET > 3. C-x d /tmp RET > 4. C-x C-f foo RET C-x C-s C-x C-j > 5. d x yes RET y > > Point is now at BOB instead of the line from which the file was deleted. > Both steps 1 and 2 are needed to reproduce. > Emacs 24.5 does not reproduce; 25.3 and 26.3 behave like 30. Hi Basil, I confirm the behaviour you observe on master. I'm trying to track this down and it seems to come from the dired clean-up after a deletion. Customizing `dired-clean-up-buffers-too' to nil, fixes this issue for me. Do you see the same? -- Manuel Giraud From debbugs-submit-bounces@debbugs.gnu.org Fri May 31 05:42:25 2024 Received: (at submit) by debbugs.gnu.org; 31 May 2024 09:42:25 +0000 Received: from localhost ([127.0.0.1]:53243 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sCymG-0003wA-Sp for submit@debbugs.gnu.org; Fri, 31 May 2024 05:42:25 -0400 Received: from lists.gnu.org ([209.51.188.17]:51554) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sCymC-0003w0-IF for submit@debbugs.gnu.org; Fri, 31 May 2024 05:42:21 -0400 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 1sCym1-0002cf-6g for bug-gnu-emacs@gnu.org; Fri, 31 May 2024 05:42:09 -0400 Received: from ledu-giraud.fr ([51.159.28.247]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sCylz-0002YJ-Hy for bug-gnu-emacs@gnu.org; Fri, 31 May 2024 05:42:08 -0400 DKIM-Signature: v=1; a=ed25519-sha256; c=simple/simple; s=ed25519; bh=dc5tFHTJ VbmSWztTtbjNS8XvEJgcU8yJIabrgRLgPNk=; h=date:references:in-reply-to: subject:cc:to:from; d=ledu-giraud.fr; b=KYRN1jKmCHN3gTONAVpP54mgGXxrgE DjQbbaTK9C7MvDO3wgDfY7h0NxwG96z46OSxn8hIaxR2npBUKIWr/cAg== DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=rsa; bh=dc5tFHTJVbmSWztT tbjNS8XvEJgcU8yJIabrgRLgPNk=; h=date:references:in-reply-to:subject: cc:to:from; d=ledu-giraud.fr; b=lSLiaKONslaBKA0/e0shKhqVOrfaN82SfiJQA3 kD61K6aP5qDUHZpqQZZeLKM73H/EEeHbobOZAQhS4cjBH+VLywJpNtZ/T+0BD3yp18Gm01 xCsW2jMCsBeeE8uSwHYt4c4/1yHOBI8t6x7fwcAZ7NvfCOGo8j0/NFN1wksQ7rGf+zxdLa tpNeMz+/xCgB7+VRXEAGmFleEUqH3x/0quSEf8D8mKVxn9jr6Vvn6kdCYPYfJ8QybZ8zmp 4++3JOquSwq5fusjMTkJhGRSM/GnVWXrjza9pqzN/F9RPIfTbacYfheM+c0GHbw21Ubpu7 ugb5a+mUlKfGRoLRUKGYAezA== Received: from computer ( [10.1.1.1]) by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id c485f603 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Fri, 31 May 2024 11:42:03 +0200 (CEST) From: Manuel Giraud To: Manuel Giraud via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Subject: Re: bug#71264: 30.0.50; Dired deletion moves point under auto-revert In-Reply-To: <87mso61g92.fsf@ledu-giraud.fr> (Manuel Giraud via's message of "Fri, 31 May 2024 11:29:29 +0200") References: <87zfs8waqx.fsf@epfl.ch> <87mso61g92.fsf@ledu-giraud.fr> Date: Fri, 31 May 2024 11:42:02 +0200 Message-ID: <87ikyu1fo5.fsf@ledu-giraud.fr> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=51.159.28.247; envelope-from=manuel@ledu-giraud.fr; helo=ledu-giraud.fr X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit Cc: "Basil L. Contovounesios" , 71264@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) Manuel Giraud via "Bug reports for GNU Emacs, the Swiss army knife of text editors" writes: > "Basil L. Contovounesios" writes: > >> 0. emacs -Q >> 1. M-: (add-hook 'dired-mode-hook #'auto-revert-mode) RET >> 2. M-: (require 'dired-x) RET >> 3. C-x d /tmp RET >> 4. C-x C-f foo RET C-x C-s C-x C-j >> 5. d x yes RET y >> >> Point is now at BOB instead of the line from which the file was deleted. >> Both steps 1 and 2 are needed to reproduce. >> Emacs 24.5 does not reproduce; 25.3 and 26.3 behave like 30. > > Hi Basil, > > I confirm the behaviour you observe on master. I'm trying to track this > down and it seems to come from the dired clean-up after a deletion. > > Customizing `dired-clean-up-buffers-too' to nil, fixes this issue for > me. Do you see the same? BTW, customizing `dired-clean-confirm-killing-deleted-buffers' to nil also solve this issue. -- Manuel Giraud From debbugs-submit-bounces@debbugs.gnu.org Fri May 31 08:11:20 2024 Received: (at 71264) by debbugs.gnu.org; 31 May 2024 12:11:21 +0000 Received: from localhost ([127.0.0.1]:53473 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sD16O-0004uO-LE for submit@debbugs.gnu.org; Fri, 31 May 2024 08:11:20 -0400 Received: from mail-ed1-f54.google.com ([209.85.208.54]:41342) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sD16L-0004u6-6H for 71264@debbugs.gnu.org; Fri, 31 May 2024 08:11:19 -0400 Received: by mail-ed1-f54.google.com with SMTP id 4fb4d7f45d1cf-57a1c3cdd48so216464a12.1 for <71264@debbugs.gnu.org>; Fri, 31 May 2024 05:11:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717157460; x=1717762260; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=+5z1CvkRxRtZ/k9M/ji9KRzAtq00cyLrNfXvTiel1Oo=; b=ugZWb0Y8HaFLgdIaLWKVRX7NOIS3s1jB+LrJyiFGZodwRCT2riyeZNbFukJqagOJU/ WJnnNGJblxUlN2k//LDY/x5VmCTxM7Aw5iCqoJEOuLXOhwyOPZYnsTMeDg8U1LXfBR9g tU5jl5poJuwc33ycJMAoP96qduJLrxJHS8Xcw60/ENhNnriPxQzx4faTM7U5o7Bv4Xvo 3w1Gy1gmKMK4RL5XS5XtlF52G0lQC4y1rRwuJ6xPbz/w8IOrFVnmDM6kqr7u/TLKTv3s bqtvjbYbyVBY/SJMjFqgBNBf6N5DTk0FFAB5/+8wXE/IRCl97JZ//KG6aWdgG3VrjaFT Pwvg== X-Gm-Message-State: AOJu0YxDzQiTJNFlxq+TK57xq0b3o5mPmFKXMdZfAZuYnBSZ/2838BMs Ni4whIvUm/R/5uyA+7JUvzQQIX5su5x8ltKv4UBiL/XV4QBwozCC X-Google-Smtp-Source: AGHT+IFHMrRrVmP+zVPR1Hq9XdWLd77FppQ5SYk8dWq8oAGxs4y5Zvzo3elDxsSbZ8y5suBexc5gKQ== X-Received: by 2002:a50:9348:0:b0:57a:2069:e91 with SMTP id 4fb4d7f45d1cf-57a363546bbmr1274035a12.1.1717157459787; Fri, 31 May 2024 05:10:59 -0700 (PDT) Received: from localhost ([2a02:aa12:b107:8900:7502:96a1:feec:a0bf]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-57a31b993aasm931530a12.3.2024.05.31.05.10.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 May 2024 05:10:59 -0700 (PDT) From: "Basil L. Contovounesios" To: Manuel Giraud Subject: Re: bug#71264: 30.0.50; Dired deletion moves point under auto-revert In-Reply-To: <87ikyu1fo5.fsf@ledu-giraud.fr> (Manuel Giraud's message of "Fri, 31 May 2024 11:42:02 +0200") References: <87zfs8waqx.fsf@epfl.ch> <87mso61g92.fsf@ledu-giraud.fr> <87ikyu1fo5.fsf@ledu-giraud.fr> Date: Fri, 31 May 2024 14:10:58 +0200 Message-ID: <87sexygp0t.fsf@epfl.ch> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 71264 Cc: 71264@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Manuel Giraud [2024-05-31 11:42 +0200] wrote: > Manuel Giraud writes: >> Customizing `dired-clean-up-buffers-too' to nil, fixes this issue for >> me. Do you see the same? > BTW, customizing `dired-clean-confirm-killing-deleted-buffers' to nil > also solve this issue. ISTR that yes, disabling the prompt avoids the issue, maybe because the prompt allows auto-revert-mode to take effect (just speculating). I wouldn't go as far as saying that disabling the prompt 'fixes' the issue - I would still like to keep the prompt enabled as a user-facing safety feature. Thanks, -- Basil From debbugs-submit-bounces@debbugs.gnu.org Fri May 31 08:54:30 2024 Received: (at 71264) by debbugs.gnu.org; 31 May 2024 12:54:30 +0000 Received: from localhost ([127.0.0.1]:53509 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sD1m9-00060M-U7 for submit@debbugs.gnu.org; Fri, 31 May 2024 08:54:30 -0400 Received: from ledu-giraud.fr ([51.159.28.247]:6818) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sD1m5-000607-NK for 71264@debbugs.gnu.org; Fri, 31 May 2024 08:54:28 -0400 DKIM-Signature: v=1; a=ed25519-sha256; c=simple/simple; s=ed25519; bh=FL3Fjh9g c5WVbucboX5BzOkG4l4b5yUITtg/lNOhPyE=; h=date:references:in-reply-to: subject:cc:to:from; d=ledu-giraud.fr; b=GxSogXkjGDdNY43TX3BERTSlIUt+lw u0I89IIiQmHfKPkAuHvvGVo54bKO9wWvi7VyFLqL+BpQsBB2Pp+XokCA== DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=rsa; bh=FL3Fjh9gc5WVbucb oX5BzOkG4l4b5yUITtg/lNOhPyE=; h=date:references:in-reply-to:subject: cc:to:from; d=ledu-giraud.fr; b=srWDTAXUV1Ljek2k3wO0bjAVd8bex81OGeuwHq shl9JFxRQVlplv5UKqqfqc+3+cxDl2LL5GYXaJPHISRSbwoV2l0GMEnej8Vex6fAp0LkbQ H6Zgr0Cpbp/Hm27O+2J6YxRuWXUvZkxiBjuhHe/R1axy/ia536+YY80IqfKZHmIPiQousT 2LSkOmrFUMhLbTIPrvp6ZHesgufj56+Bp75d+D5oTUVyNXfBiF2cweQLay0ZBVzHc//tK6 dxtVVr/3/z8HXism0X+Hw8nFcy0uyWY+VYSBx0FTiH9fcAV5IuCKNYEqcSzPKE2es5v5Kg mrKYCMXMlMu0v3QkO/YplJnA== Received: from computer ( [10.1.1.1]) by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id 82d72c26 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Fri, 31 May 2024 14:54:11 +0200 (CEST) From: Manuel Giraud To: "Basil L. Contovounesios" Subject: Re: bug#71264: 30.0.50; Dired deletion moves point under auto-revert In-Reply-To: <87sexygp0t.fsf@epfl.ch> (Basil L. Contovounesios's message of "Fri, 31 May 2024 14:10:58 +0200") References: <87zfs8waqx.fsf@epfl.ch> <87mso61g92.fsf@ledu-giraud.fr> <87ikyu1fo5.fsf@ledu-giraud.fr> <87sexygp0t.fsf@epfl.ch> Date: Fri, 31 May 2024 14:54:01 +0200 Message-ID: <87zfs6b0ra.fsf@ledu-giraud.fr> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 71264 Cc: 71264@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain "Basil L. Contovounesios" writes: > Manuel Giraud [2024-05-31 11:42 +0200] wrote: >> Manuel Giraud writes: >>> Customizing `dired-clean-up-buffers-too' to nil, fixes this issue for >>> me. Do you see the same? >> BTW, customizing `dired-clean-confirm-killing-deleted-buffers' to nil >> also solve this issue. > > ISTR that yes, disabling the prompt avoids the issue, maybe because the > prompt allows auto-revert-mode to take effect (just speculating). Ok. > I wouldn't go as far as saying that disabling the prompt 'fixes' the > issue - I would still like to keep the prompt enabled as a user-facing > safety feature. You're right: this is not a 'fix' per se just a circumvention of this issue. Anyway, I think I've made some progress. It seems to come from the following unnecessary funcall (maybe you could try this patch): --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=dired.diff diff --git a/lisp/dired.el b/lisp/dired.el index f2a75df6ef1..518d581e3e6 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -4100,9 +4100,9 @@ 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)))) + (y-or-n-p + (format "Kill buffer of %s, too? " + (file-name-nondirectory fn)))) (not dired-clean-confirm-killing-deleted-buffers)) (kill-buffer buf))) (let ((buf-list (dired-buffers-for-dir-or-subdir --=-=-= Content-Type: text/plain As to why it causes this behaviour, I really don't know. -- Manuel Giraud --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri May 31 11:48:48 2024 Received: (at 71264) by debbugs.gnu.org; 31 May 2024 15:48:48 +0000 Received: from localhost ([127.0.0.1]:55208 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sD4Uq-0002bV-40 for submit@debbugs.gnu.org; Fri, 31 May 2024 11:48:48 -0400 Received: from ledu-giraud.fr ([51.159.28.247]:42402) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sD4Un-0002bM-6D for 71264@debbugs.gnu.org; Fri, 31 May 2024 11:48:46 -0400 DKIM-Signature: v=1; a=ed25519-sha256; c=simple/simple; s=ed25519; bh=prQhJgev G+H8TP9TttoYKkLnid8gDJE0HPmo5KAjMkA=; h=date:references:in-reply-to: subject:cc:to:from; d=ledu-giraud.fr; b=XKClCYHg/zZrgwc8YPgU2eaX4znPVs NtnfDO//iXKCQawLBQkFrFS1zBjl7UzAxHhpdy5fB6SIQgW01efxg0Dg== DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=rsa; bh=prQhJgevG+H8TP9T ttoYKkLnid8gDJE0HPmo5KAjMkA=; h=date:references:in-reply-to:subject: cc:to:from; d=ledu-giraud.fr; b=MaOjuvUTXZs+ZI5NktS+2WFjSg/nF43R+CEo/1 H5eMoRWf6W9+TqnYnnJ6yVsHYeXXXhuo+3GuuabplYFtRcXpT1fukcbaKaS6HZrC2T+SeC xQKmEOEuULNBpRs9YON20bWsMgwdDMPgEaK22Go4E0yKwtHnUmsN6twwQRmxPhmlqg4Cp0 NsRVD5YyEOjQDVvQm0dxJ3h9wFg+C5uHgpz4bLwbKsOdBlooCP8nAuvJz06dnHoxeZZ54t uryyE/kwDqW3CEUtnfAvCmkkTj3EjGLXfXyWQzOCrL0rhUpHO+l1I2+twAkbJONPt4xVEM Q9jC6NKiv2zvtxUYHSG6Cgdg== Received: from computer ( [10.1.1.1]) by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id e25905e0 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Fri, 31 May 2024 17:48:32 +0200 (CEST) From: Manuel Giraud To: "Basil L. Contovounesios" Subject: Re: bug#71264: 30.0.50; Dired deletion moves point under auto-revert In-Reply-To: <87zfs6b0ra.fsf@ledu-giraud.fr> (Manuel Giraud's message of "Fri, 31 May 2024 14:54:01 +0200") References: <87zfs8waqx.fsf@epfl.ch> <87mso61g92.fsf@ledu-giraud.fr> <87ikyu1fo5.fsf@ledu-giraud.fr> <87sexygp0t.fsf@epfl.ch> <87zfs6b0ra.fsf@ledu-giraud.fr> Date: Fri, 31 May 2024 17:48:31 +0200 Message-ID: <87ttienfsg.fsf@ledu-giraud.fr> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 71264 Cc: 71264@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Manuel Giraud writes: [...] > You're right: this is not a 'fix' per se just a circumvention of this > issue. Anyway, I think I've made some progress. It seems to come from > the following unnecessary funcall (maybe you could try this patch): Sorry my bad, this patch does nothing. I forgot to activate the 'auto-revert-mode' before testing. -- Manuel Giraud From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 01 13:19:32 2024 Received: (at 71264) by debbugs.gnu.org; 1 Jun 2024 17:19:32 +0000 Received: from localhost ([127.0.0.1]:57329 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDSOB-0003Jq-K8 for submit@debbugs.gnu.org; Sat, 01 Jun 2024 13:19:31 -0400 Received: from ledu-giraud.fr ([51.159.28.247]:14401) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDSO8-0003Jg-Rf for 71264@debbugs.gnu.org; Sat, 01 Jun 2024 13:19:30 -0400 DKIM-Signature: v=1; a=ed25519-sha256; c=simple/simple; s=ed25519; bh=YPvBOpdQ 15uTAk6PW5Bu7mfrnrml+D7giGQYCd7PT2Y=; h=date:references:in-reply-to: subject:cc:to:from; d=ledu-giraud.fr; b=WOIyko/TgAWvZIEX/Dr/4WThfkS6di K2txT1bEBzpsmrrRdNfkHseg5RvaR8Y4JS7oNA95oatoFMHVC0qngkDQ== DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=rsa; bh=YPvBOpdQ15uTAk6P W5Bu7mfrnrml+D7giGQYCd7PT2Y=; h=date:references:in-reply-to:subject: cc:to:from; d=ledu-giraud.fr; b=yenvn1t4v7LSB4aHA5Ce0z2EC4HHwfbzjx3Nwl SeCURMWebxjlbCEe+jPNyaP99RjPdcIZSM5WBDWjwfVxEytsDsnjk2E130hd63UVxEh7J1 8UVGpAQplE/QIvFtUNdvk7h2wDRtSwJivGi1oeLTdBQpWz/EMXq88luXGDiJOwxCgOh/cK lV9+gxZVgkbgkrZ+Ytyr4H6iNpH5FtkkJOSKUNaJ8HitB+Y8MifK0QFRnUmHTeQWXCfWWg GuKUBhFtzjxwDxIZRUgYXzVbFcWJAsy5f0FB0j8Rv1JmGc2mfihxdc5FGkGhdw6R+2jAMJ S/oub2TJSPfaPnAgCkQxIUig== Received: from computer ( [10.1.1.1]) by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id 864e7a83 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Sat, 1 Jun 2024 19:19:13 +0200 (CEST) From: Manuel Giraud To: "Basil L. Contovounesios" Subject: Re: bug#71264: 30.0.50; Dired deletion moves point under auto-revert In-Reply-To: <87sexygp0t.fsf@epfl.ch> (Basil L. Contovounesios's message of "Fri, 31 May 2024 14:10:58 +0200") References: <87zfs8waqx.fsf@epfl.ch> <87mso61g92.fsf@ledu-giraud.fr> <87ikyu1fo5.fsf@ledu-giraud.fr> <87sexygp0t.fsf@epfl.ch> Date: Sat, 01 Jun 2024 19:19:12 +0200 Message-ID: <874jactwbz.fsf@ledu-giraud.fr> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 71264 Cc: 71264@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Hi Basil, I think I'm onto something regarding this bug. We can observe the same misbehavior with the following patch: --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=my.diff 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 --=-=-= Content-Type: text/plain 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 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 01 14:00:01 2024 Received: (at 71264) by debbugs.gnu.org; 1 Jun 2024 18:00:01 +0000 Received: from localhost ([127.0.0.1]:57354 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDT1N-0004JK-Dx for submit@debbugs.gnu.org; Sat, 01 Jun 2024 14:00:01 -0400 Received: from eggs.gnu.org ([209.51.188.92]:51792) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDT1L-0004J7-Gl for 71264@debbugs.gnu.org; Sat, 01 Jun 2024 14:00:00 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sDT10-00054H-VZ; Sat, 01 Jun 2024 13:59:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=qcDzw0K9QAFCAeMBslP2NFwa5seVspxcEDYzcaxR0wk=; b=PnEmtYnRATYD RL2Job0fIaTdEI6EOnQHK0MgSjfHYRG/W47kvHsH18QG2N4iblKD9sdh4cY2Z3RByDOuxz7+N2B6L C6Ne2FvxUA+vgEuo3AGArxC/PEljHJZi28DGuU2EE6a/t5eeHnZj85Ofc5Yjq2SG546wJGxGQHb85 lwzy/wHDAxMGR1Ew0nYDFyKDNPmfj2CdxXK2VO4ngKBiZrGqLrMLnDmeyKaYW9ZLjmrQTKSjFxdhA Ab7TmKLiHaRMHJUFlT/2JRFa55ETWWHNOJ+k0LOQ2PP6h7pydJzHpqXS0axKPyLLQhRWDlF4QhEAQ uv4tnxpT2IooDDiBCpbk1Q==; Date: Sat, 01 Jun 2024 20:59:34 +0300 Message-Id: <86h6eco86x.fsf@gnu.org> From: Eli Zaretskii To: Manuel Giraud In-Reply-To: <874jactwbz.fsf@ledu-giraud.fr> (bug-gnu-emacs@gnu.org) Subject: Re: bug#71264: 30.0.50; Dired deletion moves point under auto-revert References: <87zfs8waqx.fsf@epfl.ch> <87mso61g92.fsf@ledu-giraud.fr> <87ikyu1fo5.fsf@ledu-giraud.fr> <87sexygp0t.fsf@epfl.ch> <874jactwbz.fsf@ledu-giraud.fr> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 71264 Cc: basil@contovou.net, 71264@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: 71264@debbugs.gnu.org > Date: Sat, 01 Jun 2024 19:19:12 +0200 > From: Manuel Giraud via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > 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. Yes, of course. When Emacs waits for keyboard input, the file-notification events are accepted and acted upon. > 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. Can you explain why the disappearance of "foo" causes point to be positioned at BOB? > I don't know how to prevent this yet. I'm not sure I understand why we need to prevent that. From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 02 11:00:19 2024 Received: (at 71264) by debbugs.gnu.org; 2 Jun 2024 15:00:19 +0000 Received: from localhost ([127.0.0.1]:60130 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDmh1-0007Vh-8c for submit@debbugs.gnu.org; Sun, 02 Jun 2024 11:00:19 -0400 Received: from mail-ed1-f51.google.com ([209.85.208.51]:40528) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDmgx-0007VO-5S for 71264@debbugs.gnu.org; Sun, 02 Jun 2024 11:00:17 -0400 Received: by mail-ed1-f51.google.com with SMTP id 4fb4d7f45d1cf-57a4bc986c9so175790a12.2 for <71264@debbugs.gnu.org>; Sun, 02 Jun 2024 08:00:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717340397; x=1717945197; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=ohNZlsLOFS2p6cjxbe/Yh3bvHTQFJMxwLE/oHWuVwGA=; b=iNA8VNFbWq9qYA0dR/wOyYNla4YmQIyfLmxH+AF2opuQoF1UvjlVxEfvHEpB6lUyJN sWwDA3GoRtcdieEVeLAdiJhMKSqolX+fcdO2ekBXfmT+lHVyNuUGP9wRXGNaelBBs919 /eWOJF29Ts+4RENwPdvhEJ54qvg+oTgMTWXIyBESMk8xPa7GRyRWKzFfwC9Uu090EaER YTdOsLDHqB+OTvulMHq0hN/sR9ZoV5/SkxiRHnUp0yum8bmqmqjNuCJBWOW3FbUUmSy3 +PMx+7Ay9geviwlKGO5sbAzw+MwT52WcfVdwv5IvgNmhtynS79cxb787fNCg3hOcxmRG AHCQ== X-Forwarded-Encrypted: i=1; AJvYcCXWUCBaAxFg+YpnOvf7Hk+lel8V6yFExxCy9jmqiQ/gPTZ7mMpIDNbAJnp6u5oOf0gfhaqnJodah3uPF/qSLUMdHqekbPk= X-Gm-Message-State: AOJu0YzN/cIpQRGvRsxGc/SgFc6izlmeJ/cOc8U/Nuom/MS+Mj6DqS/R ruoPLfaFJz0u5s5NC1DHT4yOazSg0EHmyJ05iRBRp6AIXttzszvdU5v+pQ== X-Google-Smtp-Source: AGHT+IFiK7fD/2M9cgFacllFnv3supcfiXb2b2+VnzUhQgZPbCB6wONBrHfHZO/qBIb1ZoU6AVWfsg== X-Received: by 2002:a50:9e28:0:b0:57a:2069:e99 with SMTP id 4fb4d7f45d1cf-57a3657a060mr4492381a12.4.1717340396809; Sun, 02 Jun 2024 07:59:56 -0700 (PDT) Received: from localhost ([2001:620:618:5c0:2:80b3:0:5c]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-57a31bb842asm3797668a12.36.2024.06.02.07.59.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Jun 2024 07:59:56 -0700 (PDT) From: "Basil L. Contovounesios" To: Eli Zaretskii Subject: Re: bug#71264: 30.0.50; Dired deletion moves point under auto-revert In-Reply-To: <86h6eco86x.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 01 Jun 2024 20:59:34 +0300") 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> Date: Sun, 02 Jun 2024 16:59:55 +0200 Message-ID: <87h6eb75lg.fsf@epfl.ch> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 71264 Cc: Manuel Giraud , 71264@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Eli Zaretskii [2024-06-01 20:59 +0300] wrote: >> Cc: 71264@debbugs.gnu.org >> Date: Sat, 01 Jun 2024 19:19:12 +0200 >> From: Manuel Giraud via "Bug reports for GNU Emacs, >> the Swiss army knife of text editors" >> >> I don't know how to prevent this yet. > > I'm not sure I understand why we need to prevent that. I encounter this most often in my homedir: it contains ~140 subdirs and files, meaning BOB and EOB are separated by ~2 pagefuls. Files are sorted by name in groups: subdirs first, then dotfiles, then the rest. Each time some program, such as a screenshot application, stores a file in my homedir, it appears near EOB. And each time I delete such a file, I lose my current position and have to scroll down 2 pagefuls again. I understand that auto-revert-mode can come with limitations, but I don't think this UX is right, and I imagine Dired can do better. Thanks, -- Basil From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 02 11:24:12 2024 Received: (at 71264) by debbugs.gnu.org; 2 Jun 2024 15:24:12 +0000 Received: from localhost ([127.0.0.1]:60160 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDn47-0008DD-QS for submit@debbugs.gnu.org; Sun, 02 Jun 2024 11:24:12 -0400 Received: from eggs.gnu.org ([209.51.188.92]:33340) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDn43-0008Cu-HL for 71264@debbugs.gnu.org; Sun, 02 Jun 2024 11:24:09 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sDn3j-0007iR-Qn; Sun, 02 Jun 2024 11:23:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=9ZGpKvdTrnyZJfQkPRdirnRiC4VpZUWvnLvg3skhzkQ=; b=f4cKRhtIFD10 ifycFBdjtQL4Erw0s6uQ6FH06PD7QTjEek/0RrplTXRo75UUwfXiHChf2wcJUORGO79RE1vhgKuxQ Ej4/J0O0adb9oNTtaQNSRxlNOcyuadp+HRp9AYfj1dCAXK4n1ZtlG9VSTuJyeM8TuSfHbp9M6DOt0 3CkxtSLz41nta5Lozu9aBs7WovA7k0KPtdqlmEI4ECRwjkjPxCYIPA+90Zr8Pe3tdQQSz145kCkyJ XPOM2wHfZvIjShfTJCatDsekldHSfZbuqHrAmh7E+RQ6IvAh+ALDWqrI2Oa9lyD4Se9iqHMooWtLk kOGa0GY2y3IaPWDshKb+TQ==; Date: Sun, 02 Jun 2024 18:23:45 +0300 Message-Id: <86ed9fmkqm.fsf@gnu.org> From: Eli Zaretskii To: "Basil L. Contovounesios" In-Reply-To: <87h6eb75lg.fsf@epfl.ch> (basil@contovou.net) Subject: Re: bug#71264: 30.0.50; Dired deletion moves point under auto-revert 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> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 71264 Cc: manuel@ledu-giraud.fr, 71264@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: "Basil L. Contovounesios" > Cc: Manuel Giraud , 71264@debbugs.gnu.org > Date: Sun, 02 Jun 2024 16:59:55 +0200 > > Eli Zaretskii [2024-06-01 20:59 +0300] wrote: > > >> Cc: 71264@debbugs.gnu.org > >> Date: Sat, 01 Jun 2024 19:19:12 +0200 > >> From: Manuel Giraud via "Bug reports for GNU Emacs, > >> the Swiss army knife of text editors" > >> > >> I don't know how to prevent this yet. > > > > I'm not sure I understand why we need to prevent that. > > I encounter this most often in my homedir: it contains ~140 subdirs and > files, meaning BOB and EOB are separated by ~2 pagefuls. Files are > sorted by name in groups: subdirs first, then dotfiles, then the rest. > Each time some program, such as a screenshot application, stores a file > in my homedir, it appears near EOB. And each time I delete such a file, > I lose my current position and have to scroll down 2 pagefuls again. > > I understand that auto-revert-mode can come with limitations, but I > don't think this UX is right, and I imagine Dired can do better. Maybe I misunderstood what was meant by "this" in "how to prevent this". The preceding text was: > 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. So which part of this did Manuel want "to prevent"? That y-or-n-p doesn't block file notifications is AFAIU by design, and preventing that could cause much more serious problems. What I don't understand is two things: . why the fact that "foo"s buffer was reverted affects Dired, and what is expected from Dired when a file and its buffer are deleted? . why the effect is to move point to BOB? From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 02 13:02:50 2024 Received: (at 71264) by debbugs.gnu.org; 2 Jun 2024 17:02:50 +0000 Received: from localhost ([127.0.0.1]:60214 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDoba-00050O-Bk for submit@debbugs.gnu.org; Sun, 02 Jun 2024 13:02:50 -0400 Received: from mail-lf1-f42.google.com ([209.85.167.42]:39085) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDobU-000508-RZ for 71264@debbugs.gnu.org; Sun, 02 Jun 2024 13:02:49 -0400 Received: by mail-lf1-f42.google.com with SMTP id 2adb3069b0e04-52a559e4429so521468e87.0 for <71264@debbugs.gnu.org>; Sun, 02 Jun 2024 10:02:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717347746; x=1717952546; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=a298puSoPxs2J16D8+ZdVFd/hDNrNYBi+CqvYbQXVqI=; b=EWlMr8x3pZMIVKhEP6FgyJEw4dLugvKQ/LnFbIu/0H45vZ0MxhcfgJxpQqlbtNCcy0 pOXXSVpBEEglZojmPDL51V7aB8hSnlpE7C4dA4497WAG0WZwuMQm0SqNa7Kikvzl2IzL YoiCT5fYlTXrN+iMZIbUJLoNzqgwnATSzLH9Leo8MYdr78CK+7N9kYR4p3a0fZgaLXoB IqHtcP3Wxzwrzz24i3gBuqQrvIkuzuf2q1+2yqDn0jx61c4k4MWrwP5C+K+rraGx8XDu gDulfsJaLfWWWuVi2VdaZsY/o3FTB5LZHry/b6LCANYNCkOzTwz+hkeT1uK/z/K3KjNV 8Vaw== X-Forwarded-Encrypted: i=1; AJvYcCW8uRbzsHQ4nTRn1WoRMeZVPXB448mQGgN/EWQie0371cUcVjPhVot5uycsk9KQGbpHflfPbXATkj24IroD1xHhg2FR0jk= X-Gm-Message-State: AOJu0YzxKvNYo8Z4q6zjfQUujqXhi/T4c3I424lBV/Z+lpANXupKElQf mYW7/+Z/WokUP0Of5TJnLtx+83sqlO777yWH8J0XlrWGyfrD0flJ X-Google-Smtp-Source: AGHT+IHjcVtyo7qbW728GJ83ik1h6G9oz519KOvWkBMbmX+ixa7aDgwa7s9kIMUeHcEuzq8XAdwUMA== X-Received: by 2002:a2e:9155:0:b0:2e9:8ac5:c0dd with SMTP id 38308e7fff4ca-2ea9515809emr36822841fa.2.1717347745761; Sun, 02 Jun 2024 10:02:25 -0700 (PDT) Received: from localhost ([2001:620:618:5c0:2:80b3:0:5c]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-57a31bb841fsm3988119a12.34.2024.06.02.10.02.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Jun 2024 10:02:25 -0700 (PDT) From: "Basil L. Contovounesios" To: Eli Zaretskii Subject: Re: bug#71264: 30.0.50; Dired deletion moves point under auto-revert In-Reply-To: <86ed9fmkqm.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 02 Jun 2024 18:23:45 +0300") 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> Date: Sun, 02 Jun 2024 19:02:23 +0200 Message-ID: <87sexv5lcw.fsf@epfl.ch> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 71264 Cc: manuel@ledu-giraud.fr, 71264@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Eli Zaretskii [2024-06-02 18:23 +0300] wrote: > Maybe I misunderstood what was meant by "this" in "how to prevent > this". The preceding text was: > >> 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. > > So which part of this did Manuel want "to prevent"? I assumed it was the undesirable motion. > That y-or-n-p doesn't block file notifications is AFAIU by design, and > preventing that could cause much more serious problems. Agreed. > What I don't understand is two things: > > . why the fact that "foo"s buffer was reverted affects Dired, [...] > . why the effect is to move point to BOB? I suspect answering these is tantamount to fixing the bug. > [...] what is expected from Dired when a file and its buffer are deleted? I'd be happy with the same behaviour as when auto-revert-mode is disabled: point remains on the same line; either on the next file in the listing, or at EOB if there is no next file. -- Basil From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 03 14:54:09 2024 Received: (at 71264) by debbugs.gnu.org; 3 Jun 2024 18:54:10 +0000 Received: from localhost ([127.0.0.1]:55665 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sECor-0006Y4-KI for submit@debbugs.gnu.org; Mon, 03 Jun 2024 14:54:09 -0400 Received: from ledu-giraud.fr ([51.159.28.247]:29126) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sECom-0006Xm-VD for 71264@debbugs.gnu.org; Mon, 03 Jun 2024 14:54:08 -0400 DKIM-Signature: v=1; a=ed25519-sha256; c=simple/simple; s=ed25519; bh=s9BpybFa L338Xpi9DpnAEeVv9D7Nnn1Fl45tlj1HnYU=; h=date:references:in-reply-to: subject:cc:to:from; d=ledu-giraud.fr; b=18Rzsme96WBO8Nwuux6vjqc4zPp4Py X7WsiqAWKGTYiQm6c2ena9CeL0RAISiNB5FCBpIPtxWiXDQCXlDq8JCg== DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=rsa; bh=s9BpybFaL338Xpi9 DpnAEeVv9D7Nnn1Fl45tlj1HnYU=; h=date:references:in-reply-to:subject: cc:to:from; d=ledu-giraud.fr; b=n717mYgqJ2hIDI7KCY0cFm5zESVEEH5D+tidf/ YBt+fGRP0v9r46Jc/LGiMPPQUK3tzqEoqF8IpFqBAGGrkJ7Zmgu11vHNKwRrtdzqNozBUR fs5aJWJ+OzgE3x11khzUo1ZIegGtyEZN8Bl2qUvd7goBTWk2BgQRRKYDiSwdcNUHwkjjPf c4ieyw+bRIQOflOs8i4a70kF9yUL9WensYoMEZ/lRHx/qsCf1O+/BLmBc/4vKEWrN58rFD VleA867WDGNRLFY0acX/K5b2E/CRPadU5XAG3eLc7qXp1nJerUZiuLmV2U8qY1tyVJiDgY EXAfhzDwe/kB/UgR4+FQ81jw== Received: from computer ( [10.1.1.1]) by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id e4e08094 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Mon, 3 Jun 2024 20:53:48 +0200 (CEST) From: Manuel Giraud To: "Basil L. Contovounesios" Subject: Re: bug#71264: 30.0.50; Dired deletion moves point under auto-revert In-Reply-To: <87sexv5lcw.fsf@epfl.ch> (Basil L. Contovounesios's message of "Sun, 02 Jun 2024 19:02:23 +0200") 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> User-Agent: Gnus/5.13 (Gnus v5.13) Date: Mon, 03 Jun 2024 20:53:46 +0200 Message-ID: <877cf5x3gl.fsf@ledu-giraud.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 71264 Cc: Eli Zaretskii , 71264@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) "Basil L. Contovounesios" writes: > Eli Zaretskii [2024-06-02 18:23 +0300] wrote: > >> Maybe I misunderstood what was meant by "this" in "how to prevent >> this". The preceding text was: >> >>> 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. >> >> So which part of this did Manuel want "to prevent"? > > I assumed it was the undesirable motion. Yes that's it. This is the bug AFAIU. Keeping the point on the file right after the one that has been deleted would be the "correct" behaviour. >> That y-or-n-p doesn't block file notifications is AFAIU by design, and >> preventing that could cause much more serious problems. > > Agreed. Ok, sure. >> What I don't understand is two things: >> >> . why the fact that "foo"s buffer was reverted affects Dired, [...] >> . why the effect is to move point to BOB? > > I suspect answering these is tantamount to fixing the bug. This I'm not sure and I have to check. But it seems that dired keeps the information of =C2=AB=C2=A0what is the current file name=C2=A0=C2=BB an= d go there after having reverted the content. If it is not found, the point stays at BOB. >> [...] what is expected from Dired when a file and its buffer are deleted? > > I'd be happy with the same behaviour as when auto-revert-mode is > disabled: point remains on the same line; either on the next file in the > listing, or at EOB if there is no next file. --=20 Manuel Giraud From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 03 15:02:34 2024 Received: (at 71264) by debbugs.gnu.org; 3 Jun 2024 19:02:34 +0000 Received: from localhost ([127.0.0.1]:55677 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sECx0-0006uz-8W for submit@debbugs.gnu.org; Mon, 03 Jun 2024 15:02:34 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54326) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sECww-0006uh-PF for 71264@debbugs.gnu.org; Mon, 03 Jun 2024 15:02:33 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sECwc-0006RE-H4; Mon, 03 Jun 2024 15:02:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=Gf2b5/fhIekbdJYSX2U2b9eKEk+K6Cmd1oPHKTHtnDs=; b=dCrRJ/3ilw2AMQjXYyMs +7tHax7tOyWsS9cnq3cQqXKtb3AIx+GUdntbJgcAS/xcldEsNkpdNZCcgBJyY3gf7sRCZWaLYE2lK hwt0UEngE0RXE6GQEow4cdLMYrHBFmMOD62/FZqdnB4UFwlws/wBNS1otOqmAoDZX2p7fONor5O9h w8+h30KX7thtVVU8IOM+SS3R2WO1OMkcrc/Yibd7sTwFMims3f+gdevczqlo9vClnNzJa/162X1JY dNBdLPPM1LYxwthnIBBQBoneRBJMCkGhLys1mgRZ6bYrZPQ36SmkPHqsG8Fg6mwmeqKnTOyzZVvXf 6HAMuB59gFc+4w==; Date: Mon, 03 Jun 2024 22:02:06 +0300 Message-Id: <868qzlluj5.fsf@gnu.org> From: Eli Zaretskii To: Manuel Giraud In-Reply-To: <877cf5x3gl.fsf@ledu-giraud.fr> (message from Manuel Giraud on Mon, 03 Jun 2024 20:53:46 +0200) Subject: Re: bug#71264: 30.0.50; Dired deletion moves point under auto-revert 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> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 71264 Cc: basil@contovou.net, 71264@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Manuel Giraud > Cc: Eli Zaretskii , 71264@debbugs.gnu.org > Date: Mon, 03 Jun 2024 20:53:46 +0200 > > >> What I don't understand is two things: > >> > >> . why the fact that "foo"s buffer was reverted affects Dired, [...] > >> . why the effect is to move point to BOB? > > > > I suspect answering these is tantamount to fixing the bug. > > This I'm not sure and I have to check. But it seems that dired keeps > the information of « what is the current file name » and go there after > having reverted the content. If it is not found, the point stays at > BOB. So how does Dired DTRT when you simply delete a file at point? Why doesn't it go to BOB in that case? From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 03 16:01:09 2024 Received: (at 71264) by debbugs.gnu.org; 3 Jun 2024 20:01:09 +0000 Received: from localhost ([127.0.0.1]:55720 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sEDrg-0000XU-Mc for submit@debbugs.gnu.org; Mon, 03 Jun 2024 16:01:09 -0400 Received: from ledu-giraud.fr ([51.159.28.247]:20533) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sEDrc-0000XA-82 for 71264@debbugs.gnu.org; Mon, 03 Jun 2024 16:01:06 -0400 DKIM-Signature: v=1; a=ed25519-sha256; c=simple/simple; s=ed25519; bh=guEsstEi x7bCdjgeDz5B4KOkAux28SRFuEVyFUPsHhA=; h=date:references:in-reply-to: subject:cc:to:from; d=ledu-giraud.fr; b=+YBbW8ugCR9om4K9NEfdiOTk8K7UnT ydfP6QjGubfr/LsmF9YPaGoonMZXKrLB+4j53tfi/kqUqJCC5XDzO9CQ== DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=rsa; bh=guEsstEix7bCdjge Dz5B4KOkAux28SRFuEVyFUPsHhA=; h=date:references:in-reply-to:subject: cc:to:from; d=ledu-giraud.fr; b=Z/aP7Qu1PtKwpW/yp2K+fDdxo/P/8LuRSnv0Bu noDUt1l294a/7bsoCqzrjurMzKPITU4ET4tVBwbeAvTVfAPQkcz9V48oMncNuJmYaRCg+X +IiD/a3Td8CPTYEPtDmord6arzOxWHlYTU336Fxx+arvXcqFL+3rIxslTOHXuGc6/IFItq DDRmPl5Wfa3cRA0vD0OX8f6441AcL2OklxZennmctqeuWC9U0sZKc1V7eoWDaZ5uHHqQn6 R7TF5i4uiiKcDmT1wqiOdaF9z1RZRihTlUxM1mRwcN/al5oWsgONWnlwVS+rCHPvTIp8qx 4MvdF6nRec0jtGvNglm/R2Dg== Received: from computer ( [10.1.1.1]) by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id 7d1db722 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Mon, 3 Jun 2024 22:00:49 +0200 (CEST) From: Manuel Giraud To: Eli Zaretskii Subject: Re: bug#71264: 30.0.50; Dired deletion moves point under auto-revert In-Reply-To: <868qzlluj5.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 03 Jun 2024 22:02:06 +0300") 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> Date: Mon, 03 Jun 2024 22:00:47 +0200 Message-ID: <87wmn5vlsg.fsf@ledu-giraud.fr> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 71264 Cc: basil@contovou.net, 71264@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: [...] >> This I'm not sure and I have to check. But it seems that dired keeps >> the information of =C2=AB=C2=A0what is the current file name=C2=A0=C2=BB= and go there after >> having reverted the content. If it is not found, the point stays at >> BOB. > > So how does Dired DTRT when you simply delete a file at point? Why > doesn't it go to BOB in that case? Because the dired buffer is not reverted (it does not re-read the ls output in this case). If I'm not mistaken, this takes place in `dired-remove-entry' which removes the buffer line of the file that was just deleted. --=20 Manuel Giraud From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 04 10:40:18 2024 Received: (at 71264) by debbugs.gnu.org; 4 Jun 2024 14:40:18 +0000 Received: from localhost ([127.0.0.1]:56718 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sEVKj-00007U-CD for submit@debbugs.gnu.org; Tue, 04 Jun 2024 10:40:18 -0400 Received: from eggs.gnu.org ([209.51.188.92]:38808) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sEV89-0007tw-A4 for 71264@debbugs.gnu.org; Tue, 04 Jun 2024 10:27:18 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sEV7o-00013I-Fs; Tue, 04 Jun 2024 10:26:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=4NTEK2NxijWZgtQLgDXBazUdhLqPkLvCiGGZNSAd+Zg=; b=JFmlj42Wl8M19D4rChUL qcOU2hJ8Uu8ngLUkxPjRoDptWTNMRo2NWW8TH4XJYJrmw8UtkdzG0L0UapC9DZUL3c0RpS3FaWj5p CgSZgXYFo5cnpedly4IDHWisNVS0BlN93+Ex5x+opCNQsVZ9YEEqVN3GhSQ6Gig1Nfbs2tuujmNMb TDzayrngnRuNKsugcVz6hwILx6zlz/XdmLYcHRdMdMdNkneeSgIapQlY2gGs/SlI2qUvjhEsb6hev nSy42TvBrTv8+GR86awrz9b8xhOmci4v2C9Fd+QV2aS+vYGUJdBGqWasrbs0WHYhwZXWucwqllSXY Q3sy1XCo8b6Eyw==; Date: Tue, 04 Jun 2024 17:26:50 +0300 Message-Id: <867cf4lr6d.fsf@gnu.org> From: Eli Zaretskii To: Manuel Giraud In-Reply-To: <87wmn5vlsg.fsf@ledu-giraud.fr> (message from Manuel Giraud on Mon, 03 Jun 2024 22:00:47 +0200) Subject: Re: bug#71264: 30.0.50; Dired deletion moves point under auto-revert 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> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 71264 Cc: basil@contovou.net, 71264@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Manuel Giraud > Cc: basil@contovou.net, 71264@debbugs.gnu.org > Date: Mon, 03 Jun 2024 22:00:47 +0200 > > Eli Zaretskii writes: > > [...] > > >> This I'm not sure and I have to check. But it seems that dired keeps > >> the information of « what is the current file name » and go there after > >> having reverted the content. If it is not found, the point stays at > >> BOB. > > > > So how does Dired DTRT when you simply delete a file at point? Why > > doesn't it go to BOB in that case? > > Because the dired buffer is not reverted (it does not re-read the ls > output in this case). If I'm not mistaken, this takes place in > `dired-remove-entry' which removes the buffer line of the file that was > just deleted. AFAIR, when the Dired buffer is reverted, Dired attempts to preserve important information, like markers etc. So I think the problem could be that the revert happens before Dired had time to record that information, in which case rearranging some code should be a way forward. From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 04 15:51:53 2024 Received: (at 71264) by debbugs.gnu.org; 4 Jun 2024 19:51:53 +0000 Received: from localhost ([127.0.0.1]:47647 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sEaCG-0000LW-Sf for submit@debbugs.gnu.org; Tue, 04 Jun 2024 15:51:53 -0400 Received: from ledu-giraud.fr ([51.159.28.247]:10606) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sEaCC-0000L9-Pc for 71264@debbugs.gnu.org; Tue, 04 Jun 2024 15:51:51 -0400 DKIM-Signature: v=1; a=ed25519-sha256; c=simple/simple; s=ed25519; bh=1UEPVVHp mdZ0tt1AFX+uyigIGNnnDgN+bKoPzmtCjW0=; h=date:references:in-reply-to: subject:cc:to:from; d=ledu-giraud.fr; b=yAfKKStQP1G/+T9PiLQn4mMzJ3hy/y IcSW9AiHLhHh1vOaTsC1UIGXU2vti/C7nwBDZq4/4zBDuNurx5IMnCBw== DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=rsa; bh=1UEPVVHpmdZ0tt1A FX+uyigIGNnnDgN+bKoPzmtCjW0=; h=date:references:in-reply-to:subject: cc:to:from; d=ledu-giraud.fr; b=DN876XjP4h8e88i9vCrd5uq1T2+aSuptLRKC/e /K6YmcODPtGE+t2MVtBnvL/qsnqljUA/yLQYjnLiTAFIKQLvbCWjwA8oU33wCFoW5s3nB6 jM2Qcm2+EtLomZfxfBvFO20T4KE1OXhcsLF5D9D/gYAi2b/BaCVeJ5FfqbZVHW8u1Meh5P +XkZQoS4fVFglX1NAISvAz5/+uUcw4lW2IcnsHed4AIXvdP4VMVkpO0G9M3/7s3Q1n9Oop 6j7Pv/q+KjDL5VQpDAWFpiLfoRLWWIu/vKWcsi+HXUDeQMdcQtfcRg6I14I1Y+9u93oRHz VOYePDDYkJO3AHzpgAdEhIxg== Received: from computer ( [10.1.1.1]) by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id 4e03bfff (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Tue, 4 Jun 2024 21:51:31 +0200 (CEST) From: Manuel Giraud To: Eli Zaretskii Subject: Re: bug#71264: 30.0.50; Dired deletion moves point under auto-revert In-Reply-To: <867cf4lr6d.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 04 Jun 2024 17:26:50 +0300") 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> Date: Tue, 04 Jun 2024 21:51:20 +0200 Message-ID: <878qzko5af.fsf@ledu-giraud.fr> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 71264 Cc: basil@contovou.net, 71264@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: [...] > AFAIR, when the Dired buffer is reverted, Dired attempts to preserve > important information, like markers etc. So I think the problem could > be that the revert happens before Dired had time to record that > information, in which case rearranging some code should be a way > forward. Ok. But it seems that the functions to preserve those informations (`dired-save-positions', `dired-remember-marks'...) are all called from `dired-revert'. Which makes sense but now I'm confuse about how could Dired loose those informations upon reverting. -- Manuel Giraud From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 07 06:40:25 2024 Received: (at 71264) by debbugs.gnu.org; 7 Jun 2024 10:40:25 +0000 Received: from localhost ([127.0.0.1]:45358 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sFX1D-0004LK-Lz for submit@debbugs.gnu.org; Fri, 07 Jun 2024 06:40:24 -0400 Received: from ledu-giraud.fr ([51.159.28.247]:28600) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sFWZ8-0002sf-ID for 71264@debbugs.gnu.org; Fri, 07 Jun 2024 06:11:24 -0400 DKIM-Signature: v=1; a=ed25519-sha256; c=simple/simple; s=ed25519; bh=gd0K88QF P8IxrxY6m2QzZZqpUvnuyI/UFSB18pl+zoA=; h=date:references:in-reply-to: subject:cc:to:from; d=ledu-giraud.fr; b=FhbqhK/q/mbAc7bDzW6iYWdu+0AwRZ eX+Nhjz4YZ4LuBMLbBR4e1RL4cZbEBOFlS/i8NMuj2gNHSwSi6vfD8BA== DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=rsa; bh=gd0K88QFP8IxrxY6 m2QzZZqpUvnuyI/UFSB18pl+zoA=; h=date:references:in-reply-to:subject: cc:to:from; d=ledu-giraud.fr; b=Q+0AnRbJoXsPES9A8BbBd81qJbSj+Id2f6opj2 SAnl6J4zkMrJ/eZZhQ011IAwoxwY1tXqqd89B9rK7zaCE1zO/KTkz9wEsXvGAGSTlrzVNx SA4OhldaKPkv4gGdm5dYKNycPfKn1z300+0stM3UIWzb0jAz7s+P5noE7Vt/4hlM+yb6EJ ZnerQuSEIWlK8T94vLS5yaZRnINCbpopTGFc/LtOaRZIddnL5GT1Bv6mbXy6fe+XgFTpLm cjdGYjxq+EfJbW9GdwQPO6fFSsqgTirPMLJZ0mzOhobU9/q7l2BGVz8zhffFkHALwz+s/P 23H0mdIkPTlhT3t4ytjK8EWw== Received: from computer ( [10.1.1.1]) by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id 800fc43f (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Fri, 7 Jun 2024 12:11:05 +0200 (CEST) From: Manuel Giraud To: Eli Zaretskii Subject: Re: bug#71264: 30.0.50; Dired deletion moves point under auto-revert In-Reply-To: <878qzko5af.fsf@ledu-giraud.fr> (Manuel Giraud's message of "Tue, 04 Jun 2024 21:51:20 +0200") 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> Date: Fri, 07 Jun 2024 12:11:04 +0200 Message-ID: <87r0d9m5af.fsf@ledu-giraud.fr> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 71264 Cc: basil@contovou.net, 71264@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi, There was a discussion that seems to be related to this issue in bug#33458. And here's something that Martin Rudalics said at the time: --8<---------------cut here---------------start------------->8--- >> Maybe for dired store meta-information such as dired-filename >> in window parameters. Then when a dired buffer is restored in a window, >> and dired-revert moved point-marker to the beginning of the dired buffer, >> move point to the file from the window parameter. > > What if file referenced by such `dired-filename' was deleted? It is > desirable to move to next or prev. filename but not to stay in the > beginning of the dired buffer. These others may have been deleted as well so I think that remaining at the beginning of the dired buffer is more predictable here. Note also that the next or previous filename may depend on the order in which filenames are shown - what if reverting changed that order? --8<---------------cut here---------------end--------------->8--- -- Manuel Giraud From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 08 12:12:28 2024 Received: (at 71264) by debbugs.gnu.org; 8 Jun 2024 16:12:28 +0000 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 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== 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) From: Manuel Giraud To: Eli Zaretskii Subject: Re: bug#71264: 30.0.50; Dired deletion moves point under auto-revert In-Reply-To: <87r0d9m5af.fsf@ledu-giraud.fr> (Manuel Giraud's message of "Fri, 07 Jun 2024 12:11:04 +0200") 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> Date: Sat, 08 Jun 2024 18:11:53 +0200 Message-ID: <87h6e3wh12.fsf@ledu-giraud.fr> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 71264 Cc: basil@contovou.net, 71264@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= 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 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 15 04:52:53 2024 Received: (at 71264) by debbugs.gnu.org; 15 Jun 2024 08:52:53 +0000 Received: from localhost ([127.0.0.1]:55338 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sIP9Z-0005jy-1R for submit@debbugs.gnu.org; Sat, 15 Jun 2024 04:52:53 -0400 Received: from eggs.gnu.org ([209.51.188.92]:48124) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sIP9W-0005jb-Be for 71264@debbugs.gnu.org; Sat, 15 Jun 2024 04:52:51 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sIP9O-0001au-EV; Sat, 15 Jun 2024 04:52:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=3hitjnzQvU2n7HZViLoy5hrs7HFZW1gN5j1RYqdjYHM=; b=HCElUzNvjVD6 6Wlt4164E6eIOvqE5mQYy/xLOqf9ByWL2lklM1XVUKjpvER/IucPMAu6l3Nxb2iA2srbrwJnH8B5T jJPAXoa96HnnjQkXzd+5VcGaPjvJyKC+dbq77hddK4QRjaaaKN+cKHGH0VhyHVhbEjseaC7msNQgY Qgfg+quOHxyQi2EF1uNtziOqxugx92Wq5bzYvT9QQkN6qPLWh04u6G6n27r6mgSHiSJr4op1josNy cly3V399yaenqDRgTMXq+jkG9Pw22WVhaMiIGXI1RzFh2eL72//VjxUJIIIN6KVoS38KbVWZNwYc9 J3cX/QHxRwWFxSNeoYIT1A==; Date: Sat, 15 Jun 2024 11:52:37 +0300 Message-Id: <86h6duvb8q.fsf@gnu.org> From: Eli Zaretskii To: Manuel Giraud In-Reply-To: <87h6e3wh12.fsf@ledu-giraud.fr> (message from Manuel Giraud on Sat, 08 Jun 2024 18:11:53 +0200) Subject: Re: bug#71264: 30.0.50; Dired deletion moves point under auto-revert 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> <87h6e3wh12.fsf@ledu-giraud.fr> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 71264 Cc: basil@contovou.net, 71264@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Manuel Giraud > Cc: basil@contovou.net, 71264@debbugs.gnu.org > Date: Sat, 08 Jun 2024 18:11:53 +0200 > > I don't know if this is the right approach but the following patch gives > me the expected behaviour. 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? Also, I presume all the Dired tests in the test suite still pass after the change? Thanks. From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 17 05:29:10 2024 Received: (at 71264) by debbugs.gnu.org; 17 Jun 2024 09:29:10 +0000 Received: from localhost ([127.0.0.1]:59558 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJ8fl-0004OB-L0 for submit@debbugs.gnu.org; Mon, 17 Jun 2024 05:29:10 -0400 Received: from ledu-giraud.fr ([51.159.28.247]:25281) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJ8fi-0004Nz-RA for 71264@debbugs.gnu.org; Mon, 17 Jun 2024 05:29:08 -0400 DKIM-Signature: v=1; a=ed25519-sha256; c=simple/simple; s=ed25519; bh=Lo66Gfr3 /awVZphkZ5/9wVpIn/5PM/C7gmmcpTnFWFc=; h=date:references:in-reply-to: subject:cc:to:from; d=ledu-giraud.fr; b=1AbeYaVJDFST8CTHAjgITEaJW8aqsx jlGMlK7ujqfSatwK6fK7Y97aWZa+5iQSxQ0A+RpU7hlS16go03s4oKDQ== DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=rsa; bh=Lo66Gfr3/awVZphk Z5/9wVpIn/5PM/C7gmmcpTnFWFc=; h=date:references:in-reply-to:subject: cc:to:from; d=ledu-giraud.fr; b=RYlGpsFCS9Rxa71FCGU6P+Myh8yxUkBvLwl0Rz GJU/8/biWFCYS4Gg/nxTwy5FpdvqaWTbqDPrBv4wgNpCy1HDzSTz15vmaU6a0ytpaXQXXk 5dn4YrvWEYATlx1QbTTyBaAqL+Sd8kiMNT699mwj+PA0NoB3I7v5vdur7hlJubp7cT56kj 8H2bTxq/cGOi1/CT87dJjaqu3S+ihedyduPnoaeBWkhOR989thx+le0OzOIGH43X0a98j6 3Vf5AxpCylp6mVXsGs7lO0gZ+GosxmWvNKfWy9z6WWIyZZGMcjv0ih1WoTFAfqqAVKHpRG jaLN8IEFHcvqJ8ow/A3DVecQ== Received: from computer ( [10.1.1.1]) by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id a824b22f (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Mon, 17 Jun 2024 11:29:02 +0200 (CEST) From: Manuel Giraud To: Eli Zaretskii Subject: Re: bug#71264: 30.0.50; Dired deletion moves point under auto-revert In-Reply-To: <86h6duvb8q.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 15 Jun 2024 11:52:37 +0300") 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> <87h6e3wh12.fsf@ledu-giraud.fr> <86h6duvb8q.fsf@gnu.org> Date: Mon, 17 Jun 2024 11:29:01 +0200 Message-ID: <875xu7hq8y.fsf@ledu-giraud.fr> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 71264 Cc: basil@contovou.net, 71264@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Eli Zaretskii 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. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Prevent-auto-revert-when-deleting-entry-bug-71264.patch >From b4b3e32a7f1375ff228bc25311a56062d64aa049 Mon Sep 17 00:00:00 2001 From: Manuel Giraud 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 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Disposition: attachment; filename=dired-tests.log Content-Transfer-Encoding: quoted-printable Running 16 tests (2024-06-17 11:19:04+0200, selector =E2=80=98(not (or (tag= :expensive-test) (tag :unstable) (tag :nativecomp)))=E2=80=99) 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: ((# nil 4) nil nil) Saved pos: ((# "/tmp/emacs-test-tp9Za3-dire= d/test-subdir" 4) ((# "/tmp/emacs-test= -tp9Za3-dired/test-subdir" 4)) nil) Saved pos: ((# "/tmp/emacs-test-tp9Za3-dire= d/test-subdir" 4) ((# "/tmp/emacs-test= -tp9Za3-dired/test-subdir" 4)) nil) Saved pos: ((# "/tmp/emacs-test-tp9Za3-dire= d/test-subdir" 4) ((# "/tmp/emacs-test= -tp9Za3-dired/test-subdir" 4)) nil) Saved pos: ((# "/tmp/emacs-test-tp9Za3-dire= d/test-subdir" 4) ((# "/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+020= 0, 0.585970 sec) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Disposition: attachment; filename=dired-aux-tests.log Content-Transfer-Encoding: quoted-printable Running 5 tests (2024-06-17 11:19:04+0200, selector =E2=80=98(not (or (tag = :expensive-test) (tag :unstable) (tag :nativecomp)))=E2=80=99) 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) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Disposition: attachment; filename=dired-x-tests.log Content-Transfer-Encoding: quoted-printable Running 2 tests (2024-06-17 11:19:05+0200, selector =E2=80=98(not (or (tag = :expensive-test) (tag :unstable) (tag :nativecomp)))=E2=80=99) 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) --=-=-= Content-Type: text/plain -- Manuel Giraud --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 22 04:53:32 2024 Received: (at 71264-done) by debbugs.gnu.org; 22 Jun 2024 08:53:32 +0000 Received: from localhost ([127.0.0.1]:44368 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sKwV1-0000Of-VL for submit@debbugs.gnu.org; Sat, 22 Jun 2024 04:53:32 -0400 Received: from eggs.gnu.org ([209.51.188.92]:37702) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sKwUz-0000OR-IK for 71264-done@debbugs.gnu.org; Sat, 22 Jun 2024 04:53:30 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sKwUu-00018O-Il; Sat, 22 Jun 2024 04:53:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=SR3u+WxE+XcUM1xRPzX3RT5grajWPzzfPSPdZpO4iy8=; b=VgOnA0Jmjqtc uOUd3QnA7Kgw9gqsQHipVL7vFKaJcjLljSI2dVonC/tSXr5oiu3Yqgy6hZlm0VWaF7Rbsv9TXOswK L1ZrlAhr7DIi9c8H3929kjMfwWVeDDQ3cSOvj5OA4nTe634ILH3DCwb87uGn1oNlGrpBnkEFnSlgU FCmRC/RJ0IUrp9TQvF/3e8CviL8wJaXX4FVPeP9LVOrllkXkmHLU2xwXLP1v9v2kOSfuQUveQNvH3 O78LhecmoS2sosi50GljJ8BZk+psLcQMR6uWvUbQCwBhdUmQmDtE21MXxLsbawPsRORq7AVVS5PDM UN91uEVoaftn0hsyw44QFA==; Date: Sat, 22 Jun 2024 11:53:22 +0300 Message-Id: <86le2xicjh.fsf@gnu.org> From: Eli Zaretskii To: Manuel Giraud In-Reply-To: <875xu7hq8y.fsf@ledu-giraud.fr> (message from Manuel Giraud on Mon, 17 Jun 2024 11:29:01 +0200) Subject: Re: bug#71264: 30.0.50; Dired deletion moves point under auto-revert 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> <87h6e3wh12.fsf@ledu-giraud.fr> <86h6duvb8q.fsf@gnu.org> <875xu7hq8y.fsf@ledu-giraud.fr> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 71264-done Cc: 71264-done@debbugs.gnu.org, basil@contovou.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Manuel Giraud > Cc: basil@contovou.net, 71264@debbugs.gnu.org > Date: Mon, 17 Jun 2024 11:29:01 +0200 > > Eli Zaretskii 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. Thanks, installed, and closing the bug. From unknown Wed Jun 18 23:04:11 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 20 Jul 2024 11:24:11 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator