bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#39190: 28.0.50; two buffers with same buffer-file-name (diff-syntax-


From: Juri Linkov
Subject: bug#39190: 28.0.50; two buffers with same buffer-file-name (diff-syntax-fontify-props)
Date: Tue, 21 Jan 2020 00:56:41 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.60 (x86_64-pc-linux-gnu)

X-Debbugs-CC: Stefan Monnier <monnier@iro.umontreal.ca>

Stefan, do you think diff-syntax-fontify-props should let-bind
after-change-major-mode-hook to nil to not allow running this hook
on an internal buffer.  Or it's the responsibility of the eglot package
to check for the leading space in the buffer name when its
after-change-major-mode-hook is called?

> If I read correctly, diff-syntax-fontify-props sets buffer-file-name of
> a temporary buffer to an existing one.  This is not necessarily a bug,
> but it definitely looks strange that we have two buffers with different
> contents and the same buffer-file-name.
>
> Eglot (in ELPA) runs into problems because of this
> (https://github.com/joaotavora/eglot/pull/233).
>
> Is there a recommended way to check in an after-change-major-mode-hook
> whether the current buffer is or isn't a temporary diff buffer?  For
> example, to check if first character of buffer-name is space.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]