--- Begin Message ---
Subject: |
[REGRESSION, BISECTED]: line numbers disappear when pressing `df` in evil-mode |
Date: |
Tue, 03 Sep 2024 17:46:09 +0300 |
User-agent: |
Evolution 3.52.4 |
CCing the commit author.
Sorry for using external plugin, but master has two separate unrelated
critical regressions (the other one is going via link in *Help* buffer
and getting Emacs locked up with 100% CPU and quickly increasing memory
usage, which complicates reducing the steps), and since there's a clear
commit that introduced the problem I decided to report it as is.
# Steps to reproduce
1. Make sure you're in the Emacs repository and `./build/src/emacs` is
the built binary
2. Execute `git clone --depth 1 https://github.com/emacs-evil/evil
/tmp/evil`
3. Execute `PATH="$(pwd)/build/src/:$PATH" make -C /tmp/evil emacs`
(Emacs with Evil loaded will start)
4. Press `n` to refuse running tests
5. Turn line numbers on by evaluating: (setq-default display-line-
numbers 'visual)
6. Press `df`
## Expected
Line numbers are still shown
## Actual
Line numbers disappear
# Additional information
The commit that introduced the problem:
commit dffdbc1f1fd6569c518e2e3b5e771a54e9e9483f (HEAD)
Author: David Ponce <da_vid@orange.fr>
Date: Thu Aug 22 16:56:11 2024 +0200
Use 'with-work-macro' in 'string-pixel-width'
Tweak the implementation of 'string-pixel-width' to run
faster and use less memory. Also cater for the case where
this function is called in parallel (bug#72689).
* lisp/emacs-lisp/subr-x.el (string-pixel-width): Use
`with-work-macro'. Prefer `remove-text-properties' to
`propertize' to avoid creating a new string on each call.
lisp/emacs-lisp/subr-x.el | 22 +++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)
[03.09.2024-17:13:32] constantine@dell-g15 ~/Projects/builds/emacs-
git/src/emacs-git ‹node-› ‹› (dffdbc1f1fd*)
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#73005: [REGRESSION, BISECTED]: line numbers disappear when pressing `df` in evil-mode |
Date: |
Sat, 09 Nov 2024 13:02:22 +0200 |
> Date: Mon, 4 Nov 2024 10:02:22 +0100
> Cc: 73005@debbugs.gnu.org
> From: David Ponce <da_vid@orange.fr>
>
> On 04/11/2024 2:05 AM, Konstantin Kharlamov wrote:
> > On Sun, 2024-11-03 at 22:56 +0100, David Ponce wrote:
> >> On 03/11/2024 8:07 PM, Konstantin Kharlamov wrote:
> >>> On Sat, 2024-09-21 at 12:02 +0300, Eli Zaretskii wrote:
> >>>> Ping! Can we please make some progress here?
> >>>
> >>> Hello! Got some spare time, dug into it. Found a few interesting
> >>> things:
> >>>
> >>> 1. (not really interesting, but…) problem persists in current
> >>> master
> >>> 2. The exact function call that causes the problem is `(kill-all-
> >>> local-
> >>> variables t)` inside `(work-buffer--release)`. If I remove it,
> >>> everything works as before.
> >>>
> >>> I guess this implies that bug is not in David's commit per se,
> >>> but
> >>> rather something that's always been present and just got triggered
> >>> by
> >>> David's commit.
> >>> 3. There's an unrelated bug that confused this whole research,
> >>> since it
> >>> seemed like the function is never called: dong `M-x debug-on-entry
> >>> string-pixel-width` does nothing even though `string-pixel-width`
> >>> is
> >>> called.
> >>
> >> Hi Konstantin,
> >>
> >> Thank you for your report! This helped me (sort of) reproduce your
> >> issue
> >
> > Nice! Let me note for the safe case, since you say "sort of", that in
> > later emails I posted simpler steps to reproduce by just evaluating
> >
> > (lookup-key global-map [tab-bar])
> >
> >> which seems to be caused by a side effect of `string-pixel-width'
> >> when
> >> setting `display-line-numbers' to nil.
> >>
> >> Could you please try the attached patch and tell me if it fixes the
> >> issue
> >> for you?
> >>
> >> Thanks!
> >
> > Thank you, I confirm it does fix the bug!
>
> Thank you!
>
> Hi Eli,
>
> Would you mind to commit this fix? Here is a possible change log:
>
> 2024-11-04 David Ponce <da_vid@orange.fr>
>
> * subr-x.el (string-pixel-width): Set text property
> `display-line-numbers-disable' instead of changing the
> buffer-local value of `display-line-numbers'. Fix bug#73005.
>
> Thank you!
Thanks, installed on the master branch, and closing the bug.
--- End Message ---