[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: line-start?
From: |
Eli Zaretskii |
Subject: |
Re: line-start? |
Date: |
Fri, 07 Feb 2020 17:56:01 +0200 |
> From: Bastien <address@hidden>
> Cc: address@hidden
> Date: Fri, 07 Feb 2020 15:46:09 +0100
>
> Eli Zaretskii <address@hidden> writes:
>
> > But that gives a buffer position, not column number.
>
> (- (window-line-start) (line-beginning-position))
>
> gives me the column number.
That's not the column number, that's the ordinal number of the
character on a line. It doesn't take into account characters that
take more than one column, it doesn't take into account characters
that are composed to produce a single grapheme cluster (or even a
single glyph), and it doesn't take into account variable-size fonts.
Of course, if all these are unimportant in your use case, you can
disregard them. But a general-purpose function cannot disregard them.
- line-start?, Bastien, 2020/02/06
- Re: line-start?, Bastien, 2020/02/06
- Re: line-start?, Eli Zaretskii, 2020/02/06
- Re: line-start?, Bastien, 2020/02/07
- Re: line-start?, Eli Zaretskii, 2020/02/07
- Re: line-start?, Bastien, 2020/02/07
- Re: line-start?, Eli Zaretskii, 2020/02/07
- Re: line-start?, Bastien, 2020/02/07
- Re: line-start?, Eli Zaretskii, 2020/02/07
- Re: line-start?, Bastien, 2020/02/07
- Re: line-start?,
Eli Zaretskii <=
- Re: line-start?, Bastien, 2020/02/07