Subject: RE: bug#16028: 24.3.50; Latest build completely breaks my thumnail frames code

From: Drew Adams <[email-masked]>
Date: Wed, 11 Dec 2013 20:27:25 -0800 (PST)

>  > Switch the order of the two calls to `modify-frame-parameters'
>  > and the bug is manifested again.
> 
> Yes.  As a rule always resize the frame last.

FWIW/FYI: I was hoping that that might be a simple solution to my
problem. I tried switching the order, doing the other frame changes
before shrinking or enlarging the font.

Unfortunately, that did not work at all.  It made a big mess, in
all Emacs versions.  For one thing, each shrinking/enlargement
magnified the scale of zoom out/in over the previous one.

I.e., each shrinking/enlargement was greater than the
enlargement/shrinking that immediately preceded it (not just
greater than the last shrinking/enlargement).

You can see this easily in emacs -Q by (loading frame-fns.el,
then frame-cmds.el, then) loading thumb-frm.el but with the calls
to `enlarge-font' moved after the `modify-frame-parameters' calls.

E.g., for thumbify:

(when tf-params (modify-frame-parameters frame tf-params))
(when thumfr-next-stack-xoffset
  (set-frame-position frame thumfr-next-stack-xoffset
                      thumfr-next-stack-yoffset)
  (setq thumfr-next-stack-xoffset  nil
        thumfr-next-stack-yoffset  nil))
(modify-frame-parameters frame thumfr-frame-parameters)
;; Trying this last, not first.
(enlarge-font (- thumfr-font-difference) frame)

And for dethumbify:

(modify-frame-parameters frame non-tf-params)
;; Trying this last, not first.
(enlarge-font thumfr-font-difference frame)

I had to quickly revert to the regular code I use, which calls
`enlarge-font' first, not last.