GNU bug report logs -
#35899
26.1; move-beginning-of-line sometimes does not move to beginning of line
Previous Next
Reported by: Markus Triska <triska <at> metalevel.at>
Date: Sat, 25 May 2019 13:45:02 UTC
Severity: normal
Tags: fixed, patch
Found in version 26.1
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> From: Markus Triska <triska <at> metalevel.at>
> Date: Sat, 25 May 2019 15:31:57 +0200
>
> $ wget https://www.metalevel.at/ei/hello.png
>
> and then, starting Emacs with "emacs -Q", evaluate the following form:
>
> (progn
> (goto-char (point-min))
> (save-excursion (insert "\n"))
> (goto-char (+ (point) (cadr (insert-image-file "hello.png"))))
> (move-beginning-of-line nil))
>
> This yields: 592, and does not move point to the beginning of the line.
>
> However, the documentation of move-beginning-of-line includes:
>
> (If there’s an image in the line, this disregards newlines
> which are part of the text that the image rests on.)
>
> Hence, I expect this to move to position 1. For comparison, when I press
> C-a, it does move to position 1, as expected.
"the text that the image rests on" refers to the text which is
"covered" by the display property, not the newlines in the binary data
that constitutes the image file's data.
> Would you please consider adjusting the function so that it behaves as
> documented?
This function works on the logical/physical lines, not on visual lines.
> Alternatively, could you please provide this feature in a different
> way?
I suggest to use beginning-of-visual-line instead.
This bug report was last modified 4 years and 275 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.