[net.emacs] gnu-emacs on Suns

dsn@mimsy.umd.edu (09/12/86)

From: Dana S. Nau <dsn@mimsy.umd.edu>

I'm trying out gnu emacs and have a couple of questions:

(1) How do I get it to recognize the meta-key on Sun workstations and on
Ann Arbor Ambassador terminals?  I have an impression that it ought to be
able to do that, but I haven't been able to get it to work.

(2) Is there any way to get it to respond to the Sun mouse keys?  (Such an
ability does exist on a locally-modified version of Unipress emacs.  I suspect
that gnu emacs does not have this ability, but I thought I'd check to make
sure).

Thanks!

sdl@MITRE-BEDFORD.ARPA (Litvintchouk) (09/14/86)

>   (1) How do I get it to recognize the meta-key on Sun workstations and on
>   Ann Arbor Ambassador terminals?  I have an impression that it ought to be
>   able to do that, but I haven't been able to get it to work.

On Sun workstations, we have been able to get the "left" and "right"
shift keys to be recognized as meta keys, by
setting the variable  meta-flag  to  t     as follows:
      (setq meta-flag t)

Here's the documentation for that variable:

Documentation:
*Non-nil means treat 0200 bit in terminal input as Meta bit.


>   (2) Is there any way to get it to respond to the Sun mouse keys?
>   (Such an ability does exist on a locally-modified version of Unipress
>   emacs.  I suspect that gnu emacs does not have this ability, but I
>   thought I'd check to make sure).

I don't know of any easy way to do this.  On Sun 3's, mouse (and other
such events) are fielded by the Notifier; it seems you would need to
write some additional initialization code for Emacs that would tell
the Notifier to inform Emacs when a mouse key was pressed in the
window that Emacs was running in.


Steven Litvintchouk
MITRE Corporation
Burlington Road
Bedford, MA  01730
(617)271-7753

ARPA:  sdl@mitre-bedford
UUCP:  ...{cbosgd,decvax,genrad,ll-xn,philabs,security,utzoo}!linus!sdl

ralphw@ius2.cs.cmu.edu (Ralph Hyre) (09/17/86)

In article <8609141639.AA28389@mitre-bedford.ARPA> sdl@MITRE-BEDFORD.ARPA (Litvintchouk) writes:
>I don't know of any easy way to do this.  On Sun 3's, mouse (and other
>such events) are fielded by the Notifier; it seems you would need to
>write some additional initialization code for Emacs that would tell
>the Notifier to inform Emacs when a mouse key was pressed in the
>window that Emacs was running in.

Someone here at CMU has hacked up a version of shelltool which detects
mouse events and posts the appropriate key-down events to the shell
window.  (This is called an Interposer in Sun terminology.)  It talks
to Gosling's Emacs, but should be easily portable to other Emacses.
I'll see if the author's interested in posting diffs to the net.

[Currently you need sources to the shelltool (shelltool.c) - a 
standalone program which wouldn't need Sun sources is another possibility.]
-- 
					- Ralph W. Hyre, Jr.

Internet: ralphw@ius2.cs.cmu.edu    Phone: (412) 268-2847 [CMU-BUGS], 268-3275 
Amateur Radio: KA3PLY (c/o W3VC, CMU Radio Club) [packet mailbox coming soon!]
Fido: Ralph Hyre at Pitt-Net [don't log in very often]

wohler@sri-spam.ARPA (Bill Wohler) (09/18/86)

instead of modifying suntools to utilize the meta-keys you
could also add a sun-specific terminal driver for gnuemacs
which uses the "left" and "right" keys as meta-keys, gives
you cursor, menu, and mouse control, uses sun's graphics to
display the characters (makes scrolling much faster).

this code was written by david l. kashtan at SRI's ai center
and has been working well for us for half a year now.  i
heard rumors that this code should be appearing in version
18 of gnuemacs, but perhaps rms can help us out there.

i assume that the code has the same copyright requirements
as rms' code, but i might stand to be corrected.

i have a tar file of the original code, but we have modified
it to make use of the menuing and character selection
abilities, and made a few enhancements.  i could make a tar
file of the enhancements as well.  the code's size stands a
hair under 200k bytes.  if there is enough interest in this
code, i'll try to make it available for ftp or uucp
transfer.

questions, requests to wohler@sri-spam.arpa.

						--bw

wohler@sri-spam.ARPA (Bill Wohler) (09/30/86)

ahh, the sun terminal driver seems quite popular.  anyway,
i've finally got the code available for anonymous ftp.
we're at spam.istc.sri.com or sri-spam.arpa if you don't
update your host tables often.  the files are in
pub/gnuemacs-sun.  i've included the file
pub/gnuemacs-sun/NOTES below to whet your appetite.

i might be able to arrange for a uucp link or send a 1600
bpi tar tape out if necessary.  we can negotiate the details
over email.


					--bw

wohler@spam.istc.sri.com


	----- pub/gnuemacs-sun/NOTES follows -----
Okay, we've finally made public David Kashtan's code for
utilizing the sun's graphics to make gnuemacs better on  the
sun.  Included in this directory are two tar files:
gnuemacs-sun.tar which is David's original work, and
gnuemacs-sun.tar2 which contains the contributions of Eric
Negaard and myself to the gnuemacs sun driver.

There is one bug that you'll notice right away.  The driver
fixes damage when it feels like it is a good time to do so.
Therefore, some sigwinches are ignored, which leaves parts
of old windows on the emacs window.  No biggie--refresh the
window.

Bugs aside, here are the benefits of our updates.  Some are
fixes, others take advantage of David's code.

Additions:
	o You can select regions of text as in Shelltool;
	   however, the selected region is not displayed in
	   reverse video.
	o You can use the "Stuff" utility that you have in
	   Shelltool.

Fixes:
	o Windows redraw faster.
	o When damage is exposed, the old package redrew the
	   entire window.  This has been fixed.
	o Hourglass icon data repaired.

From the site-init.el file:
	o You can select a window by clicking the left
	   mouse button when the mouse cursor is in the
	   desired window.  Cursor is moved to the position
	   of the mouse cursor, so that your location in the
	   same buffer can be selected this way as well.
	o The "left" and "right" keys serve as meta keys.

Further improvements, or things I'd like to see:

	o Read from the .ttyswrc file like shelltool does so
	   that function keys can be used for operations
	   such as expose, hide and close window.

	o Incorporate the icon that comes with the package.


Since Eric and I have not yet been blessed with Sun 3s, we haven't
ported this code yet.   

So, enjoy!  Please mail back any diffs of your fixes, mods,
or Sun 3 ports so that we can get a smooth package to send
to rms for possible inclusion in future release.

Bill Wohler / Eric Negaard