GNU bug report logs - #5736
23.1; Xresource menuBar does not work as advertized

Previous Next

Package: emacs;

Reported by: Tim Landscheidt <tim <at> tim-landscheidt.de>

Date: Thu, 18 Mar 2010 16:06:01 UTC

Severity: normal

Done: Jan Djärv <jan.h.d <at> swipnet.se>

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 5736 in the body.
You can then email your comments to 5736 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5736; Package emacs. (Thu, 18 Mar 2010 16:06:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Tim Landscheidt <tim <at> tim-landscheidt.de>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 18 Mar 2010 16:06:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Tim Landscheidt <tim <at> tim-landscheidt.de>
To: bug-gnu-emacs <at> gnu.org
Subject: 23.1; Xresource menuBar does not work as advertized
Date: Thu, 18 Mar 2010 15:49:56 +0000
Please write in English if possible, because the Emacs maintainers
usually do not have translators to read other languages for them.

Your bug report will be posted to the bug-gnu-emacs <at> gnu.org mailing list,
and to the gnu.emacs.bug news group.

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

Appendix "D.2 Table of X Resources for Emacs" of the Emacs
info manual states that:

| `menuBar' (class `MenuBar')
|      Give frames menu bars if `on'; don't have menu bars if `off'.
|      *Note Lucid Resources::, and *note LessTif Resources::, for how to
|      control the appearance of the menu bar if you have one.

Yet, "on" produces *no* menu bar; you have to use "1" to
enable it. "off" on the other hand works as expected (maybe
silently cast to "0"?).


If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
    `bt full' and `xbacktrace'.
If you would like to further debug the crash, please read the file
/usr/share/emacs/23.1/etc/DEBUG for instructions.


In GNU Emacs 23.1.1 (i386-redhat-linux-gnu, GTK+ Version 2.16.6)
 of 2010-01-14 on x86-01.phx2.fedoraproject.org
Windowing system distributor `The X.Org Foundation', version 11.0.10603901
configured using `configure  '--build=i386-redhat-linux-gnu' '--host=i386-redhat-linux-gnu' '--target=i586-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/var/lib' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--with-dbus' '--with-gif' '--with-jpeg' '--with-png' '--with-rsvg' '--with-tiff' '--with-xft' '--with-xpm' '--with-x-toolkit=gtk' 'build_alias=i386-redhat-linux-gnu' 'host_alias=i386-redhat-linux-gnu' 'target_alias=i586-redhat-linux-gnu' 'CFLAGS=-DMAIL_USE_LOCKF -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i586 -mtune=generic -fasynchronous-unwind-tables''

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: de_DE.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default-enable-multibyte-characters: t

Major mode: Org

Minor modes in effect:
  delete-selection-mode: t
  pc-selection-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
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
Not applicable.

Recent messages:
Not applicable.





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5736; Package emacs. (Sat, 20 Mar 2010 12:43:02 GMT) Full text and rfc822 format available.

Message #8 received at 5736 <at> debbugs.gnu.org (full text, mbox):

From: Jan Djärv <jan.h.d <at> swipnet.se>
To: Tim Landscheidt <tim <at> tim-landscheidt.de>
Cc: 5736 <at> debbugs.gnu.org
Subject: Re: bug#5736: 23.1; Xresource menuBar does not work as advertized
Date: Sat, 20 Mar 2010 13:42:10 +0100
Tim Landscheidt skrev:
> Please write in English if possible, because the Emacs maintainers
> usually do not have translators to read other languages for them.
> 
> Your bug report will be posted to the bug-gnu-emacs <at> gnu.org mailing list,
> and to the gnu.emacs.bug news group.
> 
> Please describe exactly what actions triggered the bug
> and the precise symptoms of the bug:
> 
> Appendix "D.2 Table of X Resources for Emacs" of the Emacs
> info manual states that:
> 
> | `menuBar' (class `MenuBar')
> |      Give frames menu bars if `on'; don't have menu bars if `off'.
> |      *Note Lucid Resources::, and *note LessTif Resources::, for how to
> |      control the appearance of the menu bar if you have one.
> 
> Yet, "on" produces *no* menu bar; you have to use "1" to
> enable it. "off" on the other hand works as expected (maybe
> silently cast to "0"?).
> 

The documentation has stated this a long time, but it has never been true. 
The code expects a number, and 0 is off, anuthing else is on.

There is also a mention of the resource menuBarLines that doesn't exist, it 
was renamed to menuBar in 1994.  I guess that is where the 1 and 0 comes from.

It is easy to fix, but as 23.2 is approaching, I guess the Emacs maintainers 
must give their Ok.

	Jan D.






Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5736; Package emacs. (Sat, 20 Mar 2010 19:49:01 GMT) Full text and rfc822 format available.

Message #11 received at 5736 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Jan Djärv <jan.h.d <at> swipnet.se>
Cc: 5736 <at> debbugs.gnu.org, Tim Landscheidt <tim <at> tim-landscheidt.de>
Subject: Re: bug#5736: 23.1; Xresource menuBar does not work as advertized
Date: Sat, 20 Mar 2010 15:48:50 -0400
> It is easy to fix, but as 23.2 is approaching, I guess the Emacs maintainers
> must give their Ok.

I'd need to see the patch first,


        Stefan







Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5736; Package emacs. (Sun, 21 Mar 2010 07:36:01 GMT) Full text and rfc822 format available.

Message #14 received at 5736 <at> debbugs.gnu.org (full text, mbox):

From: Jan Djärv <jan.h.d <at> swipnet.se>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 5736 <at> debbugs.gnu.org, Tim Landscheidt <tim <at> tim-landscheidt.de>
Subject: Re: bug#5736: 23.1; Xresource menuBar does not work as advertized
Date: Sun, 21 Mar 2010 08:35:38 +0100
Stefan Monnier skrev:
>> It is easy to fix, but as 23.2 is approaching, I guess the Emacs maintainers
>> must give their Ok.
> 
> I'd need to see the patch first,
> 


=== modified file 'doc/emacs/ChangeLog'
--- doc/emacs/ChangeLog	2010-03-06 19:02:49 +0000
+++ doc/emacs/ChangeLog	2010-03-20 12:35:25 +0000
@@ -1,3 +1,10 @@
+2010-03-20  Jan Djärv  <jan.h.d <at> swipnet.se>
+
+	* xresources.texi (Table of Resources): Clarify toolBar number
+	for Gtk+.
+
+	* frames.texi (Menu Bars): menuBarLines => menuBar (bug#5736).
+
 2010-03-06  Chong Yidong  <cyd <at> stupidchicken.com>

 	* custom.texi (Init Examples): Add xref to Locals.

=== modified file 'doc/emacs/frames.texi'
--- doc/emacs/frames.texi	2010-03-02 22:56:36 +0000
+++ doc/emacs/frames.texi	2010-03-20 12:23:03 +0000
@@ -957,7 +957,7 @@
 With no argument, this command toggles Menu Bar mode, a
 minor mode.  With an argument, the command turns Menu Bar mode on if the
 argument is positive, off if the argument is not positive.  You can use
-the X resource @samp{menuBarLines} to control the initial setting of
+the X resource @samp{menuBar} to control the initial setting of
 Menu Bar mode.  @xref{Resources}.

 @kindex C-Mouse-3 @r{(when menu bar is disabled)}

=== modified file 'doc/emacs/xresources.texi'
--- doc/emacs/xresources.texi	2010-01-13 08:35:10 +0000
+++ doc/emacs/xresources.texi	2010-03-20 12:34:59 +0000
@@ -307,12 +307,14 @@
 @item @code{toolBar} (class @code{ToolBar})
 @cindex tool bar
 Number of lines to reserve for the tool bar.  A zero value suppresses
-the tool bar.  If the value is non-zero and
-@code{auto-resize-tool-bars} is non-@code{nil}, the tool bar's size
-will be changed automatically so that all tool bar items are visible.
+the tool bar.  For the Emacs tool bar (i.e. not Gtk+), if the value is
+non-zero and @code{auto-resize-tool-bars} is non-@code{nil}, the tool bar's
+size will be changed automatically so that all tool bar items are visible.
   If the value of @code{auto-resize-tool-bars} is @code{grow-only},
 the tool bar expands automatically, but does not contract automatically.
 To contract the tool bar, you must redraw the frame by entering @kbd{C-l}.
+For the Gtk+ tool bar, any non-zero value means on and
+@code{auto-resize-tool-bars} has no effect.

 @item @code{useXIM} (class @code{UseXIM})
 @cindex XIM

=== modified file 'src/ChangeLog'
--- src/ChangeLog	2010-03-20 03:37:39 +0000
+++ src/ChangeLog	2010-03-20 12:39:51 +0000
@@ -1,3 +1,11 @@
+2010-03-20  Jan Djärv  <jan.h.d <at> swipnet.se>
+
+	* frame.c (x_get_arg): Handle RES_TYPE_BOOLEAN_NUMBER (bug #5736).
+
+	* xfns.c (Fx_create_frame): Make menuBar a RES_TYPE_BOOLEAN_NUMBER.
+
+	* dispextern.h (resource_types): RES_TYPE_BOOLEAN_NUMBER is new.
+
 2010-03-20  YAMAMOTO Mitsuharu  <mituharu <at> math.s.chiba-u.ac.jp>

 	* xfns.c (Fx_create_frame) [USE_LUCID]: Add BLOCK_INPUT around

=== modified file 'src/dispextern.h'
--- src/dispextern.h	2010-02-19 13:57:53 +0000
+++ src/dispextern.h	2010-03-20 12:35:41 +0000
@@ -3122,7 +3122,8 @@
   RES_TYPE_FLOAT,
   RES_TYPE_BOOLEAN,
   RES_TYPE_STRING,
-  RES_TYPE_SYMBOL
+  RES_TYPE_SYMBOL,
+  RES_TYPE_BOOLEAN_NUMBER
 };

 extern Lisp_Object x_get_arg P_ ((Display_Info *, Lisp_Object,

=== modified file 'src/frame.c'
--- src/frame.c	2010-01-29 19:02:02 +0000
+++ src/frame.c	2010-03-20 12:29:04 +0000
@@ -4005,6 +4005,13 @@
 	    case RES_TYPE_NUMBER:
 	      return make_number (atoi (SDATA (tem)));

+	    case RES_TYPE_BOOLEAN_NUMBER:
+	      if (!strcmp (SDATA (tem), "on")
+		  || !strcmp (SDATA (tem), "true"))
+		return make_number (1);
+	      return make_number (atoi (SDATA (tem)));
+              break;
+
 	    case RES_TYPE_FLOAT:
 	      return make_float (atof (SDATA (tem)));


=== modified file 'src/xfns.c'
--- src/xfns.c	2010-03-20 03:37:39 +0000
+++ src/xfns.c	2010-03-20 12:29:12 +0000
@@ -3418,7 +3418,7 @@
   init_frame_faces (f);

   x_default_parameter (f, parms, Qmenu_bar_lines, make_number (1),
-		       "menuBar", "MenuBar", RES_TYPE_NUMBER);
+		       "menuBar", "MenuBar", RES_TYPE_BOOLEAN_NUMBER);
   x_default_parameter (f, parms, Qtool_bar_lines, make_number (1),
 		       "toolBar", "ToolBar", RES_TYPE_NUMBER);
   x_default_parameter (f, parms, Qbuffer_predicate, Qnil,



	Jan D.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5736; Package emacs. (Mon, 22 Mar 2010 01:46:02 GMT) Full text and rfc822 format available.

Message #17 received at 5736 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Jan Djärv <jan.h.d <at> swipnet.se>
Cc: 5736 <at> debbugs.gnu.org, Tim Landscheidt <tim <at> tim-landscheidt.de>
Subject: Re: bug#5736: 23.1; Xresource menuBar does not work as advertized
Date: Sun, 21 Mar 2010 21:45:37 -0400
>>> It is easy to fix, but as 23.2 is approaching, I guess the Emacs
>>> maintainers must give their Ok.
>> I'd need to see the patch first,

That looks OK, feel free to install it on the emacs-23 branch,


        Stefan




Reply sent to Jan Djärv <jan.h.d <at> swipnet.se>:
You have taken responsibility. (Mon, 22 Mar 2010 07:32:01 GMT) Full text and rfc822 format available.

Notification sent to Tim Landscheidt <tim <at> tim-landscheidt.de>:
bug acknowledged by developer. (Mon, 22 Mar 2010 07:32:02 GMT) Full text and rfc822 format available.

Message #22 received at 5736-done <at> debbugs.gnu.org (full text, mbox):

From: Jan Djärv <jan.h.d <at> swipnet.se>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 5736-done <at> debbugs.gnu.org, Tim Landscheidt <tim <at> tim-landscheidt.de>
Subject: Re: bug#5736: 23.1; Xresource menuBar does not work as advertized
Date: Mon, 22 Mar 2010 08:31:15 +0100
Stefan Monnier skrev:
>>>> It is easy to fix, but as 23.2 is approaching, I guess the Emacs
>>>> maintainers must give their Ok.
>>> I'd need to see the patch first,
> 
> That looks OK, feel free to install it on the emacs-23 branch,
> 

Done.

	Jan D.





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 19 Apr 2010 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 15 years and 68 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.