unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Of keyboards and terminals
@ 2008-02-24  1:30 Stefan Monnier
  2008-02-24 22:30 ` Richard Stallman
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Monnier @ 2008-02-24  1:30 UTC (permalink / raw)
  To: emacs-devel


We currently have a slightly odd situation:

In 99% of the cases, each keyboard object has a single terminal object
and each terminal has a single keyboard.  But in some rare cases,
several terminals can share a single keyboard.  See the same_x_server
function in xterm.c.

This can be the case when you have different connections to the same
X server.  This can happen if you make a frame on unix:0 and then
another frame on localhost:0 and yet another on <myhostname>:0.  This is
not very common, tho.

A more significant situation is when you have a multi-screen setup such
that you can make a frame on :0.0 and another on :0.1 and yet another
on :0.2.  These *require* separate terminal objects (and separate
X connections).

So in those particular cases, Emacs shares a single keyboard object
between those different terminal objects.  The intent of sharing
a single keyboard has mostly to do with the fact that once a command is
started, Emacs is put into "single-keyboard" mode so that all the input
coming from other keyboards is temporarily delayed.

As far as I can tell, this is the only benefit.

The problem is that variables like function-key-map are not
terminal-local (as people often think) but keyboard-local instead.
OTOH they're initialized per-terminal, and there is generally some
confusion between pr-keyboard and per-terminal objects and actions.

So I'm thinking of eliminating the special case that shares the keyboard
among different X11 connections to the same underlying server: the
sharing does make sense, but its benefit doesn't seem to justify the
resulting complexity.


        Stefan




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Of keyboards and terminals
  2008-02-24  1:30 Of keyboards and terminals Stefan Monnier
@ 2008-02-24 22:30 ` Richard Stallman
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Stallman @ 2008-02-24 22:30 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

    So I'm thinking of eliminating the special case that shares the keyboard
    among different X11 connections to the same underlying server: the
    sharing does make sense, but its benefit doesn't seem to justify the
    resulting complexity.

The one real benefit of having a single keyboard has to do
with the locking between keyboards.  The current behavior is correct
in the case of multiple screens with one keyboard.

Also, the fact that many variables (in particular, such as
overriding-terminal-local-map) are keyboard-local is right.
The word "terminal" in the name is misleading, but that means
we should change the name, not change the (correct) behavior.





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-02-24 22:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-24  1:30 Of keyboards and terminals Stefan Monnier
2008-02-24 22:30 ` Richard Stallman

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).