[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Hope tabulated-list header can be moved via horizontal-scroll-bar
From: |
Juri Linkov |
Subject: |
Re: Hope tabulated-list header can be moved via horizontal-scroll-bar |
Date: |
Thu, 20 Jun 2024 19:23:14 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) |
>>> Emacs tabulated-list is very similar to dataGridView control in WinForm,
>>> but the list header can not be moved
>>> via horizontal-scroll-bar, which prevents some tabulated-lists (that have
>>> many columns) from being placed on
>>> the side bar.
>>>
>>> Hope tabulated-list header can be moved via horizontal-scroll-bar in the
>>> future or anyone know about
>>> alternatives?
>>
>> This needs to be implemented in the display code. Currently, mode
>> line and header line are not scrolled horizontally with the text
>> (header line is the basis for implementation of tabulated-lists).
>> Conceptually, scrolling in Emacs moves the viewport, not the text, and
>> header line is considered to be part of the viewport.
>>
>> If we do implement that, it should probably be a special minor mode,
>> since not every header line should scroll with the text. Patches
>> welcome.
>
> 'proced' can scroll the header line.
Actually 'proced' relies on the hack in 'proced-header-line'
that subtracts the amount of 'window-hscroll' columns.
Apparently this line
(add-hook 'post-command-hook #'force-mode-line-update nil t) ;; FIXME: Why?
was intended to update the header-line after horizontal scrolling,
but it works correctly even without this hook.
BTW, there is an obsolete function 'tabulated-list-window-scroll-function',
but probably it's unrelated.