From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#52142: 28.0.60; `posn-object-width-height' does not reflect actual dimensions of object when confronted by display string Date: Sat, 27 Nov 2021 20:47:07 +0800 Message-ID: <87czmlahpw.fsf@yahoo.com> References: <87v90dajvy.fsf.ref@yahoo.com> <87v90dajvy.fsf@yahoo.com> <83ee71zslx.fsf@gnu.org> Reply-To: Po Lu Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1344"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.60 (gnu/linux) Cc: 52142@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 27 13:48:23 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mqx7v-0000Av-IF for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 27 Nov 2021 13:48:23 +0100 Original-Received: from localhost ([::1]:38274 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mqx7u-0000Aq-6Y for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 27 Nov 2021 07:48:22 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:42258) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mqx7a-00009Z-VN for bug-gnu-emacs@gnu.org; Sat, 27 Nov 2021 07:48:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49859) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mqx7a-0000Ys-MG for bug-gnu-emacs@gnu.org; Sat, 27 Nov 2021 07:48:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mqx7a-0004o3-8I for bug-gnu-emacs@gnu.org; Sat, 27 Nov 2021 07:48:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Po Lu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 27 Nov 2021 12:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52142 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug Original-Received: via spool by 52142-submit@debbugs.gnu.org id=B52142.163801724917305 (code B ref 52142); Sat, 27 Nov 2021 12:48:02 +0000 Original-Received: (at 52142) by debbugs.gnu.org; 27 Nov 2021 12:47:29 +0000 Original-Received: from localhost ([127.0.0.1]:33172 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mqx72-0004Uj-AW for submit@debbugs.gnu.org; Sat, 27 Nov 2021 07:47:29 -0500 Original-Received: from sonic314-20.consmr.mail.ne1.yahoo.com ([66.163.189.146]:39502) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mqx6z-0004O9-Pv for 52142@debbugs.gnu.org; Sat, 27 Nov 2021 07:47:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1638017239; bh=KxGl1I+q9Vwfhk5J7rD0cbiTE9kFS4tvp7TiIroaDVI=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=KgybEcXPTE9d3vlzGobqPuNc73qO5XgKK2EclxP/p7pLH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2sSdxZ1FYLKp.Lcc17rYebOkNRwoFfTAXs vlWrYsir.BCWUe8BiCEot6ekHe8sI4PcpxYbDZQKdBm8NZZISsYQN9a4BmXTmqVJP.tCTL8cXiru jmFERoSo27qK7QcMdJlw6SQAtlNpe83YIQEm3FtkL8AtjOTP8NJBkn1V1Z0UGal68to1gYa1zgkL T7lrc.4cOykW4Zs6ZZTTiWECaY2sOxp8X1WJWMg2LLr2274yqYhNulGvgrsxG2JfZark7ARTU0NE rUnA8OFcMDgg6FXXVKseiZEQBtedWfpoQzgaTNdeu2_MAliNsWOBf4siF_fFZ8renZFx.Eht9eoj afJCaNyHxXcnehMWBk1WUIjK3lyJcerMLL1KJugdfjJR1kdoQSOW32o55QhmT0QZ8duvRUZgNLud Nq2kfV2LmJNi.APoiN6OML5LQC6nO_UZUCe9orAdUk.6wXMw898QAx2t1X3DqOEv.ZXJEiIE06X1 ekU_4wjAzWT56Q70SMvngS3ANrYibFFU9XUh8o2EluwisV_J3Pwtewk8XbtRNwAz1LPlNg_a4Rw5 6mEvAt60ha7jkfdTMEgugfooqz6dF.7pahvf91Ske7 X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic314.consmr.mail.ne1.yahoo.com with HTTP; Sat, 27 Nov 2021 12:47:19 +0000 Original-Received: by kubenode517.mail-prod1.omega.sg3.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 1230b80e33ffd029e156406e041f65e3; Sat, 27 Nov 2021 12:47:14 +0000 (UTC) In-Reply-To: <83ee71zslx.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 27 Nov 2021 14:32:42 +0200") X-Mailer: WebService/1.1.19306 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:220916 Archived-At: Eli Zaretskii writes: > That's a feature. Maybe it isn't documented clearly enough, but > basically as long as there's a character displayed at that position, > WIDTH and HEIGHT give the dimensions of that character's glyph on > display. Hmm, okay. I think the documentation in (elisp)Click Events could do with some improvement: WIDTH, HEIGHT These are the pixel width and height of OBJECT or, if this is =E2=80=98nil=E2=80=99, those of the character glyph clicked on. For clicks on a scroll bar, POSITION has this form: (WINDOW AREA (PORTION . WHOLE) TIMESTAMP PART) Should probably be WIDTH, HEIGHT These are the pixel width and height of the character glyph clicked on, or, if none exists, the pixel width and height of OBJECT. For clicks on a scroll bar, POSITION has this form: (WINDOW AREA (PORTION . WHOLE) TIMESTAMP PART) > Remember: this stuff was originally designed for mouse clicks, where > it's important to know what did you click on. Thanks. On a slightly unrelated topic, what would be the appropriate method to obtain the height of such a display string? I'm trying to make the pixel scrolling machinery work with such text, and while scrolling down already works, I have no idea how to implement scrolling up, which currently relies on going to the last screen line, then adjusting vscroll the remainder of the way, which naturally requires a way to fetch the height of the display string.