From unknown Sat Sep 13 20:35:52 2025 X-Loop: help-debbugs@gnu.org Subject: bug#55578: 29.0.50; auto-revert-use-notify vs 'git checkout -- ' Resent-From: miha@kamnitnik.top Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 22 May 2022 17:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 55578 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 55578@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16532393157745 (code B ref -1); Sun, 22 May 2022 17:09:02 +0000 Received: (at submit) by debbugs.gnu.org; 22 May 2022 17:08:35 +0000 Received: from localhost ([127.0.0.1]:46242 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nsp4F-00020q-11 for submit@debbugs.gnu.org; Sun, 22 May 2022 13:08:35 -0400 Received: from lists.gnu.org ([209.51.188.17]:55168) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nsp4B-00020h-0m for submit@debbugs.gnu.org; Sun, 22 May 2022 13:08:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60494) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nsp4A-00036F-TP for bug-gnu-emacs@gnu.org; Sun, 22 May 2022 13:08:30 -0400 Received: from kamnitnik.top ([2001:19f0:5001:bf2:5400:2ff:fee0:2626]:41344) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nsp48-0001l2-CH for bug-gnu-emacs@gnu.org; Sun, 22 May 2022 13:08:30 -0400 From: miha@kamnitnik.top DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kamnitnik.top; s=mail; t=1653239304; bh=ACYxZ+AoTbiGNYYP0pcvGqDgN00STh/bguwuAIMqr7M=; h=From:To:Subject:Date:From; b=xRvp3s++M5IyEM9/t4BKsCD1GjE3kskiH+OtGb6eWHhC0VqjX+dpgOkFQCjxV4p2Y HpvjSAQim7XUfoScWFz7OHQZ9tiQLijuJCjpe8VA3EBgl7IH9RusTmo6aoPGNmPa66 irZMGQxkCcelpkMqXd2jOlKDC7aFQOJBZmFXcStPaCJ8a3uvVVHOK27IDGutbxzPBR kj5bNHOJ83EoFVen32vmykpwIRePbH7BtOfh44qcGxZQRhaqbB8ZI7jCaKYIDs7HoC n8HPSde/qvDH6y/eHITrr+kPrZC/gjNw4wf0j8WUe1BepkvY16dAzW5L1+q4LXoaZu 2MFiH2q5gmT3Q== Date: Sun, 22 May 2022 19:18:29 +0200 Message-ID: <87r14lfpui.fsf@miha-pc> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Received-SPF: pass client-ip=2001:19f0:5001:bf2:5400:2ff:fee0:2626; envelope-from=miha@kamnitnik.top; helo=kamnitnik.top X-Spam_score_int: 24 X-Spam_score: 2.4 X-Spam_bar: ++ X-Spam_report: (2.4 / 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, FROM_SUSPICIOUS_NTLD=0.499, FROM_SUSPICIOUS_NTLD_FP=1.997, PDS_OTHER_BAD_TLD=1.997, SPF_HELO_PASS=-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: 2.7 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Visit a file in a clean git repository, modify it and save its buffer. Turn on auto-revert-mode in its buffer. Run 'git checkout -- ' and notice that auto-revert-mode doesn't revert the buffer immediately using 'notify', it only reverts it according to auto-revert-interval. Content analysis details: (2.7 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.9 SPF_FAIL SPF: sender does not match SPF record (fail) [SPF failed: Please see http://www.openspf.org/Why?s=mfrom; id=miha%40kamnitnik.top; ip=209.51.188.17; r=debbugs.gnu.org] 1.6 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: kamnitnik.top (top)] -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [209.51.188.17 listed in list.dnswl.org] 2.0 FROM_SUSPICIOUS_NTLD_FP From abused NTLD 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD -0.0 T_SCC_BODY_TEXT_LINE No description available. 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.3 (/) --=-=-= Content-Type: text/plain Visit a file in a clean git repository, modify it and save its buffer. Turn on auto-revert-mode in its buffer. Run 'git checkout -- ' and notice that auto-revert-mode doesn't revert the buffer immediately using 'notify', it only reverts it according to auto-revert-interval. This is in contrast to modifying the file with a command like 'echo test >> ', after which auto-revert-mode reverts the buffer instantly using 'notify'. This seems to be because prior to writing the file, 'git checkout' unlinks it first. It would be nice if auto-revert-mode worked with notify in such cases as well. git version 2.36.0 cpu: x86_64 no commit associated with this build sizeof-long: 8 sizeof-size_t: 8 shell-path: /bin/sh In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, cairo version 1.17.6) of 2022-04-20 built on miha-pc Repository revision: 4714f34928c12cc9ebda7c115526db4aa87c0d51 Repository branch: tmp Windowing system distributor 'The X.Org Foundation', version 11.0.12101003 System Description: Artix Linux Configured using: 'configure --without-libsystemd --with-native-compilation' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBOTF LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS WEBP X11 XDBE XIM XPM GTK3 ZLIB Important settings: value of $LANG: en_US.utf8 locale-coding-system: utf-8-unix Major mode: Fundamental Minor modes in effect: tooltip-mode: t global-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 blink-cursor-mode: t buffer-read-only: 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 rmc puny dired dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068 epg-config gnus-util text-property-search time-date seq gv subr-x byte-opt bytecomp byte-compile cconv 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 iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd 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 simple cl-generic 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 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 move-toolbar gtk x-toolkit x multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 59212 9167) (symbols 48 5734 0) (strings 32 16445 1783) (string-bytes 1 547865) (vectors 16 11787) (vector-slots 8 271542 16531) (floats 8 21 25) (intervals 56 334 7) (buffers 992 11)) --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJHBAEBCAAxFiEEmxVnesoT5rQXvVXnswkaGpIVmT8FAmKKcGUTHG1paGFAa2Ft bml0bmlrLnRvcAAKCRCzCRoakhWZP8VeEAC3UzNZ1qVSb2KyfhY5AUzU6wla0zgQ EdiHUF95KHVoqQVfpB9NtwkZMntjlboWQgDuJdsGIHhJZVtO3h57c+YKJe1gBx6y S1I/yEdbFbEa8wD99vSyo1E1JNhQrGtntfvmVPyCWGrX99blUYJH72xvhIiKmtyc Rs+D5ITo+buOSZd7e42K2YWuxJL29M/OnJFzva+o8gVIRDYF3F7duLqa5Zu19xfD CtbLdWGZ/yueVu27/lvubSrNoE1FVmWi1L0nE4EKm8CZUa9XJrH1X5oem6PcAnwr RrMArFimwbIqv4fcgyk8nuKUSbWkVCiUO31jOKoSx5wJXFkLLzbXhglzeXjkAqHY kZqXCQlhGlFqikJIiB2lPLws9mO47uroLFNvQw9fXWpiUKPgKyNUm1BNtY5XxrLm 9UuKCDgaPtaHCjoQPUi5OjpIKo11GeAtkL0/unt0i6BKlcAqycOrk136+f3+WYLG 6FR5iBNoN7zdNJyxmMA34QKcvae2kO3e3dTkefC2EJTCvFFnvlk8W8Q+qMqKO/Kf yy/WShKtZ1bFS3zFIJxJslVZZjUfTkPQGiR3SQOyBPEXrvKZ19QVNxGH835nOCMc SV45CmlBc/LvoeWM8KwS8If8r1qXhjuYoVw2o7/DlWp1N16O5Yhpw3XQseEEBpcF dZLDfkuaBf4guA== =8l/c -----END PGP SIGNATURE----- --=-=-=-- From unknown Sat Sep 13 20:35:52 2025 X-Loop: help-debbugs@gnu.org Subject: bug#55578: 29.0.50; auto-revert-use-notify vs 'git checkout -- ' Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 24 May 2022 12:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55578 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 55578@debbugs.gnu.org Cc: miha@kamnitnik.top X-Debbugs-Original-To: miha--- via "Bug reports for GNU Emacs, the Swiss army knife of text editors" X-Debbugs-Original-Cc: 55578@debbugs.gnu.org, miha@kamnitnik.top Received: via spool by 55578-submit@debbugs.gnu.org id=B55578.16533937685683 (code B ref 55578); Tue, 24 May 2022 12:03:01 +0000 Received: (at 55578) by debbugs.gnu.org; 24 May 2022 12:02:48 +0000 Received: from localhost ([127.0.0.1]:51162 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ntTFQ-0001Ta-Fw for submit@debbugs.gnu.org; Tue, 24 May 2022 08:02:48 -0400 Received: from mout.gmx.net ([212.227.15.19]:59835) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ntTFL-0001TF-Ps for 55578@debbugs.gnu.org; Tue, 24 May 2022 08:02:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1653393757; bh=jI5J6TwBH6cdyWi/zm01Ri+ealbKdcXk1roH88kZzv4=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=X2OBeGPtgCzXUuasRO0Ffskhk5NMNSqFuvljVfxPUKjwxW1GkV8nBpF54yX2F1i9w ZeeGfbEs9IqjlGsDsf5ymAefBA11QvYSxN7qIr1xFbirJuB3byfhp+V7ezasYyEpAN PGOivNhE+fdqL+9MfaPSCDuh80pjNaqo0q/JowTI= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from gandalf.gmx.de ([213.220.149.14]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MrhUE-1nWI6z1N9o-00nklA; Tue, 24 May 2022 14:02:37 +0200 From: Michael Albinus References: <87r14lfpui.fsf@miha-pc> Date: Tue, 24 May 2022 14:02:35 +0200 In-Reply-To: <87r14lfpui.fsf@miha-pc> (miha's message of "Sun, 22 May 2022 19:18:29 +0200") Message-ID: <87mtf7nnok.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:ILktmV5+ke7tvLngIIhwiVqFp0zhr+T44XG3ydp+EOcmZ/n4hDe w/+tcjDbbe5fc4dnS7vDV9I7ciMEX3GQyefjVfUvDMA8TMVW5rRLKdgbRPzdvbh5anE+q7w Q0F2KD4yLNfArUz/0NraKQfERpYYClBc4UqQfVOnePxHvoRJ1qis/DbfFVyBwi2biNPn7UI +/LAC/Z90akoDIavmi5yw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:mTLK0ZJrVBw=:hjCPd7WrN4/y2x+PDnU9bY RI8YUNdQNyDx5A2APIKFDNFJrsKm49PSDKYpoczouyhbWtzrv8nK21uASQxYGeheiswQyzlfR asZLvRGh4GH12KJIBgA7ymQQgB4WiyK0qCxJ1ukyw33G5pjs7goIPvBvKK459fJcbDrYZPGCG teX3uMbVUMwrBFpPq47TIs8gKGR36NPaqCT8DWv6ieeLephZudVC8Gp41SsWIiMXJfmynqeRn MgB629ysx++qeTcTx9bHw7wSo2i3aPmmneQ9fhXXTb+DtAUq5IuSvtoxjxikJibqLSsQc969D g2r7D8VxYMKYLQMWUpX7VwsdzQS2uxl9QADyRI4fcEnFjsyJZHATf7mfq2TJWuEl27EQjHBl1 yWrW+bUzb2lqdZw42ZyRtUrdPhkiJ1agxYCEvDZURkSx7EPQlzEmGbjB4EPzc2oO+ozRd1dxe mzBddzIc7d1cuj2y6ttdNPOTqsFpqwg/5kMTu3yG00fzMAWOH+bbz2K7L3m2SaD2tnbWH2cZS CapflCsgWg54OawgmJMPCPBo45N3kveK1WeiXzcP+XEuXsoA9I/8JkgTjZ7UGbQNCN0Vgfdta LaezI3VpTyRbUwsA9fATsU/J3PMuuR7ZQXlVzq02/NLA6rHPv6iamm7cf4DAz75D8TsEuyR4I CBMaoCa/yztsM5N7euoopGqCApEjzyyVGRdPfHVuJ5GAefu0wWKsyzRVO3L0nzqfXtzfv2Qle oXHv5SWE1A3+H9auW2N5GRQHHn6sUll/uQnnKXsm08cbXcojLofiwXUMWVIS8M28GmHUJdIL0 ZhMF4bcowOCMxNvfax6/3q3gl4pP4ccucbK5BhBPWQZ3d+KLIZ6Has5bxk2R/+BY/p0JVtLcA zJpOLTfXVa2OmMu+xbxvRKJx1L3QStmzFVYfGkTPBIOaX2oIjPViTAW8DcQzK7o5LwWF/i9WV 3M+wpTpfQxU4Ltls9on9QsCQrxLD5nO36RJwm2JTBYUmxKcI+W6hGuBfdZi+2Nu9UaH/hNGSt 7oY85qyLbMdabLxJ9i5CLu6gx9H9FeEQb1E4X4ox5KbWwnuLPgHP52esOBAsw5Iv2ajTuQV0P 7VgWm7WFSV6ur2++KZuWAF1UqBevA5vlZeXniD0l0borU5RoEunjaivmQ== X-Spam-Score: -0.0 (/) 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.7 (-) miha--- via "Bug reports for GNU Emacs, the Swiss army knife of text editors" writes: Hi, > Visit a file in a clean git repository, modify it and save its buffer. > Turn on auto-revert-mode in its buffer. > > Run 'git checkout -- ' and notice that auto-revert-mode > doesn't revert the buffer immediately using 'notify', it only reverts it > according to auto-revert-interval. > > This is in contrast to modifying the file with a command like > 'echo test >> ', after which auto-revert-mode reverts the > buffer instantly using 'notify'. > > This seems to be because prior to writing the file, 'git checkout' > unlinks it first. It would be nice if auto-revert-mode worked with > notify in such cases as well. Indeed, git deletes and (re-)creates the file. See the following file notify events, when monitoring the git repository (/tmp/xxx is the repo, /tmp/xxx/foo the file). This happens, after calling "git checkout -- foo": --8<---------------cut here---------------start------------->8--- file-notify-handle-event (file-notify ((1 . 0) (delete) "foo" 0) file-notify--callback-inotify) file-notify-handle-event (file-notify ((1 . 0) (create) "foo" 0) file-notify--callback-inotify) file-notify-handle-event (file-notify ((1 . 0) (modify) "foo" 0) file-notify--callback-inotify) --8<---------------cut here---------------end--------------->8--- The corresponding events for the file /tmp/xxx/foo are --8<---------------cut here---------------start------------->8--- file-notify-handle-event (file-notify ((1 . 1) (delete) "foo" 0) file-notify--callback-inotify) file-notify-callback (1 . 1) deleted "/tmp/xxx/foo" nil #s(file-notify--watch "/tmp/xxx" "foo" auto-revert-notify-handler) "/tmp/xxx/foo" "/tmp/xxx" auto-revert-notify-handler ((1 . 1) deleted "/tmp/xxx/foo") file-notify-handle-event (file-notify ((1 . 1) stopped "/tmp/xxx/foo") auto-revert-notify-handler) auto-revert-notify-handler ((1 . 1) stopped "/tmp/xxx/foo") --8<---------------cut here---------------end--------------->8--- As you can see, file notifications are stopped after receiving the 'delete' event. This is a feature of our file notifications implementation. Running "echo test >> foo" instead shows the events --8<---------------cut here---------------start------------->8--- file-notify-handle-event (file-notify ((1 . 0) (modify) "foo" 0) file-notify--callback-inotify) file-notify-callback (1 . 0) changed "/tmp/xxx/foo" nil #s(file-notify--watch "/tmp/xxx" nil auto-revert-notify-handler) "/tmp/xxx" "/tmp/xxx" auto-revert-notify-handler ((1 . 0) changed "/tmp/xxx/foo") --8<---------------cut here---------------end--------------->8--- This works as expected. So I fear there's nothing we can do. Best regards, Michael. From unknown Sat Sep 13 20:35:52 2025 X-Loop: help-debbugs@gnu.org Subject: bug#55578: 29.0.50; auto-revert-use-notify vs 'git checkout -- ' Resent-From: Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 24 May 2022 15:49:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55578 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Michael Albinus , 55578@debbugs.gnu.org Received: via spool by 55578-submit@debbugs.gnu.org id=B55578.165340731423260 (code B ref 55578); Tue, 24 May 2022 15:49:01 +0000 Received: (at 55578) by debbugs.gnu.org; 24 May 2022 15:48:34 +0000 Received: from localhost ([127.0.0.1]:53149 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ntWlt-000636-I6 for submit@debbugs.gnu.org; Tue, 24 May 2022 11:48:33 -0400 Received: from kamnitnik.top ([209.250.245.214]:42544) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ntWlq-00062w-Bf for 55578@debbugs.gnu.org; Tue, 24 May 2022 11:48:31 -0400 From: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kamnitnik.top; s=mail; t=1653407308; bh=l5dQqfuLRe7Sg0iVtxgEdOo6QtD6opih2p6Io1h2sBM=; h=From:To:Subject:In-Reply-To:References:Date:From; b=uaWMkzQa7ZUh7Ejlzax/xzlpRrxwvwCU9g8fWh8nq33Gjml1rues3Bx7r3jPmD2Lw 4qtliRjuaQHjwvuBFmw2yHt3x4kfn/ve/3RCL5OCRzIaZwMMSRaKAxjCLAuOzipgtz CsGLg9384LNl6VOUBZn6bs/bZjp/iVXWVE/w1VFt5J4Y1K20ue3YEKuPbN6TfGaEYN WJZp5OZaNzPSGcK6vHx5dAvGIRzK68FBDTBskdqU2L0X0hiFqU0H4ztNdOavgh5bZ8 kGFsuvhupsfIB3CkwwzpYfho7jxGcKkUBtlEZrwyoWz+623dothNgfpqgqUBWruQO5 dxb2UBidisrxQ== In-Reply-To: <87mtf7nnok.fsf@gmx.de> References: <87r14lfpui.fsf@miha-pc> <87mtf7nnok.fsf@gmx.de> Date: Tue, 24 May 2022 17:58:36 +0200 Message-ID: <87leuqgbwz.fsf@miha-pc> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 2.1 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Michael Albinus writes: > Indeed, git deletes and (re-)creates the file. See the following file > notify events, when monitoring the git repository (/tmp/xxx is the repo, > /tmp/xxx/foo the file). This happens, after calling [...] Content analysis details: (2.1 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record 1.6 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: kamnitnik.top (top)] 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD -0.0 T_SCC_BODY_TEXT_LINE No description available. 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 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Michael Albinus writes: > Indeed, git deletes and (re-)creates the file. See the following file > notify events, when monitoring the git repository (/tmp/xxx is the repo, > /tmp/xxx/foo the file). This happens, after calling [...] Content analysis details: (2.1 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record 1.6 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: kamnitnik.top (top)] 1.0 BULK_RE_SUSP_NTLD Precedence bulk and RE: from a suspicious TLD 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD -0.0 T_SCC_BODY_TEXT_LINE No description available. -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager --=-=-= Content-Type: text/plain Michael Albinus writes: > Indeed, git deletes and (re-)creates the file. See the following file > notify events, when monitoring the git repository (/tmp/xxx is the repo, > /tmp/xxx/foo the file). This happens, after calling "git checkout -- foo": > > --8<---------------cut here---------------start------------->8--- > file-notify-handle-event (file-notify ((1 . 0) (delete) "foo" 0) file-notify--callback-inotify) > file-notify-handle-event (file-notify ((1 . 0) (create) "foo" 0) file-notify--callback-inotify) > file-notify-handle-event (file-notify ((1 . 0) (modify) "foo" 0) file-notify--callback-inotify) > --8<---------------cut here---------------end--------------->8--- > > The corresponding events for the file /tmp/xxx/foo are > > --8<---------------cut here---------------start------------->8--- > file-notify-handle-event (file-notify ((1 . 1) (delete) "foo" 0) file-notify--callback-inotify) > file-notify-callback (1 . 1) deleted "/tmp/xxx/foo" nil #s(file-notify--watch "/tmp/xxx" "foo" auto-revert-notify-handler) "/tmp/xxx/foo" "/tmp/xxx" > auto-revert-notify-handler ((1 . 1) deleted "/tmp/xxx/foo") > file-notify-handle-event (file-notify ((1 . 1) stopped "/tmp/xxx/foo") auto-revert-notify-handler) > auto-revert-notify-handler ((1 . 1) stopped "/tmp/xxx/foo") > --8<---------------cut here---------------end--------------->8--- > > As you can see, file notifications are stopped after receiving the > 'delete' event. This is a feature of our file notifications implementation. > > Running "echo test >> foo" instead shows the events > > --8<---------------cut here---------------start------------->8--- > file-notify-handle-event (file-notify ((1 . 0) (modify) "foo" 0) file-notify--callback-inotify) > file-notify-callback (1 . 0) changed "/tmp/xxx/foo" nil #s(file-notify--watch "/tmp/xxx" nil auto-revert-notify-handler) "/tmp/xxx" "/tmp/xxx" > auto-revert-notify-handler ((1 . 0) changed "/tmp/xxx/foo") > --8<---------------cut here---------------end--------------->8--- > > This works as expected. So I fear there's nothing we can do. I imagine that after receiving a 'delete' event, auto-revert-mode could set up a file-notify watch handler on the directory containing the (now deleted) file. This handler would respond to a 'create' event corresponding to the filename by reverting the buffer, removing the directory file-notify watch and (re-)adding an ordinary file-notify handler on the file. Are there any obvious flaws with this approach that I'm missing? > Best regards, Michael. Best regards. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJHBAEBCAAxFiEEmxVnesoT5rQXvVXnswkaGpIVmT8FAmKNAKwTHG1paGFAa2Ft bml0bmlrLnRvcAAKCRCzCRoakhWZP2e6D/4vg4chM7OkaZo9b0MlvQo4d+q08DUB v8AhCtUQgw47gPHiHS1b5WhiRXiyK4hEg1YRTRmTjaasm25YZRb0wsTscki6fVgu gR5r/D7KJkVYd7oM240AVInmX44IcgADE1yipDev2JEqXmvtFPlKDiWeqtfnRvhH VR/22AlqJBOCn///QYi/oXAhopMWn+6/hrpSb0u1W7vy7XyzSSPaGmKu0r3nK1uW GPfFeo+h5+sb/9MdkAPLyZR+Xdrf7CRFMUFldof2VLc+o7+BBub8bFhk8/Nk688d buUGDF1ZsQtsKumFYAotPgoKRI7vKOlw+i9LiQ8LMWFhXx+11I7ToCf9lEpp6YNl zaAoyB+0oLSpZX2S5jE++/f937FUVSlsGslPxICsqki2BphkA2GoC20u9UrIm2ha I9jAS4F3WGYTg9M3vvacqvXuXRHAgtC4bkc1k7L9xZE6gySiJZSwdfTio9g0RAjY EahlmubGHdtzORG+pZvCI2u328lBW4bvkSuKWMB8zSEN8tHwKLmz8sY7PA3CLnSP N2tHC1jETjHxIi9mstQbXM7NfOgvX7V8MR8Lury3C0ufZ+VHFLmoA5nue++X7fOl /7IxapsqpWVnY1myG4XxIlpAUwqNBYcbqTO4KygxOVw547B17uvxx7aQSBhipFZo u6ow4kgj7SJ08g== =6GeB -----END PGP SIGNATURE----- --=-=-=-- From unknown Sat Sep 13 20:35:52 2025 X-Loop: help-debbugs@gnu.org Subject: bug#55578: 29.0.50; auto-revert-use-notify vs 'git checkout -- ' Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 24 May 2022 17:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55578 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Cc: 55578@debbugs.gnu.org Received: via spool by 55578-submit@debbugs.gnu.org id=B55578.165341476911267 (code B ref 55578); Tue, 24 May 2022 17:53:02 +0000 Received: (at 55578) by debbugs.gnu.org; 24 May 2022 17:52:49 +0000 Received: from localhost ([127.0.0.1]:53286 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ntYi9-0002vf-FR for submit@debbugs.gnu.org; Tue, 24 May 2022 13:52:49 -0400 Received: from mout.gmx.net ([212.227.15.15]:38647) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ntYi6-0002vR-Px for 55578@debbugs.gnu.org; Tue, 24 May 2022 13:52:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1653414759; bh=qjL/pYzMhjm/Jo3wPGa/rzgF6+3MQUWKyN7u6X81ybo=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=QbVCvXIpGS+wrBSV+rZ6FVbYH0nFvAYEUl93OMN4YI4xOEYyLdIWuduHj+YqzVcL2 Q4c49r8YzIdG9bjjGbqZKJQFMpbOFkfAFsBxdqM08pw2lYkPv4hgcHuLDq3E6fAenh R5CDhZXvYosP8nV0UXK2OrZKdDyBierqZUDf9O+E= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from gandalf.gmx.de ([213.220.149.14]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MWzfv-1oLxSI2uF7-00XIe2; Tue, 24 May 2022 19:52:39 +0200 From: Michael Albinus References: <87r14lfpui.fsf@miha-pc> <87mtf7nnok.fsf@gmx.de> <87leuqgbwz.fsf@miha-pc> Date: Tue, 24 May 2022 19:52:37 +0200 In-Reply-To: <87leuqgbwz.fsf@miha-pc> (miha@kamnitnik.top's message of "Tue, 24 May 2022 17:58:36 +0200") Message-ID: <87bkvmom1m.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:C/+McGujBHM1fByraeDgNVFo5SY6Gg7ix92wyjelqJcDAkS/ttC tXE2WLfd5wvH7IJM/3gaTb5JsZxehGQqq01pZmZm8BME6Q9XaiVMNcvIng9YpLJq0keWRUM dM2iuBlBzEQ6mrCQ516UX0CZcmWdrMrlXU7amxEE+ldebcPSIDrD/LDZMpZsvY4NXcT+CAb UPYMT7xlyOfhcsh4/R+ng== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:Amre5xq5C1g=:a2lCmtcOmbjuqAGhgrXDMj QhWjsWGz7hZV6YBobbxNvJRBOM1zVocWnCiqPeoi2dYoUjZGi6jl4gbo3ldwccAXqAupKO657 R5I4ZUjkxrrfSNRsqpeyTlqIYLMZ5CvbOkui3vHQJq76TB1k259iw6zVPDl223zZ/TGbIXa/J zhSZgfAkGFGCFl2XWai/p7Q8yWvzG+K/xk5VXoAOsvDqslO8iq2BoUbOJD/zMZ8e0n2hRi5Ct MIh1MuKuaJTBIGn9tZlZznlBNNSxAkv+kwKZj14qU7+XAJU0QuwWPcX+rGPfmPK5zFabs5yzJ 4f7Z4Q0gj5Gc8laLM7kYEG+GgHEIqEyI5oWxiBSYFXw6cs4nqZMq+5x1mWYoHpPxm+Rq7YuxL jEAuAZZxT4EfLoEH598qMYp1svBR8qs5nIvKNlGJJ+OLGNynuVnS4AKapvgCQK8A8LAUTBJM4 Ky8+NN9URpKXAQrRq3Sqzd1X0qHpPz7rUqk3ukzV4d5FO+7+FZaGYWJq8qfHirLCyJVPMtJET AgpnrnRxR52yeCC0D1ZfcOGKzfvcFa8ZAoONr+OrbTu/6Y7uj6y8Et+6n/mbrB4K3VnCE+nKE 179ExxvAsWiwNnZyGFSynShzITYXq4jvVIUnTXJ6wyu9frvNwxe/UFmQdItvWlHOlFcBKPAp1 ApEWFnSZxOCBFfd6nH0eVl1CkRo7RIk7ids0g1tbzAoOUB2xKxCnxNLZBrrCUaDPepgh1uUW8 dh6F1kh1STTJNY42HZTx8BD3FLI5i6KCA4DCaG8O+7flrKXhyXp0MsI2QAHI39lYIsFF6/rGv rwOWhutRbhonlr2nAvAsn2MWkgHheXcl+j+fD7xAtRSAFiKp0WOXm98mhT11hzHZ3DTxRv5/i KY9f8qCuA7L9z2ghvx0LE0C9sAbYMzWoeM5jn1DUNJ+qx2Hyksn5PL24GrxR/BtCi4Sq2TPc/ EF3Zui6pt9Pl6bjpWaIdsD38fOALom5QT84bqUmHoO3DeQVIEpmh0QfG36U6zEiEaO5yvq/oH RWZ5DAUPK76THG3MviXjMi8I+wZ24nFVPV68YftKYUClUD5mXLE7pzeB2GD6uELFMkq0gd6Ww haA+xqNyBXGGXvbW6HvRJKmiFZwxOVB/S/HetvnCEn7wdRdsArt37T0cg== X-Spam-Score: 0.9 (/) 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.1 (/) writes: Hi, > I imagine that after receiving a 'delete' event, auto-revert-mode could > set up a file-notify watch handler on the directory containing the (now > deleted) file. This handler would respond to a 'create' event > corresponding to the filename by reverting the buffer, removing the > directory file-notify watch and (re-)adding an ordinary file-notify > handler on the file. Anything goes. But there are traps. > Are there any obvious flaws with this approach that I'm missing? See the notifications the auto-revert handler receives: --8<---------------cut here---------------start------------->8--- file-notify-handle-event (file-notify ((1 . 1) (delete) "foo" 0) file-notify--callback-inotify) file-notify-callback (1 . 1) deleted "/tmp/xxx/foo" nil #s(file-notify--watch "/tmp/xxx" "foo" auto-revert-notify-handler) "/tmp/xxx/foo" "/tmp/xxx" auto-revert-notify-handler ((1 . 1) deleted "/tmp/xxx/foo") file-notify-handle-event (file-notify ((1 . 1) stopped "/tmp/xxx/foo") auto-revert-notify-handler) auto-revert-notify-handler ((1 . 1) stopped "/tmp/xxx/foo") --8<---------------cut here---------------end--------------->8--- The relevant event `auto-revert-notify-handler' reacts on is the `stopped' event. In this case it deletes the file monitor, and continues with polling. The `delete' event, received before, is ignored. Receiving the `stopped' event can have different reasons. It happens when the monitored file is deleted (like in our case). It could also happen when the user has killed the corresponding file monitor, either explicitly (calling `file-notify-rm-{all-watches,watch}'), or implicitly by calling something else. The autorevert package cannot know the reason, and it cannot know, whether the file is deleted and will be recreated, possibly. So we cannot implement an automatism as above. What we could implement is a mechanism, which checks while polling, whether file notifications could be instantiated instead. This does not need to be restricted to the case, that the file was deleted and then created, again. It could be activated for any auto-revert polling activitiy, and it must be an opt-in to be configured by the user. Or at least restricted to use cases where it would make sense, like monitoring a git repository. For example a minor mode `auto-revert-restart-notify-mode'. > Best regards. Best regards, Michael. From unknown Sat Sep 13 20:35:52 2025 X-Loop: help-debbugs@gnu.org Subject: bug#55578: 29.0.50; auto-revert-use-notify vs 'git checkout -- ' Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 24 May 2022 18:10:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55578 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Cc: 55578@debbugs.gnu.org Received: via spool by 55578-submit@debbugs.gnu.org id=B55578.165341579712952 (code B ref 55578); Tue, 24 May 2022 18:10:03 +0000 Received: (at 55578) by debbugs.gnu.org; 24 May 2022 18:09:57 +0000 Received: from localhost ([127.0.0.1]:53299 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ntYyj-0003Mq-K4 for submit@debbugs.gnu.org; Tue, 24 May 2022 14:09:57 -0400 Received: from mout.gmx.net ([212.227.17.20]:41179) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ntYyg-0003Ma-UX for 55578@debbugs.gnu.org; Tue, 24 May 2022 14:09:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1653415788; bh=DANMysBNb6m4e5Cji7RAhMHIyeHIvZtZqkReIClpihE=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=eB1mWXz/nKaaNwSr2PhsEwn8tn9242p8aofOTs3yLCRBqFtPH1j9DC65ioBKzjpBh 1qS1BPMU5i7p3oeeRK5ggLYgCvhcYltQj4glwHWTNE4fBpjGIsp2riJFj4f27m0zhu PI93VYHfjoZBPhSOpXL5j0UaRph4wo1BuCcj7do4= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from gandalf.gmx.de ([213.220.149.14]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MfYLQ-1nMg4K0hey-00g3oo; Tue, 24 May 2022 20:09:48 +0200 From: Michael Albinus References: <87r14lfpui.fsf@miha-pc> <87mtf7nnok.fsf@gmx.de> <87leuqgbwz.fsf@miha-pc> <87bkvmom1m.fsf@gmx.de> Date: Tue, 24 May 2022 20:09:46 +0200 In-Reply-To: <87bkvmom1m.fsf@gmx.de> (Michael Albinus's message of "Tue, 24 May 2022 19:52:37 +0200") Message-ID: <877d6aol91.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:UBb4fjhK1lRDX2KRzsGa9dRMZ2RHVAoe5+uXjKJOO91FQH1mh2k UvkY93WFN0XTKXApsrwTqrY55QblRUkr8SgJfNXV15tfFwsS/PNHlLSpiF/bnNuAmkZzZx9 C3U2KMcY/IhLD/OEJiygr/1L6mT90ZdMTvo4CHohicABW36yGIR3VlvekOfAAH5RAhQ+7pB +amMNAMLs6filcY3bvECg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:wsuq3jAI/9c=:jv5a5bFv7yx/6EKqiBWaLx odXRj4fQbq0MTontYnaKLtmDqUbSD4IStCt4VM9j/ar2pDNT9ddcXOork8cy4zusxFW/SZBWf kqLuYootJVQCEebR90XLfL7TPgDsH67TUFevjP1vkGvfoMuP2NveuiCDOisK6fto4EZjNSQ7Z mPAbVnyfLtYG5M9OpgRyR8v/HP6KyUKOVcLzz4KxsLNoxhfG6zfAYzBG8tIBdohxI2XdPPm6I 2M17C96HK9Y+VNY0XCnt0o92ty+2S2P0klwIE8NsdUFYhQOl5/NVm3TRbhOp8C8bVwWT5dGG3 pMxxLSQ6thMW5Ak69jDB3nFj0+dp5EZr/UBwTNwalHJAmNcdMu1NRNOySKb2k6qqUCFVgNzRB +yiHNhzMt7asjKqnu3abFDpDT62KO4Eh99Ck/fMLCNmHb6G0eRQDnnYYlxU3GXrMYpUYsy2wi 0kIKg4UZ8/HzCvtQxU7yImJzpypHqv36NAilI3sqkuwNNiOgwGGlZ3vq+nvuMssm753A67wKf kon2S3IsTu2hSLnWCno0R2LZAEx9XRtCUy5db3PfZW1TqfcAqW9YYolU5T762r78t3Ef9HpmJ iH+pbJtiuasMyktT5QN2Q8t0dmo/QE7nMIi1Bb9B1YgrvyBVPRDSwKKgLP9q7AKcIxI9Ve1h0 kpC3ohA5Km5qVI4nLzejqZoWePeHHfiZbEluxy1R7IkIz9hGaG20PBpINLTny0OB5GUwQdio1 TwYQPcE6RGQaKwzEKVX09UIcSa9UQsNXdPN0vOGPzEVD/QsYHmg0Ez4jkaIQE1pGdnz68euGl tsSoPR6HCKfZODc55+w8A4eGdmSaDpf/dJ7Wj4xd0rYMlwSpE/Jrl+5yiQOeqwZOhuVEG3oOS DTqed/1Df9wjmevlMM1jRZKu2XNLN5bJNbfeArcZT4uZJMdf+4rkgz5ph9zoJt29ZLHbKP1sH s2y9zmlNFQNUiUJl02rHr+AtXffiUyAqDY80lhByZjOTiwB4O2E1BHL9q7sc+vvX2qvw44Rku yXcFu2uU3Y6gqFUT/09uOM6sCGg+cqVTylSgnxsceRlrQhbR6rTOUAYsocKWm2XaxTeRCn/1O Nh4b8dlOEZtXIHQXvbbbJIxES5RxJH8uTKaFxG6qAEW2oZO2oD2zW35pQ== X-Spam-Score: -0.7 (/) 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.7 (-) Michael Albinus writes: Hi, > What we could implement is a mechanism, which checks while polling, > whether file notifications could be instantiated instead. This does not > need to be restricted to the case, that the file was deleted and then > created, again. It could be activated for any auto-revert polling > activitiy, and it must be an opt-in to be configured by the user. Or at > least restricted to use cases where it would make sense, like monitoring > a git repository. For example a minor mode `auto-revert-restart-notify-mode'. Oops, I've just retested. Looks like we have already this. While polling, auto-revert-buffer checks already whether it could (re-)activate file notification for that file. So there's nothing left to do, right? Best regards, Michael. From unknown Sat Sep 13 20:35:52 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: miha@kamnitnik.top Subject: bug#55578: closed (Re: bug#55578: 29.0.50; auto-revert-use-notify vs 'git checkout -- ') Message-ID: References: <87y1xffv3f.fsf@gmx.de> <87r14lfpui.fsf@miha-pc> X-Gnu-PR-Message: they-closed 55578 X-Gnu-PR-Package: emacs Reply-To: 55578@debbugs.gnu.org Date: Wed, 29 Jun 2022 13:39:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1656509942-27713-1" This is a multi-part message in MIME format... ------------=_1656509942-27713-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #55578: 29.0.50; auto-revert-use-notify vs 'git checkout -- ' which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 55578@debbugs.gnu.org. --=20 55578: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D55578 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1656509942-27713-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 55578-done) by debbugs.gnu.org; 29 Jun 2022 13:38:43 +0000 Received: from localhost ([127.0.0.1]:58130 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o6Xty-0007CS-Mz for submit@debbugs.gnu.org; Wed, 29 Jun 2022 09:38:42 -0400 Received: from mout.gmx.net ([212.227.17.20]:39887) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o6Xtu-0007CB-Qa for 55578-done@debbugs.gnu.org; Wed, 29 Jun 2022 09:38:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1656509910; bh=2Jld0KKHO44JpmiCSZJDjVDjL6Eccq7pVNWbmvj6eqo=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=bg/FF6TT8+raD4c2zPfCw3+gG1tjT4+mC5YD7wJKaAUXH2XZG+JOFOkyOfRGOfCCl 2FR+HWTOYNxzg8TkdG9SdyqT5qzDxETzDKxR6QShe03SFv7QQec6g1uB6xWyTeU4sJ XP3QMsajOsjdN+qOBhKrpfwzowfo0SSn5GOC+Pjw= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from gandalf.gmx.de ([79.140.124.34]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N3bSt-1nh4lh1G2l-010gAv; Wed, 29 Jun 2022 15:38:30 +0200 From: Michael Albinus To: Subject: Re: bug#55578: 29.0.50; auto-revert-use-notify vs 'git checkout -- ' References: <87r14lfpui.fsf@miha-pc> <87mtf7nnok.fsf@gmx.de> <87leuqgbwz.fsf@miha-pc> <87bkvmom1m.fsf@gmx.de> <877d6aol91.fsf@gmx.de> Date: Wed, 29 Jun 2022 15:38:28 +0200 In-Reply-To: <877d6aol91.fsf@gmx.de> (Michael Albinus's message of "Tue, 24 May 2022 20:09:46 +0200") Message-ID: <87y1xffv3f.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:ehXjHj8xXzrISDz0SRhGCGW0IbWbc07PBxURSpPBhbV4b5xSlVU NrjHLgzBul/RVXU7W6NXIFb7vW0UIkUaIqikvixbfGFFFlGhE7lZD9kBVxXK9oWvM6BmNr6 Gq7cuu4MxhUyAP101UMVnt3S/87p9nAmbhKSbVrxWg6cCZzbdOKOrFnBCz0SWeJiTSbmrMj nUpQ8YTg/N2feGKU/evnw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:pMrU6TOucwU=:9Bz/M8KCkmLMf8rLPKQI1Z 3RQlt84z7BluWjrby+bIhBcf5135NdG2bIdUrBz+ZdCNMDrM1W2/5YVybzzoq5qK7Bj8KQwkf xeolu84uSKLk08LacXtIQPJaVnuebjHAAemK57wONZN3v5ocOwMD79p9LqszXCJb0KExgGIuF d5nxuU2PeePsGvzzf0U+pK0fuqw5QDtv8etQr88hUh6z+fuzGmhWxbj0OB1BeL/DbnzPK2SOC +QO0KohIgKFX2a2AEaQch+uQH801aQNZd0bsoz7d5XyJDBKZJHmNO0lDDt0Ct/OZ5optAw921 L+xEOWStIJFPR8RVuy8uotrVBCSaYGp/s2osNmr1O6qUeKWLbkfExS7vAvlsc2ByaMptsDyQO D1Y7NdsRaUmjLcW5zXLcD/TCVZL/bkZwVjn1COCRk3Hp9EhRwjD2jFwii9ROpsoJjwtRnhcAj hHO9czWLAexcNf9yHuY0aE2ybaXJI1HbMzihhhErCjMk1sqZBJRWsWETyQSkJmOMhkieUlN0I lqrsuO7Y3d9VeeRJkG+TcFWZsJV2GFjE/9ftiEUKHsAb7sn1pkWZqjKNk/FvSd+w047STwgqO ImkCUVzGE2Kg00qHpIoJ3CZYECqIupDxMGxp9R2r8V+VmUXQD2JXMqy4NOQPUdnwaUm0ZO1m/ qq/NhbLF8MXLyzd0NcYWL1cu2YIuyb3iuigLx9/BbonpMuVtZ0T7X1z9tK6d5UrNZEMUiGW0r NlNWCYKaTqgA0OEdA//pivqEfe8fEU5Bwkgb5YK6B0020DVPw9BIkYNj4Pj+2BnKINLBxDC6h h/vq9/M/EdAMINMJ78Xlvx+5bmDnG6vvS7OvsLneCdKO0u/shvWpeXX1rReQeWVivgGGh/U9Q vJ7ERGiHesVCIq4mjkvnwoL8+SsAZ37wT2+ITpGXxFbdP8fNzJSaASqXVJtm8UDnWgRvFxpeC qbq+if1MI787OzwV8OqOhVAIGLSca6MuU1b99w5jnbX+j6X5DL3y1rrWdbEvYCNWOVNqAa0tM D6qe7s11iZYOMCgr+erRh2xT1cJQPHBN+npp7EmGrsftzy61dg1vT2dKH1epqtMLet4fwWBrR svDmKZuBouosGnLpd/j4Exl0CCsEctO3XNR1GWSi+SyYElGclpxnkBCCg== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 55578-done Cc: 55578-done@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.7 (-) Michael Albinus writes: Hi, >> What we could implement is a mechanism, which checks while polling, >> whether file notifications could be instantiated instead. This does not >> need to be restricted to the case, that the file was deleted and then >> created, again. It could be activated for any auto-revert polling >> activitiy, and it must be an opt-in to be configured by the user. Or at >> least restricted to use cases where it would make sense, like monitoring >> a git repository. For example a minor mode `auto-revert-restart-notify-mode'. > > Oops, I've just retested. Looks like we have already this. While > polling, auto-revert-buffer checks already whether it could > (re-)activate file notification for that file. > > So there's nothing left to do, right? No response for weeks, so I assume it's OK. I'm closing the bug. Feel free to reply if you believe there're still problems. Best regards, Michael. ------------=_1656509942-27713-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 22 May 2022 17:08:35 +0000 Received: from localhost ([127.0.0.1]:46242 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nsp4F-00020q-11 for submit@debbugs.gnu.org; Sun, 22 May 2022 13:08:35 -0400 Received: from lists.gnu.org ([209.51.188.17]:55168) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nsp4B-00020h-0m for submit@debbugs.gnu.org; Sun, 22 May 2022 13:08:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60494) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nsp4A-00036F-TP for bug-gnu-emacs@gnu.org; Sun, 22 May 2022 13:08:30 -0400 Received: from kamnitnik.top ([2001:19f0:5001:bf2:5400:2ff:fee0:2626]:41344) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nsp48-0001l2-CH for bug-gnu-emacs@gnu.org; Sun, 22 May 2022 13:08:30 -0400 From: miha@kamnitnik.top DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kamnitnik.top; s=mail; t=1653239304; bh=ACYxZ+AoTbiGNYYP0pcvGqDgN00STh/bguwuAIMqr7M=; h=From:To:Subject:Date:From; b=xRvp3s++M5IyEM9/t4BKsCD1GjE3kskiH+OtGb6eWHhC0VqjX+dpgOkFQCjxV4p2Y HpvjSAQim7XUfoScWFz7OHQZ9tiQLijuJCjpe8VA3EBgl7IH9RusTmo6aoPGNmPa66 irZMGQxkCcelpkMqXd2jOlKDC7aFQOJBZmFXcStPaCJ8a3uvVVHOK27IDGutbxzPBR kj5bNHOJ83EoFVen32vmykpwIRePbH7BtOfh44qcGxZQRhaqbB8ZI7jCaKYIDs7HoC n8HPSde/qvDH6y/eHITrr+kPrZC/gjNw4wf0j8WUe1BepkvY16dAzW5L1+q4LXoaZu 2MFiH2q5gmT3Q== To: bug-gnu-emacs@gnu.org Subject: 29.0.50; auto-revert-use-notify vs 'git checkout -- ' Date: Sun, 22 May 2022 19:18:29 +0200 Message-ID: <87r14lfpui.fsf@miha-pc> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Received-SPF: pass client-ip=2001:19f0:5001:bf2:5400:2ff:fee0:2626; envelope-from=miha@kamnitnik.top; helo=kamnitnik.top X-Spam_score_int: 24 X-Spam_score: 2.4 X-Spam_bar: ++ X-Spam_report: (2.4 / 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, FROM_SUSPICIOUS_NTLD=0.499, FROM_SUSPICIOUS_NTLD_FP=1.997, PDS_OTHER_BAD_TLD=1.997, SPF_HELO_PASS=-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: 2.7 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Visit a file in a clean git repository, modify it and save its buffer. Turn on auto-revert-mode in its buffer. Run 'git checkout -- ' and notice that auto-revert-mode doesn't revert the buffer immediately using 'notify', it only reverts it according to auto-revert-interval. Content analysis details: (2.7 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.9 SPF_FAIL SPF: sender does not match SPF record (fail) [SPF failed: Please see http://www.openspf.org/Why?s=mfrom; id=miha%40kamnitnik.top; ip=209.51.188.17; r=debbugs.gnu.org] 1.6 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: kamnitnik.top (top)] -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [209.51.188.17 listed in list.dnswl.org] 2.0 FROM_SUSPICIOUS_NTLD_FP From abused NTLD 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD -0.0 T_SCC_BODY_TEXT_LINE No description available. 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: -0.3 (/) --=-=-= Content-Type: text/plain Visit a file in a clean git repository, modify it and save its buffer. Turn on auto-revert-mode in its buffer. Run 'git checkout -- ' and notice that auto-revert-mode doesn't revert the buffer immediately using 'notify', it only reverts it according to auto-revert-interval. This is in contrast to modifying the file with a command like 'echo test >> ', after which auto-revert-mode reverts the buffer instantly using 'notify'. This seems to be because prior to writing the file, 'git checkout' unlinks it first. It would be nice if auto-revert-mode worked with notify in such cases as well. git version 2.36.0 cpu: x86_64 no commit associated with this build sizeof-long: 8 sizeof-size_t: 8 shell-path: /bin/sh In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, cairo version 1.17.6) of 2022-04-20 built on miha-pc Repository revision: 4714f34928c12cc9ebda7c115526db4aa87c0d51 Repository branch: tmp Windowing system distributor 'The X.Org Foundation', version 11.0.12101003 System Description: Artix Linux Configured using: 'configure --without-libsystemd --with-native-compilation' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBOTF LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS WEBP X11 XDBE XIM XPM GTK3 ZLIB Important settings: value of $LANG: en_US.utf8 locale-coding-system: utf-8-unix Major mode: Fundamental Minor modes in effect: tooltip-mode: t global-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 blink-cursor-mode: t buffer-read-only: 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 rmc puny dired dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068 epg-config gnus-util text-property-search time-date seq gv subr-x byte-opt bytecomp byte-compile cconv 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 iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd 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 simple cl-generic 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 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 move-toolbar gtk x-toolkit x multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 59212 9167) (symbols 48 5734 0) (strings 32 16445 1783) (string-bytes 1 547865) (vectors 16 11787) (vector-slots 8 271542 16531) (floats 8 21 25) (intervals 56 334 7) (buffers 992 11)) --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJHBAEBCAAxFiEEmxVnesoT5rQXvVXnswkaGpIVmT8FAmKKcGUTHG1paGFAa2Ft bml0bmlrLnRvcAAKCRCzCRoakhWZP8VeEAC3UzNZ1qVSb2KyfhY5AUzU6wla0zgQ EdiHUF95KHVoqQVfpB9NtwkZMntjlboWQgDuJdsGIHhJZVtO3h57c+YKJe1gBx6y S1I/yEdbFbEa8wD99vSyo1E1JNhQrGtntfvmVPyCWGrX99blUYJH72xvhIiKmtyc Rs+D5ITo+buOSZd7e42K2YWuxJL29M/OnJFzva+o8gVIRDYF3F7duLqa5Zu19xfD CtbLdWGZ/yueVu27/lvubSrNoE1FVmWi1L0nE4EKm8CZUa9XJrH1X5oem6PcAnwr RrMArFimwbIqv4fcgyk8nuKUSbWkVCiUO31jOKoSx5wJXFkLLzbXhglzeXjkAqHY kZqXCQlhGlFqikJIiB2lPLws9mO47uroLFNvQw9fXWpiUKPgKyNUm1BNtY5XxrLm 9UuKCDgaPtaHCjoQPUi5OjpIKo11GeAtkL0/unt0i6BKlcAqycOrk136+f3+WYLG 6FR5iBNoN7zdNJyxmMA34QKcvae2kO3e3dTkefC2EJTCvFFnvlk8W8Q+qMqKO/Kf yy/WShKtZ1bFS3zFIJxJslVZZjUfTkPQGiR3SQOyBPEXrvKZ19QVNxGH835nOCMc SV45CmlBc/LvoeWM8KwS8If8r1qXhjuYoVw2o7/DlWp1N16O5Yhpw3XQseEEBpcF dZLDfkuaBf4guA== =8l/c -----END PGP SIGNATURE----- --=-=-=-- ------------=_1656509942-27713-1--