Sync to HEAD
[bpt/emacs.git] / etc / emacstool.1
CommitLineData
a7bfd66f
DL
1.TH EMACSTOOL 1
2.SH NAME
3.I emacstool
4\- run emacs under Sun windows with function-key and mouse support.
5.SH SYNOPSIS
6.I emacstool
7[{window_args} {-rc run_command_path} args ... ]
8.SH TYPICAL USAGE
9In ~/.suntools or ~/.rootmenu include a line like this:
10.br
11"Emacstool" emacstool -WI emacs.icon -f emacstool-init
12.SH DESCRIPTION
13.B Emacstool
14creates a SunView frame and a tty subwindow within which mouse events
15and function keys are translated to ASCII sequences which Emacs can
16parse. The translated input events are sent to the process running in
17the tty subwindow, which is typically GNU Emacs. Emacstool thereby
18allows GNU Emacs users to make full use of the mouse and function keys.
19GNU Emacs can be loaded with functions to interpret the mouse and
20function-key events to make a truly fine screen oriented editor for
21the Sun Workstation.
22.PP
23(Note that GNU Emacs has a special interface to the X window system as
24well. The X window system has many technical advantages, it is an
25industry standard, and it is also free software. The Free Software
26Foundation urges you to try X windows, and distributes a free copy of
27X on Emacs distribution tapes.)
28.PP
29Function keys are translated to a sequence of the form
30`^X*[a-o][lrt]'. The last character is `l', `r', or `t' corresponding
31to whether the key is among the Left, Right, or Top function keys.
32The third character indicates which button of the group
33was pressed. Thus, the function key in the lower right corner will
34transmit the sequence `^X*or'. In addition, the [lrt] is affected by
35the Control, Meta, and Shift keys. Unshifted Control keys will be
36non-alphabetic: C-l is [,], C-r is [2], C-t is [4].
37.PP
38Mouse buttons are encoded as `^X^@([124] x y)\\n'. ^X^@ is the
39standard GNU Emacs mouse event prefix, it is followed by a list
40indicating the button pressed and the character row and column of the
41point in the window where the mouse cursor is, and followed by a
42newline character. In GNU Emacs, the ^X^@ dispatches to a
43mouse event handler which then reads the following list.
44.SH OPTIONS
45.B Emacstool
46supports all the standard window arguments, including font and icon
47specifiers.
48.PP
49By default, Emacstool runs the program
50.I emacs
51in the created subwindow.
52The value of the environment variable
53.I EMACSTOOL
54can be used to override this if your version of
55.B Emacs
56is not accessible on your search path by the name
57.I Emacs.
58In addition, the run command can be set by the
59.I pathname
60following the last occurrence of the
61.I \-rc
62flag.
63This is convenient for using Emacstool to run on remote machines.
64.PP
65All other command line arguments not used by the window system are passed
66as arguments to the program that runs in the Emacstool window.
67.PP
68For example:
69.PP
70local% (emacstool -rc rlogin remote -8 &)&
71.PP
72will create an Emacstool window logged in to a machine named
73.I remote.
74If Emacs is run from this window,
75Emacstool will encode mouse and function keys, and send them to rlogin.
76If Emacs is run from this shell on the remote machine, it will see
77the mouse and function keys properly.
78However, since the remote host does not have access to the screen,
79the cursor cannot be changed, menus will not appear, and the selection
80buffer (STUFF) is limited.
81.SH Using With GNU Emacs:
82The GNU Emacs files
83lisp/term/sun.el,
84lisp/sun-mouse.el,
85lisp/sun-fns.el,
86and
87src/sunfns.c
88provide emacs support for the Emacstool and function keys.
89Emacstool will automatically set the TERM environment variable to be "sun"
90and unset the environment variable TERMCAP. That is, these variables will
91not be inherited from the shell that starts Emacstool.
92Since the terminal type is
93.I SUN
94(that is, the environment variable TERM is set to
95.I SUN),
96Emacs will automatically load the file lisp/term/sun.
97This, in turn, will ensure that sun-mouse.el is autoloaded when any mouse
98events are detected. It is suggested that
99.I sun-mouse
100and
101.I sun-fns
102be loaded in your site-init.el file, so that they will always be loaded
103when running on a Sun workstation.
104.PP
105In addition, Emacstool sets the environment variable IN_EMACSTOOL = "t".
106Lisp code in your ~/.emacs can use (getenv "IN_EMACSTOOL")
107to determine whether to do Emacstool specific initialization.
108Sun.el uses this to automatically call emacstool-init (getenv "IN_EMACSTOOL")
109is defined.
110.PP
111The file src/sunfns.c defines several useful functions for emacs on
112the Sun. Among these are procedures to pop-up SunView
113.I menus,
114put and get from the SunView
115.I STUFF
116buffer, and a procedure for changing the cursor
117.I icon.
118If you want to define or edit cursor icons,
119there is a rudimentary mouse driven icon editor in the file
120lisp/sun-cursors.el. Try invoking (sc:edit-cursor)
121.SH BUGS
122It takes a few milliseconds to create a menu before it pops up.
123.SH ENVIRONMENT VARIABLES
124EMACSTOOL
125IN_EMACSTOOL
126TERM
127TERMCAP
128.SH FILES
129.DT
130emacs
131.SH "SEE ALSO"
132emacs(1)
133 .../etc/SUN-SUPPORT
134 .../lisp/term/sun.el
42ec1588
EZ
135.SH COPYING
136Copyright
137.if t \(co
138.if n (c)
1392001 Free Software Foundation, Inc.
140.PP
8ea8cbd3
EZ
141Permission is granted to make and distribute verbatim copies of this
142document provided the copyright notice and this permission notice are
143preserved on all copies.
42ec1588 144.PP
8ea8cbd3
EZ
145Permission is granted to copy and distribute modified versions of
146this document under the conditions for verbatim copying, provided that
147the entire resulting derived work is distributed under the terms of
148a permission notice identical to this one.
149.PP
150Permission is granted to copy and distribute translations of this
151document into another language, under the above conditions for
152modified versions, except that this permission notice may be stated
153in a translation approved by the Free Software Foundation.
6b61353c
KH
154
155.\" arch-tag: a1f44815-5163-4026-89c1-4404e4b81d37