From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 13 14:23:54 2013 Received: (at submit) by debbugs.gnu.org; 13 Nov 2013 19:23:54 +0000 Received: from localhost ([127.0.0.1]:50514 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vgg2b-0006du-Mo for submit@debbugs.gnu.org; Wed, 13 Nov 2013 14:23:54 -0500 Received: from eggs.gnu.org ([208.118.235.92]:37946) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vgg2V-0006dW-Pj for submit@debbugs.gnu.org; Wed, 13 Nov 2013 14:23:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vgg2K-0006g8-PL for submit@debbugs.gnu.org; Wed, 13 Nov 2013 14:23:42 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,T_DKIM_INVALID, T_FRT_PACKAGE autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:37133) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vgg2K-0006g4-Jn for submit@debbugs.gnu.org; Wed, 13 Nov 2013 14:23:36 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39626) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vgg2E-00026K-FG for bug-gnu-emacs@gnu.org; Wed, 13 Nov 2013 14:23:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vgg26-0006e0-Vw for bug-gnu-emacs@gnu.org; Wed, 13 Nov 2013 14:23:30 -0500 Received: from mail-wg0-x22d.google.com ([2a00:1450:400c:c00::22d]:53123) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vgg26-0006cp-IF for bug-gnu-emacs@gnu.org; Wed, 13 Nov 2013 14:23:22 -0500 Received: by mail-wg0-f45.google.com with SMTP id a1so901238wgh.24 for ; Wed, 13 Nov 2013 11:23:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=robertdallasgray.com; s=google; h=from:content-type:content-transfer-encoding:subject:message-id:date :to:mime-version; bh=uNeAxKKto/vfiOqcdBrEGIPZQSN/oJdPTSyH53GuInw=; b=Jr4l17sQmZZAUuNizvTMrsRwn1+JmWODjtESkYctTrtbrjRGuVfe+vYetkr8rrVecy vo7aKLMUqLr69dH5dYWn3TVq1u6lxJFgBaeCruovXmH0+gbk2pBu2g+oXs3UWZ4WYyj3 YC8SYi1cJDQKEw6x7mEzNme2Iv+GqcPXyU4Vo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:content-type:content-transfer-encoding :subject:message-id:date:to:mime-version; bh=uNeAxKKto/vfiOqcdBrEGIPZQSN/oJdPTSyH53GuInw=; b=hodsROY43F9suIePK6jsJY2vHPVgUk0Cn2AcgnUSjJ3kqLy/x78dNocTUFCMKJGcE9 GzRM1Lsw00lL6ZlubrFK0SQ/wN2hGCxDQeku1Y/IrGOA6kOoqwxwX0anj3vAtiQj2N+i ejkhfeqUsEgDhxRi1ybfTE+s86nK6ODltQR5vHng6JVDpeh+1r3Ac5wrwVwFFFvjCU3O CvnBSnnIE/DRJiOoOvFonH9hySt2Bay7GSbxWYU10uuvgfOfT0n0cVXRa7uxm0KjVil4 lFauyN8tp9k9ijs0obYGQwK9+pRNdxK1XedkTiw9UDQyKIbTbjYQqbsEFDDbcjm2f+IA yEJQ== X-Gm-Message-State: ALoCoQlhSy7cXGwKC2WytfMoR04mU/CWipEeiYh1yJ5PnzIE/8JoJSI6D1lzssvyEpqWaKtghuAY X-Received: by 10.180.208.49 with SMTP id mb17mr22016370wic.64.1384370600761; Wed, 13 Nov 2013 11:23:20 -0800 (PST) Received: from [192.168.1.203] ([2.28.52.80]) by mx.google.com with ESMTPSA id dj8sm58096883wid.2.2013.11.13.11.23.19 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 13 Nov 2013 11:23:20 -0800 (PST) From: Robert Dallas Gray Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: 24.3.50; Incorrect window-text-height with non-zero line-spacing Message-Id: <8D614196-65E4-4F20-AAFE-CCFDC32D9898@robertdallasgray.com> Date: Wed, 13 Nov 2013 19:23:19 +0000 To: bug-gnu-emacs@gnu.org Mime-Version: 1.0 (Mac OS X Mail 7.0 \(1822\)) X-Mailer: Apple Mail (2.1822) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) On a graphical display, when `line-spacing' is non-zero, `window-text-height' reports an incorrect number; equally, `set-window-text-height' can't be used properly. This impacts on libraries which use `set-window-text-height' e.g. to attempt to size a window accurately. To reproduce: In a graphical display, `M-: (setq line-spacing 5)', then `M-: (window-text-height)'. Note the incorrect result.=20 In GNU Emacs 24.3.50.1 (x86_64-apple-darwin13.0.0, NS = apple-appkit-1265.00) of 2013-11-10 on Pud.local Windowing system distributor `Apple', version 10.3.1265 Configured using: `configure --prefix=3D/usr/local/Cellar/emacs/HEAD --without-dbus --enable-locallisppath=3D/usr/local/share/emacs/site-lisp --infodir=3D/usr/local/Cellar/emacs/HEAD/share/info/emacs --without-gnutls --with-ns --disable-ns-self-contained' Important settings: value of $LANG: en_GB.UTF-8 locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: Emacs-Lisp Minor modes in effect: flycheck-mode: t show-smartparens-mode: t smartparens-mode: t global-auto-complete-mode: t auto-complete-mode: t linum-mode: t shell-dirtrack-mode: t project-persist-mode: t global-auto-revert-mode: t ido-everywhere: t delete-selection-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 line-number-mode: t global-visual-line-mode: t visual-line-mode: t transient-mark-mode: t Recent input: C-x C-s =20 =20 C-c C-c . d e l e t e =20 =20 ; ; SPC=20 p a c k a g e - d e l e t e SPC h a s SPC d i f f e=20 r e n t SPC s i g n a t u r e s SPC d e p e d i n =20 n d i n g SPC o n SPC e m a=20 c s SPC v e r s i o n , ; ; SPC b u t SPC=20 u s i n g SPC t h e SPC f i r s t SPC a r g SPC s h=20 o u l d SPC h a n d l e SPC b o t h =20 =20 =20 =20 =20 t=20 a k i n g SPC =20 =20 SPC f r o m SPC a d v i c e=20 C-x C-s C-c C-c C-c C-s=20 a d v C-s =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 M-x r e=20 p o Recent messages: FlyC: You should have a section marked ";;; Commentary:" FlyC: You should have a section marked ";;; Code:" FlyC: The first line should be of the form: ";;; package --- Summary" FlyC: You should have a section marked ";;; Commentary:" FlyC: You should have a section marked ";;; Code:" Saving file = /Users/robertdallasgray/.emacs.d/pallet/test/pallet-test.el... Wrote /Users/robertdallasgray/.emacs.d/pallet/test/pallet-test.el Saving file = /Users/robertdallasgray/.emacs.d/pallet/test/pallet-test.el... Wrote /Users/robertdallasgray/.emacs.d/pallet/test/pallet-test.el Mark saved where search started scroll-down-command: Beginning of buffer [18 times] Load-path shadows: = /Users/robertdallasgray/.emacs.d/.cask/24.3.50.1/elpa/flycheck-20131108.13= 37/.dir-locals hides = /Users/robertdallasgray/.emacs.d/.cask/24.3.50.1/elpa/fringe-helper-201305= 19.1641/.dir-locals ~/.emacs.d/custom hides = /usr/local/Cellar/emacs/HEAD/share/emacs/24.3.50/lisp/custom = /Users/robertdallasgray/.emacs.d/.cask/24.3.50.1/elpa/flycheck-20131108.13= 37/.dir-locals hides = /usr/local/Cellar/emacs/HEAD/share/emacs/24.3.50/lisp/gnus/.dir-locals Features: (shadow sort mail-extr emacsbug message rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils jka-compr misearch multi-isearch pallet loadhist debug macrostep pp shell-pop term ehelp electric windmove hl-line sr-speedbar speedbar sb-image ezimage dframe dired org-wl org-w3m org-vm org-rmail org-mhe org-mew org-irc org-jsinfo org-infojs org-html org-exp ob-exp org-exp-blocks org-info org-gnus gnus-util org-docview org-bibtex bibtex org-bbdb org-mobile org-agenda org byte-opt bytecomp byte-compile cconv ob-tangle ob-ref ob-lob ob-table org-footnote org-src ob-comint ob-keys org-pcomplete org-list org-faces org-entities org-version ob-emacs-lisp ob org-compat org-macs ob-eval org-loaddefs format-spec cal-menu calendar cal-loaddefs markdown-mode noutline outline easy-mmode make-mode vc-git desktop frameset flycheck find-func help-mode easy-kill graphene-smartparens-config smartparens-config smartparens-html smartparens thingatpt auto-complete-config auto-complete popup linum imenu-anywhere imenu graphene-theme solarized-light-theme solarized-definitions uniquify readline-complete shell pcomplete comint ansi-color ring graphene graphene-look graphene-osx-defaults exec-path-from-shell graphene-keys graphene-projects project-persist edmacro kmacro graphene-speedbar graphene-env autorevert filenotify smex ido graphene-editing web-mode disp-table delsel graphene-helper-functions advice noflet rx info easymenu cask help-fns cl-macs gv cl cask-bootstrap epl git commander f dash s cl-loaddefs cl-lib package server time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel ns-win tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar 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 minibuffer nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process cocoa ns multi-tty emacs) From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 13 15:32:43 2013 Received: (at 15886) by debbugs.gnu.org; 13 Nov 2013 20:32:43 +0000 Received: from localhost ([127.0.0.1]:50572 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vgh7C-000192-W7 for submit@debbugs.gnu.org; Wed, 13 Nov 2013 15:32:43 -0500 Received: from mtaout20.012.net.il ([80.179.55.166]:37907) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vgh7B-00018o-5Y for 15886@debbugs.gnu.org; Wed, 13 Nov 2013 15:32:42 -0500 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0MW700D00YCO5N00@a-mtaout20.012.net.il> for 15886@debbugs.gnu.org; Wed, 13 Nov 2013 22:32:34 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MW700D5EYEA5B10@a-mtaout20.012.net.il>; Wed, 13 Nov 2013 22:32:34 +0200 (IST) Date: Wed, 13 Nov 2013 22:32:28 +0200 From: Eli Zaretskii Subject: Re: bug#15886: 24.3.50; Incorrect window-text-height with non-zero line-spacing In-reply-to: <8D614196-65E4-4F20-AAFE-CCFDC32D9898@robertdallasgray.com> X-012-Sender: halo1@inter.net.il To: Robert Dallas Gray Message-id: <83a9h811r7.fsf@gnu.org> References: <8D614196-65E4-4F20-AAFE-CCFDC32D9898@robertdallasgray.com> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 15886 Cc: 15886@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > From: Robert Dallas Gray > Date: Wed, 13 Nov 2013 19:23:19 +0000 > > On a graphical display, when `line-spacing' is non-zero, > `window-text-height' reports an incorrect number; equally, > `set-window-text-height' can't be used properly. This impacts on > libraries which use `set-window-text-height' e.g. to attempt to size a > window accurately. Those libraries should use 'window-screen-lines' instead. I think 'window-text-height' should continue doing what it does, as many packages, and Emacs itself, depend on its current behavior. From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 13 15:36:25 2013 Received: (at 15886) by debbugs.gnu.org; 13 Nov 2013 20:36:25 +0000 Received: from localhost ([127.0.0.1]:50591 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VghAm-0001IO-UP for submit@debbugs.gnu.org; Wed, 13 Nov 2013 15:36:25 -0500 Received: from mail-bk0-f54.google.com ([209.85.214.54]:55850) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VghAk-0001Hz-PE for 15886@debbugs.gnu.org; Wed, 13 Nov 2013 15:36:23 -0500 Received: by mail-bk0-f54.google.com with SMTP id 6so618850bkj.13 for <15886@debbugs.gnu.org>; Wed, 13 Nov 2013 12:36:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=robertdallasgray.com; s=google; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=wmk1/z91m9h4d5dtxHc0jDLQrrZjx6fru8dU/q+Ztlc=; b=Bzk9ZvkGEd+fP46RJGUSyk7uPTB4oRs0J543j7EjAFHCaRfaFR8fP6JSOv/aava8RG vg8kLyL4Kyjh+wZLt+2S8XbORaFn0RNwqwPQjQK18kHnG9rf70bg56oV2aqRIWpteAQD c3gIJSHGrAEVQgOvPrEawbeCLy2+9S/CseiGU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:content-type:mime-version:subject:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=wmk1/z91m9h4d5dtxHc0jDLQrrZjx6fru8dU/q+Ztlc=; b=WJwQ6LIyFceVmy+8qqOgGvFH8AO4vcvX+HNj5ZPAro0FHw5tCrZlUHaEHw4bYDyrzk KkgGzD44Rv+I8eKe6Av/bUwxIb3xX3oJJ8aW9imHOD9ZlWs+6Jwem5MQjSD+lZGWTP38 4DSJ7D+a6SD3I3io5KnwUZo29E/xwQd05J3nYVpIB3qTmjbPi8lwkOuEK1gJnQ6waCsT fTzVzJhB6Zu1NlU95QxWRetGyeEBNOQ5Idhui+to7ki6htXoFthdppykQ3dZHPey9yAY XTDr5NBnIIilv5SJhxNCl+B8BrQ8aVBlxJ2zFhWF78tVMTe7JDUI4voSZFMeuwdA//vc v2NA== X-Gm-Message-State: ALoCoQnuDjVy3FRVE5B8a3wk+FgfQ/mkYOAZYxXokfqdNlUDb794rSSMimRLDY35P+TmQXhYBgs/ X-Received: by 10.204.195.142 with SMTP id ec14mr120195bkb.80.1384374976586; Wed, 13 Nov 2013 12:36:16 -0800 (PST) Received: from [192.168.1.203] ([2.28.52.80]) by mx.google.com with ESMTPSA id kk2sm25012578bkb.10.2013.11.13.12.36.15 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 13 Nov 2013 12:36:16 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 7.0 \(1822\)) Subject: Re: bug#15886: 24.3.50; Incorrect window-text-height with non-zero line-spacing From: Robert Dallas Gray In-Reply-To: <83a9h811r7.fsf@gnu.org> Date: Wed, 13 Nov 2013 20:36:14 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <4D2C9983-9E63-44F6-83A6-3D306B9EC79C@robertdallasgray.com> References: <8D614196-65E4-4F20-AAFE-CCFDC32D9898@robertdallasgray.com> <83a9h811r7.fsf@gnu.org> To: Eli Zaretskii X-Mailer: Apple Mail (2.1822) X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 15886 Cc: 15886@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 13 Nov 2013, at 20:32, Eli Zaretskii wrote: >> From: Robert Dallas Gray >> Date: Wed, 13 Nov 2013 19:23:19 +0000 >>=20 >> On a graphical display, when `line-spacing' is non-zero, >> `window-text-height' reports an incorrect number; equally, >> `set-window-text-height' can't be used properly. This impacts on >> libraries which use `set-window-text-height' e.g. to attempt to size = a >> window accurately. >=20 > Those libraries should use 'window-screen-lines' instead. >=20 > I think 'window-text-height' should continue doing what it does, as > many packages, and Emacs itself, depend on its current behavior. OK, but is there a parallel setter method, or some way to set the height = of a window in pixels, so that a window could be correctly sized taking = into account line-spacing? Incidentally, the particular library that raised this issue for me was = grizzl (https://github.com/d11wtq/grizzl).= From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 13 15:45:06 2013 Received: (at 15886) by debbugs.gnu.org; 13 Nov 2013 20:45:06 +0000 Received: from localhost ([127.0.0.1]:50600 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VghJB-0001dF-Th for submit@debbugs.gnu.org; Wed, 13 Nov 2013 15:45:06 -0500 Received: from mtaout21.012.net.il ([80.179.55.169]:56532) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VghJ8-0001cT-OF for 15886@debbugs.gnu.org; Wed, 13 Nov 2013 15:45:04 -0500 Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0MW700400YQXX500@a-mtaout21.012.net.il> for 15886@debbugs.gnu.org; Wed, 13 Nov 2013 22:44:56 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MW7004Q0YYVSN70@a-mtaout21.012.net.il>; Wed, 13 Nov 2013 22:44:55 +0200 (IST) Date: Wed, 13 Nov 2013 22:44:49 +0200 From: Eli Zaretskii Subject: Re: bug#15886: 24.3.50; Incorrect window-text-height with non-zero line-spacing In-reply-to: <4D2C9983-9E63-44F6-83A6-3D306B9EC79C@robertdallasgray.com> X-012-Sender: halo1@inter.net.il To: Robert Dallas Gray Message-id: <837gcc116m.fsf@gnu.org> References: <8D614196-65E4-4F20-AAFE-CCFDC32D9898@robertdallasgray.com> <83a9h811r7.fsf@gnu.org> <4D2C9983-9E63-44F6-83A6-3D306B9EC79C@robertdallasgray.com> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 15886 Cc: 15886@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > From: Robert Dallas Gray > Date: Wed, 13 Nov 2013 20:36:14 +0000 > Cc: 15886@debbugs.gnu.org > > > On 13 Nov 2013, at 20:32, Eli Zaretskii wrote: > > >> From: Robert Dallas Gray > >> Date: Wed, 13 Nov 2013 19:23:19 +0000 > >> > >> On a graphical display, when `line-spacing' is non-zero, > >> `window-text-height' reports an incorrect number; equally, > >> `set-window-text-height' can't be used properly. This impacts on > >> libraries which use `set-window-text-height' e.g. to attempt to size a > >> window accurately. > > > > Those libraries should use 'window-screen-lines' instead. > > > > I think 'window-text-height' should continue doing what it does, as > > many packages, and Emacs itself, depend on its current behavior. > > OK, but is there a parallel setter method, or some way to set the height of a window in pixels, so that a window could be correctly sized taking into account line-spacing? I don't understand: if you need to get a window's height and then use it to change the height, then why isn't 'window-text-height' and set-window-text-height' what you want? They are consistent with one another. Perhaps it would help if you explain more about what you want to accomplish, and why. From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 13 15:55:31 2013 Received: (at 15886) by debbugs.gnu.org; 13 Nov 2013 20:55:31 +0000 Received: from localhost ([127.0.0.1]:50613 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VghTG-0001t2-Ft for submit@debbugs.gnu.org; Wed, 13 Nov 2013 15:55:31 -0500 Received: from mail-ea0-f170.google.com ([209.85.215.170]:36223) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VghTE-0001sp-Cv for 15886@debbugs.gnu.org; Wed, 13 Nov 2013 15:55:29 -0500 Received: by mail-ea0-f170.google.com with SMTP id q10so445225eaj.29 for <15886@debbugs.gnu.org>; Wed, 13 Nov 2013 12:55:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=robertdallasgray.com; s=google; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=GzvYPAyrdunictjtkvKTkqDUn7PhtOI0uDQUW7NrLek=; b=iZ21HP4EGDX2spdEEO4SF+Gm3jXwBX+6LBdWPA0eB1Lwjh3QvcGWmpC0Hp3m0sqIit 6mnOuGAX6bphm/gjH8ZEyPuTa1WJw1gwQ9wDPSwDgSg/we6j8XwJxzV3F5JfqB0knwCd cZaKJcPuFGPR6JAF5iMLhMm6NUWwEiHmOt6fY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:content-type:mime-version:subject:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=GzvYPAyrdunictjtkvKTkqDUn7PhtOI0uDQUW7NrLek=; b=NzniW1Cws26wkLkAGcvKQAlkeUuYXJSAiJkqXRfNJ4lQ7xz6Tlbs5CPx2TvUuzU857 c+/lXL2npucgFYzjGVYB+s4AINQ0EdDmX5Uw2SZzqYG0lPoXfbyqQ6lhlI5e5l0KGoHq PMnQ7/WssbLG9AfiHNEnrCVjfxsKPtAOdW2RTEJ8d34lGVNnH0QXF52zmv4NmvV4endr 09uw7AwFn1OZ/zZJxL9XndoAcnyMoX9BwuLdxOgcdvZBlDbuWXVY+ncG9+XfUaQGHx1r 5hF1whiCyYTAgg5vlwVm37ypOW+fKBSP735QCaqFIPKqrd9pI2Nd5r7E03+MfUyHFHmN tlWw== X-Gm-Message-State: ALoCoQm94YN8NYEUeI72l3TacblP8VeOjVjyEwdXuGUQ72wnHI/esWZvMJ24m5v1xMqsApCV2qYw X-Received: by 10.15.54.199 with SMTP id t47mr24658485eew.46.1384376122338; Wed, 13 Nov 2013 12:55:22 -0800 (PST) Received: from [192.168.1.203] ([2.28.52.80]) by mx.google.com with ESMTPSA id i1sm91650941eeg.0.2013.11.13.12.55.21 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 13 Nov 2013 12:55:21 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 7.0 \(1822\)) Subject: Re: bug#15886: 24.3.50; Incorrect window-text-height with non-zero line-spacing From: Robert Dallas Gray In-Reply-To: <837gcc116m.fsf@gnu.org> Date: Wed, 13 Nov 2013 20:55:20 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: References: <8D614196-65E4-4F20-AAFE-CCFDC32D9898@robertdallasgray.com> <83a9h811r7.fsf@gnu.org> <4D2C9983-9E63-44F6-83A6-3D306B9EC79C@robertdallasgray.com> <837gcc116m.fsf@gnu.org> To: Eli Zaretskii X-Mailer: Apple Mail (2.1822) X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 15886 Cc: 15886@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 13 Nov 2013, at 20:44, Eli Zaretskii wrote: >> From: Robert Dallas Gray >> Date: Wed, 13 Nov 2013 20:36:14 +0000 >> Cc: 15886@debbugs.gnu.org >>=20 >>=20 >> On 13 Nov 2013, at 20:32, Eli Zaretskii wrote: >>=20 >>>> From: Robert Dallas Gray >>>> Date: Wed, 13 Nov 2013 19:23:19 +0000 >>>>=20 >>>> On a graphical display, when `line-spacing' is non-zero, >>>> `window-text-height' reports an incorrect number; equally, >>>> `set-window-text-height' can't be used properly. This impacts on >>>> libraries which use `set-window-text-height' e.g. to attempt to = size a >>>> window accurately. >>>=20 >>> Those libraries should use 'window-screen-lines' instead. >>>=20 >>> I think 'window-text-height' should continue doing what it does, as >>> many packages, and Emacs itself, depend on its current behavior. >>=20 >> OK, but is there a parallel setter method, or some way to set the = height of a window in pixels, so that a window could be correctly sized = taking into account line-spacing? >=20 > I don't understand: if you need to get a window's height and then use > it to change the height, then why isn't 'window-text-height' and > set-window-text-height' what you want? They are consistent with one > another. >=20 > Perhaps it would help if you explain more about what you want to > accomplish, and why. Well, it's not my library, but the reason it fails (in my setup, where I = have line-spacing set to 2), is that it tries to set the height of the = minibuffer using 'set-window-text-height' -- which, in my setup, sets = the height incorrectly (the bottom of the minibuffer is obscured). I = note that 'set-window-text-height' uses 'window-text-height'=20 If there's a setter equivalent of 'window-screen-lines' (which there = doesn't seem to be), then I can raise that with the maintainer. = Otherwise, is there a way to set window height in pixels (which can be = easily worked out from the number of lines of text)? If not, then = there's no way (that I can see) to accomplish the intended function of = 'set-window-text-height' in gui Emacs. From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 13 16:16:38 2013 Received: (at 15886) by debbugs.gnu.org; 13 Nov 2013 21:16:38 +0000 Received: from localhost ([127.0.0.1]:50636 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vghni-0002R2-2D for submit@debbugs.gnu.org; Wed, 13 Nov 2013 16:16:38 -0500 Received: from mtaout22.012.net.il ([80.179.55.172]:62456) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vghnf-0002Qn-Js for 15886@debbugs.gnu.org; Wed, 13 Nov 2013 16:16:36 -0500 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0MW800B0006UAC00@a-mtaout22.012.net.il> for 15886@debbugs.gnu.org; Wed, 13 Nov 2013 23:16:29 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MW800BJF0FH8M40@a-mtaout22.012.net.il>; Wed, 13 Nov 2013 23:16:29 +0200 (IST) Date: Wed, 13 Nov 2013 23:16:22 +0200 From: Eli Zaretskii Subject: Re: bug#15886: 24.3.50; Incorrect window-text-height with non-zero line-spacing In-reply-to: X-012-Sender: halo1@inter.net.il To: Robert Dallas Gray Message-id: <834n7g0zq1.fsf@gnu.org> References: <8D614196-65E4-4F20-AAFE-CCFDC32D9898@robertdallasgray.com> <83a9h811r7.fsf@gnu.org> <4D2C9983-9E63-44F6-83A6-3D306B9EC79C@robertdallasgray.com> <837gcc116m.fsf@gnu.org> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 15886 Cc: 15886@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > From: Robert Dallas Gray > Date: Wed, 13 Nov 2013 20:55:20 +0000 > Cc: 15886@debbugs.gnu.org > > Well, it's not my library, but the reason it fails (in my setup, where I have line-spacing set to 2), is that it tries to set the height of the minibuffer using 'set-window-text-height' -- which, in my setup, sets the height incorrectly (the bottom of the minibuffer is obscured). I note that 'set-window-text-height' uses 'window-text-height' The argument passed to 'set-window-text-height' should be scaled by the ratio of the values returned by 'frame-char-height' and 'default-line-height'. (By default, this ratio is 1, but in your case it will be different.) The result of scaling should then be rounded up to the nearest integer. From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 13 16:27:48 2013 Received: (at 15886) by debbugs.gnu.org; 13 Nov 2013 21:27:48 +0000 Received: from localhost ([127.0.0.1]:50644 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VghyV-0002gw-39 for submit@debbugs.gnu.org; Wed, 13 Nov 2013 16:27:47 -0500 Received: from mail-bk0-f54.google.com ([209.85.214.54]:44809) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VghyS-0002gg-86 for 15886@debbugs.gnu.org; Wed, 13 Nov 2013 16:27:45 -0500 Received: by mail-bk0-f54.google.com with SMTP id 6so631552bkj.41 for <15886@debbugs.gnu.org>; Wed, 13 Nov 2013 13:27:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=robertdallasgray.com; s=google; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=j/wxFKyJz5XmvKCqNxLdsX1CJP18pETZTfZ905DF9wU=; b=ZSg0ndER+zDMdGRldla/+DQ9aLHvuBfuT0c9ngRPIk20HPq6VAv2U7U6tI/x5gyI3a QssVugX4kPtmw1Em727EQzDe4pjMjhzvK2RKx58rNk4ht50Qcgl5Wdqnsr42jBa2ZJUj Sd5UP0lPwU3EPCX+x9893rFyDGLAxfDxsA7U4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:content-type:mime-version:subject:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=j/wxFKyJz5XmvKCqNxLdsX1CJP18pETZTfZ905DF9wU=; b=UKQsaSd5jMbo+ZWE1TstfLepZCJDwzxRwcdqe1T+gl+DELyAqMzu930gqoJQXpdlvY dYZKsojrXfi2/FupjXan5weU0l+912vcS6O1WDWe89NJsAO5aNS5WytTIQb/pydJ/i+O 1iEvTpROUL8sy8T392Py3g9vUbWSX+R/yQE8nRAaDcr7qV9D8Yst77iwy2h1BNFSVeN/ SPQVyY/Mikaw0Cf5V9N4Dqu9TkdBS5TSiGNAyydAoPOVJ2FRZ3nY9A8w4t1ccej18kJN 8Ikzl5yTawrlpaSJ3dWcjQk8AgtxQM0Y+nBV8++gUZ2Yh4f7EpnJIbUh7rGEpDpPAbHc IVvA== X-Gm-Message-State: ALoCoQlu3ApOk45or3WgdWAL7/M+7onrYr30PQft+v/qFQNWU+D6EOWvHi69v9VWr8VHL91oxITt X-Received: by 10.204.170.140 with SMTP id d12mr7131440bkz.3.1384378058096; Wed, 13 Nov 2013 13:27:38 -0800 (PST) Received: from [192.168.1.203] ([2.28.52.80]) by mx.google.com with ESMTPSA id it1sm14906802bkb.17.2013.11.13.13.27.37 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 13 Nov 2013 13:27:37 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 7.0 \(1822\)) Subject: Re: bug#15886: 24.3.50; Incorrect window-text-height with non-zero line-spacing From: Robert Dallas Gray In-Reply-To: <834n7g0zq1.fsf@gnu.org> Date: Wed, 13 Nov 2013 21:27:35 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <2D715343-65B4-4759-95C1-D3DA8A3F7598@robertdallasgray.com> References: <8D614196-65E4-4F20-AAFE-CCFDC32D9898@robertdallasgray.com> <83a9h811r7.fsf@gnu.org> <4D2C9983-9E63-44F6-83A6-3D306B9EC79C@robertdallasgray.com> <837gcc116m.fsf@gnu.org> <834n7g0zq1.fsf@gnu.org> To: Eli Zaretskii X-Mailer: Apple Mail (2.1822) X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 15886 Cc: 15886@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 13 Nov 2013, at 21:16, Eli Zaretskii wrote: >> From: Robert Dallas Gray >> Date: Wed, 13 Nov 2013 20:55:20 +0000 >> Cc: 15886@debbugs.gnu.org >>=20 >> Well, it's not my library, but the reason it fails (in my setup, = where I have line-spacing set to 2), is that it tries to set the height = of the minibuffer using 'set-window-text-height' -- which, in my setup, = sets the height incorrectly (the bottom of the minibuffer is obscured). = I note that 'set-window-text-height' uses 'window-text-height'=20 >=20 > The argument passed to 'set-window-text-height' should be scaled by > the ratio of the values returned by 'frame-char-height' and > 'default-line-height'. (By default, this ratio is 1, but in your case > it will be different.) The result of scaling should then be rounded > up to the nearest integer. >=20 OK, but that doesn't really achieve the aim of setting the height of the = window *exactly* in terms of the height of an individual line of text = ... in the case I'm describing, where the number of lines displayed is = changing dynamically, the baseline is going to bounce around because the = window isn't being sized accurately.= From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 13 22:44:56 2013 Received: (at 15886) by debbugs.gnu.org; 14 Nov 2013 03:44:56 +0000 Received: from localhost ([127.0.0.1]:51072 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VgnrT-0003w5-Ip for submit@debbugs.gnu.org; Wed, 13 Nov 2013 22:44:55 -0500 Received: from mtaout21.012.net.il ([80.179.55.169]:36475) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VgnrP-0003vp-Ux for 15886@debbugs.gnu.org; Wed, 13 Nov 2013 22:44:53 -0500 Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0MW800600HRRGV00@a-mtaout21.012.net.il> for 15886@debbugs.gnu.org; Thu, 14 Nov 2013 05:44:44 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MW8006NVIEKD280@a-mtaout21.012.net.il>; Thu, 14 Nov 2013 05:44:44 +0200 (IST) Date: Thu, 14 Nov 2013 05:44:30 +0200 From: Eli Zaretskii Subject: Re: bug#15886: 24.3.50; Incorrect window-text-height with non-zero line-spacing In-reply-to: <2D715343-65B4-4759-95C1-D3DA8A3F7598@robertdallasgray.com> X-012-Sender: halo1@inter.net.il To: Robert Dallas Gray Message-id: <831u2j1wbl.fsf@gnu.org> References: <8D614196-65E4-4F20-AAFE-CCFDC32D9898@robertdallasgray.com> <83a9h811r7.fsf@gnu.org> <4D2C9983-9E63-44F6-83A6-3D306B9EC79C@robertdallasgray.com> <837gcc116m.fsf@gnu.org> <834n7g0zq1.fsf@gnu.org> <2D715343-65B4-4759-95C1-D3DA8A3F7598@robertdallasgray.com> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 15886 Cc: 15886@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > From: Robert Dallas Gray > Date: Wed, 13 Nov 2013 21:27:35 +0000 > Cc: 15886@debbugs.gnu.org > > > The argument passed to 'set-window-text-height' should be scaled by > > the ratio of the values returned by 'frame-char-height' and > > 'default-line-height'. (By default, this ratio is 1, but in your case > > it will be different.) The result of scaling should then be rounded > > up to the nearest integer. > > > > OK, but that doesn't really achieve the aim of setting the height of the window *exactly* in terms of the height of an individual line of text ... in the case I'm describing, where the number of lines displayed is changing dynamically, the baseline is going to bounce around because the window isn't being sized accurately. In a GUI session, a window's height can never be set exactly to the size of the text, because that size is not constant, it varies depending on what characters, fonts, and faces (bold etc.) are used for displaying the text. Change the text displayed in the window, and the exact size in pixel changes. So the goal is to make the window high enough to show all the text you need to see; any other goal is not attainable _in_principle_, and it is IMO futile to try to pursue it. Or maybe I don't understand what "bouncing" you describe. Can you give an example? From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 14 02:38:33 2013 Received: (at 15886) by debbugs.gnu.org; 14 Nov 2013 07:38:33 +0000 Received: from localhost ([127.0.0.1]:51286 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VgrVY-0001M5-Fo for submit@debbugs.gnu.org; Thu, 14 Nov 2013 02:38:32 -0500 Received: from mout.gmx.net ([212.227.17.22]:49379) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VgrVT-0001Lk-2Q for 15886@debbugs.gnu.org; Thu, 14 Nov 2013 02:38:28 -0500 Received: from [62.47.50.173] ([62.47.50.173]) by mail.gmx.com (mrgmx001) with ESMTPA (Nemesis) id 0McVGq-1VyOM73rlY-00Hf9K for <15886@debbugs.gnu.org>; Thu, 14 Nov 2013 08:38:20 +0100 Message-ID: <52847DE1.2040709@gmx.at> Date: Thu, 14 Nov 2013 08:38:09 +0100 From: martin rudalics MIME-Version: 1.0 To: Robert Dallas Gray Subject: Re: bug#15886: 24.3.50; Incorrect window-text-height with non-zero line-spacing References: <8D614196-65E4-4F20-AAFE-CCFDC32D9898@robertdallasgray.com> <83a9h811r7.fsf@gnu.org> <4D2C9983-9E63-44F6-83A6-3D306B9EC79C@robertdallasgray.com> <837gcc116m.fsf@gnu.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:ajwFfZ4yFbQepC0OZERMLDuXfembdSXWpm1d0oKWQf6L656ocWZ yZxBkd4YKoNCx3IHBP3VePZSHTb0GEFCRpv+m5VbEFK7WxLAd5gle2OEjGX7556wKYUYd/3 IZdoJUEovr+H0zTs9oQOELuSu+TkcNhRr+k+vTqtdgo5y34OKy0YUwiv0tpk0rPnZLIFBok 5/zh5K4DXOyZCIdGKEHUA== X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 15886 Cc: Eli Zaretskii , 15886@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) > Well, it's not my library, but the reason it fails (in my setup, where > I have line-spacing set to 2), is that it tries to set the height of > the minibuffer using 'set-window-text-height' Could you please tell us more precisely what you are doing? IIUC you must have set `resize-mini-windows' to nil in order to be able to apply `set-window-text-height' to the minibuffer window in the first place. But setting `resize-mini-windows' to t here resizes the mini window exactly to the height of the text it displays. So what am I missing? > -- which, in my setup, > sets the height incorrectly (the bottom of the minibuffer is > obscured). What is your value of `max-mini-window-height'? martin From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 14 13:08:03 2013 Received: (at 15886) by debbugs.gnu.org; 14 Nov 2013 18:08:03 +0000 Received: from localhost ([127.0.0.1]:52458 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vh1Kk-0004r4-Eq for submit@debbugs.gnu.org; Thu, 14 Nov 2013 13:08:02 -0500 Received: from mtaout20.012.net.il ([80.179.55.166]:55506) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vh1Kh-0004qU-9B for 15886@debbugs.gnu.org; Thu, 14 Nov 2013 13:08:00 -0500 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0MW900000M6SU300@a-mtaout20.012.net.il> for 15886@debbugs.gnu.org; Thu, 14 Nov 2013 20:07:52 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MW9000F8MD4U810@a-mtaout20.012.net.il>; Thu, 14 Nov 2013 20:07:52 +0200 (IST) Date: Thu, 14 Nov 2013 20:07:36 +0200 From: Eli Zaretskii Subject: Re: bug#15886: 24.3.50; Incorrect window-text-height with non-zero line-spacing In-reply-to: X-012-Sender: halo1@inter.net.il To: Robert Dallas Gray Message-id: <83fvqyzwk7.fsf@gnu.org> References: <8D614196-65E4-4F20-AAFE-CCFDC32D9898@robertdallasgray.com> <83a9h811r7.fsf@gnu.org> <4D2C9983-9E63-44F6-83A6-3D306B9EC79C@robertdallasgray.com> <837gcc116m.fsf@gnu.org> <834n7g0zq1.fsf@gnu.org> <2D715343-65B4-4759-95C1-D3DA8A3F7598@robertdallasgray.com> <831u2j1wbl.fsf@gnu.org> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 15886 Cc: 15886@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) [You forgot to CC the bug address.] > Date: Thu, 14 Nov 2013 09:22:14 +0000 > From: Robert Dallas Gray > > See the screenshot here: > > https://github.com/d11wtq/grizzl > > >From the bottom, you can see: a text entry area; an information line; and > then a list of candidate files (this is Grizzl used for completing read > over project files). > > All three of these elements, if I'm reading the code correctly, are > contained in the mini buffer window, which resizes dynamically as the list > of candidate files grows or shrinks. > > For this to look right, it must be possible to set the size of the window > to a given number of lines as the number of candidates changes. The > library's maintainer uses 'set-window-text-height' to do this (see > https://github.com/d11wtq/grizzl/blob/master/grizzl-read.el#L141). A side question: why does grizzl resize the minibuffer by hand, instead of letting the display engine do that? > In the case where line-spacing is non-zero, 'set-window-text-height' > doesn't size the window correctly, as we've discussed. If we use a 'rough' > number of lines based on the ratio described by Eli, then much of the time > the window will also not be sized correctly, and as the list of candidates > changes size, the baseline of the window (the text entry line) will > 'bounce'. This problem cannot be avoided entirely, and if it exists (did you actually try my suggestion?), then the package has it already. Those 2 lines, the "information line" and the line showing the best candidate, they both use special faces, don't they? If so, the same problem will happen if one or both of these faces will use a different font. IOW, you cannot resize a window "exactly" like you would like to, in a GUI session, simply because the Emacs display features are too many to take everything into account, certainly if one works only on the Lisp level. You could say that users should not shoot themselves in the foot by customizing these faces so as to disrupt the display of grizzl, but then I could tell you the same about using line spacing. > I can see that it's not possible to give an accurate window-text-height in > the case of a display where fonts of multiple sizes might be used in the > same buffer, but should it not at least take into account the global > setting of line-spacing, and the height of the default font? I don't see how line-spacing is different from any other feature that affects the height of a line (except that you use the former, but not the latter ;-). > And, if it's impractical to fix this, is there a way to set the > height of the window in pixels rather than lines so that the same > effect can be achieved? What makes you think that setting window height in pixels would solve this issue? Granted, the "jitter" would probably be smaller, but a human eye can easily spot even a 1-pixel jitter, and be no less annoyed. What I'm trying to tell is that it is simply impossible to control the Emacs display in Lisp to such a degree of precision, not with the way the display engine is currently designed and implemented. Whoever designs packages which try to do that should be acutely aware of these limitations in the first place, and if they don't avert her, at least mention them in some prominent place. Btw, I don't really see why there was a need for using the minibuffer here. Why not code a customized *Completions* buffer instead? That would at least make sure the "text entry area" could simply use the minibuffer, which would then remain of a constant height, ever. From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 14 14:24:54 2013 Received: (at 15886) by debbugs.gnu.org; 14 Nov 2013 19:24:54 +0000 Received: from localhost ([127.0.0.1]:52585 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vh2X8-0000bN-15 for submit@debbugs.gnu.org; Thu, 14 Nov 2013 14:24:54 -0500 Received: from mail-we0-f180.google.com ([74.125.82.180]:52073) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vh2X5-0000b9-UW for 15886@debbugs.gnu.org; Thu, 14 Nov 2013 14:24:52 -0500 Received: by mail-we0-f180.google.com with SMTP id u57so2027036wes.25 for <15886@debbugs.gnu.org>; Thu, 14 Nov 2013 11:24:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=robertdallasgray.com; s=google; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=Vy95ebvTJH9a8UvYMeLzNPoh9q6+RQRWT68arzMw2Pg=; b=D0/ilZB/nch4Vb3RX0Lqf5r3j0Wxg4D2ciqJyHmQsQLfCW9NSm5klX8NI3nAhoU2SP VRhGLqhB7PnXz1dKmQiiPZ/ZUVCdazMGJ7sy5gGi8eWhL1FQh6sftPHLYIDWs/3xXUWw bKyNGDOn7joZVJwbSgB7JxQgPMw7FwXqSwenw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:content-type:mime-version:subject:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=Vy95ebvTJH9a8UvYMeLzNPoh9q6+RQRWT68arzMw2Pg=; b=eH8YqW9xLe/A0egE9RkMvtyeCeNeODWUY/GQCOXQNy8gP4/lv2N/J1W39u9xhSpZqy 1KaeEsyfFrZ9Szlro/CBIEk76NOxoqTfc05o1bmXS/XrCmympUNBiEWixdbskalr91Aa iu8GeHr6uiWDmYJQr1z+RLgDdYxhipfVNg3LwSSRYngjidFpr9Pf+M0Wn5OpQRZrNfqw nssuOn6lJgRUWfFWsszDI/u5uV3KmocYu0/uw93Adi0U8taSa53+bu32LMJYPboqMbDT 2K8Aj+4Nz+oPdE5dgNeGxoH/fwzpOFpehyEIse2yLn4M+N43FLgN6OTdUqWfp1o149LT uAvw== X-Gm-Message-State: ALoCoQkIUSU+0x6OlTIRS0wZcBUbDsp7DUF7nYX9dnEj3fF+CZGOldJkohXnEHpaxk0dVhIuLqEd X-Received: by 10.181.12.75 with SMTP id eo11mr4221262wid.37.1384457086071; Thu, 14 Nov 2013 11:24:46 -0800 (PST) Received: from [192.168.1.203] ([2.28.52.80]) by mx.google.com with ESMTPSA id x19sm1624230wia.5.2013.11.14.11.24.45 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 14 Nov 2013 11:24:45 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 7.0 \(1822\)) Subject: Re: bug#15886: 24.3.50; Incorrect window-text-height with non-zero line-spacing From: Robert Dallas Gray In-Reply-To: <83fvqyzwk7.fsf@gnu.org> Date: Thu, 14 Nov 2013 19:24:42 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: References: <8D614196-65E4-4F20-AAFE-CCFDC32D9898@robertdallasgray.com> <83a9h811r7.fsf@gnu.org> <4D2C9983-9E63-44F6-83A6-3D306B9EC79C@robertdallasgray.com> <837gcc116m.fsf@gnu.org> <834n7g0zq1.fsf@gnu.org> <2D715343-65B4-4759-95C1-D3DA8A3F7598@robertdallasgray.com> <831u2j1wbl.fsf@gnu.org> <83fvqyzwk7.fsf@gnu.org> To: Eli Zaretskii X-Mailer: Apple Mail (2.1822) X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 15886 Cc: 15886@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 14 Nov 2013, at 18:07, Eli Zaretskii wrote: > [You forgot to CC the bug address.] >=20 Apologies. > A side question: why does grizzl resize the minibuffer by hand, > instead of letting the display engine do that? >=20 No idea I'm afraid. I've linked to this bug in the issue I've raised on = the Github repo, so perhaps the maintainer will drop in and enlighten = us. > This problem cannot be avoided entirely, and if it exists (did you > actually try my suggestion?), then the package has it already. Those > 2 lines, the "information line" and the line showing the best > candidate, they both use special faces, don't they? If so, the same > problem will happen if one or both of these faces will use a different > font. >=20 I did try the suggestion (or something like it), yes, and it resulted in = the 'bouncing' I mentioned. I agree with your last couple of sentences, which is why my current = workaround is to set line-spacing to nil in the minibuffer. But if it = were possible to size the window in pixels, even the edge case you = describe could be avoided. > IOW, you cannot resize a window "exactly" like you would like to, in a > GUI session, simply because the Emacs display features are too many to > take everything into account, certainly if one works only on the Lisp > level. >=20 For sure. > You could say that users should not shoot themselves in the foot by > customizing these faces so as to disrupt the display of grizzl, but > then I could tell you the same about using line spacing. >=20 > I don't see how line-spacing is different from any other feature that > affects the height of a line (except that you use the former, but not > the latter ;-). >=20 Well, I'd contend (as a former book designer) that line-spacing is *by = its nature* an integral part of the height of a line of text (the clue's = in the name).=20 >=20 > What makes you think that setting window height in pixels would solve > this issue? Granted, the "jitter" would probably be smaller, but a > human eye can easily spot even a 1-pixel jitter, and be no less > annoyed. >=20 We can determine the height of a line of text in the relevant face, and = its line-spacing, in pixels, and create a simple algorithm to calculate = the total height of a given number of lines. > What I'm trying to tell is that it is simply impossible to control the > Emacs display in Lisp to such a degree of precision, not with the way > the display engine is currently designed and implemented. Whoever > designs packages which try to do that should be acutely aware of these > limitations in the first place, and if they don't avert her, at least > mention them in some prominent place. >=20 Again, for sure. If it's a hard limitation of Emacs, so be it. > Btw, I don't really see why there was a need for using the minibuffer > here. Why not code a customized *Completions* buffer instead? That > would at least make sure the "text entry area" could simply use the > minibuffer, which would then remain of a constant height, ever. Again, I dunno. I'm not the author, and I'm crediting him with having = done things the way he has for good reasons. Hopefully he'll show up at = some point and explain. In the meantime, I'd suggest we shelve this one. Thanks a lot for taking = the time to engage. From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 28 03:40:04 2020 Received: (at 15886-done) by debbugs.gnu.org; 28 Oct 2020 07:40:04 +0000 Received: from localhost ([127.0.0.1]:46910 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXg3v-0000Il-P6 for submit@debbugs.gnu.org; Wed, 28 Oct 2020 03:40:04 -0400 Received: from mail-ej1-f49.google.com ([209.85.218.49]:43029) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXg3u-0000I5-0T for 15886-done@debbugs.gnu.org; Wed, 28 Oct 2020 03:40:02 -0400 Received: by mail-ej1-f49.google.com with SMTP id k3so5770528ejj.10 for <15886-done@debbugs.gnu.org>; Wed, 28 Oct 2020 00:40:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:user-agent :mime-version:date:message-id:subject:to:cc; bh=KOzsXUXNHM90RTdhUmATQW7v41wfOdlGf0uJtxxiqSY=; b=uc2809k9UXcLh6sGp1mxm4lxjHOxfy3K/NvNQkUWIJDmnJ9YDvCWydSsHqc7wwoDDz AwOt6BUfBnkxVXVbGSjf5U+KQjKM0uBsk/vu92Rb4oXUM1P4RriBwnIdML/JZBW5dmvm 1sbnwaVFirR8HHx1RvU2oUDT6OI112+pEFcpcJb/CcfmrECGjcrEY5Omz1apustXMW/z iKIFPTrVHSVOPrCdH69Tqz0fmoC13PuuPApdSLGmH9wnhMtrsU/aGy3w7raPSHLYHVYk 9lWhUvjPmGJOjExdLTJ54lRAMKQaftAhoGn1NzM/+paDqmuJiAOkoy++IHyoYx7d0y2w acnA== X-Gm-Message-State: AOAM532g0Nh6itCPmSs0H/hxUKI7c4+F8dweC9E0AyesFRgImJTUUZL7 UR3MvSKB98kyn1kL3rgnXIpDVqhJWoF9FlT3JrE= X-Google-Smtp-Source: ABdhPJwfBWB2SSxqZcVbo48+cEStam6Ldrk8IAWwcuGGm76wCc9NK8qSPMlTSTJif6Kr2fdwLyw4mVobIwtesxl81Cc= X-Received: by 2002:a17:906:a40b:: with SMTP id l11mr3113702ejz.25.1603870796216; Wed, 28 Oct 2020 00:39:56 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Wed, 28 Oct 2020 00:39:55 -0700 From: Stefan Kangas In-Reply-To: <83fvqyzwk7.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 14 Nov 2013 20:07:36 +0200") References: <8D614196-65E4-4F20-AAFE-CCFDC32D9898@robertdallasgray.com> <83a9h811r7.fsf@gnu.org> <4D2C9983-9E63-44F6-83A6-3D306B9EC79C@robertdallasgray.com> <837gcc116m.fsf@gnu.org> <834n7g0zq1.fsf@gnu.org> <2D715343-65B4-4759-95C1-D3DA8A3F7598@robertdallasgray.com> <831u2j1wbl.fsf@gnu.org> <83fvqyzwk7.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Date: Wed, 28 Oct 2020 00:39:55 -0700 Message-ID: Subject: Re: bug#15886: 24.3.50; Incorrect window-text-height with non-zero line-spacing To: Eli Zaretskii Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 15886-done Cc: Robert Dallas Gray , 15886-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) Eli Zaretskii writes: >> And, if it's impractical to fix this, is there a way to set the >> height of the window in pixels rather than lines so that the same >> effect can be achieved? > > What makes you think that setting window height in pixels would solve > this issue? Granted, the "jitter" would probably be smaller, but a > human eye can easily spot even a 1-pixel jitter, and be no less > annoyed. > > What I'm trying to tell is that it is simply impossible to control the > Emacs display in Lisp to such a degree of precision, not with the way > the display engine is currently designed and implemented. Whoever > designs packages which try to do that should be acutely aware of these > limitations in the first place, and if they don't avert her, at least > mention them in some prominent place. >From skimming this thread, it contains a long discussion that ultimately ends up in the conclusion that what is requested is fundamentally not possible to achieve with our current display engine. So lacking any other updates within 7 years, and seeing nothing actionable, it seems unlikely that we'll make any progress here. I'm therefore closing this bug report. If that conclusion is incorrect and there is more to do here, please reply to this email (use "Reply to all" in your email client) and we can reopen the bug report. From unknown Tue Jun 17 22:09:43 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 25 Nov 2020 12:24:10 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator