GNU bug report logs - #6518
24.0.50; window-height returns wrong value

Previous Next

Package: emacs;

Reported by: Sebastian Rose <sebastian_rose <at> gmx.de>

Date: Sat, 26 Jun 2010 18:49:02 UTC

Severity: normal

Tags: patch

Found in version 24.0.50

Done: Juanma Barranquero <lekktu <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 6518 in the body.
You can then email your comments to 6518 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6518; Package emacs. (Sat, 26 Jun 2010 18:49:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Sebastian Rose <sebastian_rose <at> gmx.de>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 26 Jun 2010 18:49:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Sebastian Rose <sebastian_rose <at> gmx.de>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.0.50; window-height returns wrong value
Date: Sat, 26 Jun 2010 20:48:20 +0200

Fill the *scratch* buffer with text, such that the number of lines
exceeds the window's height.  Then press

   M-S-. (window-height)

The value returned is to high (by one actually).


It gets worse, if I start my emacs without the `-Q' option.  I have line
spacing set to `5'.
(window-height) return eight lines too much.

This is espacially bad in `follow-mode'.




In GNU Emacs 24.0.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.20.1)
 of 2010-06-15 on beteigeuze
Windowing system distributor `The X.Org Foundation', version 11.0.10706000
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: de_DE.utf8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: CSS

Minor modes in effect:
  follow-mode: t
  diff-auto-refine-mode: t
  highlight-changes-visible-mode: t
  subword-mode: t
  yas/global-mode: t
  yas/minor-mode: t
  recentf-mode: t
  show-paren-mode: t
  global-hl-line-mode: t
  display-time-mode: t
  desktop-save-mode: t
  auto-image-file-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> 
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> 
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> 
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> 
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> 
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> 
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> 
<up> <up> <down> <down> <down> <down> <down> ( w i 
n d o w - h e i g h t ) C-h f <return> q M-< C-s w 
i n d o w <down> <left> C-x C-e C-x C-e C-a C-k M-< 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <up> 
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> 
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> 
<up> <up> <up> <up> <up> <up> <up> <up> C-x 1 C-h f 
<up> <return> C-x 1 <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <up> <up> <up> <up> <up> <up> <up> <up> 
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> 
<up> <up> <up> <up> <down> M-: ( w i n d o w - h e 
i g h t ) <return> M-x e m c s <backspace> <backspace> 
a c s <tab> b u g <tab> <tab> <M-backspace> <M-backspace> 
- u <backspace> b u g <tab> <tab> <M-backspace> <backspace> 
r e m <backspace> p o <tab> r <tab> <return>

Recent messages:
Type "q" to restore this window.
Mark set
Mark saved where search started
40
40 (#o50, #x28, ?\()
Mark set
Type C-x 1 to delete the help window.
Auto-saving...done
40 (#o50, #x28)
Making completion list... [2 times]

Load-path shadows:
/home/sebastian/emacs/lisp/ext/org-mode/contrib/lisp/htmlize hides /home/sebastian/emacs/lisp/ext/htmlize
/home/sebastian/emacs/lisp/ext/org-mode/lisp/org-list hides /usr/local/share/emacs/24.0.50/lisp/org/org-list
/home/sebastian/emacs/lisp/ext/org-mode/lisp/org-habit hides /usr/local/share/emacs/24.0.50/lisp/org/org-habit
/home/sebastian/emacs/lisp/ext/org-mode/lisp/org-docview hides /usr/local/share/emacs/24.0.50/lisp/org/org-docview
/home/sebastian/emacs/lisp/ext/org-mode/lisp/org-plot hides /usr/local/share/emacs/24.0.50/lisp/org/org-plot
/home/sebastian/emacs/lisp/ext/org-mode/lisp/org-id hides /usr/local/share/emacs/24.0.50/lisp/org/org-id
/home/sebastian/emacs/lisp/ext/org-mode/lisp/org-ascii hides /usr/local/share/emacs/24.0.50/lisp/org/org-ascii
/home/sebastian/emacs/lisp/ext/org-mode/lisp/org-macs hides /usr/local/share/emacs/24.0.50/lisp/org/org-macs
/home/sebastian/emacs/lisp/ext/org-mode/lisp/org-protocol hides /usr/local/share/emacs/24.0.50/lisp/org/org-protocol
/home/sebastian/emacs/lisp/ext/org-mode/lisp/org-mac-message hides /usr/local/share/emacs/24.0.50/lisp/org/org-mac-message
/home/sebastian/emacs/lisp/ext/org-mode/lisp/org-compat hides /usr/local/share/emacs/24.0.50/lisp/org/org-compat
/home/sebastian/emacs/lisp/ext/org-mode/lisp/org-footnote hides /usr/local/share/emacs/24.0.50/lisp/org/org-footnote
/home/sebastian/emacs/lisp/ext/org-mode/lisp/org-mouse hides /usr/local/share/emacs/24.0.50/lisp/org/org-mouse
/home/sebastian/emacs/lisp/ext/org-mode/lisp/org-colview hides /usr/local/share/emacs/24.0.50/lisp/org/org-colview
/home/sebastian/emacs/lisp/ext/org-mode/lisp/org-wl hides /usr/local/share/emacs/24.0.50/lisp/org/org-wl
/home/sebastian/emacs/lisp/ext/org-mode/lisp/org-beamer hides /usr/local/share/emacs/24.0.50/lisp/org/org-beamer
/home/sebastian/emacs/lisp/ext/org-mode/lisp/org-table hides /usr/local/share/emacs/24.0.50/lisp/org/org-table
/home/sebastian/emacs/lisp/ext/org-mode/lisp/org-html hides /usr/local/share/emacs/24.0.50/lisp/org/org-html
/home/sebastian/emacs/lisp/ext/org-mode/lisp/org-mhe hides /usr/local/share/emacs/24.0.50/lisp/org/org-mhe
/home/sebastian/emacs/lisp/ext/org-mode/lisp/org-docbook hides /usr/local/share/emacs/24.0.50/lisp/org/org-docbook
/home/sebastian/emacs/lisp/ext/org-mode/lisp/org-install hides /usr/local/share/emacs/24.0.50/lisp/org/org-install
/home/sebastian/emacs/lisp/ext/org-mode/lisp/org-timer hides /usr/local/share/emacs/24.0.50/lisp/org/org-timer
/home/sebastian/emacs/lisp/ext/org-mode/lisp/org-entities hides /usr/local/share/emacs/24.0.50/lisp/org/org-entities
/home/sebastian/emacs/lisp/ext/org-mode/lisp/org hides /usr/local/share/emacs/24.0.50/lisp/org/org
/home/sebastian/emacs/lisp/ext/org-mode/lisp/org-w3m hides /usr/local/share/emacs/24.0.50/lisp/org/org-w3m
/home/sebastian/emacs/lisp/ext/org-mode/lisp/org-clock hides /usr/local/share/emacs/24.0.50/lisp/org/org-clock
/home/sebastian/emacs/lisp/ext/org-mode/lisp/org-icalendar hides /usr/local/share/emacs/24.0.50/lisp/org/org-icalendar
/home/sebastian/emacs/lisp/ext/org-mode/lisp/org-inlinetask hides /usr/local/share/emacs/24.0.50/lisp/org/org-inlinetask
/home/sebastian/emacs/lisp/ext/org-mode/lisp/org-mew hides /usr/local/share/emacs/24.0.50/lisp/org/org-mew
/home/sebastian/emacs/lisp/ext/org-mode/lisp/org-info hides /usr/local/share/emacs/24.0.50/lisp/org/org-info
/home/sebastian/emacs/lisp/ext/org-mode/lisp/org-indent hides /usr/local/share/emacs/24.0.50/lisp/org/org-indent
/home/sebastian/emacs/lisp/ext/org-mode/lisp/org-xoxo hides /usr/local/share/emacs/24.0.50/lisp/org/org-xoxo
/home/sebastian/emacs/lisp/ext/org-mode/lisp/org-agenda hides /usr/local/share/emacs/24.0.50/lisp/org/org-agenda
/home/sebastian/emacs/lisp/ext/org-mode/lisp/org-latex hides /usr/local/share/emacs/24.0.50/lisp/org/org-latex
/home/sebastian/emacs/lisp/ext/org-mode/lisp/org-bbdb hides /usr/local/share/emacs/24.0.50/lisp/org/org-bbdb
/home/sebastian/emacs/lisp/ext/org-mode/lisp/org-jsinfo hides /usr/local/share/emacs/24.0.50/lisp/org/org-jsinfo
/home/sebastian/emacs/lisp/ext/org-mode/lisp/org-archive hides /usr/local/share/emacs/24.0.50/lisp/org/org-archive
/home/sebastian/emacs/lisp/ext/org-mode/lisp/org-publish hides /usr/local/share/emacs/24.0.50/lisp/org/org-publish
/home/sebastian/emacs/lisp/ext/org-mode/lisp/org-crypt hides /usr/local/share/emacs/24.0.50/lisp/org/org-crypt
/home/sebastian/emacs/lisp/ext/org-mode/lisp/org-datetree hides /usr/local/share/emacs/24.0.50/lisp/org/org-datetree
/home/sebastian/emacs/lisp/ext/org-mode/lisp/org-rmail hides /usr/local/share/emacs/24.0.50/lisp/org/org-rmail
/home/sebastian/emacs/lisp/ext/org-mode/lisp/org-exp-blocks hides /usr/local/share/emacs/24.0.50/lisp/org/org-exp-blocks
/home/sebastian/emacs/lisp/ext/org-mode/lisp/org-attach hides /usr/local/share/emacs/24.0.50/lisp/org/org-attach
/home/sebastian/emacs/lisp/ext/org-mode/lisp/org-vm hides /usr/local/share/emacs/24.0.50/lisp/org/org-vm
/home/sebastian/emacs/lisp/ext/org-mode/lisp/org-gnus hides /usr/local/share/emacs/24.0.50/lisp/org/org-gnus
/home/sebastian/emacs/lisp/ext/org-mode/lisp/org-exp hides /usr/local/share/emacs/24.0.50/lisp/org/org-exp
/home/sebastian/emacs/lisp/ext/org-mode/lisp/org-remember hides /usr/local/share/emacs/24.0.50/lisp/org/org-remember
/home/sebastian/emacs/lisp/ext/org-mode/lisp/org-irc hides /usr/local/share/emacs/24.0.50/lisp/org/org-irc
/home/sebastian/emacs/lisp/ext/org-mode/lisp/org-feed hides /usr/local/share/emacs/24.0.50/lisp/org/org-feed
/home/sebastian/emacs/lisp/ext/org-mode/lisp/org-mobile hides /usr/local/share/emacs/24.0.50/lisp/org/org-mobile
/home/sebastian/emacs/lisp/ext/org-mode/lisp/org-ctags hides /usr/local/share/emacs/24.0.50/lisp/org/org-ctags
/home/sebastian/emacs/lisp/ext/org-mode/lisp/org-freemind hides /usr/local/share/emacs/24.0.50/lisp/org/org-freemind
/home/sebastian/emacs/lisp/ext/org-mode/lisp/org-src hides /usr/local/share/emacs/24.0.50/lisp/org/org-src
/home/sebastian/emacs/lisp/ext/org-mode/lisp/org-bibtex hides /usr/local/share/emacs/24.0.50/lisp/org/org-bibtex
/home/sebastian/emacs/lisp/ext/org-mode/lisp/org-faces hides /usr/local/share/emacs/24.0.50/lisp/org/org-faces

Features:
(shadow emacsbug follow macros info crm thingatpt sebastian-dark-theme
diff-mode ob-emacs-lisp ob-keys ob-comint ob-tangle ob-ref ob-lob
ob-table ob-exp ob ffap cus-edit hilit-chg jka-compr bbdb-hooks
org-archive appt cal-iso solar cal-dst holidays hol-loaddefs mule-util
cal-move texinfo org-ascii sha1 hex-util org-colview calculator
conf-mode browse-url sgml-mode vc-hg newcomment sql css-mode
multi-isearch subword gnus-fun mailalias rect flyspell ispell debug
find-func bookmark pp help-mode view tabify org-table org-man org-mouse
org-w3m org-wl org-irc org-inlinetask org-jsinfo org-infojs org-html
org-info org-id org-gnus org-bibtex org-bbdb org-capture org-mks
flow-fill bbdb-gui qp vc-mcvs vc-cvs sort gnus-cite smiley ansi-color
gnus-async gnus-bcklg gnus-ml disp-table parse-time pop3 nnml nndraft
nnmh bbdb-gnus bbdb-snarf mail-extr bbdb-com auth-source netrc
gnus-agent gnus-srvr gnus-score score-mode nnvirtual gnus-msg gnus-art
mm-uu mml2015 epg-config mm-view smime password-cache dig nntp
gnus-cache smtpmail imenu hideshow server sr-globals sr-copyright
filladapt bbdb-vcard-export bbdb-autoloads bbdb windmove javascript-mode
comint diary-lib diary-loaddefs rfcview get-rfc sr-org-index-complete
sr-org-mode org-latex org-export-latex org-beamer remember org-remember
org-datetree org-clock sr-org-projects org-publish org-exp
org-exp-blocks org-agenda org-protocol org byte-opt warnings bytecomp
byte-compile org-footnote org-src org-list org-faces org-compat
org-entities org-macs noutline outline cal-menu calendar cal-loaddefs
gnus-sum nnoo gnus-group time-date gnus-undo nnmail mail-source
format-spec gnus-start gnus-spec gnus-int gnus-range message sendmail
rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
rfc2047 rfc2045 ietf-drums mailabbrev gmm-utils mailheader gnus-win gnus
gnus-ems nnheader gnus-util mail-utils org-install sr-monotone vc-git
uniquify yasnippet dropdown-list easy-mmode edmacro kmacro recentf
tree-widget wid-edit eldoc sr-holidays sr-doxymacs tempo url url-proxy
url-privacy url-expand url-methods url-history url-cookie url-util
url-parse timezone url-vars mm-util mail-prsvr mailcap xml-parse
doxymacs browse-kill-ring php-mode derived etags ring cc-langs cc-mode
cc-fonts cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs
htmlize sr-speedbar cl cl-19 advice help-fns advice-preload speedbar
sb-image ezimage dframe easymenu assoc footnote sebastian-theme
regexp-opt paren pc-select hl-line time desktop delsel image-file
cus-start cus-load tooltip ediff-hook vc-hooks lisp-float-type mwheel
x-win x-dnd tool-bar dnd fontset image fringe lisp-mode register page
menu-bar rfn-eshadow timer select scroll-bar mldrag mouse jit-lock
font-lock syntax facemenu font-core frame cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew
greek romanian slovak czech european ethiopic indian cyrillic chinese
case-table epa-hook jka-cmpr-hook help simple abbrev loaddefs button
minibuffer faces cus-face files text-properties overlay md5 base64
format env code-pages mule custom widget hashtable-print-readable
backquote make-network-process dbusbind dynamic-setting
system-font-setting font-render-setting gtk x-toolkit x multi-tty emacs)




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6518; Package emacs. (Sun, 27 Jun 2010 00:27:02 GMT) Full text and rfc822 format available.

Message #8 received at 6518 <at> debbugs.gnu.org (full text, mbox):

From: Christoph <cschol2112 <at> googlemail.com>
To: 6518 <at> debbugs.gnu.org
Subject: RE: 24.0.50; window-height returns wrong value
Date: Sat, 26 Jun 2010 18:25:56 -0600
I verified this in GNU Emacs 23.2.1 (i386-mingw-nt6.1.7600) of 
2010-05-08 on G41R2F1, on Windows 7.

I decreased the window height so that only one line is visible in the 
buffer.

(window-height) function indeed returns 2.

But the documenation says:
The return value includes WINDOW's mode line and header line, if any.

Therefore, the window height of 2 is correct: 1 line in the buffer plus 
the mode line.

If I decrease the window size further that even the mode line 
disappears, (window-height) reports the correct value of 1.

The next test was setting lines-spacing to 5.

In decreased the window height so only 1 line was visible, plus the mode 
line. I checked that going to the next line indeed results in a complete 
screen scroll.

(window-height) now returns 3, which is not correct. Setting 
line-spacing back to 0 shows that 2 lines are visible, plus the mode 
line, result in a total of 3 lines.

The (window-height) function doesn't seem to take the value of 
line-spacing into account.

Christoph




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6518; Package emacs. (Sun, 27 Jun 2010 03:07:02 GMT) Full text and rfc822 format available.

Message #11 received at 6518 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Christoph <cschol2112 <at> googlemail.com>
Cc: 6518 <at> debbugs.gnu.org
Subject: Re: bug#6518: 24.0.50; window-height returns wrong value
Date: Sun, 27 Jun 2010 06:08:35 +0300
> Date: Sat, 26 Jun 2010 18:25:56 -0600
> From: Christoph <cschol2112 <at> googlemail.com>
> Cc: 
> 
> The (window-height) function doesn't seem to take the value of 
> line-spacing into account.

Yes.  I think this is by design, so maybe a doc fix is in order.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6518; Package emacs. (Sun, 27 Jun 2010 04:11:01 GMT) Full text and rfc822 format available.

Message #14 received at 6518 <at> debbugs.gnu.org (full text, mbox):

From: Christoph <cschol2112 <at> googlemail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 6518 <at> debbugs.gnu.org
Subject: Re: bug#6518: 24.0.50; window-height returns wrong value
Date: Sat, 26 Jun 2010 22:10:12 -0600
[Message part 1 (text/plain, inline)]
On 6/26/2010 9:08 PM, Eli Zaretskii wrote:

> Yes.  I think this is by design, so maybe a doc fix is in order.

Sounds good. I attached a doc fix patch proposal.

Christoph
[bugfix_6518.txt (text/plain, attachment)]

Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6518; Package emacs. (Sat, 10 Jul 2010 20:36:02 GMT) Full text and rfc822 format available.

Message #17 received at 6518 <at> debbugs.gnu.org (full text, mbox):

From: Christoph <cschol2112 <at> googlemail.com>
To: 6518 <at> debbugs.gnu.org
Date: Sat, 10 Jul 2010 14:34:58 -0600
tags 6518 patch




Added tag(s) patch. Request was from Christoph <cschol2112 <at> googlemail.com> to control <at> debbugs.gnu.org. (Sat, 10 Jul 2010 20:40:03 GMT) Full text and rfc822 format available.

Reply sent to Juanma Barranquero <lekktu <at> gmail.com>:
You have taken responsibility. (Fri, 23 Jul 2010 00:03:02 GMT) Full text and rfc822 format available.

Notification sent to Sebastian Rose <sebastian_rose <at> gmx.de>:
bug acknowledged by developer. (Fri, 23 Jul 2010 00:03:02 GMT) Full text and rfc822 format available.

Message #24 received at 6518-done <at> debbugs.gnu.org (full text, mbox):

From: Juanma Barranquero <lekktu <at> gmail.com>
To: Christoph <cschol2112 <at> googlemail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 6518-done <at> debbugs.gnu.org
Subject: Re: bug#6518: 24.0.50; window-height returns wrong value
Date: Fri, 23 Jul 2010 02:01:43 +0200
> Sounds good. I attached a doc fix patch proposal.

Committed, thanks.

    Juanma




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 20 Aug 2010 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 14 years and 310 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.