From unknown Sat Aug 16 20:56:57 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#5098 <5098@debbugs.gnu.org> To: bug#5098 <5098@debbugs.gnu.org> Subject: Status: [NS] 23.1.50; display-pixel-height / display-pixel-width don't work in .emacs Reply-To: bug#5098 <5098@debbugs.gnu.org> Date: Sun, 17 Aug 2025 03:56:57 +0000 retitle 5098 [NS] 23.1.50; display-pixel-height / display-pixel-width don't= work in .emacs reassign 5098 emacs submitter 5098 Ian Eure severity 5098 normal tag 5098 unreproducible thanks From ian.eure@gmail.com Wed Dec 2 00:00:11 2009 Received: (at submit) by emacsbugs.donarmstrong.com; 2 Dec 2009 08:00:12 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-1.2 required=4.0 tests=AWL,FOURLA autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nB280AH3002096 for ; Wed, 2 Dec 2009 00:00:11 -0800 Received: from mx10.gnu.org ([199.232.76.166]:44036) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1NFk89-0001x1-Aj for emacs-pretest-bug@gnu.org; Wed, 02 Dec 2009 03:00:09 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NFk87-0007kk-DC for emacs-pretest-bug@gnu.org; Wed, 02 Dec 2009 03:00:09 -0500 Received: from mx20.gnu.org ([199.232.41.8]:35335) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NFk86-0007ka-P9 for emacs-pretest-bug@gnu.org; Wed, 02 Dec 2009 03:00:07 -0500 Received: from 64-71-7-198.static.wiline.com ([64.71.7.198] helo=proton.local) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NFk85-00046E-8N for emacs-pretest-bug@gnu.org; Wed, 02 Dec 2009 03:00:05 -0500 Received: by proton.local (Postfix, from userid 502) id C1C1436F4AC; Sat, 28 Nov 2009 15:30:30 -0800 (PST) From: Ian Eure To: emacs-pretest-bug@gnu.org Subject: [NS] 23.1.50; display-pixel-height / display-pixel-width don't work in .emacs Date: Sat, 28 Nov 2009 15:30:29 -0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by mx20.gnu.org: Genre and OS details not recognized. X-Greylist: delayed 86402 seconds by postgrey-1.27 at nadesico; Wed, 02 Dec 2009 03:00:04 EST X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) I have a function which sets up the Emacs frame how I like it. This involves centering the frame within the screen; since I run Emacs on multiple systems, I calculate it based on the current screen dimensions. However, calling both display-pixel-height and display-pixel-width return zero when called from my .emacs file. I added some debug messages to emacs-startup-hook and window-setup-hook, and they return zero there as well. After Emacs has started, they return the correct values. This is irritating, since I must manually call my function after Emacs starts up. Here=E2=80=99s a simple testcase: (defun report-display-size () (message "Screen dimensions are %dx%d" (display-pixel-width) (display-pixel-height))) (add-hook 'window-setup-hook 'report-display-size) -> "Screen dimensions are 0x0" M-: (report-display-size) RET -> "Screen dimensions are 1440x900" In GNU Emacs 23.1.50.1 (x86_64-apple-darwin10.2.0, NS apple-appkit-1038.25) of 2009-11-27 on proton.local Windowing system distributor `Apple', version 10.3.1038 configured using `configure '--without-dbus' '--with-ns' 'CFLAGS=3D-pipe -= O2 -march=3Dnocona'' 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: nil value of $XMODIFIERS: nil locale-coding-system: nil default enable-multibyte-characters: t Major mode: Magit Minor modes in effect: erc-spelling-mode: t erc-ring-mode: t erc-pcomplete-mode: t erc-netsplit-mode: t erc-button-mode: t erc-fill-mode: t erc-autojoin-mode: t erc-match-mode: t erc-irccontrols-mode: t erc-noncommands-mode: t erc-readonly-mode: t erc-scrolltobottom-mode: t which-function-mode: t yas/minor-mode: t shell-dirtrack-mode: t ime-bindings: t show-paren-mode: t recentf-mode: t iswitchb-mode: t cua-mode: t auto-insert-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 blink-cursor-mode: t global-auto-composition-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t size-indication-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t abbrev-mode: t Recent input: f r o m SPC . e m a c s SPC o r SPC =20 , SPC C-x o C-x b C-x o C-n C-p C-n C-p C-x=20 b H C-x o C-x b e m a c s - s t a=20 r t u p h - h o o k , M-q C-o C-o C-n C-n=20 C-a C-c C-c C-p C-p C-e =20 C-c C-b C-c C-b C-SPC C-M-f M-w C-x o SPC=20 C-y C-x o C-p C-n C-p C-e C-b C-b C-b C-b C-b =20 C-x 1 M-< C-s - h o o k C-s C-s C-s C-s C-s C-s C-s=20 C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s=20 C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s=20 C-s C-s C-s C-s C-x k RET C-n C-p C-n C-p C-x b C-g=20 C-x b C-n C-p M-b M-b M-b o r SPC C-e . M-q=20 C-SPC C-p C-a M-w C-n C-n C-d C-x C-s C-c C-g n n n=20 n n n n p p C-n C-p C-p=20 C-p C-p C-p C-p C-p C-p C-p C-n C-p C-n C-x C-t C-x=20 C-s C-x b g s c C o m m e n t SPC u p =20 o u t SPC f r a m e - c e n t e r SPC c=20 a l l , SPC i t SPC d o e n s ' t SPC w o r k SPC a=20 t SPC a t s t s t a r t u p SPC t i m=20 e . C-c C-c M-x r e p o r t - e m Recent messages: Mark set Saving file /Users/ieure/Projects/dotfiles/emacs.d/ime-lisp/ime-top.el... Mark set Wrote /Users/ieure/Projects/dotfiles/emacs.d/ime-lisp/ime-top.el (No files need saving) Saving file /Users/ieure/Projects/dotfiles/emacs.d/ime-lisp/ime-top.el... Mark set Wrote /Users/ieure/Projects/dotfiles/emacs.d/ime-lisp/ime-top.el Type C-c C-c to commit (C-c C-k to cancel). Git finished. Load-path shadows: None found. Features: (shadow mail-extr emacsbug magit diff-mode log-edit pcvs-util add-log parse-time ielm jka-compr find-func cua-rect rect dired-aux dired cus-edit grep executable newcomment apropos dabbrev erc-spelling flyspell ispell erc-ring erc-pcomplete pcomplete erc-netsplit erc-button erc-fill erc-stamp erc-join help-mode view erc-track erc-match erc-goodies erc erc-backend erc-compat pp multi-isearch vc-git test-case-mode compile goto-addr light-symbol hi-lock thingatpt hl-line eldoc which-func imenu ime-top ime-ns dpkg-dev-el dpkg-dev-el-loaddefs ime-smarty ime-help ime-thrift ime-diff ime-org ime-m4 ime-markdown ime-clojure swank-clojure-autoload ime-slime slime-autoloads ime-w3m w3m-load ime-snippets dropdown-list yasnippet cl cl-19 ime-dired ime-ibuffer edmacro kmacro ime-abbrev ime-inferior ime-erc ime-ssh ime-sql ime-javascript ime-xml ime-html ime-sh ime-tcl ime-elisp ime-python ime-php skeleton ime-vc ime-programming tramp-imap epa derived epg epg-config imap-hash imap message sendmail ecomplete rfc822 mml mml-sec mm-decode mm-bodies mm-encode mailcap mail-parse rfc2231 rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader mm-util mail-prsvr gmm-utils mailheader canlock sha1 hex-util hashcash mail-utils assoc tramp-gw tramp-fish tramp-smb tramp-cache tramp-ftp tramp-cmds tramp regexp-opt auth-source gnus-util netrc time-date shell comint ring password-cache format-spec tramp-compat trampver ime-inserts ime-editing ime-bindings easy-mmode ime-vars ime-fonts ime-autoloads ime-frame ibuf-ext ibuffer uniquify advice help-fns advice-preload paren server recentf tree-widget wid-edit iswitchb cua-base autoinsert cus-start cus-load tooltip ediff-hook vc-hooks lisp-float-type mwheel ns-win easymenu 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 text-properties overlay md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process ns multi-tty emacs) From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 18 05:47:26 2011 Received: (at 5098) by debbugs.gnu.org; 18 Sep 2011 09:47:27 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R5DyA-0007zy-IU for submit@debbugs.gnu.org; Sun, 18 Sep 2011 05:47:26 -0400 Received: from hermes.netfonds.no ([80.91.224.195]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R5Dy3-0007zH-ID for 5098@debbugs.gnu.org; Sun, 18 Sep 2011 05:47:21 -0400 Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=stories.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1R5DtC-0007Uy-2f; Sun, 18 Sep 2011 11:42:18 +0200 From: Lars Magne Ingebrigtsen To: Ian Eure Subject: Re: [NS] 23.1.50; display-pixel-height / display-pixel-width don't work in .emacs In-Reply-To: (Ian Eure's message of "Sat, 28 Nov 2009 15:30:29 -0800") Date: Sun, 18 Sep 2011 11:38:45 +0200 Message-ID: References: User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux) X-Now-Playing: Eurythmics's _Savage_: "Beethoven (I Love To Listen To)" MIME-Version: 1.0 Content-Type: text/plain X-MailScanner-ID: 1R5DtC-0007Uy-2f X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1316943738.20194@CXSGEVeseBuGtBZOgKSIYA X-Spam-Status: No X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 5098 Cc: 5098@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) Ian Eure writes: > I have a function which sets up the Emacs frame how I like it. This > involves centering the frame within the screen; since I run Emacs on > multiple systems, I calculate it based on the current screen > dimensions. > > However, calling both display-pixel-height and display-pixel-width > return zero when called from my .emacs file. I added some debug messages > to emacs-startup-hook and window-setup-hook, and they return zero there > as well. I'm unable to reproduce this in Emacs 24. Has this bug gone away in recent Emacs versions? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog http://lars.ingebrigtsen.no/ From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 18 05:47:12 2011 Received: (at control) by debbugs.gnu.org; 18 Sep 2011 09:47:12 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R5Dxw-0007yq-1f for submit@debbugs.gnu.org; Sun, 18 Sep 2011 05:47:12 -0400 Received: from hermes.netfonds.no ([80.91.224.195]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R5Dxu-0007yi-Fa for control@debbugs.gnu.org; Sun, 18 Sep 2011 05:47:11 -0400 Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=stories.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1R5Dt2-0007U0-QJ for control@debbugs.gnu.org; Sun, 18 Sep 2011 11:42:08 +0200 Date: Sun, 18 Sep 2011 11:38:48 +0200 Message-Id: To: control@debbugs.gnu.org From: Lars Magne Ingebrigtsen Subject: control message for bug #5098 X-MailScanner-ID: 1R5Dt2-0007U0-QJ X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1316943728.89682@ipsvHpf8WVAXTogvMdY6OA X-Spam-Status: No X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) tags 5098 unreproducible From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 06 23:32:26 2012 Received: (at 5098) by debbugs.gnu.org; 7 Jan 2012 04:32:26 +0000 Received: from localhost ([127.0.0.1]:47452 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RjNxB-0002aa-N7 for submit@debbugs.gnu.org; Fri, 06 Jan 2012 23:32:26 -0500 Received: from hermes.netfonds.no ([80.91.224.195]:59724) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RjNx5-0002aB-AZ for 5098@debbugs.gnu.org; Fri, 06 Jan 2012 23:32:23 -0500 Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=stories.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1RjNwx-0001zv-Gu; Sat, 07 Jan 2012 05:32:11 +0100 From: Lars Magne Ingebrigtsen To: Ian Eure Subject: Re: bug#5098: [NS] 23.1.50; display-pixel-height / display-pixel-width don't work in .emacs References: X-Now-Playing: Fennesz, Sakamoto's _Flumina (1)_: "0401" Date: Sat, 07 Jan 2012 05:32:10 +0100 In-Reply-To: (Lars Magne Ingebrigtsen's message of "Sun, 18 Sep 2011 11:38:45 +0200") Message-ID: User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.92 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-MailScanner-ID: 1RjNwx-0001zv-Gu X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1326515531.61362@1FchJqCY5nZ6iIpNAhE9kw X-Spam-Status: No X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 5098 Cc: 5098@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) Lars Magne Ingebrigtsen writes: > I'm unable to reproduce this in Emacs 24. Has this bug gone away in > recent Emacs versions? More information was requested, but no response was given within a few months, so I'm closing this bug report. If the problem still exists, please reopen this bug report. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog http://lars.ingebrigtsen.no/ From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 06 23:32:24 2012 Received: (at control) by debbugs.gnu.org; 7 Jan 2012 04:32:24 +0000 Received: from localhost ([127.0.0.1]:47450 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RjNx9-0002aN-8p for submit@debbugs.gnu.org; Fri, 06 Jan 2012 23:32:24 -0500 Received: from hermes.netfonds.no ([80.91.224.195]:59730) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RjNx7-0002aF-MR for control@debbugs.gnu.org; Fri, 06 Jan 2012 23:32:22 -0500 Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=stories.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1RjNx2-00020A-1I for control@debbugs.gnu.org; Sat, 07 Jan 2012 05:32:16 +0100 Date: Sat, 07 Jan 2012 05:32:15 +0100 Message-Id: To: control@debbugs.gnu.org From: Lars Magne Ingebrigtsen Subject: control message for bug #5098 X-MailScanner-ID: 1RjNx2-00020A-1I X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1326515536.13004@GrxfDLq5v2S224HoVoKyMg X-Spam-Status: No X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) close 5098 From unknown Sat Aug 16 20:56:57 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 04 Feb 2012 12:24:06 +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