Package: emacs;
Reported by: z <at> bcc32.com
Date: Sat, 8 Jun 2024 04:45:02 UTC
Severity: normal
Found in version 29.3
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 71424 in the body.
You can then email your comments to 71424 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
View this report as an mbox folder, status mbox, maintainer mbox
bug-gnu-emacs <at> gnu.org
:bug#71424
; Package emacs
.
(Sat, 08 Jun 2024 04:45:02 GMT) Full text and rfc822 format available.z <at> bcc32.com
:bug-gnu-emacs <at> gnu.org
.
(Sat, 08 Jun 2024 04:45:02 GMT) Full text and rfc822 format available.Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
From: z <at> bcc32.com To: bug-gnu-emacs <at> gnu.org Cc: z <at> bcc32.com Subject: 29.3; auto-revert-use-notify buggy interaction with indirect buffers Date: Sat, 08 Jun 2024 00:44:13 -0400
1. emacs -Q 2. Enable global-auto-revert-mode, and ensure auto-revert-use-notify=t 3. Open an org file, such as ~/temp.org 4. Insert some contents: * example org contents here is a subtree * another heading 5. Save the buffer 6. Outside of Emacs, modify ~/temp.org: $ echo asdf >> ~/temp.org 7. See that temp.org's buffer is immediately reverted in Emacs and contains the new contents that were added. 8. M-x org-tree-to-indirect-buffer 9. Kill the new indirect buffer 10. Modify ~/temp.org outside of Emacs again. temp.org's buffer is not reverted, and even if you eval (auto-revert-buffers), the buffer is not reverted. At this point, `auto-revert--buffer-by-watch-descriptor' does not contain an entry for temp.org, and the value of `auto-revert-notify-watch-descriptor' in temp.org is not present as a key in that alist either. As a result, when inotify events are received by Emacs, `auto-revert-notify-handler' cannot find the buffer whose file was apparently updated, and therefore it does not set `auto-revert-notify-modified-p'. When `auto-revert-handler' runs in temp.org, it sees that `auto-revert-notify-watch-descriptor' is non-nil and `auto-revert-notify-modified-p' is nil, and skips reverting the buffer, even though the file has in fact been modified outside of Emacs. In GNU Emacs 29.3 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo version 1.18.0, Xaw3d scroll bars) Windowing system distributor 'HC-Consult', version 11.0.12014000 System Description: NixOS 24.05 (Uakari) Configured using: 'configure --prefix=/nix/store/8r6lgsfyak1mr2gg3ka6zkffxswkj3wv-emacs-29.3 --disable-build-details --with-modules --with-x-toolkit=lucid --with-cairo --with-xft --with-compress-install --with-toolkit-scroll-bars --with-native-compilation --without-imagemagick --with-mailutils --without-small-ja-dic --with-tree-sitter --with-xinput2 --without-xwidgets --with-dbus --with-selinux' Configured features: CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP 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 $EMACSLOADPATH: value of $EMACSNATIVELOADPATH: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Org Minor modes in effect: global-evil-surround-mode: t evil-surround-mode: t evil-org-mode: t org-appear-mode: t org-modern-mode: t org-superstar-mode: t org-indent-mode: t windmove-mode: t pupo-mode: t purpose-mode: t evil-escape-mode: t global-display-line-numbers-mode: t global-vi-tilde-fringe-mode: t vi-tilde-fringe-mode: t recentf-mode: t eval-sexp-fu-flash-mode: t show-smartparens-global-mode: t show-smartparens-mode: t indent-guide-global-mode: t indent-guide-mode: t dired-async-mode: t global-corfu-mode: t corfu-mode: t winner-mode: t flyspell-mode: t flycheck-pos-tip-mode: t global-flycheck-mode: t global-spacemacs-whitespace-cleanup-mode: t spacemacs-whitespace-cleanup-mode: t winum-mode: t volatile-highlights-mode: t vertico-mode: t unkillable-scratch: t global-undo-tree-mode: t undo-tree-mode: t global-term-cursor-mode: t term-cursor-mode: t save-place-mode: t savehist-mode: t persistent-scratch-autosave-mode: t org-wild-notifier-mode: t projectile-mode: t shell-dirtrack-mode: t server-mode: t mode-line-bell-mode: t marginalia-mode: t global-ligature-mode: t ligature-mode: t Info-breadcrumbs-in-mode-line-mode: t global-hl-todo-mode: t global-fasd-mode: t global-evil-quickscope-always-mode: t evil-quickscope-always-mode: t global-anzu-mode: t anzu-mode: t envrc-global-mode: t envrc-mode: t editorconfig-mode: t global-column-enforce-mode: t clean-aindent-mode: t hybrid-mode: t which-key-mode: t evil-mode: t evil-local-mode: t spacemacs-leader-override-mode: t global-spacemacs-leader-override-mode: t global-hl-line-mode: t xterm-mouse-mode: t global-auto-revert-mode: t which-function-mode: t minibuffer-depth-indicate-mode: t midnight-mode: t display-time-mode: t override-global-mode: t ido-vertical-mode: t global-page-break-lines-mode: t page-break-lines-mode: t global-eldoc-mode: t eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t column-number-mode: t line-number-mode: t auto-fill-function: org-auto-fill-function transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t Load-path shadows: /home/aaron/.emacs.d/elpa/29.3/develop/load-env-vars-20180511.2210/load-env-vars hides /home/aaron/.emacs.d/core/libs/forks/load-env-vars /home/aaron/.emacs.d/elpa/29.3/develop/spinner-1.7.4/spinner hides /home/aaron/.emacs.d/core/libs/spinner /nix/store/gxi8whqw0hp0h1c83hh5l171qzk98n5g-emacs-packages-deps/share/emacs/site-lisp/site-start hides /nix/store/8r6lgsfyak1mr2gg3ka6zkffxswkj3wv-emacs-29.3/share/emacs/site-lisp/site-start ~/.spacemacs.d/custom hides /nix/store/8r6lgsfyak1mr2gg3ka6zkffxswkj3wv-emacs-29.3/share/emacs/29.3/lisp/custom /home/aaron/.emacs.d/elpa/29.3/develop/transient-20240603.2200/transient hides /nix/store/8r6lgsfyak1mr2gg3ka6zkffxswkj3wv-emacs-29.3/share/emacs/29.3/lisp/transient /home/aaron/.emacs.d/elpa/29.3/develop/hierarchy-20190425.842/hierarchy hides /nix/store/8r6lgsfyak1mr2gg3ka6zkffxswkj3wv-emacs-29.3/share/emacs/29.3/lisp/emacs-lisp/hierarchy /nix/store/gxi8whqw0hp0h1c83hh5l171qzk98n5g-emacs-packages-deps/share/emacs/site-lisp/elpa/let-alist-1.0.6/let-alist hides /nix/store/8r6lgsfyak1mr2gg3ka6zkffxswkj3wv-emacs-29.3/share/emacs/29.3/lisp/emacs-lisp/let-alist Features: (shadow sort mail-extr emacsbug message yank-media rfc822 mml mml-sec epa gnus-util mm-decode mm-bodies mm-encode mailabbrev gmm-utils mailheader sendmail mail-utils consult-imenu consult bookmark vertico-directory evil-surround elisp-demos mule-util helpful cc-langs cc-vars cc-defs trace edebug debug backtrace info-look help-fns radix-tree elisp-refs cal-iso org-eldoc evil-org org-appear org-download org-modern org-superstar toc-org org-indent image-file image-converter oc-basic face-remap add-log windmove misearch multi-isearch zoom-frm frame-cmds frame-fns avoid spacemacs-purpose-popwin window-purpose-x imenu-list window-purpose window-purpose-fixes window-purpose-prefix-overload window-purpose-switch window-purpose-layout window-purpose-core evil-escape display-line-numbers vi-tilde-fringe persistent-soft list-utils pcache eieio-base cl font-utils recentf tree-widget overseer pkg-info url-http url-auth mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr url-gw nsm puny epl auto-compile elisp-slime-nav flycheck-elsa flycheck-package package-lint let-alist finder eval-sexp-fu goto-addr vc-hg vc-git diff-mode vc-bzr vc-src vc-sccs vc-svn vc-cvs vc-rcs log-view pcvs-util vc vc-dispatcher bug-reference evil-lisp-state highlight-numbers parent-mode highlight-parentheses hideshow rainbow-delimiters smartparens-config smartparens-org smartparens-text smartparens loadhist ol-man org-checklist ol-eshell eshell-z em-dirs esh-var em-term term disp-table ehelp em-smart esh-mode eshell esh-cmd esh-ext esh-opt esh-proc esh-io esh-arg esh-module esh-groups esh-util files-x org-tempo tempo ol-info org-habit ol-docview doc-view jka-compr image-mode exif ol-bibtex bibtex iso8601 indent-guide fancy-battery battery dired-async dired-aux evil-collection-dired dired-x dired dired-loaddefs cus-start corfu bcc32-abbrev winner flyspell ispell window-purpose-configuration window-purpose-utils org-clock flycheck-pos-tip pos-tip flycheck-ledger flycheck evil-matchit evil-matchit-evil-setup evil-matchit-sdk semantic/lex semantic/fw mode-local spacemacs-whitespace-cleanup ws-butler winum etags fileloop xref volatile-highlights vertico-repeat vertico-quick vertico unkillable-scratch unicode-fonts undo-tree diff queue term-cursor symbol-overlay string-inflection saveplace savehist popwin persistent-scratch pdf-loader diary-lib diary-loaddefs org-wild-notifier org-duration bcc32-org bcc32-org-lint org-lint ox-texinfo ox-org ox-latex ox-icalendar ox-gfm ox-md ox-html table ox-ascii ox-publish ox org-attach projectile project lisp-mnt grep compile text-property-search ibuf-ext ibuffer ibuffer-loaddefs org-agenda org-element org-persist xdg org-id avl-tree generator org-refile magit-core magit-autorevert magit-margin magit-transient magit-process with-editor shell server magit-mode transient magit-git magit-base magit-section cursor-sensor crm org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-src ob-comint org-pcomplete pcomplete comint ansi-osc org-list org-footnote org-faces org-entities time-date ob-emacs-lisp ob-core ob-eval org-cycle org-table org-keys oc org-loaddefs find-func cal-menu calendar cal-loaddefs ol org-fold org-fold-core org-compat org-version org-macs async alert log4e notifications dbus xml gntp org-rich-yank orderless mode-line-bell marginalia ligature keycast info+ hl-todo compat fasd evil-unimpaired f s dash evil-textobj-line evil-quickscope evil-easymotion evil-collection-simple evil-collection-replace evil-collection-buff-menu evil-collection annalist evil-anzu anzu envrc inheritenv ansi-color editorconfig editorconfig-core editorconfig-core-handle editorconfig-fnmatch noutline outline drag-stuff column-enforce-mode clean-aindent-mode bcc32 zenburn-theme-autoloads yapfify-autoloads yaml-mode-autoloads ws-butler-autoloads writeroom-mode-autoloads visual-fill-column-autoloads winum-autoloads window-purpose-autoloads imenu-list-autoloads wgrep-autoloads web-mode-autoloads web-beautify-autoloads volatile-highlights-autoloads vim-powerline-autoloads vi-tilde-fringe-autoloads vertico-autoloads uuidgen-autoloads utop-autoloads unkillable-scratch-autoloads unicode-fonts-autoloads ucs-utils-autoloads font-utils-autoloads persistent-soft-autoloads pcache-autoloads undo-tree-autoloads queue-autoloads typescript-mode-autoloads tuareg-autoloads caml-autoloads toml-mode-autoloads toc-org-autoloads tide-autoloads terminal-here-autoloads term-cursor-autoloads tao-theme-autoloads tagedit-autoloads symon-autoloads symbol-overlay-autoloads string-inflection-autoloads string-edit-at-point-autoloads sql-indent-autoloads spotify-autoloads sphinx-doc-autoloads spacemacs-whitespace-cleanup-autoloads spacemacs-purpose-popwin-autoloads space-doc-autoloads solarized-theme-autoloads smeargle-autoloads slim-mode-autoloads shfmt-autoloads reformatter-autoloads shell-pop-autoloads scss-mode-autoloads sass-mode-autoloads rustic-autoloads xterm-color-autoloads rust-mode-autoloads ron-mode-autoloads reveal-in-osx-finder-autoloads restart-emacs-autoloads rainbow-delimiters-autoloads quickrun-autoloads pytest-autoloads pylookup-autoloads pyenv-mode-autoloads pydoc-autoloads py-isort-autoloads pug-mode-autoloads prettier-js-autoloads posframe-autoloads popwin-autoloads poetry-autoloads pocket-reader-autoloads org-web-tools-autoloads esxml-autoloads rainbow-identifiers-autoloads ov-autoloads pocket-lib-autoloads plz-autoloads peg-autoloads kv-autoloads pippel-autoloads pipenv-autoloads load-env-vars-autoloads pyvenv-autoloads pip-requirements-autoloads persistent-scratch-autoloads pdf-tools-autoloads tablist-autoloads password-generator-autoloads paradox-autoloads spinner-autoloads ox-gfm-autoloads overseer-autoloads osx-trash-autoloads osx-clipboard-autoloads orgit-forge-autoloads orgit-autoloads org-wild-notifier-autoloads org-superstar-autoloads org-rich-yank-autoloads org-projectile-autoloads org-project-capture-autoloads org-category-capture-autoloads org-present-autoloads org-pomodoro-autoloads alert-autoloads log4e-autoloads gntp-autoloads org-modern-autoloads org-mime-autoloads org-download-autoloads org-contrib-autoloads org-cliplink-autoloads org-appear-autoloads orderless-autoloads open-junk-file-autoloads ocp-indent-autoloads ocamlformat-autoloads npm-mode-autoloads nose-autoloads nodejs-repl-autoloads nixos-options-autoloads nix-mode-autoloads nano-agenda-autoloads nameless-autoloads multi-vterm-autoloads vterm-autoloads multi-term-autoloads multi-line-autoloads shut-up-autoloads mode-line-bell-autoloads merlin-iedit-autoloads merlin-eldoc-autoloads merlin-company-autoloads company-autoloads markdown-toc-autoloads marginalia-autoloads magit-todos-autoloads macrostep-autoloads lorem-ipsum-autoloads livid-mode-autoloads skewer-mode-autoloads live-py-mode-autoloads link-hint-autoloads ligature-autoloads launchctl-autoloads keycast-autoloads json-reformat-autoloads json-navigator-autoloads hierarchy-autoloads json-mode-autoloads json-snatcher-autoloads js2-refactor-autoloads multiple-cursors-autoloads js2-mode-autoloads js-doc-autoloads inspector-autoloads insert-shebang-autoloads info+-autoloads indent-guide-autoloads importmagic-autoloads epc-autoloads ctable-autoloads concurrent-autoloads impatient-mode-autoloads simple-httpd-autoloads ibuffer-projectile-autoloads hungry-delete-autoloads htmlize-autoloads hl-todo-autoloads highlight-parentheses-autoloads highlight-numbers-autoloads parent-mode-autoloads highlight-indentation-autoloads hide-comnt-autoloads helpful-autoloads elisp-refs-autoloads helm-make-autoloads haml-mode-autoloads google-translate-autoloads google-c-style-autoloads golden-ratio-autoloads gnuplot-autoloads gitignore-templates-autoloads git-timemachine-autoloads git-modes-autoloads git-messenger-autoloads git-link-autoloads gh-md-autoloads gendoxy-autoloads geiser-guile-autoloads geiser-chicken-autoloads geiser-autoloads forge-autoloads yaml-autoloads markdown-mode-autoloads ghub-autoloads treepy-autoloads closql-autoloads emacsql-autoloads flyspell-correct-popup-autoloads flyspell-correct-autoloads flycheck-ycmd-autoloads ycmd-autoloads pkg-info-autoloads epl-autoloads request-deferred-autoloads deferred-autoloads flycheck-rtags-autoloads rtags-autoloads flycheck-pos-tip-autoloads pos-tip-autoloads flycheck-package-autoloads package-lint-autoloads flycheck-ocaml-autoloads merlin-autoloads flycheck-ledger-autoloads flycheck-elsa-autoloads flycheck-bashate-autoloads flycheck-autoloads flx-ido-autoloads flx-autoloads fish-mode-autoloads fasd-autoloads fancy-battery-autoloads explain-pause-mode-autoloads expand-region-autoloads evil-visualstar-autoloads evil-visual-mark-mode-autoloads evil-unimpaired-autoloads evil-tutor-autoloads evil-textobj-line-autoloads evil-surround-autoloads evil-quickscope-autoloads evil-org-autoloads evil-numbers-autoloads evil-nerd-commenter-autoloads evil-matchit-autoloads evil-lisp-state-autoloads evil-lion-autoloads evil-ledger-autoloads ledger-mode-autoloads evil-indent-plus-autoloads evil-iedit-state-autoloads evil-goggles-autoloads evil-exchange-autoloads evil-escape-autoloads evil-easymotion-autoloads evil-collection-autoloads annalist-autoloads evil-cleverparens-autoloads smartparens-autoloads evil-args-autoloads evil-anzu-autoloads anzu-autoloads eval-sexp-fu-autoloads eshell-z-autoloads eshell-prompt-extras-autoloads esh-help-autoloads envrc-autoloads inheritenv-autoloads emr-autoloads iedit-autoloads paredit-autoloads list-utils-autoloads emmet-mode-autoloads embark-consult-autoloads embark-autoloads elisp-slime-nav-autoloads elisp-demos-autoloads elisp-def-autoloads editorconfig-autoloads eat-autoloads dune-autoloads dumb-jump-autoloads popup-autoloads drag-stuff-autoloads disaster-autoloads dired-quick-sort-autoloads devdocs-autoloads define-word-autoloads debbugs-autoloads cython-mode-autoloads csv-mode-autoloads cpp-auto-include-autoloads corfu-autoloads consult-yasnippet-autoloads yasnippet-autoloads consult-autoloads compleseus-spacemacs-help-autoloads command-log-mode-autoloads column-enforce-mode-autoloads code-cells-autoloads clean-aindent-mode-autoloads clang-format-autoloads centered-cursor-mode-autoloads browse-at-remote-autoloads blacken-autoloads bcc32-org-autoloads projectile-autoloads magit-autoloads magit-section-autoloads git-commit-autoloads with-editor-autoloads transient-autoloads compat-autoloads auto-highlight-symbol-autoloads ht-autoloads auto-dictionary-autoloads auto-compile-autoloads anaconda-mode-autoloads pythonic-autoloads f-autoloads dash-autoloads s-autoloads all-the-icons-autoloads ahk-mode-autoloads aggressive-indent-autoloads advent-of-code-autoloads request-autoloads ace-window-autoloads ace-link-autoloads avy-autoloads hybrid-mode evil-evilified-state pcre2el-autoloads hybrid-mode-autoloads holy-mode-autoloads evil-evilified-state-autoloads dotenv-mode-autoloads which-key hydra lv evil evil-integration evil-maps evil-commands reveal evil-jumps evil-command-window evil-types evil-search evil-ex evil-macros evil-repeat evil-states evil-core advice evil-common thingatpt rect evil-vars diminish ring bind-map which-key-autoloads hydra-autoloads lv-autoloads info evil-autoloads goto-chg-autoloads diminish-autoloads bind-map-autoloads async-autoloads thunk comp comp-cstr hl-line xt-mouse autorevert filenotify base16-material-theme base16-theme base16-theme-autoloads format-spec finder-inf which-func imenu mb-depth midnight time edmacro kmacro cl-extra use-package use-package-ensure use-package-delight use-package-diminish use-package-bind-key bind-key use-package-core ido-vertical-mode ido core-spacemacs core-use-package-ext core-spacebind core-transient-state core-micro-state core-toggle core-keybindings core-fonts-support core-themes-support core-display-init core-jump core-release-management core-custom-settings core-configuration-layer core-progress-bar core-spacemacs-buffer core-funcs spacemacs-ht inline help-mode warnings package browse-url url url-proxy url-privacy url-expand url-methods url-history url-cookie generate-lisp-file url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq password-cache json map url-vars eieio byte-opt eieio-core epg rfc6068 epg-config core-command-line core-debug derived core-hooks page-break-lines easy-mmode core-env load-env-vars rx core-dotspacemacs core-customization validate cus-edit pp cus-load icons wid-edit core-emacs-backports core-compilation pcase bytecomp byte-compile subr-x core-dumper spinner cl-macs gv cl-loaddefs cl-lib core-versions core-load-paths core-early-funcs 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 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 dynamic-setting system-font-setting font-render-setting cairo x-toolkit xinput2 x multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 1796915 1282520) (symbols 48 91360 3) (strings 32 366852 186994) (string-bytes 1 12422101) (vectors 16 112664) (vector-slots 8 2933826 1475577) (floats 8 620 2108) (intervals 56 71575 671) (buffers 984 53))
bug-gnu-emacs <at> gnu.org
:bug#71424
; Package emacs
.
(Sat, 08 Jun 2024 04:48:01 GMT) Full text and rfc822 format available.Message #8 received at 71424 <at> debbugs.gnu.org (full text, mbox):
From: "Aaron Zeng" <z <at> bcc32.com> To: 71424 <at> debbugs.gnu.org Date: Sat, 08 Jun 2024 00:46:55 -0400
[Message part 1 (text/plain, inline)]
I should add---this also happens with more common org-mode commands, such as org-capture, as well as plenty of commands from other major modes. org-capture is where I actually first noticed this issue.
[Message part 2 (text/html, inline)]
bug-gnu-emacs <at> gnu.org
:bug#71424
; Package emacs
.
(Sat, 08 Jun 2024 07:05:02 GMT) Full text and rfc822 format available.Message #11 received at 71424 <at> debbugs.gnu.org (full text, mbox):
From: Eli Zaretskii <eliz <at> gnu.org> To: z <at> bcc32.com Cc: 71424 <at> debbugs.gnu.org Subject: Re: bug#71424: 29.3; auto-revert-use-notify buggy interaction with indirect buffers Date: Sat, 08 Jun 2024 10:03:36 +0300
> Cc: z <at> bcc32.com > From: z <at> bcc32.com > Date: Sat, 08 Jun 2024 00:44:13 -0400 > > > 1. emacs -Q > 2. Enable global-auto-revert-mode, and ensure auto-revert-use-notify=t > 3. Open an org file, such as ~/temp.org > 4. Insert some contents: > > * example org contents > here is a subtree > * another heading > > 5. Save the buffer > 6. Outside of Emacs, modify ~/temp.org: > > $ echo asdf >> ~/temp.org > > 7. See that temp.org's buffer is immediately reverted in Emacs and > contains the new contents that were added. > 8. M-x org-tree-to-indirect-buffer > 9. Kill the new indirect buffer > > 10. Modify ~/temp.org outside of Emacs again. temp.org's buffer is > not reverted, and even if you eval (auto-revert-buffers), the > buffer is not reverted. Thanks, but did you report this to the Org developers first? If not, please do, so they could analyze the issue and determine whether it's an Org bug or a bug in some core Emacs functionality. To see that at least the basic functionality works in Emacs, I did the following: emacs -Q C-x C-f SOME-FILE RET M-x global-auto-revert-mode RET M-x clone-indirect-buffer RET Then, outside Emacs, typed from the shell prompt $ cat OTHER-FILE >> SOME-FILE where OTHER-FILE is some other existing file. After that, I saw both the base buffer's text and that of its indirect clone change to reflect the appended text. So my conclusion is that the Subject of your bug report is not accurate: the auto-revert feature does work with indirect buffers as expected. Which is why I think this might be an Org specific issue, since org-tree-to-indirect-buffer does more than just create an indirect buffer. Thanks.
bug-gnu-emacs <at> gnu.org
:bug#71424
; Package emacs
.
(Sat, 08 Jun 2024 15:31:02 GMT) Full text and rfc822 format available.Message #14 received at 71424 <at> debbugs.gnu.org (full text, mbox):
From: "Aaron Zeng" <z <at> bcc32.com> To: "Eli Zaretskii" <eliz <at> gnu.org> Cc: 71424 <at> debbugs.gnu.org Subject: Re: bug#71424: 29.3; auto-revert-use-notify buggy interaction with indirect buffers Date: Sat, 08 Jun 2024 11:30:08 -0400
On Sat, Jun 8, 2024, at 03:03, Eli Zaretskii wrote: > To see that at least the basic functionality works in Emacs, I did the > following: > > emacs -Q > C-x C-f SOME-FILE RET > M-x global-auto-revert-mode RET > M-x clone-indirect-buffer RET > > Then, outside Emacs, typed from the shell prompt > > $ cat OTHER-FILE >> SOME-FILE > > where OTHER-FILE is some other existing file. After that, I saw both > the base buffer's text and that of its indirect clone change to > reflect the appended text. Indeed, while the indirect buffer is live, everything works fine. However, after you kill the indirect buffer, then the buffer no longer gets auto-reverted when you modify SOME-FILE outside Emacs. > So my conclusion is that the Subject of your bug report is not > accurate: the auto-revert feature does work with indirect buffers as > expected. Which is why I think this might be an Org specific issue, > since org-tree-to-indirect-buffer does more than just create an > indirect buffer. Good point. I didn't know about M-x clone-indirect-buffer ("If I had more time, I would have written a shorter letter", etc.). Thanks for your quick reply.
bug-gnu-emacs <at> gnu.org
:bug#71424
; Package emacs
.
(Sat, 08 Jun 2024 16:28:02 GMT) Full text and rfc822 format available.Message #17 received at 71424 <at> debbugs.gnu.org (full text, mbox):
From: Eli Zaretskii <eliz <at> gnu.org> To: "Aaron Zeng" <z <at> bcc32.com>, Michael Albinus <michael.albinus <at> gmx.de> Cc: 71424 <at> debbugs.gnu.org Subject: Re: bug#71424: 29.3; auto-revert-use-notify buggy interaction with indirect buffers Date: Sat, 08 Jun 2024 19:27:08 +0300
> Date: Sat, 08 Jun 2024 11:30:08 -0400 > From: "Aaron Zeng" <z <at> bcc32.com> > Cc: 71424 <at> debbugs.gnu.org > > On Sat, Jun 8, 2024, at 03:03, Eli Zaretskii wrote: > > > To see that at least the basic functionality works in Emacs, I did the > > following: > > > > emacs -Q > > C-x C-f SOME-FILE RET > > M-x global-auto-revert-mode RET > > M-x clone-indirect-buffer RET > > > > Then, outside Emacs, typed from the shell prompt > > > > $ cat OTHER-FILE >> SOME-FILE > > > > where OTHER-FILE is some other existing file. After that, I saw both > > the base buffer's text and that of its indirect clone change to > > reflect the appended text. > > Indeed, while the indirect buffer is live, everything works fine. However, after you kill the indirect buffer, then the buffer no longer gets auto-reverted when you modify SOME-FILE outside Emacs. Right. Michael, is the below the correct fix? diff --git a/lisp/autorevert.el b/lisp/autorevert.el index a23d536..ab69add 100644 --- a/lisp/autorevert.el +++ b/lisp/autorevert.el @@ -378,8 +378,11 @@ auto-revert-debug (defun auto-revert-remove-current-buffer (&optional buffer) "Remove BUFFER from `auto-revert-buffer-list'. BUFFER defaults to `current-buffer'." - (setq auto-revert-buffer-list - (delq (or buffer (current-buffer)) auto-revert-buffer-list))) + (let ((buf (or buffer (current-buffer)))) + ;; Don't remove the watch if we are killing an indirect buffer. + (or (buffer-base-buffer buf) + (setq auto-revert-buffer-list + (delq buf auto-revert-buffer-list))))) ;;;###autoload (define-minor-mode auto-revert-mode @@ -639,7 +642,9 @@ auto-revert-set-timer (defun auto-revert-notify-rm-watch () "Disable file notification for current buffer's associated file." - (when-let ((desc auto-revert-notify-watch-descriptor)) + (when-let ((desc + (and (buffer-base-buffer) + auto-revert-notify-watch-descriptor))) (setq auto-revert--buffer-by-watch-descriptor (assoc-delete-all desc auto-revert--buffer-by-watch-descriptor)) (ignore-errors
bug-gnu-emacs <at> gnu.org
:bug#71424
; Package emacs
.
(Sat, 08 Jun 2024 16:59:01 GMT) Full text and rfc822 format available.Message #20 received at 71424 <at> debbugs.gnu.org (full text, mbox):
From: Michael Albinus <michael.albinus <at> gmx.de> To: Eli Zaretskii <eliz <at> gnu.org> Cc: Aaron Zeng <z <at> bcc32.com>, 71424 <at> debbugs.gnu.org Subject: Re: bug#71424: 29.3; auto-revert-use-notify buggy interaction with indirect buffers Date: Sat, 08 Jun 2024 18:57:45 +0200
Eli Zaretskii <eliz <at> gnu.org> writes: Hi Eli, >> Indeed, while the indirect buffer is live, everything works fine. >> However, after you kill the indirect buffer, then the buffer no >> longer gets auto-reverted when you modify SOME-FILE outside Emacs. > > Right. Michael, is the below the correct fix? I haven't tested yet, but it looks proper to me. You might push it. I will add a test for this case next days. Best regards, Michael.
bug-gnu-emacs <at> gnu.org
:bug#71424
; Package emacs
.
(Sat, 08 Jun 2024 17:08:01 GMT) Full text and rfc822 format available.Message #23 received at 71424 <at> debbugs.gnu.org (full text, mbox):
From: "Aaron Zeng" <z <at> bcc32.com> To: "Eli Zaretskii" <eliz <at> gnu.org>, "Michael Albinus" <michael.albinus <at> gmx.de> Cc: 71424 <at> debbugs.gnu.org Subject: Re: bug#71424: 29.3; auto-revert-use-notify buggy interaction with indirect buffers Date: Sat, 08 Jun 2024 13:06:28 -0400
On Sat, Jun 8, 2024, at 12:27, Eli Zaretskii wrote: > diff --git a/lisp/autorevert.el b/lisp/autorevert.el > index a23d536..ab69add 100644 > --- a/lisp/autorevert.el > +++ b/lisp/autorevert.el > @@ -378,8 +378,11 @@ auto-revert-debug > (defun auto-revert-remove-current-buffer (&optional buffer) > "Remove BUFFER from `auto-revert-buffer-list'. > BUFFER defaults to `current-buffer'." > - (setq auto-revert-buffer-list > - (delq (or buffer (current-buffer)) auto-revert-buffer-list))) > + (let ((buf (or buffer (current-buffer)))) > + ;; Don't remove the watch if we are killing an indirect buffer. > + (or (buffer-base-buffer buf) > + (setq auto-revert-buffer-list > + (delq buf auto-revert-buffer-list))))) (take my reply with a grain of salt---I'm not that familiar with this code). I think this will leave killed buffers in auto-revert-buffer-list, which seems wrong to me. > ;;;###autoload > (define-minor-mode auto-revert-mode > @@ -639,7 +642,9 @@ auto-revert-set-timer > > (defun auto-revert-notify-rm-watch () > "Disable file notification for current buffer's associated file." > - (when-let ((desc auto-revert-notify-watch-descriptor)) > + (when-let ((desc > + (and (buffer-base-buffer) > + auto-revert-notify-watch-descriptor))) > (setq auto-revert--buffer-by-watch-descriptor > (assoc-delete-all desc auto-revert--buffer-by-watch-descriptor)) > (ignore-errors Maybe I'm reading the code wrong, but should this be (not (buffer-base-buffer)) instead?
bug-gnu-emacs <at> gnu.org
:bug#71424
; Package emacs
.
(Sat, 08 Jun 2024 17:46:02 GMT) Full text and rfc822 format available.Message #26 received at 71424 <at> debbugs.gnu.org (full text, mbox):
From: Eli Zaretskii <eliz <at> gnu.org> To: Michael Albinus <michael.albinus <at> gmx.de> Cc: z <at> bcc32.com, 71424 <at> debbugs.gnu.org Subject: Re: bug#71424: 29.3; auto-revert-use-notify buggy interaction with indirect buffers Date: Sat, 08 Jun 2024 20:44:57 +0300
> From: Michael Albinus <michael.albinus <at> gmx.de> > Cc: "Aaron Zeng" <z <at> bcc32.com>, 71424 <at> debbugs.gnu.org > Date: Sat, 08 Jun 2024 18:57:45 +0200 > > Eli Zaretskii <eliz <at> gnu.org> writes: > > Hi Eli, > > >> Indeed, while the indirect buffer is live, everything works fine. > >> However, after you kill the indirect buffer, then the buffer no > >> longer gets auto-reverted when you modify SOME-FILE outside Emacs. > > > > Right. Michael, is the below the correct fix? > > I haven't tested yet, but it looks proper to me. You might push it. Thanks, done. > I will add a test for this case next days. Thanks.
Eli Zaretskii <eliz <at> gnu.org>
:z <at> bcc32.com
:Message #31 received at 71424-done <at> debbugs.gnu.org (full text, mbox):
From: Eli Zaretskii <eliz <at> gnu.org> To: "Aaron Zeng" <z <at> bcc32.com> Cc: michael.albinus <at> gmx.de, 71424-done <at> debbugs.gnu.org Subject: Re: bug#71424: 29.3; auto-revert-use-notify buggy interaction with indirect buffers Date: Sat, 08 Jun 2024 20:45:41 +0300
> Date: Sat, 08 Jun 2024 13:06:28 -0400 > From: "Aaron Zeng" <z <at> bcc32.com> > Cc: 71424 <at> debbugs.gnu.org > > On Sat, Jun 8, 2024, at 12:27, Eli Zaretskii wrote: > > diff --git a/lisp/autorevert.el b/lisp/autorevert.el > > index a23d536..ab69add 100644 > > --- a/lisp/autorevert.el > > +++ b/lisp/autorevert.el > > @@ -378,8 +378,11 @@ auto-revert-debug > > (defun auto-revert-remove-current-buffer (&optional buffer) > > "Remove BUFFER from `auto-revert-buffer-list'. > > BUFFER defaults to `current-buffer'." > > - (setq auto-revert-buffer-list > > - (delq (or buffer (current-buffer)) auto-revert-buffer-list))) > > + (let ((buf (or buffer (current-buffer)))) > > + ;; Don't remove the watch if we are killing an indirect buffer. > > + (or (buffer-base-buffer buf) > > + (setq auto-revert-buffer-list > > + (delq buf auto-revert-buffer-list))))) > > (take my reply with a grain of salt---I'm not that familiar with this code). I think this will leave killed buffers in auto-revert-buffer-list, which seems wrong to me. Fixed. > > ;;;###autoload > > (define-minor-mode auto-revert-mode > > @@ -639,7 +642,9 @@ auto-revert-set-timer > > > > (defun auto-revert-notify-rm-watch () > > "Disable file notification for current buffer's associated file." > > - (when-let ((desc auto-revert-notify-watch-descriptor)) > > + (when-let ((desc > > + (and (buffer-base-buffer) > > + auto-revert-notify-watch-descriptor))) > > (setq auto-revert--buffer-by-watch-descriptor > > (assoc-delete-all desc auto-revert--buffer-by-watch-descriptor)) > > (ignore-errors > > Maybe I'm reading the code wrong, but should this be (not (buffer-base-buffer)) instead? Also fixed. I'm therefore closing this bug.
bug-gnu-emacs <at> gnu.org
:bug#71424
; Package emacs
.
(Mon, 10 Jun 2024 11:22:02 GMT) Full text and rfc822 format available.Message #34 received at 71424 <at> debbugs.gnu.org (full text, mbox):
From: Michael Albinus <michael.albinus <at> gmx.de> To: Eli Zaretskii <eliz <at> gnu.org> Cc: z <at> bcc32.com, 71424 <at> debbugs.gnu.org Subject: Re: bug#71424: 29.3; auto-revert-use-notify buggy interaction with indirect buffers Date: Mon, 10 Jun 2024 13:15:21 +0200
Eli Zaretskii <eliz <at> gnu.org> writes: Hi Eli, >> I will add a test for this case next days. > > Thanks. Done, pushed to master as 24448b7bbb8. Best regards, Michael.
Debbugs Internal Request <help-debbugs <at> gnu.org>
to internal_control <at> debbugs.gnu.org
.
(Mon, 08 Jul 2024 11:24:07 GMT) Full text and rfc822 format available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.