From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Newsgroups: gmane.emacs.help Subject: Re: How do I get the window height in lines, taking in account line-spacing? Date: Tue, 05 Aug 2014 05:42:17 +0400 Message-ID: <86wqank8zq.fsf@yandex.ru> References: <53DF7885.8000907@yandex.ru> <87oaw08hlj.fsf@web.de> <86d2cg3y3x.fsf@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1407202977 13264 80.91.229.3 (5 Aug 2014 01:42:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 5 Aug 2014 01:42:57 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Michael Heerdegen Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Aug 05 03:42:51 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XETm4-0007uB-Gj for geh-help-gnu-emacs@m.gmane.org; Tue, 05 Aug 2014 03:42:48 +0200 Original-Received: from localhost ([::1]:55865 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XETm4-0008PU-5F for geh-help-gnu-emacs@m.gmane.org; Mon, 04 Aug 2014 21:42:48 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50630) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XETln-0008IG-M0 for help-gnu-emacs@gnu.org; Mon, 04 Aug 2014 21:42:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XETlf-0002Af-Db for help-gnu-emacs@gnu.org; Mon, 04 Aug 2014 21:42:31 -0400 Original-Received: from mail-lb0-x229.google.com ([2a00:1450:4010:c04::229]:49823) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XETlf-0002AE-6Z for help-gnu-emacs@gnu.org; Mon, 04 Aug 2014 21:42:23 -0400 Original-Received: by mail-lb0-f169.google.com with SMTP id s7so188641lbd.0 for ; Mon, 04 Aug 2014 18:42:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:in-reply-to:references:user-agent:date :message-id:mime-version:content-type; bh=Gh3nxqKcfFXqtHem/0pjCX3Ma31inFUYh5Z5dQiyv+o=; b=uGgPXEbIirV8nj8ZuH4H1RN/Jrya/GeaiG3UrLP3xK/RJSh95rkXw5YLDal35GsCot gEMNzfwNzw/00DZ7wycSt0DZXiXwfoKBt169LAtr+AM12B6A+DUN4kulY5LMYD6K6H72 ilHtmEqtloOXE/kXEz7H01Ovk45JLhXZtTZct5LmxvoHTi4R/CE0yuGFuqnaisYQA7QA etdqOQ9N/g1mmLHyiu09fsX3Hw1oCRQqRei99Ia0mHTWnv4LzH2SdHTW6sZPrvdCEwns ok97ddupH1C8xKkRVMbcwhziQDrpMPH9RXwdQyESzUrKZQxZ8hgQBXr3Lkha5woe/kIt kwLQ== X-Received: by 10.152.5.167 with SMTP id t7mr540201lat.54.1407202942040; Mon, 04 Aug 2014 18:42:22 -0700 (PDT) Original-Received: from axl (v-2-eu19-d3962-07.webazilla.com. [78.140.151.7]) by mx.google.com with ESMTPSA id si1sm363609lbb.43.2014.08.04.18.42.20 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 04 Aug 2014 18:42:21 -0700 (PDT) In-Reply-To: <86d2cg3y3x.fsf@yandex.ru> (Dmitry's message of "Mon, 04 Aug 2014 22:31:46 +0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.92 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c04::229 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:99088 Archived-At: Dmitry writes: > Michael Heerdegen writes: >> You maybe want to use `window-end' combined with >> `pos-visible-in-window-p'. > > Yep, this seems to be the most accurate approach, although probably the > slowest one. Thanks. Looks like this isn't good enough either: if the window is longer than the buffer, the value we get this way only reflects the number of lines in the buffer.