From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Michael Schierl Newsgroups: gmane.emacs.bugs Subject: (current-column) produces unexpected results with tabs when overlays have before-strings Date: Sat, 25 Oct 2003 22:26:00 +0200 Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Message-ID: <3F9ADC58.1D41DD41@gmx.de> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1067113739 13171 80.91.224.253 (25 Oct 2003 20:28:59 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 25 Oct 2003 20:28:59 +0000 (UTC) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Oct 25 22:28:57 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1ADV1t-000536-00 for ; Sat, 25 Oct 2003 22:28:57 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1ADV0u-0000ca-1I for geb-bug-gnu-emacs@m.gmane.org; Sat, 25 Oct 2003 16:27:56 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1ADV0s-0000bw-T2 for bug-gnu-emacs@gnu.org; Sat, 25 Oct 2003 16:27:54 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1ADV0M-0000Jw-2b for bug-gnu-emacs@gnu.org; Sat, 25 Oct 2003 16:27:54 -0400 Original-Received: from [213.165.64.20] (helo=mail.gmx.net) by monty-python.gnu.org with smtp (Exim 4.24) id 1ADV0L-0000Jr-Ja for bug-gnu-emacs@gnu.org; Sat, 25 Oct 2003 16:27:21 -0400 Original-Received: (qmail 3101 invoked by uid 65534); 25 Oct 2003 20:27:19 -0000 Original-Received: from ags9-d9ba52e8.pool.mediaWays.net (EHLO gmx.de) (217.186.82.232) by mail.gmx.net (mp013) with SMTP; 25 Oct 2003 22:27:19 +0200 X-Authenticated: #13243522 X-Mailer: Mozilla 4.75 [de]C-CCK-MCD QXW0324v (Win95; U) X-Accept-Language: de,en Original-To: bug-gnu-emacs@gnu.org X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Bug reports for GNU Emacs, the Swiss army knife of text editors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.bugs:6028 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:6028 This bug report will be sent to the Free Software Foundation, not to your local site managers! Please write in English, because the Emacs maintainers do not have translators to read other languages for them. Your bug report will be posted to the bug-gnu-emacs@gnu.org mailing list, and to the gnu.emacs.bug news group. In GNU Emacs 21.3.1 (i386-msvc-windows98.3000) of 2003-03-28 on buffy configured using `configure --with-msvc (12.00)' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: deu locale-coding-system: iso-latin-1 default-enable-multibyte-characters: t Please describe exactly what actions triggered the bug and the precise symptoms of the bug: Execute this example code: (let ((buf (get-buffer-create "*new*")) ovl (str "*")) (set-buffer buf) (setq tab-width 8) (erase-buffer) (insert "1234567\t89012\n1234567 89012") (put-text-property 0 1 'face 'bold str) (setq ovl (make-overlay 0 0)) (overlay-put ovl 'before-string str) (setq ovl (make-overlay 15 15)) (overlay-put ovl 'before-string str) (switch-to-buffer buf)) You will see 2 lines that look the same. Each one has an 1 character wide overlay at the beginning. So from the documentation of current-column one expects that when point is on (before) 8, the column number should be the same in both lines (first line has a tab, but that one should be counted as 8 spaces as it is 8 chars wide). However, the tab is counted as only one space (column-number will return 8 in first line, 15 in last line). When there are no overlays with before-string before the tab, it works as expected. This also affects cursor movement when the cursor is right of the tab. Set cursor before upper 8 and move up -> cursor moves left a bit. Recent input: M-x r e p o r t - e m a c s - b u g Recent messages: Loading c:/eigenes/michael/homedir/.emacs21...done For information about the GNU Project and its goals, type C-h C-p. Loading cl-seq...done Loading emacsbug...done