all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* (current-column) produces unexpected results with tabs when overlays have before-strings
@ 2003-10-25 20:26 Michael Schierl
  2003-10-27 23:44 ` Richard Stallman
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Schierl @ 2003-10-25 20:26 UTC (permalink / raw)


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 <return>

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: (current-column) produces unexpected results with tabs when overlays have before-strings
  2003-10-25 20:26 (current-column) produces unexpected results with tabs when overlays have before-strings Michael Schierl
@ 2003-10-27 23:44 ` Richard Stallman
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Stallman @ 2003-10-27 23:44 UTC (permalink / raw)
  Cc: bug-gnu-emacs

current-column ignores overlays entirely, exceot for invisibility.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-10-27 23:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-25 20:26 (current-column) produces unexpected results with tabs when overlays have before-strings Michael Schierl
2003-10-27 23:44 ` Richard Stallman

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.