[comp.emacs] gnuemacs + X

mayer@hplabsc.UUCP (02/11/87)

I recently got a version of gnuemacs (v18.35) running as an x client and I
was throroughly disappointed to find that gnuemacs/X is still a single window
editor. What a pane! 

My qusetion is: will gnuemacs/X ever support multiple windows??

-- Niels Mayer

rlk@bacchus.UUCP (02/11/87)

In article <1286@hplabsc.UUCP> mayer@hplabsc.UUCP (Niels Mayer) writes:
]I recently got a version of gnuemacs (v18.35) running as an x client and I
]was throroughly disappointed to find that gnuemacs/X is still a single window
]editor. What a pane! 
]
]My qusetion is: will gnuemacs/X ever support multiple windows??

Not in Version 18; if RMS decides to redesign the terminal interface,
it may be possible in version 19 or later.

The problem is that the terminal handler expects a single input stream
and a single output stream.  There's no way for emacs to understand
the concept of switching between windows.

It would in theory be possible to do this by handling enter window
events and sending the necessary Emacs commands (C-xo), but this is
unreliable, messy, and generally a bad way to do things, but there's
still a problem:  the minibuffer.  Emacs can only deal with one
minibuffer at once, except for recursive minibuffers; multiple windows
would generally need multiple minibuffers.  This is not good.

So, until Stallman decides to redo the terminal/window interface for
emacs, I'm afraid the answer to your question is no.

Robert^Z

ram@spice.cs.cmu.edu.UUCP (02/13/87)

I think that the difficulty of integrating multiple windows into EMACS is
often exaggerated.  The Hemlock editor that we developed here at CMU is very
similar in interface to ITS emacs, and originally only worked in one window,
with vertical splitting into an arbitrary number of editor windows.

I adapted it to a multi-window discipline by giving each editor window its
own window system window, and also making separate windows for the echo area
and typeout windows.  If you stick to using the standard EMACS style
windowing commands, then windows are created and resized in the same way as
in EMACS.  There is also additional functionality available that is not
present in the original EMACS.

For one, the standard window system commands may be used to move and reshape
windows.  Once you start moving windows around, the meaning of "next window"
becomes somewhat problematical; I chose to ignore this problem, simply
placing a new window after the current window in the ordering, and giving up
on the notion that there is any geometic meaning to this command once you
start randomly moving windows.

There is only one echo area, which didn't seem to cause major problems.  The
main difficulty was the "where's the echo area" syndrome.  If you move or
bury echo area, then it may take a while to find it.  A reasonable solution
would be to have prompting functions make sure the echo area is visible
before they do anything.

We handled input simply by smashing together all input from all windows.
There still is only one input stream.  Changing of the editor's notion of
current window has to be explicitly done by a command, often invoked from a
mouse botton.  This can cause somewhat confusing effects with the window
under the mouse not being the editor window where insertion and whatnot is
done, but once you get used to it this actually turns out to be useful.  For
example, you can use a mouse-based scolling command to move around in one
window, while typing into a buffer in another window.

We used the middle mouse button for moving the point and marking.  A simple
click moves the point to whatever you clicked on, in whatever window that
might be in.  This is the command usually used for switching windows.  If
you click and drag, then the mark is left at the original click position and
the point is left at the realease point.

We used the left and right bottons for scolling.  Left moves the line under
the mouse to the top of the window it is in, without changing the current
window or point.  If left is pressed near the beginning of the line, then it
goes into a smooth-scroll mode, moving up one line at a time until you
release.  The right button does the same thing, but in the opposite
direction.

If my tenses are somewhat confused in this message, it is because the
interface I describe was used under the PERQ/Spice system which is now dead.
CMU Common Lisp is now running under Mach, using a non-windowing interface.
We plan to become whizzy again as soon as we can get our X interface up to
speed.

  Rob