all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: joostkremers@fastmail.fm, 55387@debbugs.gnu.org
Subject: 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	[thread overview]
Message-ID: <875ym92zx0.fsf@gnus.org> (raw)
In-Reply-To: <83k0apmsi4.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 13 May 2022 17:12:03 +0300")

Eli Zaretskii <eliz@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





  parent reply	other threads:[~2022-05-13 15:52 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-12 15:33 bug#55387: 28.1.50; csv-mode: header does not align when line numbers are displayed Joost Kremers
2022-05-13 12:52 ` Lars Ingebrigtsen
2022-05-13 13:36   ` Eli Zaretskii
2022-05-13 13:41     ` Lars Ingebrigtsen
2022-05-13 14:12       ` Eli Zaretskii
2022-05-13 14:20         ` Eli Zaretskii
2022-05-13 15:55           ` Eli Zaretskii
2022-05-13 15:52         ` Lars Ingebrigtsen [this message]
2022-05-13 16:01           ` Eli Zaretskii
2022-05-13 16:04             ` Lars Ingebrigtsen
2022-05-13 17:09               ` Eli Zaretskii
2022-05-13 17:40                 ` Lars Ingebrigtsen
2022-05-13 17:41                   ` Lars Ingebrigtsen
2022-05-13 18:14                     ` Lars Ingebrigtsen
2022-05-13 19:48                       ` Lars Ingebrigtsen
2022-05-14  5:56                         ` Eli Zaretskii
2022-05-14 11:28                           ` Lars Ingebrigtsen
2022-05-14 11:34                             ` Eli Zaretskii
2022-05-14  5:17                   ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=875ym92zx0.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=55387@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=joostkremers@fastmail.fm \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.