Subject: 24.0.50; window-height returns wrong value

From: Sebastian Rose <[email-masked]>
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)