emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Mysterious frame widening


From: Stephen Berman
Subject: Mysterious frame widening
Date: Tue, 05 Jul 2016 11:27:46 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

I'm seeing the Emacs frame widen under peculiar but reliably
reproducible conditions on my machine (running Gnu/Linux) with builds of
Emacs from both the master and emacs-25 branches as well as with Emacs
24.5.  The conditions involve a combination of particular default face
settings (font family and size), loading the Hyperbole package and Gnus.
Since I only noticed this issue after installing Hyperbole, I filed a
bug against that package (#23880 on debbugs.gnu.org), but Hyperbole's
author, Bob Weiner, was unable to reproduce the problem on his system (a
Mac), so I'm hoping someone here can reproduce it and has some idea
about how to debug it; I'm completely at a loss as to how to proceed.  

I can provide a step-by-step recipe, but it's easier to see the issue by
evaluating the attached Lisp sexp.  Before doing that it's necessary to
install Hyperbole; the current version (5.14) can be installed from the
Emacs package manager after adding this repository:

  (add-to-list 'package-archives
               '("RSW-Packages" . "http://www.plasmas.biz/rswe/";) t)

When Hyperbole is installed, start Emacs with -Q, copy the attached sexp
into *scratch*, adjust the load-path addition for Hyperbole as
appropriate, and evaluate the sexp.  (I also tried putting the sexp in a
file and loading that file by starting Emacs with -Q -l, but then the
widening does not happen.)  When I do this, the following lines appear
in *Messages*:

   Emacs started; frame width: 80
   Gnus started; frame width: 80
   Entered Summary buffer; frame width: 80
   Entered Article buffer; frame width: 86
   Point moved to a button; frame width: 86
   Back to Summary buffer; frame width: 88
   Back to button in Article buffer; frame width: 97

The widening in the last step only happens when point is moved to
buttonized text in the Gnus Article buffer (all the lines in the Gnus
Summary buffer are also buttonized).  If I subsequently make the frame
width less than 88, then on making the Gnus Summary buffer current it
widens to 88, and on making the Article buffer current (as long as point
is on a button in that buffer) the frame widens to 97.  (If the frame
width is already wider than 88 or 97, respectively, then making those
buffers current does not shrink the frame's width.)

These results are with the font DejaVu Sans Mono, pixel size 12 (which I
use for the default face in my Emacs).  I tried this test with several
other fonts, and I get the same pattern as the above with the fonts
commented out in the sexp above the dashed line.  With the fonts below
the dashed line, the pattern is different.  With Latin Modern Mono size
12 *Messages* contains these lines:

   Emacs started; frame width: 80
   Gnus started; frame width: 80
   Entered Summary buffer; frame width: 80
   Entered Article buffer; frame width: 100
   Point moved to a button; frame width: 100
   Back to Summary buffer; frame width: 103
   Back to button in Article buffer; frame width: 113

When I set the font to either of the listed DEC Terminal or Sony Fixed
fonts (with size 12), the actually used fonts have pixel size 14 and 16,
respectively, and the frame widens only at the last step (back to button
in Article buffer), to 85.  I also see this pattern with the fonts above
the dashed line when the pixel size is 13 instead of 12; but with Latin
Modern Mono size 13, the pattern is the first one above (i.e., the same
as with size 12 for the fonts above the dashed line).

When I set the font to Misc Fixed size 12, the actually used font has
pixel size 15 and there is no frame widening.  The same holds for the
fonts above the dashed line with pixel size 15: no frame widening.

I also tried the test loading only individual Hyperbole files instead of
the entire package; in three cases (the commented out require lines in
the sexp), this showed frame widening with yet another pattern: here
too, the frame widens only at the last step (back to button in Article
buffer), but to 86 (not 85 as above).

Finally, when I conducted the test manually (which I only did with Deja
Vu Sans Mono size 12 and requiring the entire Hyperbole package),
i.e. stepwise invoking commands to set the font, require the packages,
move between the Gnus buffers, and at each step invoke (frame-width),
the pattern of frame widening was slightly different from the first one
above: 80, 80, 80, 88, 88, 88, 97.

I'd be grateful for any suggestions about how to debug this issue.

Steve Berman

Attachment: bug23880.el
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]