GNU bug report logs - #40529
26.3; global-display-line-numbers-mode and flymake-show-diagnostics-buffer error

Previous Next

Package: emacs;

Reported by: Aidan Beggs <nadiasggeb001 <at> gmail.com>

Date: Thu, 9 Apr 2020 22:07:02 UTC

Severity: normal

Found in version 26.3

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #35 received at 40529 <at> debbugs.gnu.org (full text, mbox):

From: João Távora <joaotavora <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 40529 <at> debbugs.gnu.org, Aidan Beggs <nadiasggeb001 <at> gmail.com>
Subject: Re: bug#40529: 26.3; global-display-line-numbers-mode and
 flymake-show-diagnostics-buffer error
Date: Sun, 12 Apr 2020 15:13:35 +0100
[Message part 1 (text/plain, inline)]
On Sun, Apr 12, 2020 at 2:43 PM Eli Zaretskii <eliz <at> gnu.org> wrote:

> > From: João Távora <joaotavora <at> gmail.com>
> > Date: Sun, 12 Apr 2020 13:22:34 +0100
> > Cc: Aidan Beggs <nadiasggeb001 <at> gmail.com>, 40529 <at> debbugs.gnu.org
> >
> > But after some analysis, I think it is tabulated-list-mode, or rather
> > its recent adaptation to display-line-numbers-mode, which is in the
> > wrong here.  It used to be that using a mode derived from
> > tabulated-list-mode didn't immediately force a request for refreshing
> its
> > rows.  After display-line-numbers-mode came along, that ceased to be
> > true in some situations.
> >
> > Reading the special code in tabulated-list-mode concerned with line
> > numbers, the latter seem to affect only the header line, not the
> > buffer's contents.  So this seems to be the correct fix:
>
> I don't remember all the callers/users of tabulated-list-mode, so I
> cannot be sure your patch is correct.  (Why only update the header?
> the columns below the header need to be realigned as well, no?  See
> tabulated-line-print-col, for example.)
>

I don't know what you are calling attention to in that function. Can
you be more specific?

Regarding your question (why only the header?), well that seems
to be the only place where a line-number _isn't_ printed, so
it needs the additional indentation.  I think that also explains
why you already _only_ update only the header in pre-redisplay-functions
and window-scroll-functions.  Have a look at
tabulated-list-watch-line-number-width and
tabulated-list-window-scroll-function. All they do is update the
header, not the contents.

I'm just extending that criteria to the turn-on/off of d-l-n-m.

Furthermore I think it is a regression in itself to deliver an Emacs
27 with this changed tabulated-list-mode bootstrapping behaviour.

However, if you are convinced it's TRT, I'm okay with doing that on
> master.  On the release branch, please try to find a solution that is
> not in tabulated-list-mode, but in Flymake.
>

I tried around a bit and couldn't come up with anything that I know is
safe, short of some very ugly vapourware hacks. Not saying that it
doesn't exist, but I started searching in tabulated-list-mode and
I do think that's the best place to fix it.

João
[Message part 2 (text/html, inline)]

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

Previous Next


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