annotate README.multi-tty @ 53233:fe9b37bee5f7

Fully eliminated global tty state variables. lib-src/emacsclient.c (main.c): Fix error message. lisp/frame.el (make-frame-on-tty): New function. lisp/server.el (server-process-filter): Notify emacsclient if there was on error during evaluation. src/cm.c: Fix remaining cases of direct Wcm references. src/dispextern.h: Updated prototypes. src/dispnew.c (Fredraw_frame): Fix set_terminal_modes call. (init_display): Remove reference to meta_key. src/frame.c (make_terminal_frame): Renamed first parameter to tty_name. Call term_init before creating the frame. (Fmake_terminal_frame): Look up the `tty' and `tty-type' frame parameters from the currently selected terminal before the global default. (Fdelete_frame): Make sure that the new selected frame is live. src/keyboard.c (meta_key): Moved to struct tty_output. (read_avail_input): Fix C syntax. Update references to meta_key. (Fsuspend_emacs): pass current tty to init_sys_modes via record_unwind_protect. (Fset_input_mode): Update references to meta_key. (Fcurrent_input_mode): Ditto. src/sysdep.c (init_sys_modes): Updated old_tty and meta_key references. Don't call set_terminal_modes, it needs termcap strings. (reset_sys_modes): Call tty_reset_terminal_modes instead of reset_terminal_modes. Updated old_tty references. src/term.c: Massive updates throuout the file. (TS_*, TN_*): Moved to struct tty_output. (RPov, delete_in_insert_mode se_is_so, costs_set, insert_mode): Ditto. (standout_mode, specified_window, tty_cursor_hidden): Ditto. (tty_set_terminal_modes, tty_reset_terminal_modes): New functions. (turn_on_insert, turn_off_insert): Added tty parameter. (turn_on_highlight, turn_off_highlight, toggle_highlight): Added tty parameter. (tty_hide_cursor, tty_show_cursor): Ditto. (background_highlight, highlight_if_desired): Ditto. (tty_capable_p): Changed first parameter to tty_output. (term_init): Make sure top_frame is initialized. Don't exit on errors if this would have been a secondary terminal. Call set_terminal_modes on the end. (delete_tty): New function. (delete_tty_1): New function. (print_all_frames): New function, marginally useful for debugging. src/termchar.h (struct tty_output): Changed old_tty to be a pointer. Removed old_tty_valid member. Added tty-specific variables from term.c. src/xfaces.c (Ftty_supports_face_attributes_p): Update for new tty_capable_p. git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-9
author Karoly Lorentey <lorentey@elte.hu>
date Sat, 27 Dec 2003 10:00:19 +0000
parents 22aaf1e5fbe6
children f3b94bd26d21
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
53226
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
1 -*- coding: utf-8; -*-
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
2 GOAL
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
3 ----
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
4
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
5 The ultimate goal of this branch is to implement support for opening
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
6 multiple, different tty devices and simultaneous X and tty frames from
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
7 a single Emacs session.
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
8
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
9 WHO IS DOING IT
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
10 ---------------
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
11
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
12 I'm Károly Lőrentey. My address: lorentey@elte.hu.
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
13
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
14 Patches or suggestions are welcome!
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
15
53232
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53229
diff changeset
16 Retrieving the latest version of the branch:
53228
c5b253fd2504 Added a pointer to my archive to README.multi-tty
Karoly Lorentey <lorentey@elte.hu>
parents: 53226
diff changeset
17
c5b253fd2504 Added a pointer to my archive to README.multi-tty
Karoly Lorentey <lorentey@elte.hu>
parents: 53226
diff changeset
18 tla register-archive lorentey@elte.hu--2004 http://lorentey.web.elte.hu/arch/2004/
c5b253fd2504 Added a pointer to my archive to README.multi-tty
Karoly Lorentey <lorentey@elte.hu>
parents: 53226
diff changeset
19 tla get lorentey@elte.hu--2004/emacs--multi-tty--0 <directory>
c5b253fd2504 Added a pointer to my archive to README.multi-tty
Karoly Lorentey <lorentey@elte.hu>
parents: 53226
diff changeset
20
c5b253fd2504 Added a pointer to my archive to README.multi-tty
Karoly Lorentey <lorentey@elte.hu>
parents: 53226
diff changeset
21 (I use tla 1.1.)
c5b253fd2504 Added a pointer to my archive to README.multi-tty
Karoly Lorentey <lorentey@elte.hu>
parents: 53226
diff changeset
22
53226
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
23
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
24 STATUS
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
25 ------
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
26
53232
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53229
diff changeset
27 Basic support is there; there are some rough edges, but it already
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53229
diff changeset
28 seems to be usable. Input is read from all terminals (NOT via
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53229
diff changeset
29 MULTIKBOARD!). At the moment, the type of the new terminals must be
53233
fe9b37bee5f7 Fully eliminated global tty state variables.
Karoly Lorentey <lorentey@elte.hu>
parents: 53232
diff changeset
30 the same as the initial terminal. Emacsclient has been extended to
fe9b37bee5f7 Fully eliminated global tty state variables.
Karoly Lorentey <lorentey@elte.hu>
parents: 53232
diff changeset
31 support opening a new terminal frame.
53226
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
32
53229
33c3c7c16e13 lib-src/emacsclient.c: Implemented --here option (open a new Emacs tty). Needs more work.
Karoly Lorentey <lorentey@elte.hu>
parents: 53228
diff changeset
33 To try it out, start up the emacs server (M-x server-start), and then
53232
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53229
diff changeset
34 (from a shell prompt on another terminal) start emacsclient with
53226
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
35
53229
33c3c7c16e13 lib-src/emacsclient.c: Implemented --here option (open a new Emacs tty). Needs more work.
Karoly Lorentey <lorentey@elte.hu>
parents: 53228
diff changeset
36 emacsclient -h
33c3c7c16e13 lib-src/emacsclient.c: Implemented --here option (open a new Emacs tty). Needs more work.
Karoly Lorentey <lorentey@elte.hu>
parents: 53228
diff changeset
37
53232
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53229
diff changeset
38 You'll have two fully working frames on separate terminals. If you
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53229
diff changeset
39 exit emacs, both terminals should be restored to their previous
53229
33c3c7c16e13 lib-src/emacsclient.c: Implemented --here option (open a new Emacs tty). Needs more work.
Karoly Lorentey <lorentey@elte.hu>
parents: 53228
diff changeset
40 states.
53226
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
41
53232
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53229
diff changeset
42 X, Mac, Windows and DOS support is broken at the moment.
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53229
diff changeset
43
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53229
diff changeset
44 Tested under GNU/Linux only.
53226
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
45
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
46 NEWS
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
47 ----
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
48
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
49 For the NEWS file:
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
50
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
51 ** Support for multiple terminal devices has been added. You can
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
52 specify a terminal device (`tty' parameter) and a terminal type
53232
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53229
diff changeset
53 (`tty-type' parameter) to `make-terminal-frame'. `tty' must be a
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53229
diff changeset
54 terminal device created by the new emacsclient, or there will be
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53229
diff changeset
55 problems with terminal input and window resizes. (The kernel
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53229
diff changeset
56 notifies processes about pending input or terminal resizes only on
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53229
diff changeset
57 the controlling terminal, so we need emacsclient to sit on the real
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53229
diff changeset
58 terminal device, create SIGIO signals upon terminal input, and
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53229
diff changeset
59 forward SIGWINCH signals to us.)
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53229
diff changeset
60
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53229
diff changeset
61 You can test for the presence of multiple terminal support by
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53229
diff changeset
62 testing for the `multi-tty' feature.
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53229
diff changeset
63
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53229
diff changeset
64 ** A make-frame-on-tty function has been added to make it easier to
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53229
diff changeset
65 create frames on new terminals.
53226
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
66
53229
33c3c7c16e13 lib-src/emacsclient.c: Implemented --here option (open a new Emacs tty). Needs more work.
Karoly Lorentey <lorentey@elte.hu>
parents: 53228
diff changeset
67 ** Emacsclient has been extended to support opening a new terminal
33c3c7c16e13 lib-src/emacsclient.c: Implemented --here option (open a new Emacs tty). Needs more work.
Karoly Lorentey <lorentey@elte.hu>
parents: 53228
diff changeset
68 frame.
53226
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
69
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
70 CHANGELOG
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
71 ---------
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
72
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
73 See arch logs.
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
74
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
75
53232
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53229
diff changeset
76 DIARY OF CHANGES
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53229
diff changeset
77 ----------------
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53229
diff changeset
78
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53229
diff changeset
79 (ex-TODO items with explanations.)
53226
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
80
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
81 -- Introduce a new abstraction for terminal devices.
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
82
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
83 (Done, see struct tty_output. The abstraction is not yet
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
84 complete.)
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
85
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
86
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
87 -- Change the bootstrap procedure to initialize tty_list.
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
88
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
89 (Done, but needs review.)
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
90
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
91
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
92 -- Change make-terminal-frame to support specifying another tty.
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
93
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
94 (Done, new frame parameters: `tty' and `tty-type'.)
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
95
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
96
53229
33c3c7c16e13 lib-src/emacsclient.c: Implemented --here option (open a new Emacs tty). Needs more work.
Karoly Lorentey <lorentey@elte.hu>
parents: 53228
diff changeset
97 -- Implement support for reading from multiple terminals.
33c3c7c16e13 lib-src/emacsclient.c: Implemented --here option (open a new Emacs tty). Needs more work.
Karoly Lorentey <lorentey@elte.hu>
parents: 53228
diff changeset
98
33c3c7c16e13 lib-src/emacsclient.c: Implemented --here option (open a new Emacs tty). Needs more work.
Karoly Lorentey <lorentey@elte.hu>
parents: 53228
diff changeset
99 (Done, read_avail_input tries to read from each terminal, until one
53232
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53229
diff changeset
100 succeeds. MULTIKBOARD is not used. Secondary terminals don't send
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53229
diff changeset
101 SIGIO!)
53229
33c3c7c16e13 lib-src/emacsclient.c: Implemented --here option (open a new Emacs tty). Needs more work.
Karoly Lorentey <lorentey@elte.hu>
parents: 53228
diff changeset
102
33c3c7c16e13 lib-src/emacsclient.c: Implemented --here option (open a new Emacs tty). Needs more work.
Karoly Lorentey <lorentey@elte.hu>
parents: 53228
diff changeset
103 -- other-frame should cycle through the frames on the `current'
53232
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53229
diff changeset
104 terminal only.
53229
33c3c7c16e13 lib-src/emacsclient.c: Implemented --here option (open a new Emacs tty). Needs more work.
Karoly Lorentey <lorentey@elte.hu>
parents: 53228
diff changeset
105
53232
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53229
diff changeset
106 (Done, by trivially modifiying next_frame and prev_frame.)
53229
33c3c7c16e13 lib-src/emacsclient.c: Implemented --here option (open a new Emacs tty). Needs more work.
Karoly Lorentey <lorentey@elte.hu>
parents: 53228
diff changeset
107
33c3c7c16e13 lib-src/emacsclient.c: Implemented --here option (open a new Emacs tty). Needs more work.
Karoly Lorentey <lorentey@elte.hu>
parents: 53228
diff changeset
108 -- Support different terminal sizes.
33c3c7c16e13 lib-src/emacsclient.c: Implemented --here option (open a new Emacs tty). Needs more work.
Karoly Lorentey <lorentey@elte.hu>
parents: 53228
diff changeset
109
33c3c7c16e13 lib-src/emacsclient.c: Implemented --here option (open a new Emacs tty). Needs more work.
Karoly Lorentey <lorentey@elte.hu>
parents: 53228
diff changeset
110 (Done, no problem.)
33c3c7c16e13 lib-src/emacsclient.c: Implemented --here option (open a new Emacs tty). Needs more work.
Karoly Lorentey <lorentey@elte.hu>
parents: 53228
diff changeset
111
33c3c7c16e13 lib-src/emacsclient.c: Implemented --here option (open a new Emacs tty). Needs more work.
Karoly Lorentey <lorentey@elte.hu>
parents: 53228
diff changeset
112 -- Make sure terminal resizes are handled gracefully. (Could be
33c3c7c16e13 lib-src/emacsclient.c: Implemented --here option (open a new Emacs tty). Needs more work.
Karoly Lorentey <lorentey@elte.hu>
parents: 53228
diff changeset
113 problematic.)
33c3c7c16e13 lib-src/emacsclient.c: Implemented --here option (open a new Emacs tty). Needs more work.
Karoly Lorentey <lorentey@elte.hu>
parents: 53228
diff changeset
114
53232
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53229
diff changeset
115 (Done. We don't get automatic SIGWINCH for additional ttys,
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53229
diff changeset
116 though.)
53229
33c3c7c16e13 lib-src/emacsclient.c: Implemented --here option (open a new Emacs tty). Needs more work.
Karoly Lorentey <lorentey@elte.hu>
parents: 53228
diff changeset
117
33c3c7c16e13 lib-src/emacsclient.c: Implemented --here option (open a new Emacs tty). Needs more work.
Karoly Lorentey <lorentey@elte.hu>
parents: 53228
diff changeset
118 -- Extend emacsclient to automatically open a new tty when it connects
33c3c7c16e13 lib-src/emacsclient.c: Implemented --here option (open a new Emacs tty). Needs more work.
Karoly Lorentey <lorentey@elte.hu>
parents: 53228
diff changeset
119 to Emacs.
33c3c7c16e13 lib-src/emacsclient.c: Implemented --here option (open a new Emacs tty). Needs more work.
Karoly Lorentey <lorentey@elte.hu>
parents: 53228
diff changeset
120
33c3c7c16e13 lib-src/emacsclient.c: Implemented --here option (open a new Emacs tty). Needs more work.
Karoly Lorentey <lorentey@elte.hu>
parents: 53228
diff changeset
121 (Done. It's an ugly hack, needs more work.)
33c3c7c16e13 lib-src/emacsclient.c: Implemented --here option (open a new Emacs tty). Needs more work.
Karoly Lorentey <lorentey@elte.hu>
parents: 53228
diff changeset
122
33c3c7c16e13 lib-src/emacsclient.c: Implemented --here option (open a new Emacs tty). Needs more work.
Karoly Lorentey <lorentey@elte.hu>
parents: 53228
diff changeset
123 -- Redisplay must refresh the topmost frame on all terminals, not just
33c3c7c16e13 lib-src/emacsclient.c: Implemented --here option (open a new Emacs tty). Needs more work.
Karoly Lorentey <lorentey@elte.hu>
parents: 53228
diff changeset
124 the initial terminal.
33c3c7c16e13 lib-src/emacsclient.c: Implemented --here option (open a new Emacs tty). Needs more work.
Karoly Lorentey <lorentey@elte.hu>
parents: 53228
diff changeset
125
33c3c7c16e13 lib-src/emacsclient.c: Implemented --here option (open a new Emacs tty). Needs more work.
Karoly Lorentey <lorentey@elte.hu>
parents: 53228
diff changeset
126 (Done, but introduced ugly redisplay problems. Ugh.)
33c3c7c16e13 lib-src/emacsclient.c: Implemented --here option (open a new Emacs tty). Needs more work.
Karoly Lorentey <lorentey@elte.hu>
parents: 53228
diff changeset
127
53232
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53229
diff changeset
128 -- Fix redisplay problems.
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53229
diff changeset
129
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53229
diff changeset
130 (Done, it turned out that the entire Wcm structure must be moved
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53229
diff changeset
131 inside tty_output. Why was it so hard for me to find this out?)
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53229
diff changeset
132
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53229
diff changeset
133 -- Provide a way for emacsclient to tell Emacs that the tty has been
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53229
diff changeset
134 resized.
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53229
diff changeset
135
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53229
diff changeset
136 (Done, simply forward the SIGWINCH signal.)
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53229
diff changeset
137
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53229
diff changeset
138 -- Each keypress should automatically select the frame corresponding
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53229
diff changeset
139 to the terminal that it was coming from. This means that Emacs
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53229
diff changeset
140 must know from which terminal the last keyboard event came from.
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53229
diff changeset
141 (Multikeyboard support may help with this.)
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53229
diff changeset
142
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53229
diff changeset
143 (Done, it was quite simple.)
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53229
diff changeset
144
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53229
diff changeset
145 -- Fix SIGIO issue with secondary terminals.
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53229
diff changeset
146
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53229
diff changeset
147 (Done, emacsclient signals Emacs after writing to the proxy pseudo
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53229
diff changeset
148 terminal. This means that multi-tty does not work with raw ttys!)
53229
33c3c7c16e13 lib-src/emacsclient.c: Implemented --here option (open a new Emacs tty). Needs more work.
Karoly Lorentey <lorentey@elte.hu>
parents: 53228
diff changeset
149
53233
fe9b37bee5f7 Fully eliminated global tty state variables.
Karoly Lorentey <lorentey@elte.hu>
parents: 53232
diff changeset
150
fe9b37bee5f7 Fully eliminated global tty state variables.
Karoly Lorentey <lorentey@elte.hu>
parents: 53232
diff changeset
151 -- Make make-terminal-frame look up the `tty' and `tty-type' frame
fe9b37bee5f7 Fully eliminated global tty state variables.
Karoly Lorentey <lorentey@elte.hu>
parents: 53232
diff changeset
152 parameters from the currently selected terminal before the global
fe9b37bee5f7 Fully eliminated global tty state variables.
Karoly Lorentey <lorentey@elte.hu>
parents: 53232
diff changeset
153 default.
fe9b37bee5f7 Fully eliminated global tty state variables.
Karoly Lorentey <lorentey@elte.hu>
parents: 53232
diff changeset
154
fe9b37bee5f7 Fully eliminated global tty state variables.
Karoly Lorentey <lorentey@elte.hu>
parents: 53232
diff changeset
155 (Done.)
fe9b37bee5f7 Fully eliminated global tty state variables.
Karoly Lorentey <lorentey@elte.hu>
parents: 53232
diff changeset
156
fe9b37bee5f7 Fully eliminated global tty state variables.
Karoly Lorentey <lorentey@elte.hu>
parents: 53232
diff changeset
157 -- Put all cached terminal escape sequences into struct tty_output.
fe9b37bee5f7 Fully eliminated global tty state variables.
Karoly Lorentey <lorentey@elte.hu>
parents: 53232
diff changeset
158 Currently, they are still stored in global variables, so we don't
fe9b37bee5f7 Fully eliminated global tty state variables.
Karoly Lorentey <lorentey@elte.hu>
parents: 53232
diff changeset
159 really support multiple terminal types.
fe9b37bee5f7 Fully eliminated global tty state variables.
Karoly Lorentey <lorentey@elte.hu>
parents: 53232
diff changeset
160
fe9b37bee5f7 Fully eliminated global tty state variables.
Karoly Lorentey <lorentey@elte.hu>
parents: 53232
diff changeset
161 (Done.)
fe9b37bee5f7 Fully eliminated global tty state variables.
Karoly Lorentey <lorentey@elte.hu>
parents: 53232
diff changeset
162
fe9b37bee5f7 Fully eliminated global tty state variables.
Karoly Lorentey <lorentey@elte.hu>
parents: 53232
diff changeset
163 -- Implement sane error handling after initialization. (Currently
fe9b37bee5f7 Fully eliminated global tty state variables.
Karoly Lorentey <lorentey@elte.hu>
parents: 53232
diff changeset
164 emacs exits if you specify a bad terminal type.) The helpful error
fe9b37bee5f7 Fully eliminated global tty state variables.
Karoly Lorentey <lorentey@elte.hu>
parents: 53232
diff changeset
165 messages must still be provided when Emacs starts.
fe9b37bee5f7 Fully eliminated global tty state variables.
Karoly Lorentey <lorentey@elte.hu>
parents: 53232
diff changeset
166
fe9b37bee5f7 Fully eliminated global tty state variables.
Karoly Lorentey <lorentey@elte.hu>
parents: 53232
diff changeset
167 (Done.)
fe9b37bee5f7 Fully eliminated global tty state variables.
Karoly Lorentey <lorentey@elte.hu>
parents: 53232
diff changeset
168
fe9b37bee5f7 Fully eliminated global tty state variables.
Karoly Lorentey <lorentey@elte.hu>
parents: 53232
diff changeset
169 -- Implement terminal deletion, i.e., deleting local frames, closing
fe9b37bee5f7 Fully eliminated global tty state variables.
Karoly Lorentey <lorentey@elte.hu>
parents: 53232
diff changeset
170 the tty device and restoring its previous state without exiting
fe9b37bee5f7 Fully eliminated global tty state variables.
Karoly Lorentey <lorentey@elte.hu>
parents: 53232
diff changeset
171 Emacs.
fe9b37bee5f7 Fully eliminated global tty state variables.
Karoly Lorentey <lorentey@elte.hu>
parents: 53232
diff changeset
172
fe9b37bee5f7 Fully eliminated global tty state variables.
Karoly Lorentey <lorentey@elte.hu>
parents: 53232
diff changeset
173 (Done, but at the moment only called when an error happens during
fe9b37bee5f7 Fully eliminated global tty state variables.
Karoly Lorentey <lorentey@elte.hu>
parents: 53232
diff changeset
174 initialization. There is a memory corruption error around this
fe9b37bee5f7 Fully eliminated global tty state variables.
Karoly Lorentey <lorentey@elte.hu>
parents: 53232
diff changeset
175 somewhere.)
fe9b37bee5f7 Fully eliminated global tty state variables.
Karoly Lorentey <lorentey@elte.hu>
parents: 53232
diff changeset
176
fe9b37bee5f7 Fully eliminated global tty state variables.
Karoly Lorentey <lorentey@elte.hu>
parents: 53232
diff changeset
177
53226
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
178 THINGS TO DO
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
179 ------------
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
180
53233
fe9b37bee5f7 Fully eliminated global tty state variables.
Karoly Lorentey <lorentey@elte.hu>
parents: 53232
diff changeset
181 ** Fix mysterious memory corruption error with tty deletion. To
fe9b37bee5f7 Fully eliminated global tty state variables.
Karoly Lorentey <lorentey@elte.hu>
parents: 53232
diff changeset
182 trigger it, try the following shell command:
fe9b37bee5f7 Fully eliminated global tty state variables.
Karoly Lorentey <lorentey@elte.hu>
parents: 53232
diff changeset
183
fe9b37bee5f7 Fully eliminated global tty state variables.
Karoly Lorentey <lorentey@elte.hu>
parents: 53232
diff changeset
184 while true; do TERM=no-such-terminal-definition emacsclient -h; done
fe9b37bee5f7 Fully eliminated global tty state variables.
Karoly Lorentey <lorentey@elte.hu>
parents: 53232
diff changeset
185
fe9b37bee5f7 Fully eliminated global tty state variables.
Karoly Lorentey <lorentey@elte.hu>
parents: 53232
diff changeset
186 Emacs usually dumps core after a few dozen iterations. (The bug
fe9b37bee5f7 Fully eliminated global tty state variables.
Karoly Lorentey <lorentey@elte.hu>
parents: 53232
diff changeset
187 seems to be related to the xfree()ing or bzero()ing of
fe9b37bee5f7 Fully eliminated global tty state variables.
Karoly Lorentey <lorentey@elte.hu>
parents: 53232
diff changeset
188 tty_output.Wcm. Maybe there are outside references to struct Wcm?
fe9b37bee5f7 Fully eliminated global tty state variables.
Karoly Lorentey <lorentey@elte.hu>
parents: 53232
diff changeset
189 Sounds logical, otherwise these vars would not have been collected
fe9b37bee5f7 Fully eliminated global tty state variables.
Karoly Lorentey <lorentey@elte.hu>
parents: 53232
diff changeset
190 into a struct. But where?)
fe9b37bee5f7 Fully eliminated global tty state variables.
Karoly Lorentey <lorentey@elte.hu>
parents: 53232
diff changeset
191
fe9b37bee5f7 Fully eliminated global tty state variables.
Karoly Lorentey <lorentey@elte.hu>
parents: 53232
diff changeset
192 This does not seem to happen if the error occurs before terminal
fe9b37bee5f7 Fully eliminated global tty state variables.
Karoly Lorentey <lorentey@elte.hu>
parents: 53232
diff changeset
193 initialization or if I comment out all xfree()s in delete_frame.
fe9b37bee5f7 Fully eliminated global tty state variables.
Karoly Lorentey <lorentey@elte.hu>
parents: 53232
diff changeset
194 Update: yes it does, although it is much rarer.
53232
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53229
diff changeset
195
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53229
diff changeset
196 ** C-g should work on secondary terminals.
53229
33c3c7c16e13 lib-src/emacsclient.c: Implemented --here option (open a new Emacs tty). Needs more work.
Karoly Lorentey <lorentey@elte.hu>
parents: 53228
diff changeset
197
53226
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
198 ** Move optimalization parameters (costs) from union output_data to
53232
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53229
diff changeset
199 a backend-neutral per-device structure.
53229
33c3c7c16e13 lib-src/emacsclient.c: Implemented --here option (open a new Emacs tty). Needs more work.
Karoly Lorentey <lorentey@elte.hu>
parents: 53228
diff changeset
200
53232
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53229
diff changeset
201 ** Implement automatic deletion of terminals when the last frame on
53226
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
202 that terminal is closed.
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
203
53232
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53229
diff changeset
204 ** Make parts of struct tty_output accessible from Lisp. The device
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53229
diff changeset
205 name and the type is sufficient.
53226
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
206
53233
fe9b37bee5f7 Fully eliminated global tty state variables.
Karoly Lorentey <lorentey@elte.hu>
parents: 53232
diff changeset
207 ** Export delete_tty to the Lisp environment.
fe9b37bee5f7 Fully eliminated global tty state variables.
Karoly Lorentey <lorentey@elte.hu>
parents: 53232
diff changeset
208
53226
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
209 ** Implement support for starting an interactive Emacs session without
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
210 an initial frame. (The user would connect to it and open frames
53233
fe9b37bee5f7 Fully eliminated global tty state variables.
Karoly Lorentey <lorentey@elte.hu>
parents: 53232
diff changeset
211 later, with emacsclient.) Not necessarily a good idea.
53226
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
212
53232
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53229
diff changeset
213 ** Support raw secondary terminals. (This one is tricky, SIGIO works
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53229
diff changeset
214 only on the controlling terminal.)
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53229
diff changeset
215
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53229
diff changeset
216 ** What does interrupt_input do? I tried to disable it for raw
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53229
diff changeset
217 secondary tty support, but it seems not to do anything useful.
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53229
diff changeset
218
53226
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
219 ** Fix X support.
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
220
53232
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53229
diff changeset
221 ** Do tty output through term_hooks, too.
22aaf1e5fbe6 Full support for multiple terminal I/O (with some rough edges).
Karoly Lorentey <lorentey@elte.hu>
parents: 53229
diff changeset
222
53226
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
223 ** Allow simultaneous X and tty frames.
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
224
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
225 ** Fix Mac support (I can't do this myself).
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
226
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
227 ** Fix W32 support (I can't do this myself).
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
228
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
229 ** Fix DOS support (I can't do this myself).
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
230
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
231
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
232
dd3018b4785b Implemented multiple tty support.
Karoly Lorentey <lorentey@elte.hu>
parents:
diff changeset
233 ;;; arch-tag: 8da1619e-2e79-41a8-9ac9-a0485daad17d