[comp.emacs] Menu bar

darrylo@hpnmxx.sr.hp.com (04/18/91)

> Is there a way to have a permanent menu bar at the top of the screen?
> The menu bar could be invoked by some ctrl-key. 
> 
> Is there a macro package that offers this kind of a menu add-on for
> general emacs editing (so you don't have to remember all those key
> sequences)?

     Use Andy Norman's gnuclient (aka, "gnuserv") package (it's
basically a super-enhanced emacsclient).  The gnuclient package has a
C program, "gnudoit", which allows you to send arbitrary elisp expressions
to a running Emacs program for evaluation.

     How is this relevant to your question?  Well, you can now use your
favorite X-window manager (twm, mwm, olwm, etc.) to have Emacs-specific
pop-up menus -- just execute the "gnudoit" program with the appropriate
arguments.

     -- Darryl Okahata
	UUCP: {hplabs!, hpcea!, hpfcla!} hpnmd!darrylo
	Internet: darrylo%hpnmd@relay.hp.com

DISCLAIMER: this message is the author's personal opinion and does not
constitute the support, opinion or policy of Hewlett-Packard or of the
little green men that have been following him all day.

haydens%bullwinkle@JULIET.LL.MIT.EDU (Hayden Schultz) (04/18/91)

@xn

	
	     How is this relevant to your question?  Well, you can now use your
	favorite X-window manager (twm, mwm, olwm, etc.) to have Emacs-specific
	pop-up menus -- just execute the "gnudoit" program with the appropriate
	arguments.
	
Does anyone have an example of this with olwm?

	Hayden Schultz (haydens@juliet.ll.mit.edu)
	MIT Lincoln Lab
	(617) 981-3685

darrylo@HPNMXX.SR.HP.COM (04/18/91)

> Does anyone have an example of this with olwm?

     I'm afraid that I don't have any olwm examples.  However, here is
an UNTESTED example for twm:

-------------------------------------------------------------------------------
Button1 =      : root    : f.menu "button1"

menu "button1"
{
"Emacs Utilities"	f.title
"-------------"		f.nop
"Read mail"		!"gnudoit '(mh-rmail)' &"
}

-------------------------------------------------------------------------------

This defines a single menu pick called "Read mail", which uses the
Emacs MH facilities to read mail.  It's quite easy to define
hierarchical pop-up menus for Emacs this way.

     Something similar for mwm would be (please, no flames about
non-free software -- I don't have access to olwm, and so I can't give
olwm examples):

-------------------------------------------------------------------------------
Menu emacs_menu
{
    "Root Menu"		f.title
	""		f.separator
    "Read mail"		f.exec "gnudoit '(mh-rmail)' &"
}

#
# Must have a line like the following in .Xdefaults:
#
#	Mwm*buttonBindings:			MainButtonBindings
#
Buttons MainButtonBindings
{
    <Btn1Down>		root				f.menu emacs_menu
    #
    # etc., etc.
    #
}
-------------------------------------------------------------------------------

     All this does assume that you have gnuclient (gnuserv) installed on
your system.

     -- Darryl Okahata
	UUCP: {hplabs!, hpcea!, hpfcla!} hpnmd!darrylo
	Internet: darrylo%hpnmd@relay.hp.com

DISCLAIMER: this message is the author's personal opinion and does not
constitute the support, opinion or policy of Hewlett-Packard or of the
little green men that have been following him all day.