GNU bug report logs -
#16497
24.3.50; `move-to-column' ignores invisible text at the beginning of the line, which create problems when using string-rectangle
Previous Next
Full log
Message #20 received at 16497 <at> debbugs.gnu.org (full text, mbox):
> From: Bastien <bzg <at> altern.org>
> Cc: 16497 <at> debbugs.gnu.org
> Date: Mon, 20 Jan 2014 10:22:02 +0100
>
> emacs -Q
> M-: (insert "abc") RET
> C-a
> M-: (put-text-property (point) (1+ (point)) 'invisible t) RET
> M-: (move-to-column 0)
>
> The point is between the invisible character and "b", which
> feels wrong even in terms of interactively inserting text.
Thanks.
move-to-column is a screen-moving command, and it has been skipping
invisible text for the past 18 years. It also accounts for various
other display-only features and artifacts. (It is a pity that this is
not documented; I think it's a documentation bug.)
So now I'm wondering why you thought you should be using this
function, if what you need is (AFAIU) to get to the Nth character
starting from the beginning of a line. E.g., move-to-column also
accounts for double-width characters (it counts them as 2 columns),
and also for how composed characters are displayed (it could count N
composed characters as M ~= N columns). It also accounts for
characters displayed via display tables. Are you sure you want all
this in the job you need to do with the rectangle?
Or maybe you just want line-move-to-column.
This bug report was last modified 11 years and 204 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.