all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Markus Triska <triska@metalevel.at>
Cc: 35899@debbugs.gnu.org
Subject: bug#35899: 26.1; move-beginning-of-line sometimes does not move to beginning of line
Date: Sat, 25 May 2019 17:38:01 +0300	[thread overview]
Message-ID: <838suu4n1y.fsf@gnu.org> (raw)
In-Reply-To: <875zpylkxe.fsf@metalevel.at> (message from Markus Triska on Sat,  25 May 2019 15:31:57 +0200)

> From: Markus Triska <triska@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.





  reply	other threads:[~2019-05-25 14:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-25 13:31 bug#35899: 26.1; move-beginning-of-line sometimes does not move to beginning of line Markus Triska
2019-05-25 14:38 ` Eli Zaretskii [this message]
2019-06-21 10:05   ` Noam Postavsky
2019-06-21 12:30     ` Eli Zaretskii
2019-06-22 22:54       ` Noam Postavsky
2019-06-23 15:54         ` Eli Zaretskii
2019-06-23 16:31           ` Noam Postavsky
2020-08-21 13:09             ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=838suu4n1y.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=35899@debbugs.gnu.org \
    --cc=triska@metalevel.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.