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

From: Eli Zaretskii <[email-masked]>
Date: Fri, 13 May 2022 18:55:32 +0300

> Resent-From: Eli Zaretskii <[email-masked]>
> Original-Sender: "Debbugs-submit" <[email-masked]>
> Resent-CC: [email-masked]
> Resent-Sender: [email-masked]
> Cc: [email-masked], [email-masked]
> Date: Fri, 13 May 2022 17:20:43 +0300
> From: Eli Zaretskii <[email-masked]>
> 
> > Cc: [email-masked], [email-masked]
> > Date: Fri, 13 May 2022 17:12:03 +0300
> > From: Eli Zaretskii <[email-masked]>
> > 
> > > header-line-format would look like
> > > 
> > > (display-line-spaces <the rest>)
> > > 
> > > where display-line-spaces would indeed be updated by the redisplay code
> > > (to be of the same length as (line-number-display-width 'columns)).
> 
> 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?

So looking at cvs-mode.el, I conclude that I don't really understand
the problem.  It seems to use :align-to display spec to align columns
in the body of the table, which should keep the alignment when
line-numbers are turned on and off, so is the problem with the
header-line after all?  If so, why isn't just using
line-number-display-width when calculating the header-line-format good
enough?

Perhaps Joost could describe the problem in more detail?