[Top][All Lists]

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

Re: `vertical-motion', `goto-line' set point to invisible text

From: Stefan Monnier
Subject: Re: `vertical-motion', `goto-line' set point to invisible text
Date: Sun, 03 Jul 2011 10:50:21 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

> While working on notmuch [1] emacs client, I stumbled upon an unexpected
> behavior: `beginning-of-visual-line' places point to invisible text in
> the beginning to the line.  I.e. you have:

>   line1
>   line2    <--- this line is not visible
>   line3    <--- point is on this line

> in this case, `beginning-of-visual-line' will set the position to start
> of line2 (which is invisible), not line3.  It differs from what
> `move-beginning-of-line' and even does not match
> `line-beginning-position'.  `beginning-of-visual-line' uses
> `vertical-motion' to do the job.  `goto-line' has a similar behavior.  I
> believe there are more functions like this.

> This does not look right to me.  I expect these functions never set
> point inside invisible text and there should be some general way to
> protect from this.

AFAIK none of those positions are *inside* invisible text (remember
that point is always between two chars).


reply via email to

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