emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug: table header line mode causes next-line to reach beginning of l


From: Kyle Meyer
Subject: Re: Bug: table header line mode causes next-line to reach beginning of line
Date: Sat, 17 Apr 2021 15:13:17 -0400

Oorja Sandhu writes:

[...]
> 3. M-x org-table-header-line-mode
>
> 4. Resize emacs window very small such that horizontal as well as
> vertical scrolling is required to see it fully.
> 
> Otherwise, add rows and columns in the org table in the file such that
> it exceeds window size both vertically and horizontally. This is not a
> useless example because the header line mode is most useful when you
> have a big table and heading scrolls off your visible window.
>
> 5. Go to end of line in a row in the table when the header line
> overlay is active.
>
> 6. Press C-n  (or down arrow) twice
>
> Observation : cursor is at the beginning-of-line
>
> Expected : cursor should remain at the same column as earlier

Thanks for the report and the clear steps to reproduce the issue.

> =========
> My unsuccessful code analysis, if anyone is interested :
> There is a post command hook to update the overlay of table
> header. This includes the function "beginning-of-line". In more recent
> versions of org, it is (move-beginning-of-line 2).
>
> But all instances of "beginning-of-line" or "move-beginning-of-line"
> are wrapped in "save-excursion".. In fact if I invoke
> (org-table-header-set-header) instead of C-n, the cursor does not go
> to beginning of line.

Yes, it looks like the issue is that the movement in
org-table-header-set-header resets temporary-goal-column to 0, messing
with the logic in line-move-1.  This should be fixed by f12ca1a56.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]