[Top][All Lists]

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

current-column doesn't reflect display column any longer

From: Drew Adams
Subject: current-column doesn't reflect display column any longer
Date: Sat, 31 Dec 2005 14:43:05 -0800

emacs -q

Enter some lines of text in a buffer, with some TAB characters in some
of the lines.

Put the cursor just after one of the TABs and do `M-:
(current-column)'. Do the same at places directly above or below the
same position, in other lines that have not TABs (or a different
number of TABs). Keep the cursor, in other words, in the same column
and evaluat that `current-column'.

The result should always be the same, for the same column. It is
not. Instead, each TAB is simply counted as one
character. `current-column' appears to simply count characters
now. This behavior contradicts both its name and its doc string, which
specifically says that it measures the apparent (i.e. displayed)
column, by summing the widths of the characters preceding the
cursor. It even mentions TAB as an example.

I'm using an old CVS snapshot, and hoping this has been fixed since.

In GNU Emacs (i386-mingw-nt5.1.2600)
 of 2005-06-26 on NONIQPC
X server distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc
(3.3) --cflags -I../../jpeg-6b-3/include -I../../libpng-1.2.8/include -I../.
./tiff-3.6.1-2/include -I../../xpm-nox-4.2.0/include -I../../zlib-1.2.2/incl

reply via email to

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