From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Mauger Newsgroups: gmane.emacs.devel Subject: current-column and display (space :align-to) properties Date: Tue, 10 Jan 2006 01:24:22 +0000 (UTC) Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1136856314 31276 80.91.229.2 (10 Jan 2006 01:25:14 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 10 Jan 2006 01:25:14 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jan 10 02:25:01 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 1Ew8Fq-0005eU-H5 for ged-emacs-devel@m.gmane.org; Tue, 10 Jan 2006 02:24:55 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ew8Hn-0006r5-Qs for ged-emacs-devel@m.gmane.org; Mon, 09 Jan 2006 20:26:55 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ew8Hc-0006qK-AO for emacs-devel@gnu.org; Mon, 09 Jan 2006 20:26:44 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ew8HZ-0006pf-Cm for emacs-devel@gnu.org; Mon, 09 Jan 2006 20:26:44 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ew8HZ-0006pZ-AG for emacs-devel@gnu.org; Mon, 09 Jan 2006 20:26:41 -0500 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtp (TLS-1.0:RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1Ew8Jw-00072g-1S for emacs-devel@gnu.org; Mon, 09 Jan 2006 20:29:08 -0500 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1Ew8FQ-0005bI-Hz for emacs-devel@gnu.org; Tue, 10 Jan 2006 02:24:29 +0100 Original-Received: from na6mk2fw02.fidelity.com ([192.223.243.6]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 10 Jan 2006 02:24:28 +0100 Original-Received: from mmaug by na6mk2fw02.fidelity.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 10 Jan 2006 02:24:28 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Lines: 41 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: main.gmane.org User-Agent: Loom/3.14 (http://gmane.org/) X-Loom-IP: 192.223.243.6 (Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; JFV; IE 6.0 SP1 (FID r3.0); .NET CLR 1.0.3705; .NET CLR 1.1.4322)) 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:48887 Archived-At: I'm not sure if this is a bug or a feature... Along the lines of a question that arose a couple of weeks ago re: counting before and after properties when calculating current-column, should the space :align-to and :width properties be reflected in current-column? For example, in *scratch*, try the following: (progn (insert "[" (propertize "01" 'display '(space :align-to 10)) "]XX\n") (insert "[" (propertize "0123456789012" 'display '(space :align-to 5)) "]YY\n") ) `C-j' You should see something like the following in *scratch*: [ ]XX [ ]YY nil If you place the cursor on the second of the two XXs (actually point is between the two XXs), the current-column is 5 (the two square brackets, the two characters in the propertized string and the first X.) If you place the cursor on the second of the two YYs, the current-column is 16 (the two square brackets, the twelve characters in the propertized string and the first Y.) Even stranger, if you again place the cursor between the two XXs and hit `C-n', the cursor will go to before the closing bracket on the second line in an effort to preserve the column position. Is this desired behavior? Should current-column look at the display property to determine how to calculate the column position? -- Michael