From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: IRIE Shinsuke Newsgroups: gmane.emacs.bugs Subject: bug#4426: 23.0.91; posn-at-point returns an incorrect value Date: Mon, 14 Sep 2009 18:18:47 +0900 Message-ID: <4AAE0A77.3010807@yahoo.co.jp> Reply-To: irieshinsuke@yahoo.co.jp, 4426@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1252933997 31166 80.91.229.12 (14 Sep 2009 13:13:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 14 Sep 2009 13:13:17 +0000 (UTC) To: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Sep 14 15:13:10 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MnBMf-0004O5-UK for geb-bug-gnu-emacs@m.gmane.org; Mon, 14 Sep 2009 15:13:06 +0200 Original-Received: from localhost ([127.0.0.1]:46219 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MnBMf-0004Bk-9i for geb-bug-gnu-emacs@m.gmane.org; Mon, 14 Sep 2009 09:13:05 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mn7pz-0005Ih-Vy for bug-gnu-emacs@gnu.org; Mon, 14 Sep 2009 05:27:08 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mn7pv-0005FN-BG for bug-gnu-emacs@gnu.org; Mon, 14 Sep 2009 05:27:07 -0400 Original-Received: from [199.232.76.173] (port=34911 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mn7pu-0005F0-PK for bug-gnu-emacs@gnu.org; Mon, 14 Sep 2009 05:27:03 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:39735) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Mn7pu-0000KC-8G for bug-gnu-emacs@gnu.org; Mon, 14 Sep 2009 05:27:02 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8E9R0Wm012894; Mon, 14 Sep 2009 02:27:00 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n8E9P4R1012550; Mon, 14 Sep 2009 02:25:04 -0700 Resent-Date: Mon, 14 Sep 2009 02:25:04 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: IRIE Shinsuke Original-Sender: IRIE Shinsuke Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Mon, 14 Sep 2009 09:25:04 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: report 4426 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.125291994811674 (code B ref -1); Mon, 14 Sep 2009 09:25:04 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 14 Sep 2009 09:19:08 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8E9J6rd011670 for ; Mon, 14 Sep 2009 02:19:07 -0700 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mn7iD-0004h5-Hg for bug-gnu-emacs@gnu.org; Mon, 14 Sep 2009 05:19:05 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mn7i7-0004ZA-W9 for bug-gnu-emacs@gnu.org; Mon, 14 Sep 2009 05:19:04 -0400 Original-Received: from [199.232.76.173] (port=50471 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mn7i7-0004Yo-7T for bug-gnu-emacs@gnu.org; Mon, 14 Sep 2009 05:18:59 -0400 Original-Received: from mail-yw0-f190.google.com ([209.85.211.190]:64884) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mn7i6-0007E0-NM for bug-gnu-emacs@gnu.org; Mon, 14 Sep 2009 05:18:59 -0400 Original-Received: by ywh28 with SMTP id 28so4303611ywh.15 for ; Mon, 14 Sep 2009 02:18:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :reply-to:user-agent:mime-version:to:subject:content-type :content-transfer-encoding; bh=St1YDpbRk2xHqTbVqZWlQsQf6PJryDUmtOOMBMxgT/o=; b=FkSGJWX5ZQ7hezX3PZRWR2toWs2uOn55pdOuz5/K1iUu2zeez4fGNX3CPx1EroAPQp yrlXoL1QGUDWIq3H5US9eYzAeU9l0PVelNk06gxLdAzvcAuUQjf8tNAZOo6j4Q6nEwDo O2RRqToWTBFSEfZS/wtoqaBbQSWseW1AZRd3c= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:reply-to:user-agent:mime-version:to :subject:content-type:content-transfer-encoding; b=vIEfmLql3xLPuYga+P0UrezJKQ1dBLyNtIFH5/EpCxwQbOhcI8gCU3pcGg2JqzJErL T54SjJocGUqNMTZF5knHQy28bQj73RFkz57e6Y+HqLHQIWPoK1eEUuVcJGcBQGglSEvQ 6LrjBcbi3lnfLBw96/VdaprVMWaVYJ76h0e4E= Original-Received: by 10.90.188.17 with SMTP id l17mr3753212agf.30.1252919937349; Mon, 14 Sep 2009 02:18:57 -0700 (PDT) Original-Received: from ?114.51.31.64? (EM114-51-31-64.pool.e-mobile.ne.jp [114.51.31.64]) by mx.google.com with ESMTPS id 10sm7995949agd.21.2009.09.14.02.18.54 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 14 Sep 2009 02:18:56 -0700 (PDT) User-Agent: Thunderbird 2.0.0.23 (X11/20090817) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Mon, 14 Sep 2009 05:27:07 -0400 X-Mailman-Approved-At: Mon, 14 Sep 2009 09:11:59 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 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: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:31083 Archived-At: 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 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@yahoo.co.jp