help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: How to get the current column regardless of the content of the curre


From: Gregory Heytings
Subject: Re: How to get the current column regardless of the content of the current line?
Date: Fri, 16 Dec 2022 08:52:46 +0000


(defun my/current-column ()
   (- (point) (pos-bol)))

It's not entirely correct to call this a "column", though...


That's what the OP wanted, indeed it's not a "column" in the visual sense anymore (e.g. a TAB counts for 1), but it's still a "column" in a "number of characters" sense. Well, almost: when glyphs are composed, that function will not give the result the OP expects I think, e.g. with a line with only "🧙🏻" 2 is returned.


reply via email to

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