GOAL
----
-The goal of this branch is to implement support for opening multiple,
-different tty devices and simultaneous X and tty frames from a single
-Emacs session.
+This branch implements support for opening multiple, different tty
+devices and simultaneous X and tty frames from a single Emacs session.
Some use cases:
Emacs is notoriously slow at startup, so most people use another
Comments, bug reports, suggestions and patches are welcome; send them
to multi-tty@lists.fnord.hu.
+The following is a (sadly incomplete) list of people who have
+contributed to the project by testing, submitting patches, bug
+reports, and suggestions. Thanks!
+
+ARISAWA Akihiro <ari at mbf dot ocn dot ne dot jp>
+Vincent Bernat <bernat at luffy dot cx>
+Han Boetes <han at mijncomputer dot nl>
+Robert J. Chassell <bob at rattlesnake dot com>
+Romain Francoise <romain at orebokech dot com>
+Ami Fischman <ami at fischman dot org>
+Friedrich Delgado Friedrichs <friedel at nomaden dot org>
+IRIE Tetsuya <irie at t dot email dot ne dot jp>
+Yoshiaki Kasahara <kasahara at nc dot kyushu-u dot ac dot jp>
+Jurej Kubelka <Juraj dot Kubelka at email dot cz>
+David Lichteblau <david at lichteblau dot com>
+Xavier Mallard <zedek at gnu-rox dot org>
+Istvan Marko <mi-mtty at kismala dot com>
+Ted Morse <morse at ciholas dot com>
+Dan Nicolaescu <dann at ics dot uci dot edu>
+Gergely Nagy <algernon at debian dot org>
+Mark Plaksin <happy at mcplaksin dot org>
+Francisco Borges <borges at let dot rug dot nl>
+Frank Ruell <stoerte at dreamwarrior dot net>
+Dan Waber <dwaber at logolalia dot com>
+and many others.
+
+Richard Stallman was kind enough to review an earlier version of my
+patches.
+
+
MAILING LISTS
-------------
frames. It has been changed open new Emacs frames by default.
The multi-tty branch has been scheduled for inclusion in the next
-major release of Emacs (version 22). I expect the merge into the
+major release of Emacs (version 23). I expect the merge into the
development trunk to occur sometime during next year (2005), after the
merge of the Unicode branch.
Known problems:
- * Mac, Windows and DOS support is broken, probably doesn't
- even compile -- this will be solved later.
+ * GTK support. If you compile your Emacs with the GTK
+ toolkit, some functionality of multi-tty will be lost.
+ Current releases of GTK have limitations and bugs that
+ prevent full-blown multi-display support in Emacs. Use the
+ Lucid toolkit if you want to see a complete feature set.
+
+ * The single-kboard mode.
+
+ If your multi-tty Emacs session seems to be frozen, you
+ probably have a recursive editing session or a pending
+ minibuffer prompt (which is a kind of recursive editing) on
+ another display. To unfreeze your session, switch to that
+ display and complete the recursive edit, for example by
+ pressing C-] (`abort-recursive-edit').
+
+ I am sorry to say that currently there is no way to break
+ out of this "single-kboard mode" from a frozen display. If
+ you are unable to switch to the display that locks the
+ others (for example because it is on a remote computer),
+ then you can use emacsclient to break out of all recursive
+ editing sessions:
+
+ emacsclient -e '(top-level)'
+
+ Note that this (perhaps) unintuitive behaviour is by design.
+ Single-kboard mode is required because of an intrinsic Emacs
+ limitation that is very hard to eliminate. (This limitation
+ is related to the single-threaded nature of Emacs.)
+
+ I plan to implement better user notification and support for
+ breaking out of single-kboard mode from locked displays.
+
+ * Mac, Windows and DOS support is broken, doesn't even
+ compile. Multiple display support will probably not provide
+ new Emacs features on these systems, but the multi-tty
+ branch changed a few low-level interfaces, and the
+ system-dependent source files need to be adapted
+ accordingly. The changes are mostly trivial, so almost
+ anyone can help, if only by compiling the branch and
+ reporting the compiler errors. (It is not worth to do this
+ yet, though.)
+
HOW TO GET THE BRANCH
---------------------
Retrieving the latest version of the branch:
- tla register-archive http://lorentey.hu/arch/2004/
+ tla register-archive -f http://lorentey.hu/arch/2004/
tla get lorentey@elte.hu--2004/emacs--multi-tty <directory>
This incantation uses my private archive mirror that is hosted on a
relatively low-bandwidth site; if you are outside Hungary, you will
-probably want to you use the Arch supermirror instead:
+probably want to you use my secondary mirror: (Note that the -f option
+will overwrite the archive location if you have previously registered
+the Hungarian one.)
+
+ tla register-archive -f http://aszt.inf.elte.hu/~lorentey/mirror/arch/2004
+ tla get lorentey@elte.hu--2004/emacs--multi-tty <directory>
+
+ http://aszt.inf.elte.hu/~lorentey/mirror/arch/2004
+
+The Arch supermirror provides mirroring services for all public Arch
+repositories. We have a mirror there, too, if you prefer.
- tla register-archive http://mirrors.gnuarch.org/lorentey@elte.hu--2004/
+ tla register-archive -f http://mirrors.sourcecontrol.net/lorentey%40elte.hu--2004
tla get lorentey@elte.hu--2004/emacs--multi-tty <directory>
-(I use a recent tla development snapshot, but any of the released
-versions of arch will do fine, I think.) My GPG key id is 0FB27A3F;
-it is available from hkp://wwwkeys.eu.pgp.net/, or my homepage at
+My GPG key id is 0FB27A3F; it is available from
+hkp://wwwkeys.eu.pgp.net/, or from my homepage at
http://lorentey.hu/rolam/gpg.html)
-To update your source tree to the latest revision after the first
-checkout, simply use the following command:
+Don't worry if the above checkout takes a few minutes to complete;
+once you have a source tree, updating it to the latest revision will
+be _much_ faster. Use the following command for the update:
- tla replay lorentey@elte.hu--2004/emacs--multi-tty--0
+ tla replay
-If you are interested, you can find more information about Arch on
-http://wiki.gnuarch.org/. It's a wonderful source control system, I
-highly recommend it.
+You can find more information about Arch on http://wiki.gnuarch.org/.
+It's a wonderful source control system, I highly recommend it.
If you don't have tla, the branch has a homepage from which you can
download conventional patches against Emacs CVS HEAD:
http://lorentey.hu/project/emacs.html
+DEBIAN PACKAGES
+---------------
+
+If you run Debian, or a distribution based on Debian, you are welcome
+to use our binary packages; put these lines in your /etc/apt/sources.list:
+
+ # Multi-tty Emacs
+ deb http://aszt.inf.elte.hu/~lorentey/mirror/apt ./
+ deb-src http://aszt.inf.elte.hu/~lorentey/mirror/apt ./
+
+Note that these packages are intended solely to provide an easy way to
+test the new multi-tty features. They are not to be taken as Emacs
+releases, and it's a mistake to expect robust operation or any kind of
+timely support for them. Do not install them, unless you'd like to
+have your editor crash on you.
+
COMPILATION
-----------
behave the same way as in previous Emacs versions. If you exit emacs,
all terminals should be restored to their previous states.
-This is work in progress, and probably full of bugs. You should
-always run emacs from gdb, so that you'll have a live instance to
-debug if something goes wrong. Please send me
-(multi-tty@lists.fnord.hu) your bug reports.
+This is work in progress, and probably full of bugs. It is a good
+idea to run emacs from gdb, so that you'll have a live instance to
+debug if something goes wrong. Please send me your bug reports on our
+mailing list: multi-tty@lists.fnord.hu
TIPS & TRICKS
-------------
I use the following two bash functions to handle my Emacs sessions:
,----[ ~/.bash_profile
-| # Usage: preload-emacs <name> [<waitp>]
+| # Usage: preload_emacs <name> [<waitp>]
| #
| # Preloads the Emacs instance called NAME in a detached screen
| # session. Does nothing if the instance is already running. If WAITP
| # is non-empty, the function waits until the server starts up and
| # creates its socket; otherwise it returns immediately.
-| function preload-emacs {
+| function preload_emacs {
| local name="$1"
| local waitp="$2"
| local screendir="/var/run/screen/S-$USER"
| local emacs=emacs # Or wherever you installed your multi-tty Emacs
|
| if [ -z "$name" ]; then
-| echo "Usage: preload-emacs <name> [<waitp>]" >&2
+| echo "Usage: preload_emacs <name> [<waitp>]" >&2
| return 1
| fi
|
| return 0
| }
|
-| # Usage: connect-emacs <name> <args>...
+| # Usage: connect_emacs <name> <args>...
| #
| # Connects to the Emacs instance called NAME. Starts up the instance
| # if it is not already running. The rest of the arguments are passed
| # to emacsclient.
-| function connect-emacs {
+| function connect_emacs {
| local name="$1"
| shift
|
| if [ -z "$name" ]; then
-| echo "Usage: connect-emacs <name> <args>..." >&2
+| echo "Usage: connect_emacs <name> <args>..." >&2
| fi
-| preload-emacs "$name" wait
+| preload_emacs "$name" wait
| emacsclient -s "$name" "$@"
| }
|
-| export -f preload-emacs connect-emacs
+| export -f preload_emacs connect_emacs
|
| # Preload editor and gnus sessions for speedy initial connects.
-| preload-emacs editor
-| preload-emacs gnus
+| preload_emacs editor
+| preload_emacs gnus
`----
,----[ ~/.bashrc
-| alias gnus="connect-emacs gnus"
-| alias edit="connect-emacs editor"
-| alias et="connect-emacs editor -t"
+| alias gnus="connect_emacs gnus"
+| alias edit="connect_emacs editor"
+| alias et="connect_emacs editor -t"
| alias e=edit
`----
*** The new `initial-window-system' variable contains the
`window-system' value for the first frame.
-THANKS
-------
-
-The following is a (sadly incomplete) list of people who have
-contributed to the project by testing, submitting patches, bug
-reports, and suggestions. Thanks!
-
-ARISAWA Akihiro <ari at mbf dot ocn dot ne dot jp>
-Han Boetes <han at mijncomputer dot nl>
-Robert J. Chassell <bob at rattlesnake dot com>
-Romain Francoise <romain at orebokech dot com>
-Ami Fischman <ami at fischman dot org>
-Friedrich Delgado Friedrichs <friedel at nomaden dot org>
-IRIE Tetsuya <irie at t dot email dot ne dot jp>
-Yoshiaki Kasahara <kasahara at nc dot kyushu-u dot ac dot jp>
-Jurej Kubelka <Juraj dot Kubelka at email dot cz>
-David Lichteblau <david at lichteblau dot com>
-Istvan Marko <mi-mtty at kismala dot com>
-Ted Morse <morse at ciholas dot com>
-Dan Nicolaescu <dann at ics dot uci dot edu>
-Gergely Nagy <algernon at debian dot org>
-Mark Plaksin <happy at mcplaksin dot org>
-Francisco Borges <borges at let dot rug dot nl>
-Frank Ruell <stoerte at dreamwarrior dot net>
-Dan Waber <dwaber at logolalia dot com>
-and many others.
-
-Richard Stallman was kind enough to review an earlier version of my
-patches.
-
CHANGELOG
---------
THINGS TO DO
------------
+** The single-keyboard mode of MULTI_KBOARD is extremely confusing
+ sometimes; Emacs does not respond to stimuli from other keyboards.
+ At least a beep or a message would be important, if the single-mode
+ is still required to prevent interference. (Reported by Dan
+ Nicolaescu.)
+
+ Update: selecting a region with the mouse enables single_kboard
+ under X. This is very confusing.
+
+ Update: After discussions with Richard, this will be resolved by
+ having locked displays warn the user to wait, and introducing a
+ complex protocol to remotely bail out of single-kboard mode by
+ pressing C-g.
+
+ Update: Warning the user is not trivial to implement, as Emacs has
+ only one echo area. Ideally the warning should not be displayed on
+ the display that is locking the others. Perhaps the high
+ probability of user confusion caused by single_kboard mode deserves
+ a special case in the display code. Alternatively, it might be
+ good enough to signal single_kboard mode by changing the modelines
+ or some other frame-local display element on the locked out displays.
+
+** normal-erase-is-backspace-mode in simple.el needs to be updated for
+ multi-tty (rep. by Dan Waber).
+
** Hunt down display-related functions in frame.el and extend them all
to accept display ids.
+** rif->flush_display_optional (NULL) calls should be replaced by a
+ new global function.
+
** Have a look at fatal_error_hook.
+** Have a look at set_frame_matrix_frame.
+
** Check if we got term-setup-hook right.
+** I think tip_frame should be display-local.
+
+** Check display reference count handling in x_create_tip_frame.
+
** make-frame does not correctly handle extra parameters in its
argument:
what if we'd blow it up into several separate functions (with a
compatibility definition)?
-** Lisp-level stuff that needs to be updated for multi-tty:
-
- - normal-erase-is-backspace-mode (simple.el) (rep. by Dan Waber)
-
-
-** The single-keyboard mode of MULTI_KBOARD is extremely confusing
- sometimes; Emacs does not respond to stimuli from other keyboards.
- At least a beep or a message would be important, if the single-mode
- is still required to prevent interference. (Reported by Dan
- Nicolaescu.) (Update: selecting a region with the mouse enables
- single_kboard under X. This is very confusing.) Update:
- After discussions with Richard, this will be resolved by having
- locked displays warn the user to wait, and introducing a complex
- protocol to remotely bail out of single-kboard mode by pressing C-g.
-
** The terminal customization files in term/*.el tend to change global
parameters, which may confuse Emacs with multiple displays. Change
them to tweak only frame-local settings, if possible.
frame, not any other emacsclient frame that may have the same file
opened for editing. I think I agree with him.
-** Miles Bader suggests that C-x C-c on an emacsclient frame should
- only close the frame, not exit the entire Emacs session. Update:
- see above for a function that does this. Maybe this should be the
- new default?
-
** Very strange bug: visible-bell does not work on secondary
terminals in xterm and konsole. The screen does flicker a bit,
but it's so quick it isn't noticable.
(Done.)
+-- Miles Bader suggests that C-x C-c on an emacsclient frame should
+ only close the frame, not exit the entire Emacs session. Update:
+ see above for a function that does this. Maybe this should be the
+ new default?
+
+ (Done. This is the new default. No complaints so far.)
+
+
;;; arch-tag: 8da1619e-2e79-41a8-9ac9-a0485daad17d