From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Rodolfo Medina Newsgroups: gmane.emacs.help Subject: Re: window-height function lies! Date: Wed, 01 Oct 2008 20:13:29 +0100 Organization: SunSITE.dk - Supporting Open source Message-ID: <87y718nn6u.fsf@gmail.com> References: <87od24wl3x.fsf@gmail.com> <87hc7wp7zo.fsf_-_@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1222886491 14024 80.91.229.12 (1 Oct 2008 18:41:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 1 Oct 2008 18:41:31 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Oct 01 20:42:29 2008 connect(): Connection refused Return-path: Envelope-to: geh-help-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 1Kl6eb-0003qM-2Q for geh-help-gnu-emacs@m.gmane.org; Wed, 01 Oct 2008 20:42:29 +0200 Original-Received: from localhost ([127.0.0.1]:44146 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kl6dY-0002Qv-6V for geh-help-gnu-emacs@m.gmane.org; Wed, 01 Oct 2008 14:41:24 -0400 Original-Path: news.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!feeder.erje.net!goblin1!goblin2!goblin.stu.neva.ru!news.net.uni-c.dk!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:uacJxzZjQYVdT/CBZgtkKNVyLC4= Original-Lines: 35 Original-NNTP-Posting-Host: 151.80.67.79 Original-X-Trace: news.sunsite.dk DXC=JDOnT[km^TMe:i55N5G3eEYSB=nbEKnkKf2; 89Q0P2=B:AocXk=\=_DT7bXfBO; G:EKAib\KDO`hBm=c5DAkLCDLcKaSRREU`MNnT4fe8mO[2H Original-X-Complaints-To: staff@sunsite.dk Original-Xref: news.stanford.edu gnu.emacs.help:162921 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:58262 Archived-At: Rodolfo Medina wrote: >> But, the remarkable result is that, the value returned by >> window-height turns to be *false* when the buffer contains a line >> longer that the screen width (a line that continues on the following >> line). Nikolaj Schumacher writes: > I was a little confused by this sentence at first. Because no matter > how long I made the lines, `window-height' remained the same. But then > I understood, you think it should get smaller, because fewer lines are > displayed, right? Yes, that's right. > However `window-height' is related to the window and > independent of the buffer. It relates to `move-to-window-line', not > `goto-line'. > > You might want to use: > > (1+ (count-lines (window-start) (window-end))) All right that works for `too long' lines. But still window-height fails in info buffers and TeX mode buffers, that contain chapter and node titles with bigger characters. Any way to solve that? Thanks Rodolfo