I'm working on a utility that communicates with an external process using line and column positions in the current file.
I have configured Haskell mode to use compose-region
to display certain parts of the syntax in Unicode, which can replace multiple characters with a single one (ie turning ->
into →
). Unfortunately, this means that the line and column position in the buffer no longer correspond to their position in the underlying file, but instead map to the position in the buffer, counting the composed region as a single character.
Here's the code I currently use to get the line and column:
(list (line-number-at-pos) (current-column))
How can I get the position ignoring these composed characters, in terms of the underlying file?