[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: |
Fri, 31 Jan 2020 00:45:17 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) |
>> 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.
Strange, when I tested the minimal patch, there were no errors anymore.
Before the patch, I got this error in the git master when trying
to use 'C-c C-r' (diff-reverse-direction) in the diff buffer:
Debugger entered--Lisp error: (wrong-type-argument arrayp nil)
substring(nil 0 1)
file-truename(nil)
But after applying the patch, after-change-major-mode-hook is not called
anymore in 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.
I guess Eglot should have more safeguarding, i.e. the same check
'when buffer-file-name' could be added to 'maybe-connect' as well.
- bug#39190: 28.0.50; two buffers with same buffer-file-name (diff-syntax-fontify-props), (continued)
- bug#39190: 28.0.50; two buffers with same buffer-file-name (diff-syntax-fontify-props), Juri Linkov, 2020/01/30
- bug#39190: 28.0.50; two buffers with same buffer-file-name (diff-syntax-fontify-props), Stefan Monnier, 2020/01/30
- bug#39190: 28.0.50; two buffers with same buffer-file-name (diff-syntax-fontify-props), Dmitry Gutov, 2020/01/30
- bug#39190: 28.0.50; two buffers with same buffer-file-name (diff-syntax-fontify-props), Felician Nemeth, 2020/01/26
- bug#39190: 28.0.50; two buffers with same buffer-file-name (diff-syntax-fontify-props), Juri Linkov, 2020/01/27
- bug#39190: 28.0.50; two buffers with same buffer-file-name (diff-syntax-fontify-props), Felician Nemeth, 2020/01/28
- bug#39190: 28.0.50; two buffers with same buffer-file-name (diff-syntax-fontify-props), Juri Linkov, 2020/01/29
- bug#39190: 28.0.50; two buffers with same buffer-file-name (diff-syntax-fontify-props), Felician Nemeth, 2020/01/30
- bug#39190: 28.0.50; two buffers with same buffer-file-name (diff-syntax-fontify-props),
Juri Linkov <=