bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#12406: 24.2.50; frame parameter `menu-bar-lines' and `menu-bar-mode'


From: Drew Adams
Subject: bug#12406: 24.2.50; frame parameter `menu-bar-lines' and `menu-bar-mode'
Date: Mon, 10 Sep 2012 10:59:22 -0700

emacs -Q
 
(setq special-display-frame-alist '((menu-bar-lines . 1))
      special-display-regexps     '("[ ]?[*][^*]+[*]"))
(menu-bar-mode 0)
(describe-variable 'menu-bar-mode)
 
You will see that:
 
* Buffer *Help* is displayed in its own frame.
* It says that menu-bar-mode is nil (which it is).
* The frame has a menu bar.
 
I'm not sure what should be done about this, but it is confusing, at the
least.  When the mode is disabled the menu bar is (generally) not
supposed to be present.  Command `menu-bar-mode' "applies to all frames
that exist and frames to be created in the future."  That strong
statement certainly does not match not the behavior in this case.
 
Of course, someone will argue, correctly, that when frame *Help* is
created that is done with an explicit `menu-bar-lines' setting, which
should override the mode behavior.  That's why I say that I'm not sure
what, if anything, should be done about this.  But the behavior is a bit
confusing.
 
I don't have any great suggestion.  Perhaps something more could be done
wrt the doc, at least.  For example, the doc string of the mode command
could perhaps mention the frame parameter, and vice versa, explaining
that the mode is overridden by the frame parameter.  The doc for
`menu-bar-mode' should perhaps not claim so strongly that it affects
all future frames, since that is clearly not so.
 
 
FYI -
 
This came up because I received a bug report that actually had to do
with the VERY OLD bug that trying to enlarge a frame with a wide menu
bar actually shrinks the frame (horizontally, vertically).
 
Suspecting that old bug, I tried to get a repro recipe.  The user turned
off menu-bar-mode as shown above, but the symptom persisted.  The user
didn't tell me that a menu bar was actually present, so it took a while
to figure out what the problem really was.
 
That OLD bug has never been fixed, though Emacs Dev has expressed a will
to fix it at various times.
 
Here are some references to this old bug:
 
1. Bug #456.
 
2. emacs-devel thread in 2006-06 and 2007-07: "frame parameter
   menu-bar-lines changes height of frame".
 
There were also older discussions than that, but I don't have pointers
to them.

I, for one, would like to see that old bug fixed.  I, like some others,
use keys to incrementally enlarge/shrink frames horizontally/vertically,
and whenever the frame width is less than the menu-bar width, the bug
rears its ugly head.
 
It is my wish that that longstanding bug be taken off the wishlist and
treated normally - and hopefully fixed finally.
 
In GNU Emacs 24.2.50.1 (i386-mingw-nt5.1.2600)
 of 2012-09-02 on MARVIN
Bzr revision: 109861 eggert@cs.ucla.edu-20120902171035-7mzihil3xd6bjfiy
Windowing system distributor `Microsoft Corp.', version 5.1.2600
Configured using:
 `configure --with-gcc (4.6) --no-opt --enable-checking --cflags
 -ID:/devel/emacs/libs/libXpm-3.5.8/include
 -ID:/devel/emacs/libs/libXpm-3.5.8/src
 -ID:/devel/emacs/libs/libpng-dev_1.4.3-1/include
 -ID:/devel/emacs/libs/zlib-dev_1.2.5-2/include
 -ID:/devel/emacs/libs/giflib-4.1.4-1/include
 -ID:/devel/emacs/libs/jpeg-6b-4/include
 -ID:/devel/emacs/libs/tiff-3.8.2-1/include
 -ID:/devel/emacs/libs/gnutls-3.0.9/include
 -ID:/devel/emacs/libs/libiconv-1.13.1-1-dev/include
 -ID:/devel/emacs/libs/libxml2-2.7.8/include/libxml2'
 






reply via email to

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