all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#17142: 24.4.50; Initial frame geometry on OSX
@ 2014-03-30  7:36 Bernd Rellermeyer
  2014-03-30 10:51 ` martin rudalics
  2014-03-30 13:46 ` martin rudalics
  0 siblings, 2 replies; 4+ messages in thread
From: Bernd Rellermeyer @ 2014-03-30  7:36 UTC (permalink / raw
  To: 17142


When changing the default font and the height in default-frame-alist,
the width is not set correctly.  I have the following lines in the
.emacs file:

(add-to-list 'default-frame-alist '(font . "Courier-14"))
(add-to-list 'default-frame-alist '(height . 71))

The default width, which is 80 characters, seems to be evaluated with
the default font, which is Monaco-12. Courier-14 is a bit wider, and
the initial frame is too narrow (it has only 70 characters per line).

When I change my settings to

(add-to-list 'default-frame-alist '(font . "Courier-14"))
(add-to-list 'default-frame-alist '(width . 80))
(add-to-list 'default-frame-alist '(height . 71))

everything is fine.  When I change my settings to

(add-to-list 'default-frame-alist '(font . "Courier-14"))

leaving the height as ist is, the width of 80 characters per line is
also set correctly.

I am still on OS X Lion (10.7.5).



In GNU Emacs 24.4.50.1 (x86_64-apple-darwin, NS apple-appkit-1038.36)
 of 2014-03-29 on bob.porkrind.org
Repository revision: rgm@gnu.org-20140329025951-otlt7zg52tt43f64
Windowing system distributor `Apple', version 10.3.1138
Configured using:
 `configure --host=x86_64-apple-darwin --build=i686-apple-darwin
 --with-ns'

Configured features:
ACL LIBXML2 ZLIB

Important settings:
  value of $LANG: de_DE.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Fundamental

Minor modes in effect:
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
<escape> x r e p o r <tab> <return>

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.

Load-path shadows:
/Users/bernd/.emacs.d/elpa/org-20140217/ox hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox
/Users/bernd/.emacs.d/elpa/org-20140217/ox-texinfo hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox-texinfo
/Users/bernd/.emacs.d/elpa/org-20140217/ox-publish hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox-publish
/Users/bernd/.emacs.d/elpa/org-20140217/ox-org hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox-org
/Users/bernd/.emacs.d/elpa/org-20140217/ox-odt hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox-odt
/Users/bernd/.emacs.d/elpa/org-20140217/ox-md hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox-md
/Users/bernd/.emacs.d/elpa/org-20140217/ox-man hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox-man
/Users/bernd/.emacs.d/elpa/org-20140217/ox-latex hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox-latex
/Users/bernd/.emacs.d/elpa/org-20140217/ox-icalendar hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox-icalendar
/Users/bernd/.emacs.d/elpa/org-20140217/ox-html hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox-html
/Users/bernd/.emacs.d/elpa/org-20140217/ox-beamer hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox-beamer
/Users/bernd/.emacs.d/elpa/org-20140217/ox-ascii hides /Applications/Emacs.app/Contents/Resources/lisp/org/ox-ascii
/Users/bernd/.emacs.d/elpa/org-20140217/org hides /Applications/Emacs.app/Contents/Resources/lisp/org/org
/Users/bernd/.emacs.d/elpa/org-20140217/org-w3m hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-w3m
/Users/bernd/.emacs.d/elpa/org-20140217/org-version hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-version
/Users/bernd/.emacs.d/elpa/org-20140217/org-timer hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-timer
/Users/bernd/.emacs.d/elpa/org-20140217/org-table hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-table
/Users/bernd/.emacs.d/elpa/org-20140217/org-src hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-src
/Users/bernd/.emacs.d/elpa/org-20140217/org-rmail hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-rmail
/Users/bernd/.emacs.d/elpa/org-20140217/org-protocol hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-protocol
/Users/bernd/.emacs.d/elpa/org-20140217/org-plot hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-plot
/Users/bernd/.emacs.d/elpa/org-20140217/org-pcomplete hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-pcomplete
/Users/bernd/.emacs.d/elpa/org-20140217/org-mouse hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-mouse
/Users/bernd/.emacs.d/elpa/org-20140217/org-mobile hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-mobile
/Users/bernd/.emacs.d/elpa/org-20140217/org-mhe hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-mhe
/Users/bernd/.emacs.d/elpa/org-20140217/org-macs hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-macs
/Users/bernd/.emacs.d/elpa/org-20140217/org-macro hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-macro
/Users/bernd/.emacs.d/elpa/org-20140217/org-loaddefs hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-loaddefs
/Users/bernd/.emacs.d/elpa/org-20140217/org-list hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-list
/Users/bernd/.emacs.d/elpa/org-20140217/org-irc hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-irc
/Users/bernd/.emacs.d/elpa/org-20140217/org-install hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-install
/Users/bernd/.emacs.d/elpa/org-20140217/org-inlinetask hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-inlinetask
/Users/bernd/.emacs.d/elpa/org-20140217/org-info hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-info
/Users/bernd/.emacs.d/elpa/org-20140217/org-indent hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-indent
/Users/bernd/.emacs.d/elpa/org-20140217/org-id hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-id
/Users/bernd/.emacs.d/elpa/org-20140217/org-habit hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-habit
/Users/bernd/.emacs.d/elpa/org-20140217/org-gnus hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-gnus
/Users/bernd/.emacs.d/elpa/org-20140217/org-footnote hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-footnote
/Users/bernd/.emacs.d/elpa/org-20140217/org-feed hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-feed
/Users/bernd/.emacs.d/elpa/org-20140217/org-faces hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-faces
/Users/bernd/.emacs.d/elpa/org-20140217/org-eshell hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-eshell
/Users/bernd/.emacs.d/elpa/org-20140217/org-entities hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-entities
/Users/bernd/.emacs.d/elpa/org-20140217/org-element hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-element
/Users/bernd/.emacs.d/elpa/org-20140217/org-docview hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-docview
/Users/bernd/.emacs.d/elpa/org-20140217/org-datetree hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-datetree
/Users/bernd/.emacs.d/elpa/org-20140217/org-ctags hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-ctags
/Users/bernd/.emacs.d/elpa/org-20140217/org-crypt hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-crypt
/Users/bernd/.emacs.d/elpa/org-20140217/org-compat hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-compat
/Users/bernd/.emacs.d/elpa/org-20140217/org-colview hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-colview
/Users/bernd/.emacs.d/elpa/org-20140217/org-clock hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-clock
/Users/bernd/.emacs.d/elpa/org-20140217/org-capture hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-capture
/Users/bernd/.emacs.d/elpa/org-20140217/org-bibtex hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-bibtex
/Users/bernd/.emacs.d/elpa/org-20140217/org-bbdb hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-bbdb
/Users/bernd/.emacs.d/elpa/org-20140217/org-attach hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-attach
/Users/bernd/.emacs.d/elpa/org-20140217/org-archive hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-archive
/Users/bernd/.emacs.d/elpa/org-20140217/org-agenda hides /Applications/Emacs.app/Contents/Resources/lisp/org/org-agenda
/Users/bernd/.emacs.d/elpa/org-20140217/ob hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob
/Users/bernd/.emacs.d/elpa/org-20140217/ob-tangle hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-tangle
/Users/bernd/.emacs.d/elpa/org-20140217/ob-table hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-table
/Users/bernd/.emacs.d/elpa/org-20140217/ob-sqlite hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-sqlite
/Users/bernd/.emacs.d/elpa/org-20140217/ob-sql hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-sql
/Users/bernd/.emacs.d/elpa/org-20140217/ob-shen hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-shen
/Users/bernd/.emacs.d/elpa/org-20140217/ob-sh hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-sh
/Users/bernd/.emacs.d/elpa/org-20140217/ob-screen hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-screen
/Users/bernd/.emacs.d/elpa/org-20140217/ob-scheme hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-scheme
/Users/bernd/.emacs.d/elpa/org-20140217/ob-scala hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-scala
/Users/bernd/.emacs.d/elpa/org-20140217/ob-sass hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-sass
/Users/bernd/.emacs.d/elpa/org-20140217/ob-ruby hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-ruby
/Users/bernd/.emacs.d/elpa/org-20140217/ob-ref hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-ref
/Users/bernd/.emacs.d/elpa/org-20140217/ob-R hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-R
/Users/bernd/.emacs.d/elpa/org-20140217/ob-python hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-python
/Users/bernd/.emacs.d/elpa/org-20140217/ob-plantuml hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-plantuml
/Users/bernd/.emacs.d/elpa/org-20140217/ob-picolisp hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-picolisp
/Users/bernd/.emacs.d/elpa/org-20140217/ob-perl hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-perl
/Users/bernd/.emacs.d/elpa/org-20140217/ob-org hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-org
/Users/bernd/.emacs.d/elpa/org-20140217/ob-octave hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-octave
/Users/bernd/.emacs.d/elpa/org-20140217/ob-ocaml hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-ocaml
/Users/bernd/.emacs.d/elpa/org-20140217/ob-mscgen hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-mscgen
/Users/bernd/.emacs.d/elpa/org-20140217/ob-maxima hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-maxima
/Users/bernd/.emacs.d/elpa/org-20140217/ob-matlab hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-matlab
/Users/bernd/.emacs.d/elpa/org-20140217/ob-makefile hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-makefile
/Users/bernd/.emacs.d/elpa/org-20140217/ob-lob hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-lob
/Users/bernd/.emacs.d/elpa/org-20140217/ob-lisp hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-lisp
/Users/bernd/.emacs.d/elpa/org-20140217/ob-lilypond hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-lilypond
/Users/bernd/.emacs.d/elpa/org-20140217/ob-ledger hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-ledger
/Users/bernd/.emacs.d/elpa/org-20140217/ob-latex hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-latex
/Users/bernd/.emacs.d/elpa/org-20140217/ob-keys hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-keys
/Users/bernd/.emacs.d/elpa/org-20140217/ob-js hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-js
/Users/bernd/.emacs.d/elpa/org-20140217/ob-java hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-java
/Users/bernd/.emacs.d/elpa/org-20140217/ob-io hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-io
/Users/bernd/.emacs.d/elpa/org-20140217/ob-haskell hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-haskell
/Users/bernd/.emacs.d/elpa/org-20140217/ob-gnuplot hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-gnuplot
/Users/bernd/.emacs.d/elpa/org-20140217/ob-fortran hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-fortran
/Users/bernd/.emacs.d/elpa/org-20140217/ob-exp hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-exp
/Users/bernd/.emacs.d/elpa/org-20140217/ob-eval hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-eval
/Users/bernd/.emacs.d/elpa/org-20140217/ob-emacs-lisp hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-emacs-lisp
/Users/bernd/.emacs.d/elpa/org-20140217/ob-dot hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-dot
/Users/bernd/.emacs.d/elpa/org-20140217/ob-ditaa hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-ditaa
/Users/bernd/.emacs.d/elpa/org-20140217/ob-css hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-css
/Users/bernd/.emacs.d/elpa/org-20140217/ob-core hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-core
/Users/bernd/.emacs.d/elpa/org-20140217/ob-comint hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-comint
/Users/bernd/.emacs.d/elpa/org-20140217/ob-clojure hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-clojure
/Users/bernd/.emacs.d/elpa/org-20140217/ob-calc hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-calc
/Users/bernd/.emacs.d/elpa/org-20140217/ob-C hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-C
/Users/bernd/.emacs.d/elpa/org-20140217/ob-awk hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-awk
/Users/bernd/.emacs.d/elpa/org-20140217/ob-asymptote hides /Applications/Emacs.app/Contents/Resources/lisp/org/ob-asymptote

Features:
(shadow sort gnus-util mail-extr emacsbug message dired format-spec
rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util help-fns mail-prsvr mail-utils info easymenu package time-date
tooltip electric uniquify 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)

Memory information:
((conses 16 83239 6653)
 (symbols 48 18247 0)
 (miscs 40 77 156)
 (strings 32 14002 4505)
 (string-bytes 1 390065)
 (vectors 16 10073)
 (vector-slots 8 373944 6113)
 (floats 8 56 80)
 (intervals 56 215 0)
 (buffers 960 12))





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#17142: 24.4.50; Initial frame geometry on OSX
  2014-03-30  7:36 bug#17142: 24.4.50; Initial frame geometry on OSX Bernd Rellermeyer
@ 2014-03-30 10:51 ` martin rudalics
  2014-03-30 13:46 ` martin rudalics
  1 sibling, 0 replies; 4+ messages in thread
From: martin rudalics @ 2014-03-30 10:51 UTC (permalink / raw
  To: Bernd Rellermeyer, 17142

 > When changing the default font and the height in default-frame-alist,
 > the width is not set correctly.  I have the following lines in the
 > .emacs file:
 >
 > (add-to-list 'default-frame-alist '(font . "Courier-14"))
 > (add-to-list 'default-frame-alist '(height . 71))
 >
 > The default width, which is 80 characters, seems to be evaluated with
 > the default font, which is Monaco-12. Courier-14 is a bit wider, and
 > the initial frame is too narrow (it has only 70 characters per line).
 >
 > When I change my settings to
 >
 > (add-to-list 'default-frame-alist '(font . "Courier-14"))
 > (add-to-list 'default-frame-alist '(width . 80))
 > (add-to-list 'default-frame-alist '(height . 71))
 >
 > everything is fine.  When I change my settings to
 >
 > (add-to-list 'default-frame-alist '(font . "Courier-14"))
 >
 > leaving the height as ist is, the width of 80 characters per line is
 > also set correctly.

Thanks for the report - in particular for the two scenarios where
"everything is fine" or "set correctly".  I found the problem and am
working on a fix.

martin





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#17142: 24.4.50; Initial frame geometry on OSX
  2014-03-30  7:36 bug#17142: 24.4.50; Initial frame geometry on OSX Bernd Rellermeyer
  2014-03-30 10:51 ` martin rudalics
@ 2014-03-30 13:46 ` martin rudalics
       [not found]   ` <C1683582-7B58-49E7-96D9-EE4431F61B76@arcor.de>
  1 sibling, 1 reply; 4+ messages in thread
From: martin rudalics @ 2014-03-30 13:46 UTC (permalink / raw
  To: Bernd Rellermeyer, 17142

[-- Attachment #1: Type: text/plain, Size: 1540 bytes --]

 > When changing the default font and the height in default-frame-alist,
 > the width is not set correctly.  I have the following lines in the
 > .emacs file:

When processing frame parameters we initially recorded the old frame
width first.  The following font change requested by

 > (add-to-list 'default-frame-alist '(font . "Courier-14"))

implicitly enlarged the frame width but the next size change requested
by

 > (add-to-list 'default-frame-alist '(height . 71))

applies the old width recorded initially, discarding the width value
implied by the new font size.


This scenario

 > When I change my settings to
 >
 > (add-to-list 'default-frame-alist '(font . "Courier-14"))
 > (add-to-list 'default-frame-alist '(width . 80))
 > (add-to-list 'default-frame-alist '(height . 71))
 >
 > everything is fine.

doesn't show the problem because it requests a new frame width as well,
so the new value is used instead of the recorded old value.


This scenario

 > When I change my settings to
 >
 > (add-to-list 'default-frame-alist '(font . "Courier-14"))
 >
 > leaving the height as ist is, the width of 80 characters per line is
 > also set correctly.

doesn't show the problem because no explicit change of the frame size is
requested, so none of the old recorded values gets applied.


I checked in a fix on the emacs-24 release branch which will get merged
to trunk sooner or later.  If you are on trunk and want to test the fix
immediately (recommended), please try the attached patch.

Thanks once more for the recipe, martin

[-- Attachment #2: frame.c.diff --]
[-- Type: text/plain, Size: 2737 bytes --]

=== modified file 'src/frame.c'
--- src/frame.c	2014-03-20 14:09:37 +0000
+++ src/frame.c	2014-03-30 13:10:11 +0000
@@ -2795,6 +2795,7 @@
      set them both at once.  So we wait until we've looked at the
      entire list before we set them.  */
   int width, height;
+  bool width_change = 0, height_change = 0;

   /* Same here.  */
   Lisp_Object left, top;
@@ -2810,7 +2811,6 @@
 #ifdef HAVE_X_WINDOWS
   bool icon_left_no_change = 0, icon_top_no_change = 0;
 #endif
-  bool size_changed = 0;
   struct gcpro gcpro1, gcpro2;

   i = 0;
@@ -2844,18 +2844,6 @@
   top = left = Qunbound;
   icon_left = icon_top = Qunbound;

-  /* Provide default values for HEIGHT and WIDTH.  */
-  width = (f->new_width
-	   ? (f->new_pixelwise
-	      ? f->new_width
-	      : (f->new_width * FRAME_COLUMN_WIDTH (f)))
-	   : FRAME_TEXT_WIDTH (f));
-  height = (f->new_height
-	    ? (f->new_pixelwise
-	       ? f->new_height
-	       : (f->new_height * FRAME_LINE_HEIGHT (f)))
-	    : FRAME_TEXT_HEIGHT (f));
-
   /* Process foreground_color and background_color before anything else.
      They are independent of other properties, but other properties (e.g.,
      cursor_color) are dependent upon them.  */
@@ -2897,12 +2885,12 @@

       if (EQ (prop, Qwidth) && RANGED_INTEGERP (0, val, INT_MAX))
         {
-          size_changed = 1;
+	  width_change = 1;
           width = XFASTINT (val) * FRAME_COLUMN_WIDTH (f) ;
         }
       else if (EQ (prop, Qheight) && RANGED_INTEGERP (0, val, INT_MAX))
         {
-          size_changed = 1;
+	  height_change = 1;
           height = XFASTINT (val) * FRAME_LINE_HEIGHT (f);
         }
       else if (EQ (prop, Qtop))
@@ -2989,11 +2977,30 @@

     XSETFRAME (frame, f);

-    if (size_changed
+    if ((width_change || height_change)
         && (width != FRAME_TEXT_WIDTH (f)
             || height != FRAME_TEXT_HEIGHT (f)
             || f->new_height || f->new_width))
-      Fset_frame_size (frame, make_number (width), make_number (height), Qt);
+      {
+	/* If necessary provide default values for HEIGHT and WIDTH.  Do
+	   that here since otherwise a size change implied by an
+	   intermittent font change may get lost as in Bug#17142.  */
+	if (!width_change)
+	  width = (f->new_width
+		   ? (f->new_pixelwise
+		      ? f->new_width
+		      : (f->new_width * FRAME_COLUMN_WIDTH (f)))
+		   : FRAME_TEXT_WIDTH (f));
+
+	if (!height_change)
+	  height = (f->new_height
+		    ? (f->new_pixelwise
+		       ? f->new_height
+		       : (f->new_height * FRAME_LINE_HEIGHT (f)))
+		    : FRAME_TEXT_HEIGHT (f));
+
+	Fset_frame_size (frame, make_number (width), make_number (height), Qt);
+      }

     if ((!NILP (left) || !NILP (top))
 	&& ! (left_no_change && top_no_change)



^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#17142: 24.4.50; Initial frame geometry on OSX
       [not found]   ` <C1683582-7B58-49E7-96D9-EE4431F61B76@arcor.de>
@ 2014-04-07  7:48     ` martin rudalics
  0 siblings, 0 replies; 4+ messages in thread
From: martin rudalics @ 2014-04-07  7:48 UTC (permalink / raw
  To: Bernd Rellermeyer, 17142-done

> I tested the fix in a recent release and found everything ok.
>
> Bernd Rellermeyer

Thanks.  Closing this bug.

martin






^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-04-07  7:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-30  7:36 bug#17142: 24.4.50; Initial frame geometry on OSX Bernd Rellermeyer
2014-03-30 10:51 ` martin rudalics
2014-03-30 13:46 ` martin rudalics
     [not found]   ` <C1683582-7B58-49E7-96D9-EE4431F61B76@arcor.de>
2014-04-07  7:48     ` martin rudalics

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.