emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: invisible


From: Stefan Monnier
Subject: Re: invisible
Date: Mon, 26 Nov 2007 15:16:35 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux)

> I lost you here.  `line-move-ignore-invisible' nil means do not skip
> invisible newlines and explicitly should affect only C-n and C-p.
> `disable-point-adjustment' is about a lot of other things as well.

AFAIK in all circumstances where you want line-move-ignore-invisible to
be non-nil, you'll also want disable-point-adjustment to be nil.
And vice-versa.

>>> This function works only in certain cases,
>>> because what we really need is for `move-to-column'
>>> and `current-column' to be able to ignore invisible text."
>> This text seems odd: AFAIK they *do* ignore invisible text.  Does it
>> want to say that they sould ignore the `invisible' text property?
> Personally I think they should ignore all properties.

You're saying that line-move-to-column would like current-column and
friends should to treat invisible text as if it were visible?

For reference: the pre-21 behavior was to treat all invisible text as if
it weren't there.  In Emacs-21, I changed it so that text that's
replaced by an ellipsis is counted as if it were visible: I needed this
to be able to re-indent blocks of code while hidden by outline-minor-mode.
I didn't change it for non-ellipsis invisible text to reduce the
backward compatibility problems.

It turns out that it's also a good behavior in the sense that you can
get the other two behaviors (ignore all invisible text properties and
obey all invisible text properties) in the following way:

   (let ((buffer-invisibility-spec nil)) (current-column))
and
   (let ((buffer-invisibility-spec t)) (current-column))

>> The docstring of line-move-to-column is too vague: it doesn't say what
>> it intends to do, really: "considering invisibility" is not much help.
>> If someone knows what it intends to do, really, maybe we can figure out
>> how to fix it (probably the best fix will be to change the C code).

> `line-move-ignore-invisible' per se is vague.
> What is an invisible line?

Indeed.  We also need to improve that docstring.


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]