[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Alternative to current-column that counts from visual line beginning
From: |
Yuan Fu |
Subject: |
Re: Alternative to current-column that counts from visual line beginning |
Date: |
Tue, 29 Dec 2020 00:01:16 -0500 |
> On Dec 28, 2020, at 9:40 PM, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>
>> to get the column number counting from the visual line beginning. Is
>> there a function that does what I want? If not, maybe we should add
>> one, or add an argument to current-column.
>
> `posn-at-point`?
>
That works, albeit a bit convoluted comparing to current-column and only works
when point is visible. Another less legit point is that posn-at-point is a bit
far-fetched semantically: for me it is more about GUI pixel positions than
text-based column and line positions. All things considered, I still prefer a
dedicated function or an additional argument to current-column.
Yuan