emacs-devel
[Top][All Lists]
Advanced

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

Re: current-column and display (space :align-to) properties


From: Kim F. Storm
Subject: Re: current-column and display (space :align-to) properties
Date: Thu, 12 Jan 2006 09:41:42 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Michael Mauger <address@hidden> writes:

> I think a basic solution to this (report integer column number with no 
> accounting for font widths) is needed now (before the release) since many of 
> the display properties are new and cause inconsistent behavior in some basic 
> functions.  

The mentioned display properties are not new (they were introduced in
21.1), so the problem is not new either.

> I've looked at the code, and understand where the changes are needed, but am 
> not very comfortable with Emacs internals.  I'll take a look and see if I can 
> puzzle my way thru but my time for it is limited.

If you manage to fix current-column (actually current_column_1),
please remember to fix move-to-column in a similar way!

My best guess is that it must be fixed in a way which calls redisplay
internally to calculate the proper column.  Otherwise, there are just
too many things which can go wrong -- e.g. newlines with display
properties, etc.

Try this:

  (insert "["
          (propertize "01\n23" 
                      'display '(space :align-to 10))
          "]ZZ\n")


A good test would be 
M-: (move-to-column (current-column))

-- 
Kim F. Storm <address@hidden> http://www.cua.dk





reply via email to

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