Subject: Re: move-end-of-line inline doc unclear. (intangibility)

From: Chong Yidong <[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.