all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#72696: Track-changes errors out when file is overwritten using Node.js's fs.writeFile (at least on macOS)
@ 2024-08-18 10:58 Dario Gjorgjevski
  2024-08-18 11:02 ` Eli Zaretskii
  2024-08-18 16:10 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 2 replies; 16+ messages in thread
From: Dario Gjorgjevski @ 2024-08-18 10:58 UTC (permalink / raw)
  To: 72696

How to reproduce:

1. In one shell, fire up GNU Emacs, open a file, and start something
that uses track-changes; e.g., Eglot.  In my case it was a Python file
called test.py with contents foo = 0.  Everything is happy so far.
2. In another shell, fire up a Node.js interpreter and execute const
fs = require("node:fs/promises") followed by await
fs.writeFile("test.py", "foo = 1").  This will overwrite the file.
3. Track-changes (and by extension Eglot) will error out.  Restarting
Eglot makes everything go back to normal.

The *Warnings* buffer now contains:

    Warning (emacs): Missing/incorrect calls to
‘before/after-change-functions’!!
    Details logged to `track-changes--error-log'

And `track-changes--error-log' contains:

    (("test.py" #1=(unexpected-after 1 8 0)
      ((t track-changes--recover-from-error (#1#) nil)
       (t track-changes--after (1 8 0) nil)
       (t revert-buffer-insert-file-contents--default-function
          ("/path/to/test.py"
           nil)
          nil)
       (t revert-buffer--default (ignore-auto dont-ask) nil)
       (t revert-buffer (ignore-auto dont-ask preserve-modes) nil)
       (t auto-revert-handler nil nil)
       (t auto-revert-buffer (#<buffer test.py>) nil)
       (t #<subr auto-revert-buffers> nil nil)
       (t auto-revert-buffers@buffer-list-filter
          (#<subr auto-revert-buffers>) nil)
       (t apply
          (auto-revert-buffers@buffer-list-filter #<subr
                              auto-revert-buffers> nil)
          nil)
       (t auto-revert-buffers nil nil)
       (t apply (auto-revert-buffers nil) nil)
       (t timer-event-handler
          ([nil 26305 53479 773611 5 auto-revert-buffers nil nil 0 nil])
          nil))
      [(nil . minibuffer-complete-and-exit) 5 (nil . move-end-of-line) 127
       (nil . python-indent-dedent-line-backspace) 48
       (nil . self-insert-command) 24 24 19 (nil . save-buffer) 27 91 79
       27 91 73 27 91 79]))

Despite `python-indent-dedent-line-backspace' being present in the
backtrace, the error is not limited to `python-mode'.

My GNU Emacs is built from:

    Repository revision: 40eecd594ac60f38b6729fd9cf3474a8b9d133b9
    Repository branch: master
    System Description: macOS 14.5
    Configured using:
     'configure --without-x --without-ns --with-mailutils
     --with-kerberos5 --with-json --with-tree-sitter
     --with-native-compilation

Best regards,
Dario





^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2024-09-24 17:51 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-18 10:58 bug#72696: Track-changes errors out when file is overwritten using Node.js's fs.writeFile (at least on macOS) Dario Gjorgjevski
2024-08-18 11:02 ` Eli Zaretskii
2024-08-18 16:10 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-08-18 20:36   ` Dario Gjorgjevski
2024-08-20 12:15     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-08-22 11:19       ` Dario Gjorgjevski
2024-08-22 11:27         ` Dario Gjorgjevski
2024-09-07  7:15           ` Eli Zaretskii
2024-09-08 23:06         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-18 22:02           ` Dario Gjorgjevski
2024-09-19  5:32             ` Eli Zaretskii
2024-09-19 12:58               ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-19 21:47                 ` João Távora
2024-09-20  6:21                   ` Eli Zaretskii
2024-09-20 18:46                     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-24 17:51                       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.