Rens Oliemans <[email protected]> writes:

> Below is an attached org mode file where I have some strange behaviour in 
> column
> view, I expect it to be a bug. The problem: if the entire headline consists 
> of a
> link, you cannot properly move through all columns, some columns are skipped.
>
> To reproduce:
> 1. Open attached test.org
> 2. Enter column view (org-columns)
> 3. Set point to =** Org Mode= heading
> 4. Press <RIGHT> three times, you are now in column 'Two'
> 5. Press <RIGHT> once more.
>
> Expected behaviour: We have moved one column to the right, to column 'Three'.
>
> Actual behaviour: We skip columns 'Three' and 'Four' and go straight to the 
> text
> of the headline.

Confirmed.
This is related to point adjustment and the way column view works.
Column view puts N overlays onto first N chars on the heading line.
However, when a char has invisible property (which [[ in link do), even
though there is something displayed on top, Emacs still adjusts point,
trying to skip over "invisible" text.
To illustrate:

(let (ovs)
  (with-current-buffer (generate-new-buffer "*temp*")
    (display-buffer-below-selected (current-buffer) nil)
    (insert "\n\n12345789")
    (goto-char (point-min))
    (with-silent-modifications
      (search-forward "1")
      (backward-char)
      (put-text-property (+ (point) 2) (+ (point) 4) 'invisible t)
      (read-char "Press any key (part of 123456789 hidden)")
      (dolist (offset '(0 1 2 3 4 5 6 7 8))
        (push (make-overlay (+ offset (point)) (+ offset (point) 1)) ovs)
        (overlay-put (car ovs) 'display (copy-sequence "!")))
      (message "NOW, move cursor across 123456789 string, observe point jumping 
across some !"))))

I will report this to Emacs devs and see what they say.

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>

Reply via email to