GNU bug report logs -
#4426
23.0.91; posn-at-point returns an incorrect value
Previous Next
Reported by: irieshinsuke <at> yahoo.co.jp
Date: Mon, 14 Sep 2009 09:25:04 UTC
Severity: normal
Tags: patch
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Sat, 08 Oct 2011 13:01:06 +0200
with message-id <83zkhbeoi5.fsf <at> gnu.org>
and subject line Re: bug#4426: [PATCH] posn-at-point returns an incorrect value
has caused the debbugs.gnu.org bug report #4426,
regarding 23.0.91; posn-at-point returns an incorrect value
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
4426: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=4426
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
I was going to acquire the width and height of a character the cursor
is over, by using the following code:
(posn-object-width-height (posn-at-point))
However, I found that this code gives back a wrong result when a
header line is displayed such as tabbar-mode. This code returns the
size of another character, which is in the position different from the
exact one in the number of objects included in the header line.
For example, when the cursor is in the top left corner of the window,
the size of the object in the left end of the header line is obtained.
Steps to reproduce:
1. Turn on tabbar-mode.
2. Evaluate the following expressions in *scratch*:
(defun char-w-h ()
(message "%s" (posn-object-width-height (posn-at-point))))
(add-hook 'post-command-hook 'char-w-h)
3. Move a cursor from place to place in the window.
In GNU Emacs 23.0.91.1 (i486-pc-linux-gnu, GTK+ Version 2.16.0)
of 2009-04-05 on palmer, modified by Debian
(emacs-snapshot package, version 1:20090320-1ubuntu1)
Windowing system distributor `The X.Org Foundation', version 11.0.10600000
configured using `configure '--build' 'i486-linux-gnu' '--host'
'i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib'
'--libexecdir=/usr/lib' '--localstatedir=/var'
'--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes'
'--enable-locallisppath=/etc/emacs-snapshot:/etc/emacs:/usr/local/share/emacs/23.0.91/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.0.91/site-lisp:/usr/share/emacs/site-lisp'
'--with-x=yes' '--with-x-toolkit=gtk' 'build_alias=i486-linux-gnu'
'host_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN
-DSITELOAD_PURESIZE_EXTRA=5000 -g -O2' 'LDFLAGS=-g -Wl,--as-needed'
'CPPFLAGS=''
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: ja_JP.UTF-8
value of $XMODIFIERS: @im=none
locale-coding-system: utf-8-unix
default-enable-multibyte-characters: t
Major mode: Lisp Interaction
Minor modes in effect:
tabbar-mwheel-mode: t
tabbar-mode: t
tooltip-mode: t
tool-bar-mode: t
mouse-wheel-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
global-auto-composition-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
Recent input:
u i r e SPC ' t C-p C-p C-p C-p C-p C-p C-p C-n C-n
C-n C-n C-n C-f C-f C-f C-f C-f C-f C-f C-f C-b C-b
C-b C-b C-b C-b C-b C-b C-b C-b C-b C-b C-b C-b C-n
C-n C-e a b b a r ) C-j ( t a b b a r - m o d e ) C-j
C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p
C-n C-p C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f
C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f
C-f C-f C-f C-f C-f C-n C-p C-p C-b C-b C-b C-b C-b
C-b C-b C-b C-b C-b C-b C-b C-b C-b C-b C-b C-b C-b
C-b C-b C-b C-b C-b C-b C-b C-b C-b C-b C-b C-b C-b
C-b C-b C-b C-b C-b C-b C-b C-b C-b C-b C-n C-n C-n
C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-n C-n
C-n C-p C-p C-p C-p C-p C-n C-n C-b C-p C-p C-n C-a
C-f C-f C-f C-f C-f C-f C-p C-n C-n C-n C-n C-n C-n
C-n C-n C-n C-n C-n C-n C-n C-p C-p C-p C-p C-p C-p
C-p C-p C-p C-p C-p C-p C-p C-p C-a C-a C-f C-f C-f
C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-n C-n
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n ( r e m o v
e - h o o k SPC ' p o s t - c o m m a n d - h o o k
SPC ' c h a r - w - h ) C-j M-x r e p o r t - e m a
<tab> RET
Recent messages:
(7 . 14) [3 times]
(0 . 14)
(7 . 14)
(0 . 14)
(7 . 14)
(0 . 14)
(7 . 14)
(0 . 14)
(7 . 14) [3 times]
(0 . 14) [41 times]
--
IRIE Shinsuke, Ph.D.
irieshinsuke <at> yahoo.co.jp
[Message part 3 (message/rfc822, inline)]
> From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
> Date: Sun, 18 Sep 2011 10:21:43 +0200
> Cc: 4426 <at> debbugs.gnu.org
>
> As far as I can tell, this patch hasn't been applied yet. I'm not
> familiar enough with this code to say whether this looks correct or
> not. Could someone take a look?
I took a look. The problem indeed was still there. I installed a fix
(slightly different from what the OP suggested).
Thanks.
This bug report was last modified 13 years and 291 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.