Subject: bug#1507 closed by Chong Yidong <[email-masked]> (Re: move-end-of-line inline doc unclear. (intangibility))

From: [email-masked] (Emacs bug Tracking System)
Date: Sun, 04 Jan 2009 08:20:03 +0000

This is an automatic notification regarding your bug report
which was filed against the emacs package:

#1507: move-end-of-line inline doc unclear. (intangibility)

It has been closed by Chong Yidong <[email-masked]>.

Their explanation is attached below along with your original report.
If this explanation is unsatisfactory and you have not received a
better one in a separate message then please contact Chong Yidong <[email-masked]> by
replying to this email.

-- 
1507: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=1507
Emacs Bug Tracking System
Contact [email-masked] with problems

Subject: Re: move-end-of-line inline doc unclear. (intangibility)
From: Chong Yidong <[email-masked]>
To: xah lee <[email-masked]>
Cc: [email-masked]
Date: Sun, 04 Jan 2009 03:12:18 -0500

> It is not clear to me what this sentence means: “(If there's an image
> in the line, this disregards newlines which are part of the text that
> the image rests on.)” So, if there is a image on the current line... i
> don't know what it means to say it disregard newline, because to me
> eol char is at the end of line...

Whenever a range of text contains a text or overlay property with a
`display' property that specifies an image to display, Emacs displays
that image instead of displaying the range of text in the usual way.
Hence, move-end-of-line ignores newlines in that range of text, because
it is not displayed as the end of a line (it is "hidden" inside the
image).

> the last paragraph about intangibility is unclear. (i don't understand
> what it means. Looking up on that hook var didn't help much.)

Unfortunately, it's not feasible to explain the effects of every single
text or overlay property in docstrings.  The role of the `intangible'
property is explained in the "Special Properties" node of the Emacs Lisp
reference manual.

> am not sure if move-end-of-line should be used in elisp code, which is
> my primary query. If this function is not suitable in elisp code,
> perhaps the doc should say.

This function is suitable for use in elisp code, provided one keeps in
mind that it moves to the end of line *as displayed*, i.e., taking
things like text properties into account, exactly as C-e does.  This may
or may not be what you want in a Lisp program.

>From [email-masked] Sat Dec  6 15:59:15 2008
To: [email-masked]
From: xah lee <[email-masked]>
Subject: move-end-of-line inline doc unclear. (intangibility)
Date: Sat, 6 Dec 2008 15:58:54 -0800

it seems to me that the move-end-of-line inline doc is unclear.

in the inline doc for move-end-of-line, it says:

=C2=AB
move-end-of-line is an interactive compiled Lisp function in =20
`simple.el'.
It is bound to M-D.
(move-end-of-line arg)

Move point to end of current line as displayed.
(If there's an image in the line, this disregards newlines
which are part of the text that the image rests on.)

With argument arg not nil or 1, move forward arg - 1 lines first.
If point reaches the beginning or end of buffer, it stops there.
To ignore intangibility, bind `inhibit-point-motion-hooks' to t.
=C2=BB

=E2=80=A2 It is not clear to me what this sentence means: =E2=80=9C(If =
there's an =20
image in the line, this disregards newlines which are part of the =20
text that the image rests on.)=E2=80=9D So, if there is a image on the =20=

current line... i don't know what it means to say it disregard =20
newline, because to me eol char is at the end of line...

=E2=80=A2 the last paragraph about intangibility is unclear. (i don't =20=

understand what it means. Looking up on that hook var didn't help much.)

=E2=80=A2 am not sure if move-end-of-line should be used in elisp code, =20=

which is my primary query. If this function is not suitable in elisp =20
code, perhaps the doc should say.

similar in move-beginning-of-line.

   Xah
=E2=88=91 http://xahlee.org/

=E2=98=84