[Top][All Lists]

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

Re: I can see invisible characters

From: Stefan Monnier
Subject: Re: I can see invisible characters
Date: Thu, 21 May 2009 10:05:56 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.93 (gnu/linux)

>> I see the same thing: the char is not displayed.

> I'm confused.  The first lines are

>   1  Aachen;Aa·chen
>  16  Aachener;Aa·che·ner
>  36  Aachenerin;Aa·che·ne·rin
>  61  Aachenern;Aa·che·nern
>  83  Aacheners;Aa·che·ners
> 105  Aachens;Aa·chens
> 122  Aadorf;Aa·dorf
> 137  Aalbauer;Aal=bau-er

> My code calls `add-text-properties' with the following start and end
> values:

>    1  16
>   16  36
>   ...
>  122 137

> As you can see, the positions overlap.

The positions are *between* chars, so the positions themselves have
a width of 0, so the interval 1-16 and 16-36 do not overlap.

> If I don't do this, I get empty lines.

Of course, because otherwise they don't cover the newlines.

> However, I really don't understand the whole issue!  The
> last character in the first line has position 14,

14 is the position before the last char.

> thus the end-of-line character has position 15

Indeed, 15 is the position after the last char, aka before the newline.

> -- why do I need to use position 16 to make
> the first line completely disappear?

Because 15-16 is the interval that covers the newline.

> Note that, according to the info of `C-x =', I can't access position
> 138, the first visible character after applying my code.  This *can't*
> be right IMHO.

That doesn't sound right: the first visible position is the char on
interval 137-138.  So you should not be able to access position 137
(because the invisible&intangible interval 1-137 is rear-sticky, so you
can place point at its beginning but not at its end), but you should be
able to go to position 138 (between the A and the a of Aalbauer).


reply via email to

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