all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Hope tabulated-list header can be moved via horizontal-scroll-bar
@ 2024-06-19 21:12 Siyuan Chen
  2024-06-20  5:05 ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Siyuan Chen @ 2024-06-19 21:12 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 390 bytes --]

Hi,

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?

Thanks.

Best regards,
Siyuan Chen

[-- Attachment #2: Type: text/html, Size: 538 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Hope tabulated-list header can be moved via horizontal-scroll-bar
  2024-06-19 21:12 Hope tabulated-list header can be moved via horizontal-scroll-bar Siyuan Chen
@ 2024-06-20  5:05 ` Eli Zaretskii
  2024-06-20  6:46   ` Juri Linkov
  0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2024-06-20  5:05 UTC (permalink / raw)
  To: Siyuan Chen; +Cc: emacs-devel

> From: Siyuan Chen <chansey97@gmail.com>
> Date: Thu, 20 Jun 2024 05:12:35 +0800
> 
> 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.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Hope tabulated-list header can be moved via horizontal-scroll-bar
  2024-06-20  5:05 ` Eli Zaretskii
@ 2024-06-20  6:46   ` Juri Linkov
  2024-06-20 16:23     ` Juri Linkov
  0 siblings, 1 reply; 4+ messages in thread
From: Juri Linkov @ 2024-06-20  6:46 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Siyuan Chen, emacs-devel

>> 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.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Hope tabulated-list header can be moved via horizontal-scroll-bar
  2024-06-20  6:46   ` Juri Linkov
@ 2024-06-20 16:23     ` Juri Linkov
  0 siblings, 0 replies; 4+ messages in thread
From: Juri Linkov @ 2024-06-20 16:23 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Siyuan Chen, emacs-devel

>>> 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.



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-06-20 16:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-19 21:12 Hope tabulated-list header can be moved via horizontal-scroll-bar Siyuan Chen
2024-06-20  5:05 ` Eli Zaretskii
2024-06-20  6:46   ` Juri Linkov
2024-06-20 16:23     ` Juri Linkov

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.