GNU bug report logs - #55387
28.1.50; csv-mode: header does not align when line numbers are displayed

Previous Next

Package: emacs;

Reported by: Joost Kremers <joostkremers <at> fastmail.fm>

Date: Thu, 12 May 2022 15:38:02 UTC

Severity: normal

Tags: moreinfo

Found in version 28.1.50

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: joostkremers <at> fastmail.fm, 55387 <at> debbugs.gnu.org
Subject: Re: bug#55387: 28.1.50; csv-mode: header does not align when line
 numbers are displayed
Date: Fri, 13 May 2022 17:52:11 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

> Moreover, the code which produces the line-numbers can be called when
> the line doesn't need to be displayed at all, only its metrics
> measured, for some job related to layout of text.  In this case, it
> would be unthinkable to modify the header-line as a side effect,
> because no one expects the header-line to be updated on display when,
> say, the user presses C-n in the middle of a window.
>
> So again, I don't understand how this can work.

I don't really understand your point here, so I'm probably
misunderstanding something fundamental.  My thought was just that the
thing that produces the line number would set a
line-number-width/columns variable.  When redisplay formats the header
line (whenever it wants to do that), that variable would be set, so it
would just render it in the totally normal way.

> This is why we have hooks that redisplay calls in strategic places,
> and tabulated-list.el uses them to update the header-line.  Why isn't
> that a better way?

Because this affects all modes that have a columnar layout and uses a
header line.

> Btw, isn't it true that the problem is not in displaying the
> header-line, but in adjusting the alignment of the _body_ of the table
> to the changes in header-line (which happen automatically)?  In which
> case how will header-line construct help?

The header line isn't adjusted automatically by display-line-number-mode.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 3 years and 11 days ago.

Previous Next


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