From unknown Mon Sep 08 01:50:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6763: 24.0.50.1; Doc string of `window-line-height' Resent-From: IRIE Shinsuke Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 30 Jul 2010 13:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 6763 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 6763@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.128049812325551 (code B ref -1); Fri, 30 Jul 2010 13:56:02 +0000 Received: (at submit) by debbugs.gnu.org; 30 Jul 2010 13:55:23 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oeq3W-0006e4-66 for submit@debbugs.gnu.org; Fri, 30 Jul 2010 09:55:22 -0400 Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oeq3U-0006dz-3t for submit@debbugs.gnu.org; Fri, 30 Jul 2010 09:55:20 -0400 Received: from lists.gnu.org ([199.232.76.165]:54140) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Oeq3j-0003hn-Se for submit@debbugs.gnu.org; Fri, 30 Jul 2010 09:55:36 -0400 Received: from [140.186.70.92] (port=47512 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oeq3i-0001Wh-9F for bug-gnu-emacs@gnu.org; Fri, 30 Jul 2010 09:55:35 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,T_DKIM_INVALID,T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Oeq3g-0004pp-VP for bug-gnu-emacs@gnu.org; Fri, 30 Jul 2010 09:55:33 -0400 Received: from mail-px0-f169.google.com ([209.85.212.169]:50485) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oeq3g-0004pe-Qt for bug-gnu-emacs@gnu.org; Fri, 30 Jul 2010 09:55:32 -0400 Received: by pxi7 with SMTP id 7so1030548pxi.0 for ; Fri, 30 Jul 2010 06:55:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:date:message-id:from :to:subject:user-agent:mime-version:content-type; bh=tRlMaQuWpIQo6EQMsYVuYOx0OvMRYntpd7F8+PzX9hI=; b=SdJtKJ6FDxpUsk0gZrDaB+CQryUUpb4ZrVL8DRxFNvTmQ0mb70ckUpU9GgUJbjX5Xa HbTbfgO6QsJtHqUWxxtW+47+T77lfWX7ymTDJdIyRa1q0cWFV/ndPHU96DYhsreVjMrg /kFFKZsKwqf1fogQHYxQiJgTcDun50TeEnUZk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:date:message-id:from:to:subject:user-agent:mime-version :content-type; b=Adr4/RLfqK0xdQdyXhQ60w6LGpDxAoszgSunl/be5cA2Ukfbpcw2AXrSjGgknXSYBc l+rnMcV0Aal5ovzih79j3gYgPDB9QSrZDf+01/MJjoflkNc3kvbDlNIp9ZXVquiOHhph q5a9C9oN8oMOjiUSVGrQ3bCPouqCSGOKRsYNA= Received: by 10.114.103.6 with SMTP id a6mr2281420wac.213.1280498130846; Fri, 30 Jul 2010 06:55:30 -0700 (PDT) Received: from tama.gmail.com (EM114-51-74-105.pool.e-mobile.ne.jp [114.51.74.105]) by mx.google.com with ESMTPS id q6sm3797770waj.10.2010.07.30.06.55.28 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 30 Jul 2010 06:55:29 -0700 (PDT) Date: Fri, 30 Jul 2010 22:55:17 +0900 Message-ID: <87tynh9ire.wl%irieshinsuke@yahoo.co.jp> From: IRIE Shinsuke User-Agent: Wanderlust/2.15.6 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 =?UTF-8?Q?(Goj=1B$(D+W=1B(B)?= APEL/10.7 Emacs/23.1 (i486-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -4.1 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) Hi, Doc string of `window-line-height' says: Return nil if window display is not up-to-date. In that case, use `pos-visible-in-window-p' to obtain the information. However, using `pos-visible-in-window-p' seems ineffectual. In fact, the following expression often returns nil: (progn (pos-visible-in-window-p) (window-line-height)) So I use `redisplay' instead of `pos-visible-in-window-p' as: (or (window-line-height) (and (redisplay t) (window-line-height))) and it correctly works. Please correct the doc string. IRIE Shinsuke From unknown Mon Sep 08 01:50:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6763: 24.0.50.1; Doc string of `window-line-height' Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 30 Jul 2010 14:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6763 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: IRIE Shinsuke Cc: 6763@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 6763-submit@debbugs.gnu.org id=B6763.128050161827221 (code B ref 6763); Fri, 30 Jul 2010 14:54:02 +0000 Received: (at 6763) by debbugs.gnu.org; 30 Jul 2010 14:53:38 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oeqxt-000750-Tf for submit@debbugs.gnu.org; Fri, 30 Jul 2010 10:53:38 -0400 Received: from mtaout20.012.net.il ([80.179.55.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oeqxm-00074u-N0 for 6763@debbugs.gnu.org; Fri, 30 Jul 2010 10:53:36 -0400 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0L6D00M00LBOY200@a-mtaout20.012.net.il> for 6763@debbugs.gnu.org; Fri, 30 Jul 2010 17:53:08 +0300 (IDT) Received: from HOME-C4E4A596F7 ([84.229.19.236]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0L6D00IHSLCJ78J0@a-mtaout20.012.net.il>; Fri, 30 Jul 2010 17:53:08 +0300 (IDT) Date: Fri, 30 Jul 2010 17:53:07 +0300 From: Eli Zaretskii In-reply-to: <87tynh9ire.wl%irieshinsuke@yahoo.co.jp> X-012-Sender: halo1@inter.net.il Message-id: <83k4odaung.fsf@gnu.org> References: <87tynh9ire.wl%irieshinsuke@yahoo.co.jp> X-Spam-Score: -1.9 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) > Date: Fri, 30 Jul 2010 22:55:17 +0900 > From: IRIE Shinsuke > Cc: > > Doc string of `window-line-height' says: > > Return nil if window display is not up-to-date. In that case, use > `pos-visible-in-window-p' to obtain the information. > > However, using `pos-visible-in-window-p' seems ineffectual. > In fact, the following expression often returns nil: > > (progn (pos-visible-in-window-p) > (window-line-height)) I think you misunderstood the doc string. It means that instead of (window-line-height) you should use (pos-visible-in-window-p) Using progn doesn't cut it, since it always returns the value of the last form. What you mean is probably this: (or (window-line-height) (pos-visible-in-window-p)) If this doesn't work for you, please show a precise recipe, starting from "emacs -Q", to reproduce the situation where pos-visible-in-window-p returns nil when it shouldn't. From unknown Mon Sep 08 01:50:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6763: 24.0.50.1; Doc string of `window-line-height' Resent-From: IRIE Shinsuke Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 30 Jul 2010 18:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6763 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 6763@debbugs.gnu.org Received: via spool by 6763-submit@debbugs.gnu.org id=B6763.128051352432437 (code B ref 6763); Fri, 30 Jul 2010 18:13:01 +0000 Received: (at 6763) by debbugs.gnu.org; 30 Jul 2010 18:12:04 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oeu3u-0008R8-RS for submit@debbugs.gnu.org; Fri, 30 Jul 2010 14:12:03 -0400 Received: from mail-px0-f172.google.com ([209.85.212.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oeu3s-0008Qu-8b for 6763@debbugs.gnu.org; Fri, 30 Jul 2010 14:12:00 -0400 Received: by pxi20 with SMTP id 20so619158pxi.3 for <6763@debbugs.gnu.org>; Fri, 30 Jul 2010 11:12:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:date:message-id:from :to:cc:subject:in-reply-to:references:user-agent:mime-version :content-type; bh=3o9i4iXbxIZCPkjVsqnoDaecZm9957SIr9CXFaEAPJQ=; b=A2D+BuVvDmZhSel/7wfxMCwD0ZNKfxQy4b6DnBYnSZvj4vwFH4GWKAVSH0VlprKjnG ReTCFeVJwUHEPH2RRKhWyY3dI0N+VCynG7RB/bnf7DA5URocGyWk77KQnCQIRbfUgqj1 wd6Noz6AP+m8W0xSPkUha0d2j0UCMX03mQ4m0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:date:message-id:from:to:cc:subject:in-reply-to:references :user-agent:mime-version:content-type; b=kP1iR0RoJLC2BhBtS5gX6nNJe89M+yImvMA7TVhhlJjAvdf8tcjSTgUuLgzhns9YMG EpNV3QemSWgk5eyd4Se4pUNN9p14RNSii/7ITOu52iZUJ9kLPswotvTDRnwRiTN3dhN1 g6G8XxLSDk3dGW28sS7RAodcXpkc/dw7AE8lQ= Received: by 10.142.169.12 with SMTP id r12mr2054972wfe.305.1280513535877; Fri, 30 Jul 2010 11:12:15 -0700 (PDT) Received: from tama.gmail.com (EM114-51-85-185.pool.e-mobile.ne.jp [114.51.85.185]) by mx.google.com with ESMTPS id w27sm2859752wfd.5.2010.07.30.11.12.13 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 30 Jul 2010 11:12:14 -0700 (PDT) Date: Sat, 31 Jul 2010 03:12:09 +0900 Message-ID: <87sk30alfq.wl%irieshinsuke@yahoo.co.jp> From: IRIE Shinsuke In-Reply-To: <83k4odaung.fsf@gnu.org> References: <87tynh9ire.wl%irieshinsuke@yahoo.co.jp> <83k4odaung.fsf@gnu.org> User-Agent: Wanderlust/2.15.6 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 =?UTF-8?Q?(Goj=1B$(D+W=1B(B)?= APEL/10.7 Emacs/23.1 (i486-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Spam-Score: -2.6 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) > I think you misunderstood the doc string. It means that instead of > > (window-line-height) > > you should use > > (pos-visible-in-window-p) `pos-visible-in-window-p' doesn't return a line height, so we can never use it as a substitute of `window-line-height'. > Using progn doesn't cut it, since it always returns the value of the > last form. What you mean is probably this: > > (or (window-line-height) > (pos-visible-in-window-p)) Why? If `window-line-height' returns nil, the result of this expression becomes t or nil. What I want to obtain is a line height, not a boolean. I guess the doc string means "`pos-visible-in-window-p' updates the matrices' information, so call it before `window-line-height'." In that case, however, it seems redisplaying is necessary for getting the useful result. As I wrote in the previous mail, the following expression properly returns the line height. (progn (redisplay t) (window-line-height)) I think `pos-visible-in-window-p' in the doc string should be changed to `redisplay'. IRIE Shinsuke From unknown Mon Sep 08 01:50:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6763: 24.0.50.1; Doc string of `window-line-height' Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 30 Jul 2010 18:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6763 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: IRIE Shinsuke Cc: 6763@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 6763-submit@debbugs.gnu.org id=B6763.1280514902564 (code B ref 6763); Fri, 30 Jul 2010 18:36:01 +0000 Received: (at 6763) by debbugs.gnu.org; 30 Jul 2010 18:35:02 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OeuPu-00008q-SS for submit@debbugs.gnu.org; Fri, 30 Jul 2010 14:35:01 -0400 Received: from mtaout22.012.net.il ([80.179.55.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OeuPr-00008i-D3 for 6763@debbugs.gnu.org; Fri, 30 Jul 2010 14:34:44 -0400 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0L6D00B00VHZQA00@a-mtaout22.012.net.il> for 6763@debbugs.gnu.org; Fri, 30 Jul 2010 21:34:58 +0300 (IDT) Received: from HOME-C4E4A596F7 ([84.229.19.236]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0L6D00AOGVM9ST40@a-mtaout22.012.net.il>; Fri, 30 Jul 2010 21:34:58 +0300 (IDT) Date: Fri, 30 Jul 2010 21:34:57 +0300 From: Eli Zaretskii In-reply-to: <87sk30alfq.wl%irieshinsuke@yahoo.co.jp> X-012-Sender: halo1@inter.net.il Message-id: <83eiekbyy6.fsf@gnu.org> References: <87tynh9ire.wl%irieshinsuke@yahoo.co.jp> <83k4odaung.fsf@gnu.org> <87sk30alfq.wl%irieshinsuke@yahoo.co.jp> X-Spam-Score: -1.9 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) > Date: Sat, 31 Jul 2010 03:12:09 +0900 > From: IRIE Shinsuke > Cc: 6763@debbugs.gnu.org > > > I think you misunderstood the doc string. It means that instead of > > > > (window-line-height) > > > > you should use > > > > (pos-visible-in-window-p) > > `pos-visible-in-window-p' doesn't return a line height, so we can never > use it as a substitute of `window-line-height'. window-line-height doesn't return the line height, either. It returns a list of 4 values. pos-visible-in-window-p can also return a similar list, see its doc string. > > (or (window-line-height) > > (pos-visible-in-window-p)) > > Why? If `window-line-height' returns nil, the result of this expression > becomes t or nil. No, `or' returns the value of the first expression whose value is non-nil. It doesn't necessarily return a boolean. See its doc string. > I guess the doc string means "`pos-visible-in-window-p' updates the > matrices' information, so call it before `window-line-height'." It doesn't update the matrices, it just works in a way that doesn't need the glyph matrices to be up-to-date. And no, calling pos-visible-in-window-p before window-line-height will not help, because the glyph matrices used by window-line-height are still not up to date after a call to pos-visible-in-window-p. > In that case, however, it seems redisplaying is necessary for getting > the useful result. As I wrote in the previous mail, the following > expression properly returns the line height. > > (progn (redisplay t) > (window-line-height)) Yes, but the call to `redisplay' is quite expensive, so this is inappropriate in many use-cases. > I think `pos-visible-in-window-p' in the doc string should be changed > to `redisplay'. Sorry, I disagree. I think the doc string is generally correct, it just might need an example to make clear what it means. From unknown Mon Sep 08 01:50:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6763: 24.0.50.1; Doc string of `window-line-height' Resent-From: IRIE Shinsuke Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 30 Jul 2010 21:19:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6763 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 6763@debbugs.gnu.org Received: via spool by 6763-submit@debbugs.gnu.org id=B6763.12805247305123 (code B ref 6763); Fri, 30 Jul 2010 21:19:01 +0000 Received: (at 6763) by debbugs.gnu.org; 30 Jul 2010 21:18:50 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oewye-0001Ka-HG for submit@debbugs.gnu.org; Fri, 30 Jul 2010 17:18:48 -0400 Received: from mail-pz0-f44.google.com ([209.85.210.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oewyc-0001KV-2f for 6763@debbugs.gnu.org; Fri, 30 Jul 2010 17:18:46 -0400 Received: by pzk6 with SMTP id 6so674396pzk.3 for <6763@debbugs.gnu.org>; Fri, 30 Jul 2010 14:19:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:date:message-id:from :to:cc:subject:in-reply-to:references:user-agent:mime-version :content-type; bh=mVBAiazrtqMcx6DnVoGb/Sn4LxfwwLxBMKPbWhnQkiQ=; b=JG3RZtmR935r+M/EcEmxwSF1Jq+0c2jibNaHechMwAmSpsKJjbp0pZY20pHd1w14vB 2baawR3s2JfoFdp3wnjFhUfB6CN7FdgXPJ+mK7DfWkM9dZrTxsdaI6eukTVfsSSltYna 6QAc1VxN+6pjj3S2nHUeQ1k0FcIyZQaIeYv0Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:date:message-id:from:to:cc:subject:in-reply-to:references :user-agent:mime-version:content-type; b=SCjpUAx0jm3He3hdaolCL+7igbvCP5cYWrSDeqOlsb7S6sVJ8m6YOnD8hHXNM6ZZoj 5wz/ZuG8+xxI+LdpQ8YwfPikD9bqgjmdQyP03Dao5clNpOm9yXB+VMWvc7B7ZCl65/8Y tGn2SL6zjBVsfBqnD+H3yLKYGCz4dJVPQfh2M= Received: by 10.142.140.20 with SMTP id n20mr2264256wfd.77.1280524741595; Fri, 30 Jul 2010 14:19:01 -0700 (PDT) Received: from tama.gmail.com (EM114-51-15-14.pool.e-mobile.ne.jp [114.51.15.14]) by mx.google.com with ESMTPS id w8sm3060684wfd.19.2010.07.30.14.18.58 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 30 Jul 2010 14:19:00 -0700 (PDT) Date: Sat, 31 Jul 2010 06:18:54 +0900 Message-ID: <87r5ikacsh.wl%irieshinsuke@yahoo.co.jp> From: IRIE Shinsuke In-Reply-To: <83eiekbyy6.fsf@gnu.org> References: <87tynh9ire.wl%irieshinsuke@yahoo.co.jp> <83k4odaung.fsf@gnu.org> <87sk30alfq.wl%irieshinsuke@yahoo.co.jp> <83eiekbyy6.fsf@gnu.org> User-Agent: Wanderlust/2.15.6 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 =?UTF-8?Q?(Goj=1B$(D+W=1B(B)?= APEL/10.7 Emacs/23.1 (i486-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Spam-Score: -2.6 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) > > > I think you misunderstood the doc string. It means that instead of > > > > > > (window-line-height) > > > > > > you should use > > > > > > (pos-visible-in-window-p) > > > > `pos-visible-in-window-p' doesn't return a line height, so we can never > > use it as a substitute of `window-line-height'. > > window-line-height doesn't return the line height, either. It returns > a list of 4 values. pos-visible-in-window-p can also return a similar > list, see its doc string. Of course I've well known that both of them can return a list, but I also know these lists contain the considerably different information. (window-line-height) => (HEIGHT VPOS YPOS OFFBOT) (pos-visible-in-window-p nil nil t) => (X Y [RTOP RBOT ROWH VPOS]) If (window-line-height) is non-nil, we can obtain the number of pixels of line height as: (car (window-line-height)) However, the latter has normally only two elements X and Y unless point is in the bottom row, and never includes the line height. ROWH is the height of displayed part of the bottom row, not a line height. How can we obtain the line height from such a list??? > > > (or (window-line-height) > > > (pos-visible-in-window-p)) > > > > Why? If `window-line-height' returns nil, the result of this expression > > becomes t or nil. > > No, `or' returns the value of the first expression whose value is > non-nil. It doesn't necessarily return a boolean. See its doc > string. `pos-visible-in-window-p' with no args returns t or nil, so this expression returns a boolean if (window-line-height) is nil. Since `pos-visible-in-window-p' can't be the substitute, such an expression merely causes a meaningless result. > Sorry, I disagree. I think the doc string is generally correct, it > just might need an example to make clear what it means. Yeah, even if the doc string is correct, it's quite unclear and useless, unfortunately. As Drew reported a similar issue in #3602, no one can resolve the problem by reading it. IRIE Shinsuke From unknown Mon Sep 08 01:50:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6763: 24.0.50.1; Doc string of `window-line-height' Resent-From: Lars Magne Ingebrigtsen Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 14 Jul 2011 14:03:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6763 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: IRIE Shinsuke Cc: Eli Zaretskii , 6763@debbugs.gnu.org Received: via spool by 6763-submit@debbugs.gnu.org id=B6763.131065215215475 (code B ref 6763); Thu, 14 Jul 2011 14:03:05 +0000 Received: (at 6763) by debbugs.gnu.org; 14 Jul 2011 14:02:32 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QhMUl-00041F-4V for submit@debbugs.gnu.org; Thu, 14 Jul 2011 10:02:31 -0400 Received: from hermes.netfonds.no ([80.91.224.195]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QhMUf-00040j-U8 for 6763@debbugs.gnu.org; Thu, 14 Jul 2011 10:02:26 -0400 Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=quimbies.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1QhMUU-00071q-K8; Thu, 14 Jul 2011 16:02:10 +0200 From: Lars Magne Ingebrigtsen In-Reply-To: <87r5ikacsh.wl%irieshinsuke@yahoo.co.jp> (IRIE Shinsuke's message of "Sat, 31 Jul 2010 06:18:54 +0900") Date: Thu, 14 Jul 2011 15:33:11 +0200 Message-ID: References: <87tynh9ire.wl%irieshinsuke@yahoo.co.jp> <83k4odaung.fsf@gnu.org> <87sk30alfq.wl%irieshinsuke@yahoo.co.jp> <83eiekbyy6.fsf@gnu.org> <87r5ikacsh.wl%irieshinsuke@yahoo.co.jp> User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux) X-Now-Playing: Depeche Mode's _Black Celebration_ X-Hashcash: 1:23:110714:irieshinsuke@yahoo.co.jp::XaidtqBnIJKnUwc7:00000000000000000000000000000000000001wfp X-Hashcash: 1:23:110714:6763@debbugs.gnu.org::anGP9DU2QCrrtUqg:0000000000000000000000000000000000000000052wP X-Hashcash: 1:23:110714:eliz@gnu.org::cFfcczNs/N97Jtsl:00000G9gj MIME-Version: 1.0 Content-Type: text/plain X-MailScanner-ID: 1QhMUU-00071q-K8 X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1311256930.78756@gDHg8XLYQq//4T39cgv85A X-Spam-Status: No X-Spam-Score: -2.7 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) IRIE Shinsuke writes: > `pos-visible-in-window-p' with no args returns t or nil, so this > expression returns a boolean if (window-line-height) is nil. > Since `pos-visible-in-window-p' can't be the substitute, such an > expression merely causes a meaningless result. Do you have a test case that shows this bug? The doc of `pos-visible-in-window-p' says: --- If POS is visible, return t if PARTIALLY is nil; if PARTIALLY is non-nil, return value is a list of 2 or 6 elements (X Y [RTOP RBOT ROWH VPOS]), where X and Y are the pixel coordinates relative to the top left corner of the window. The remaining elements are omitted if the character after POS is fully visible; otherwise, RTOP and RBOT are the number of pixels off-window at the top and bottom of the row, ROWH is the height of the display row, and VPOS is the row number (0-based) containing POS. --- ROWH should be what you're looking for, otherwise? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog http://lars.ingebrigtsen.no/ From unknown Mon Sep 08 01:50:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6763: 24.0.50.1; Doc string of `window-line-height' Resent-From: Lars Magne Ingebrigtsen Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 02 Aug 2011 19:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6763 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: IRIE Shinsuke Cc: Eli Zaretskii , 6763@debbugs.gnu.org Received: via spool by 6763-submit@debbugs.gnu.org id=B6763.13123120981820 (code B ref 6763); Tue, 02 Aug 2011 19:09:02 +0000 Received: (at 6763) by debbugs.gnu.org; 2 Aug 2011 19:08:18 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QoKK9-0000TH-TA for submit@debbugs.gnu.org; Tue, 02 Aug 2011 15:08:18 -0400 Received: from hermes.netfonds.no ([80.91.224.195]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QoKK6-0000T4-QT for 6763@debbugs.gnu.org; Tue, 02 Aug 2011 15:08:15 -0400 Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=stories.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1QoKJU-0007M0-QF; Tue, 02 Aug 2011 21:07:36 +0200 From: Lars Magne Ingebrigtsen In-Reply-To: (Lars Magne Ingebrigtsen's message of "Thu, 14 Jul 2011 15:33:11 +0200") Date: Tue, 02 Aug 2011 21:07:02 +0200 Message-ID: References: <87tynh9ire.wl%irieshinsuke@yahoo.co.jp> <83k4odaung.fsf@gnu.org> <87sk30alfq.wl%irieshinsuke@yahoo.co.jp> <83eiekbyy6.fsf@gnu.org> <87r5ikacsh.wl%irieshinsuke@yahoo.co.jp> User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux) X-Now-Playing: Throwing Muses's _Dizzy_: "Santa Claus" MIME-Version: 1.0 Content-Type: text/plain X-MailScanner-ID: 1QoKJU-0007M0-QF X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1312916857.24931@KXS3esaEEOsBJVV3TofkGw X-Spam-Status: No X-Spam-Score: -2.7 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) Lars Magne Ingebrigtsen writes: > ROWH should be what you're looking for, otherwise? No further response was made to this in three weeks, so I'm closing the report. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog http://lars.ingebrigtsen.no/ From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 02 15:08:07 2011 Received: (at control) by debbugs.gnu.org; 2 Aug 2011 19:08:08 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QoKJz-0000Sr-LK for submit@debbugs.gnu.org; Tue, 02 Aug 2011 15:08:07 -0400 Received: from hermes.netfonds.no ([80.91.224.195]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QoKJy-0000Sk-00 for control@debbugs.gnu.org; Tue, 02 Aug 2011 15:08:06 -0400 Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=stories.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1QoKJO-0007Ln-Ei for control@debbugs.gnu.org; Tue, 02 Aug 2011 21:07:30 +0200 Date: Tue, 02 Aug 2011 21:07:07 +0200 Message-Id: To: control@debbugs.gnu.org From: Lars Magne Ingebrigtsen Subject: control message for bug #6763 X-MailScanner-ID: 1QoKJO-0007Ln-Ei X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1312916850.96451@8NC0Ba5SsFSG++8/0VGlSA X-Spam-Status: No X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) close 6763