GNU bug report logs -
#21468
24.5; When next-line (visual) crosses overlay with before-string="\n" point goes to column 0
Previous Next
Full log
Message #52 received at 21468 <at> debbugs.gnu.org (full text, mbox):
On Fri, Oct 2, 2015 at 6:01 AM, Eli Zaretskii <eliz <at> gnu.org> wrote:
>> But when moving point to end of line this causes the cursor to appear
>> at the edge of the window instead of at the "real" end of line. I
>> guess it's because the aligned space pushes the newline character to
>> the edge of the window.
>
> Yes. But why is that a problem?
Because we want the lines to be just visual effects that don't affect
cursor movement, i.e. the cursor should act the same whether or not
the lines are visible.
>
> If you dislike that, you could make the stretch one column shorter,
Which of course just means that the cursor appears at one column
before the edge of the window instead of at the "real" end of line.
> (let* ((align (list 'space :align-to `(+ (,(- (window-body-width nil t)
> (default-font-width)))
> ,(window-hscroll))))
>
> (Btw, I think adding window-hscroll is incorrect here, as its value is
> in columns, while window-body-width returns the width in pixels.)
window-body-width is inside a list indicating pixel value, and
window-hscroll is a plain integer indicating a multiple of the font
width, so it should work, no? That was my reading of "37.16.3 Pixel
Specification for Spaces" in the elisp manual.
From: Noam Postavsky <npostavs <at> users.sourceforge.net>
> For a self-contained example do "emacs -Q overlay.el -f eval-buffer -f
> set-mark-command -f move-end-of-line" with attached overlay.el.
By the way, I noticed this is wrong (for some reason it works in 24.5
even though functions are being called with the wrong number of
arguments), it should be called like
emacs -Q overlay.el --eval "(progn (switch-to-buffer
\"overlay.el\") (eval-buffer) (set-mark-command nil) (move-end-of-line
nil))"
This bug report was last modified 9 years and 285 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.