From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: current-column and display (space :align-to) properties Date: Thu, 12 Jan 2006 09:41:42 +0100 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1137057835 17612 80.91.229.2 (12 Jan 2006 09:23:55 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 12 Jan 2006 09:23:55 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jan 12 10:23:49 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EwygE-0006rU-6n for ged-emacs-devel@m.gmane.org; Thu, 12 Jan 2006 10:23:38 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EwyeF-0003N1-5P for ged-emacs-devel@m.gmane.org; Thu, 12 Jan 2006 04:21:35 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ewy7R-0002TR-TT for emacs-devel@gnu.org; Thu, 12 Jan 2006 03:47:42 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ewy55-0002ES-Kc for emacs-devel@gnu.org; Thu, 12 Jan 2006 03:45:23 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ewy4w-0002De-O4 for emacs-devel@gnu.org; Thu, 12 Jan 2006 03:45:08 -0500 Original-Received: from [195.41.46.235] (helo=pfepa.post.tele.dk) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Ewy7i-0004R4-Nw for emacs-devel@gnu.org; Thu, 12 Jan 2006 03:47:58 -0500 Original-Received: from kfs-l.imdomain.dk.cua.dk (unknown [80.165.4.124]) by pfepa.post.tele.dk (Postfix) with SMTP id 1EBCC47FE94; Thu, 12 Jan 2006 09:42:53 +0100 (CET) Original-To: Michael Mauger In-Reply-To: (Michael Mauger's message of "Wed, 11 Jan 2006 16:57:38 +0000 (UTC)") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:48951 Archived-At: Michael Mauger 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 http://www.cua.dk