GNU bug report logs - #32744
There seems to be a bug in current-column in character mode

Previous Next

Package: emacs;

Reported by: Kalman Reti <kalman.reti <at> gmail.com>

Date: Sun, 16 Sep 2018 16:26:02 UTC

Severity: normal

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 32744 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Kalman Reti <kalman.reti <at> gmail.com>
Cc: 32744 <at> debbugs.gnu.org
Subject: Re: bug#32744: There seems to be a bug in current-column in character
 mode
Date: Sun, 16 Sep 2018 20:11:40 +0300
> From: Kalman Reti <kalman.reti <at> gmail.com>
> Date: Sun, 16 Sep 2018 09:28:47 -0400
> 
> In an empty buffer, m-: of
> 
> (let ((p (point))) (insert " ") (add-text-properties p (point) `(display (space :width 7))) (insert ".")
> (current-column))
> 
> returns 2 in gui mode but 8 in character mode of emacsen more recent than emacs 22.  (I tried it in several
> emacs versions including the most recent 27.0.50 snapshot.)

I get 8 in GUI frames as well.

The display spec (space :width 7) means 7 times the width of the
default face's font.  So if your default GUI font is monospaced, you
should get 8 in both GUI and text-mode frames.

So I'm unsure how come you get 2 in GUI mode.  Maybe you've omitted
some important detail in the reproducer.

Thanks.




This bug report was last modified 6 years and 306 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.