unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: David Kastrup <dak@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Something is rotten with end-of-line and move-end-of-line
Date: Tue, 29 Nov 2005 00:10:08 +0100	[thread overview]
Message-ID: <854q5w4be7.fsf@lola.goethe.zz> (raw)
In-Reply-To: <lorentey.g.e.devel.87psokbdnp.elte@walrus.fnord.hu> (Lőrentey Károly's message of "Mon, 28 Nov 2005 23:39:22 +0100")

lorentey@elte.hu (Lőrentey Károly) writes:

> David Kastrup <dak@gnu.org> writes:
>>> There is a test case given in the discussion that demonstrates the
>>> original problem:
>>>
>>> 	(progn
>>> 	 (insert "\nab")
>>> 	 (insert-image-file "../etc/splash.xpm")
>>> 	 (move-end-of-line 1) 
>>> 	 (insert "def\n"))
>>>
>>> move-b/e-of-line move across the image to the line ending that
>>> corresponds to what is displayed on the screen, while the builtin
>>> b/e-of-line variants stop at the hidden newlines embedded in the image
>>> file.
>>
>> Correct me if I am wrong, but we move point away from invisible areas
>> anyway in the keyboard input loop, so there is no necessity to let
>> move-end-of-line do the deed explicitly in order to get
>> user-comprehensible behavior, right?
>
> Consider the above example, when point is after the inserted image:
>
> 	ab[IMAGE]def<!>
>
> Executing `beginning-of-line' stops right after the image, which is
> not what the user expects.
>
> 	ab[IMAGE]<!>def

Why would it do that?  beginning-of-line moved backwards, so I'd expect

ab<!>[IMAGE]def

> Similarly, from the other way around, `end-of-line' stops just
> before the image.  (Note that the text that is hidden behind the
> image has display and intangible properties only, it is not
> invisible.

Pretty much the same with regard to the keyboard loop.

> However, `end-of-line' and `beginning-of-line' behave the same
> (well, similar) way with invisible newlines.)

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

  reply	other threads:[~2005-11-28 23:10 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-25  1:09 Something is rotten with end-of-line and move-end-of-line David Kastrup
2005-11-28  4:46 ` Richard M. Stallman
2005-11-28 11:35   ` David Kastrup
2005-11-28 19:52     ` Eli Zaretskii
2005-11-28 21:01     ` Richard M. Stallman
2005-11-28 16:10   ` Lőrentey Károly
2005-11-28 16:13     ` Lőrentey Károly
2005-11-28 16:53       ` David Kastrup
2005-11-28 20:17         ` Lőrentey Károly
2005-11-28 21:46           ` David Kastrup
2005-11-28 22:39             ` Lőrentey Károly
2005-11-28 23:10               ` David Kastrup [this message]
2005-11-28 22:24           ` Lőrentey Károly
2005-11-29  3:11           ` Richard M. Stallman
2005-11-29  9:41             ` Lőrentey Károly
2005-11-29  3:11     ` Richard M. Stallman

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=854q5w4be7.fsf@lola.goethe.zz \
    --to=dak@gnu.org \
    --cc=emacs-devel@gnu.org \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).