emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Work in progress: multiple tty support


From: Károly Lőrentey
Subject: Work in progress: multiple tty support
Date: Sat, 27 Dec 2003 16:38:07 +0100
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux)

As a useful activity during the holidays, I started working on an item
from the Emacs TODO list.  I tried to make sure to choose an item that
is not currently worked on by anybody, but I may have missed someone's
similar project -- if so, I'm sorry.  The item is:

        * Support simultaneous tty and X frames.

I have mostly finished implementing multiple tty device support, and I
have extended emacsclient with a hack to support opening a new frame
on the current terminal.  I think this is an important milestone, so I
decided to publish my branch for you to find out if you see something
horribly wrong with my general approach.  Note that this is (at the
moment) nothing more than a proof-of-concept implementation.  It is
not yet intented to be used in a production environment, so please
don't use this branch for your important work.  There are plenty of
known bugs and rough edges (see the attached README file).

Dozens of heavily used global variables were made tty-local, so the
changes are quite extensive, but mostly restricted to the low-level
input/output drivers (cm.c, term.c, frame.c, sysdep.c, keyboard.c).
(Some of these variables were used by other display backends, too, so
these will have to be changed again later, to become
backend-independent, but device-local.)

Check out the emacs--multi-tty branch from my arch archive:

        address@hidden/emacs--multi-tty--0

The archive location is

        http://lorentey.web.elte.hu/arch/2004

If you have arch, you can use the following commands:

        tla register-archive http://lorentey.web.elte.hu/arch/2004
        tla get address@hidden/emacs--multi-tty--0

In case you don't have arch, I attached a patch against patch-137 in
Rob Miles's arch branch, which corresponds to the CVS head from 8th
December.  (I intend to frequently synchronize with HEAD once the
regex.c issues are resolved.)

To try it out, compile the multi-tty branch with the following
commands:

        mkdir +build
        cd +build
        ../configure --with-x-toolkit=no --without-x
        make bootstrap

then start up the emacs server (src/emacs, M-x server-start), and then
(from a shell prompt on another terminal) start emacsclient with

        lib-src/emacsclient -h  /optional/file/names...

You'll hopefully have two fully working, independent frames on
separate terminals.  (This seems to be very useful, emacsclient starts
up even faster than vi!) :-) You can close the newly opened frame and
return to the shell without exiting Emacs by pressing C-x 5 0, i.e.,
delete-frame.  (Note that this does not seem to work yet on the
original terminal.)  Creating new frames on the same tty with C-x 5 2
works exactly as before.  Suspending Emacs is disabled at the moment.
If you exit emacs, all terminals should be restored to their previous
states.

X, Mac, Windows and DOS support is broken, probably doesn't even
compile -- this will be solved later.  Please see the attached README
for other issues, implementation notes and sub-TODO items.

Only tested on my GNU/Linux box.


Comments and suggestions are very much welcome!

Attachment: README.multi-tty
Description: Text document

Attachment: emacs.multi-tty.2003-12-27.patch.gz
Description: Binary data

-- 
Károly

reply via email to

[Prev in Thread] Current Thread [Next in Thread]