[comp.emacs] gnumacs and x windows

ghs@PURDUE.EDU.UUCP (02/19/87)

We've recently brought up gnumacs with HAVE_X_WINDOWS defined and I
have a few questions about the gnumacs and x interface.

1.  What are the advantages of using gnumacs in this way?  The only
one I can see is that it enables you to bind mouse clicks to perform
editing functions.  Although this *is* an advantage, there are some
disadvantages to gnumacs with HAVE_X_WINDOWS defined (2 & 3, below).

2.  Is there any way to get gnumacs to autoraise?  It is annoying to
have autoraise enabled and have the gnumacs window be the only one
that won't autoraise when the mouse pointer is moved to it.  

3.  Is there any way to give geometry specifications to gnumacs when
starting it regarding window size and the position of the icon?

Greg

wohler@SPAM.ISTC.SRI.COM.UUCP (02/20/87)

greg,

  besides the mouse bindings (a big win), it also makes half-screen
  scrolls MUCH faster.

  autoraise is a function of xterm.  if you want to add all of the
  xterm functionality and another meg to the gnuemacs binary, then
  help yourself.  actually, i only have my "main" xterm window
  autoraise--sometimes it can be a hassle to have every window
  autoraise if you're trying to use the information from one window in
  another. 

  yes, you can give geometry specifications for the window.  i've
  already asked to have the icon specification added.  use

	gnuemacs -w =XxY+x+y

						--bw

jr@ALEXANDER.BBN.COM.UUCP (02/20/87)

>> 1.  What are the advantages of using gnumacs in this way?  The only
>> one I can see is that it enables you to bind mouse clicks to perform
>> editing functions.  Although this *is* an advantage, there are some
>> disadvantages to gnumacs with HAVE_X_WINDOWS defined (2 & 3, below).

I think the biggest single advantage is that the server and client may
be different machines, and emacs opens the X connection automatically
for you.  So I can ask for an emacs running on my file server (so I
can do some tool maintenance, say), and it pops up a window back on my
workstation.  Thus, I can have a command alias (or shellscript) of the
form:

  rsh my-server "(setenv TERM xterm; setenv DISPLAY my-works:0; emacs)"

Compare this to starting up a new xterm window and then executing the
rlogin and then running emacs - you avoid the xterm altogether, and
emacs will do a better job at screen updating to boot since it can
skip all the termcap/termlib stuff.

More generally, the following shellscript allows for any X command to
be executed remotely (or any command in background for that matter).

  #!/bin/sh

  case $# in
  [01])  echo "Usage: $0 host x-cmd [args...]";;
  *)		host="$1"; shift
		  xhost "$host"
		  rsh "$host" "(setenv TERM xterm; setenv DISPLAY `hostname`:0; $*)" &
		  ;;
  esac

On autoraise: can't you get close to what you want with appropriate
window manager bindings?  Does require a mouse click, I guess, but is
that too awful?

/jr
jr@bbn.com or jr@bbnccv.uucp

Without life, there wouldn't be chemical companies.