GNU bug report logs -
#5098
[NS] 23.1.50; display-pixel-height / display-pixel-width don't work in .emacs
Previous Next
Reported by: Ian Eure <ian.eure <at> gmail.com>
Date: Wed, 2 Dec 2009 08:10:05 UTC
Severity: normal
Tags: unreproducible
Done: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
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 5098 in the body.
You can then email your comments to 5098 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#5098
; Package
emacs
.
(Wed, 02 Dec 2009 08:10:05 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Ian Eure <ian.eure <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Wed, 02 Dec 2009 08:10:06 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
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’s 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=-pipe -O2 -march=nocona''
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 <M-backspace> <backspace>
, SPC C-x o C-x b <return> C-x o C-n C-p C-n C-p C-x
b H <return> C-x o C-x b <return> e m a c s - s t a
r t u p h <backspace> - h o o k , M-q C-o C-o C-n C-n
C-a C-c C-c C-p C-p C-e <help-echo> <down-mouse-1>
<mouse-1> C-c C-b C-c C-b C-SPC C-M-f M-w C-x o SPC
C-y C-x o C-p C-n C-p C-e C-b C-b C-b C-b C-b <return>
C-x 1 M-< C-s - h o o k 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 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 C-s C-s C-s C-s C-s C-s C-s
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
C-x b <return> C-n C-p M-b M-b M-b o r SPC C-e . M-q
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
n n n n <tab> <tab> p p <tab> <return> C-n C-p C-p
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
C-s C-x b <return> g s c C o m m e n t SPC u p <backspace>
<backspace> o u t SPC f r a m e - c e n t e r SPC c
a l l , SPC i t SPC d o e n s ' t SPC w o r k SPC a
t SPC a t s t <M-backspace> s t a r t u p SPC t i m
e . C-c C-c M-x r e p o r t - e m <tab> <return>
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)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#5098
; Package
emacs
.
(Sun, 18 Sep 2011 09:48:04 GMT)
Full text and
rfc822 format available.
Message #8 received at 5098 <at> debbugs.gnu.org (full text, mbox):
Ian Eure <ian.eure <at> gmail.com> 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/
Added tag(s) unreproducible.
Request was from
Lars Magne Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Sun, 18 Sep 2011 09:48:04 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#5098
; Package
emacs
.
(Sat, 07 Jan 2012 04:33:02 GMT)
Full text and
rfc822 format available.
Message #13 received at 5098 <at> debbugs.gnu.org (full text, mbox):
Lars Magne Ingebrigtsen <larsi <at> gnus.org> 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/
bug closed, send any further explanations to
5098 <at> debbugs.gnu.org and Ian Eure <ian.eure <at> gmail.com>
Request was from
Lars Magne Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Sat, 07 Jan 2012 04:33:03 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 04 Feb 2012 12:24:07 GMT)
Full text and
rfc822 format available.
This bug report was last modified 13 years and 197 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.