GNU bug report logs - #39190
28.0.50; two buffers with same buffer-file-name (diff-syntax-fontify-props)

Previous Next

Package: emacs;

Reported by: Felician Nemeth <felician.nemeth <at> gmail.com>

Date: Sun, 19 Jan 2020 11:15:02 UTC

Severity: normal

Found in version 28.0.50

Full log


View this message in rfc822 format

From: Felician Nemeth <felician.nemeth <at> gmail.com>
To: Juri Linkov <juri <at> linkov.net>
Cc: 39190 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: bug#39190: 28.0.50; two buffers with same buffer-file-name (diff-syntax-fontify-props)
Date: Thu, 30 Jan 2020 20:48:33 +0100
> Could you please try to reproduce the issue using Eglot with the
> following minimal patch.  If it really fixes the bug then it
> should be committed to Emacs 27 immediately, and more changes
> could be added later.

Unfortunately the minimal patch doesn't fix the issue.

Case 1. When Eglot is started manually, then the recipe fails in an
after-change-major-mode-hook where the buffer-file-name is non-nil for
the temporary diff buffer.

Case 2. With (add-to-list 'python-mode-hook 'eglot-ensure) the recipe
fails in a post-command-hook, because eglot-ensure has this:

      (when buffer-file-name
        (add-hook 'post-command-hook #'maybe-connect 'append nil)))))

And buffer-file-name is non-nil for the diff buffer during the execution
of python-mode-hook.  But during the execution of maybe-connect in the
post-command-hook, the buffer-file-name is nil and that leads to an
error.




This bug report was last modified 5 years and 84 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.