Verify the version of Emacsclient.
[bpt/emacs.git] / README.multi-tty
CommitLineData
3224dac1 1 -*- coding: utf-8; mode: text; -*-
28d440ab
KL
2GOAL
3----
4
2246281f
KL
5The goal of this branch is to implement support for opening multiple,
6different tty devices and simultaneous X and tty frames from a single
7Emacs session.
28d440ab 8
7b00d185 9Some use cases:
7b00d185
KL
10Emacs is notoriously slow at startup, so most people use another
11editor or emacsclient for quick editing jobs from the console.
12Unfortunately, emacsclient was very awkward to use, because it did not
13support opening a new Emacs frame on the current virtual console.
14Now, with multi-tty support, it can do that. (Emacsclient starts up
15faster than vi!)
16
17Some Gnus users (including me) run Gnus in an X frame in its own Emacs
18instance, which they typically leave running for weeks. It would be
19nice if they could connect to this instance from a remote ssh session
20and check their messages without opening a remote X frame or resorting
21to gnus-slave.
22
28d440ab
KL
23WHO IS DOING IT
24---------------
25
26I'm Károly Lőrentey. My address: lorentey@elte.hu.
27
2246281f 28Comments, bug reports, suggestions and patches are welcome!
28d440ab 29
6548cf00 30Retrieving the latest version of the branch:
4f0359de
KL
31
32 tla register-archive lorentey@elte.hu--2004 http://lorentey.web.elte.hu/arch/2004/
daf01701 33 tla get lorentey@elte.hu--2004/emacs--multi-tty <directory>
4f0359de 34
7b00d185
KL
35(I use a recent arch development snapshot, but any of the released
36versions of arch will do fine, I think.)
37
38If you don't have arch, the branch has a homepage from which you can
39download conventional patches against Emacs CVS HEAD:
4f0359de 40
7b00d185 41 http://lorentey.web.elte.hu/project/emacs.html
28d440ab 42
6c3d443b
KL
43If you want to be notified of new revisions, sign up to the
44multi-tty@listbox.elte.hu mailing list by visiting the
45below homepage and following its instructions.
46
47 https://listbox.elte.hu/mailman/listinfo/multi-tty
48
49Please note that the multi-tty mailing list is read-only, and is
50reserved for automatic commit messages. Discussion about the branch
51and bug reports should be sent directly to me (lorentey@elte.hu), or
52to the emacs-devel@gnu.org mailing list.
53
28d440ab
KL
54STATUS
55------
56
bacb6689
KL
57The branch is now very stable and almost full-featured. I hope the
58major problems were fixed. (It still needs testing on other
59architectures, though.) Both multiple tty device support and
60simultaneous X and tty frame support works fine. Emacsclient has been
61extended to support opening a new terminal frame.
2246281f 62
2246281f 63Please let me know if you find any bugs in this branch.
28d440ab 64
0c72d684
KL
65HOW TO COMPILE AND TEST
66-----------------------
67
7b00d185 68To try it out, compile and run the multi-tty branch with the following
04c3243c 69commands:
bc279d67
KL
70
71 mkdir +build
72 cd +build
0c72d684 73 ../configure <your favourite options>
bc279d67 74 make bootstrap
2246281f 75 src/emacs -nw # You can also try without -nw
7b00d185 76 M-x server-start
bc279d67 77
7b00d185
KL
78and then (from a shell prompt on another terminal) start emacsclient
79with
7b00d185 80 lib-src/emacsclient -t /optional/file/names...
28d440ab 81
04c3243c 82You'll hopefully have two fully working, independent frames on
7b00d185
KL
83separate terminals. The new frame is closed automatically when you
84have finished editing the specified files (C-x #), but delete-frame
85(C-x 5 0) also works. Of course, you can create frames on more than
86two tty devices.
52c2ee2a 87
7b00d185
KL
88Creating new frames on the same tty with C-x 5 2 works, and they
89behave the same way as in previous Emacs versions. If you exit emacs,
90all terminals should be restored to their previous states.
daf01701 91
7b00d185
KL
92This is work in progress, and probably full of bugs. You should
93always run emacs from gdb, so that you'll have a live instance to
2246281f 94debug if something goes wrong. Please send me your bug reports.
04c3243c 95
bacb6689
KL
96I think the best way to use the new Emacs is to have it running inside
97a disconnected GNU screen session, and always use emacsclient for
98normal work. This way not a single keystroke of your work will be
99lost if the display device that you are using crashes, or the network
100connection times out, or whatever. As long as the server that runs
101your Emacs remains up, all your buffers remain exactly as they were
102before the crash, and you can continue working as if nothing had
103happened. (I had an extremely unstable X server for some time while I
104was developing these patches, and running Emacs this way has saved me
105a number of M-x recover-session invocations.)
106
107(I am thinking about introducing a --daemon option to get rid of the
108above screen dependency.)
109
7b00d185 110Problems:
6548cf00 111
7b00d185
KL
112 * Suspending Emacs is disabled if there are multiple tty
113 devices. Also, there is no way to suspend emacsclient. This
114 will be fixed.
115
7b00d185
KL
116 * Mac, Windows and DOS support is broken, probably doesn't
117 even compile -- this will be solved later.
118
2246281f 119 * Only tested on my GNU/Linux box and on Solaris 8.
28d440ab
KL
120
121NEWS
122----
123
124For the NEWS file:
125
2246281f 126** Support for multiple terminal devices has been added.
6548cf00 127
2246281f
KL
128*** You can specify a terminal device (`tty' parameter) and a terminal
129 type (`tty-type' parameter) to `make-terminal-frame'.
6548cf00 130
2246281f
KL
131*** You can test for the presence of multiple terminal support by
132 testing for the `multi-tty' feature.
28d440ab 133
2246281f
KL
134*** Emacsclient has been extended to support opening a new terminal
135 frame (see -t option).
136
137*** A make-frame-on-tty function has been added to make it easier to
138 create frames on new terminals.
139
140*** New functions: frame-tty-name, frame-tty-type for accessing
141 terminal parameters, and delete-tty for closing the terminal
142 device.
143
144*** talk.el has been extended for multiple tty support.
145
146
147** Support for simultaneous graphical and terminal frames has been
148 added.
149
150*** The function `make-frame-on-display' now works during a terminal
151 session, and `make-frame-on-tty' works during a graphical session.
152
153*** The `window-system' variable has been made frame-local.
154
155*** The new `initial-window-system' variable contains the
156 `window-system' value for the first frame.
819b8f00 157
d448e982
KL
158THANKS
159------
160
161The following is an (incomplete) list of people who have contributed
162to the project by testing, bug reports, and suggestions. Thanks!
163
0c72d684 164Robert J. Chassel <bob at rattlesnake dot com>
806c1866 165Romain Francoise <romain at orebokech dot com>
0c72d684 166Ami Fischman <ami at fischman dot org>
4edd8a5c 167Istvan Marko <mi-mtty ar kismala dot com>
0c72d684
KL
168Dan Nicolaescu <dann at ics dot uci dot edu>
169
170Richard Stallman was kind enough to review my patches.
d448e982 171
28d440ab
KL
172CHANGELOG
173---------
174
175See arch logs.
176
7b00d185
KL
177THINGS TO DO
178------------
4edd8a5c
KL
179
180** There is a flicker during the startup of `emacs -nw'; it's as if
181 the terminal is initialized, reset and then initialialized again.
182 Debug this. (Hint: narrow_foreground_group is called twice during
183 startup.)
184
0c72d684
KL
185** Dan Nicolaescu (dann at ics dot uci dot edu) suggests that -nw
186 should be added as an alias for -t in emacsclient. Good idea.
187 (Alas, implementing this is not trivial, getopt_long does not seem
188 to support two-letter ``short'' options.)
7b00d185 189
d448e982 190** Robert J. Chassell reports:
e9cda827 191
d448e982
KL
192 > * After starting the frame in the VC, I saw this message in the
193 > *Message* buffer
194 >
195 > error in process filter: server-process-filter: \
196 > Wrong type argument: sequencep,\
197 > framep
198 > error in process filter: Wrong type argument: sequencep, framep
199 >
200 > This also happens when I start a new frame in an xterm.
201
4ca927b4
KL
202** Very strange bug: visible-bell does not work on secondary
203 terminals. This might be something xterm (konsole) specific.
204
7b00d185
KL
205** Find out the best way to support suspending Emacs with multiple
206 ttys. My guess: disable it on the controlling tty, but from other
207 ttys pass it on to emacsclient somehow. (It is (I hope) trivial to
208 extend emacsclient to handle suspend/resume. A `kill -STOP' almost
209 works right now.)
210
bacb6689
KL
211** Clean up the frame-local variable system. I think it's ugly and
212 error-prone. But maybe I just haven't yet fully understood it.
213
214** Add an elaborate mechanism for display-local variables. (There are
215 already a few of these; search for `terminal-local' in the Elisp
216 manual.)
217
428a555e 218** Move baud_rate to struct display.
7b00d185 219
7b00d185
KL
220** Implement support for starting an interactive Emacs session without
221 an initial frame. (The user would connect to it and open frames
222 later, with emacsclient.) Not necessarily a good idea.
223
3224dac1
KL
224** Fix Mac support (I can't do this myself). Note that the current
225 state of Mac-specific source files in the multi-tty tree are not
226 useful; before starting work on Mac support, revert to pristine,
227 pre-multi-tty versions.
7b00d185 228
3224dac1
KL
229** Fix W32 support (I can't do this myself). Note that the current
230 state of W32-specific source files in the multi-tty tree are not
231 useful; before starting work on W32 support, revert to pristine,
232 pre-multi-tty versions.
7b00d185 233
3224dac1
KL
234** Fix DOS support (I can't do this myself). Note that the current
235 state of DOS-specific source files in the multi-tty tree are not
236 useful; before starting work on DOS support, revert to pristine,
237 pre-multi-tty versions.
7b00d185
KL
238
239** Do a grep on XXX and ?? for more issues.
240
241** Understand Emacs's low-level input system (it seems complicated) :-)
428a555e 242 What does interrupt_input do? I tried to disable it for raw
7b00d185
KL
243 secondary tty support, but it does not seem to do anything useful.
244 (Update: Look again. X unconditionally enables this, maybe that's
245 why raw terminal support is broken again. I really do need to
246 understand input.)
247
7b00d185
KL
248** emacsclient -t from an Emacs term buffer does not work, complains
249 about face problems. This can even lock up Emacs (if the recursive
428a555e
KL
250 frame sets single_kboard). Update: the face problems are caused by
251 bugs in term.el, not in multi-tty. The lockup is caused by
4ca927b4
KL
252 single_kboard mode, and is not easily solvable. The best thing to
253 do is to simply refuse to create a tty frame of type `eterm'.
4d553a13 254
2246281f
KL
255** Maybe standard-display-table should be display-local.
256
6548cf00
KL
257DIARY OF CHANGES
258----------------
259
260(ex-TODO items with explanations.)
28d440ab 261
114a8b8c 262-- Introduce a new struct for terminal devices.
28d440ab 263
daf01701 264 (Done, see struct tty_output. The list of members is not yet
28d440ab
KL
265 complete.)
266
28d440ab
KL
267-- Change the bootstrap procedure to initialize tty_list.
268
269 (Done, but needs review.)
270
28d440ab
KL
271-- Change make-terminal-frame to support specifying another tty.
272
273 (Done, new frame parameters: `tty' and `tty-type'.)
274
9628b887
KL
275-- Implement support for reading from multiple terminals.
276
277 (Done, read_avail_input tries to read from each terminal, until one
28d7d09f 278 succeeds. MULTI_KBOARD is not used. Secondary terminals don't send
6548cf00 279 SIGIO!)
9628b887 280
819b8f00
KL
281 (Update: They do, now.)
282
daf01701
KL
283 (Update2: After enabling X, they don't.)
284
9628b887 285-- other-frame should cycle through the frames on the `current'
114a8b8c 286 terminal only.
9628b887 287
6548cf00 288 (Done, by trivially modifiying next_frame and prev_frame.)
9628b887
KL
289
290-- Support different terminal sizes.
114a8b8c 291
9628b887
KL
292 (Done, no problem.)
293
294-- Make sure terminal resizes are handled gracefully. (Could be
295 problematic.)
296
6548cf00
KL
297 (Done. We don't get automatic SIGWINCH for additional ttys,
298 though.)
9628b887
KL
299
300-- Extend emacsclient to automatically open a new tty when it connects
301 to Emacs.
114a8b8c 302
9628b887
KL
303 (Done. It's an ugly hack, needs more work.)
304
52c2ee2a
KL
305-- Redisplay must refresh the topmost frame on *all* terminals, not
306 just the initial terminal.
114a8b8c 307
52c2ee2a 308 (Done, but introduced an ugly redisplay problems. Ugh.)
9628b887 309
6548cf00
KL
310-- Fix redisplay problems.
311
52c2ee2a
KL
312 (Done; it turned out that the entire Wcm structure must be moved
313 inside tty_output. Why didn't I catch this earlier?)
6548cf00
KL
314
315-- Provide a way for emacsclient to tell Emacs that the tty has been
316 resized.
317
318 (Done, simply forward the SIGWINCH signal.)
319
320-- Each keypress should automatically select the frame corresponding
321 to the terminal that it was coming from. This means that Emacs
322 must know from which terminal the last keyboard event came from.
6548cf00 323
52c2ee2a
KL
324 (Done, it was quite simple, the input event system already
325 supported multiple frames.)
6548cf00
KL
326
327-- Fix SIGIO issue with secondary terminals.
328
329 (Done, emacsclient signals Emacs after writing to the proxy pseudo
52c2ee2a
KL
330 terminal. Note that this means that multi-tty does not work with
331 raw ttys!)
28d440ab 332
0a125897
KL
333 (Update: This is bullshit. There is a read_input_waiting function,
334 extend that somehow.)
335
819b8f00
KL
336 (Update of update: The first update was not right either, extending
337 read_input_waiting was not necessary. Secondary ttys do seem to
338 send signals on input.)
339
daf01701
KL
340 (Update^3: Not any more.)
341
fca177d4
KL
342-- Make make-terminal-frame look up the `tty' and `tty-type' frame
343 parameters from the currently selected terminal before the global
344 default.
345
346 (Done.)
347
348-- Put all cached terminal escape sequences into struct tty_output.
349 Currently, they are still stored in global variables, so we don't
350 really support multiple terminal types.
351
52c2ee2a 352 (Done. It was not fun.)
fca177d4
KL
353
354-- Implement sane error handling after initialization. (Currently
6548cf00
KL
355 emacs exits if you specify a bad terminal type.) The helpful error
356 messages must still be provided when Emacs starts.
357
fca177d4
KL
358 (Done.)
359
360-- Implement terminal deletion, i.e., deleting local frames, closing
361 the tty device and restoring its previous state without exiting
362 Emacs.
9628b887 363
fca177d4
KL
364 (Done, but at the moment only called when an error happens during
365 initialization. There is a memory corruption error around this
daf01701 366 somewhere.) (Update: now it is fully enabled.)
fca177d4 367
8303ba32
KL
368-- Implement automatic deletion of terminals when the last frame on
369 that terminal is closed.
370
371 (Done.)
372
0a125897
KL
373-- Restore tty screen after closing the terminal.
374
375 (Done, we do the same as Emacs 21.2 for all terminals.)
376
377-- 'TERM=dumb src/emacs' does not restore the terminal state.
114a8b8c 378
0a125897 379 (Done.)
fca177d4 380
b2af72d2
KL
381-- C-g should work on secondary terminals.
382
383 (Done, but the binding is not configurable.)
384
385-- Deal with SIGHUP in Emacs and in emacsclient. (After this, the
386 server-frames may be removed from server.el.)
387
388 (Done, nothing to do. It seems that Emacs does not receive SIGHUP
daf01701 389 from secondary ttys, which is actually a good thing.) (Update: I
7b00d185 390 think it would be a bad idea to remove server-frames.)
b2af72d2 391
daf01701 392-- Change emacsclient/server.el to support the -t argument better,
b2af72d2
KL
393 i.e. automatically close the socket when the frame is closed.
394
395 (Seems to be working OK.)
396
16c290d8 397-- Fix mysterious memory corruption error with tty deletion. To
fca177d4
KL
398 trigger it, try the following shell command:
399
400 while true; do TERM=no-such-terminal-definition emacsclient -h; done
401
402 Emacs usually dumps core after a few dozen iterations. (The bug
3224dac1 403 seems to be related to the xfreeing or bzeroing of
9d9f1812
KL
404 tty_output.Wcm. Maybe there are outside references to struct Wcm?
405 Why were these vars collected into a struct before multi-tty
406 support?)
fca177d4 407
16c290d8
KL
408 (Done. Whew. It turned out that the problem had nothing to do
409 with hypothetical external references to Wcm, or any other
410 tty_output component; it was simply that delete_tty closed the
411 filehandles of secondary ttys twice, resulting in fclose doubly
3224dac1 412 freeing memory. Utterly trivial matter. I love the C's memory
16c290d8
KL
413 management, it puts hair on your chest.)
414
819b8f00 415-- Support raw secondary terminals. (Note that SIGIO works only on
3224dac1 416 the controlling terminal.) Hint: extend read_input_waiting for
819b8f00 417 multiple ttys and hopefully this will be fixed.
fca177d4 418
819b8f00
KL
419 (Done, it seems to have been working already for some time. It
420 seems F_SETOWN does work, after all. Not sure what made it fail
421 earlier, but it seems to be fixed (there were several changes
422 around request_sigio, maybe one of them did it).
3224dac1 423 read_input_waiting is only used in sys_select, don't change
daf01701 424 it.) (Update: After adding X support, it's broken again.)
c1c63edb 425
819b8f00 426-- Find out why does Emacs abort when it wants to close its
0a125897 427 controlling tty. Hint: chan_process[] array. Hey, maybe
16c290d8
KL
428 noninterrupt-IO would work, too? Update: no, there is no process
429 for stdin/out.
c33d2d42 430
819b8f00
KL
431 (Done. Added add/delete_keyboard_wait_descriptor to
432 term_init/delete_tty. The hint was right, in a way.)
6548cf00 433
819b8f00 434-- Issue with SIGIO: it needs to be disabled during redisplay. See if
3224dac1 435 fcntl kernel behaviour could be emulated by emacsclient.
0a125897 436
819b8f00 437 (Done. Simply disabled the SIGIO emulation hack in emacsclient.)
daf01701 438 (Update: it was added back.)
22de1e79 439
819b8f00 440-- server.el: There are issues with saving files in buffers of closed
16c290d8
KL
441 clients. Try editing a file with emacsclient -f, and (without
442 saving it) do a delete-frame. The frame is closed without
443 question, and a surprising confirmation prompt appears in another
444 frame.
445
819b8f00
KL
446 (Done. delete-frame now asks for confirmation if it still has
447 pending buffers, and modified buffers don't seem to be deleted.)
448
449-- emacsclient.el, server.el: Handle eval or file open errors when
daf01701 450 doing -t.
16c290d8 451
819b8f00 452 (Done.)
22de1e79 453
819b8f00
KL
454-- Make parts of struct tty_output accessible from Lisp. The device
455 name and the type is sufficient.
22de1e79 456
819b8f00
KL
457 (Done, see frame-tty-name and frame-tty-type.)
458
459-- Export delete_tty to the Lisp environment, for emacsclient.
22de1e79 460
819b8f00
KL
461 (Done, see delete-tty.)
462
daf01701
KL
463-- Get rid of the accessor macros in termchar.h, or define macros for
464 all members.
465
466 (Done.)
467
468-- Move device-specific parameters (like costs) commonly used by
469 device backends to a common, device-dependent structure.
470
471 (Done. See struct display_method in termhooks.h.)
472
473-- Fix X support.
474
475 (Done. Well, it seems to be working.)
476
477-- Allow simultaneous X and tty frames. (Handling input could be
478 tricky. Or maybe not.)
479
480 (Done. Allowed, that is. It is currently extremely unstable, to
481 the point of being unusable. The rif variable causes constant
482 core dumps. Handling input is indeed tricky.)
819b8f00 483
7b00d185 484-- Rewrite multi-tty input in terms of MULTI_KBOARD.
28d440ab 485
7b00d185
KL
486 (Done. In fact, there was no need to rewrite anything, I just
487 added a kboard member to tty_display_info, and initialized the
488 frame's kboard from there.)
819b8f00 489
fa971ac3
KL
490-- Fix rif issue with X-tty combo sessions. IMHO the best thing to do
491 is to get rid of that global variable (and use the value value in
492 display_method, which is guaranteed to be correct).
493
494 (Done, did exactly that. Core dumps during combo sessions became
495 much rarer. In fact, I have not yet met a single one.)
496
17086732
KL
497-- Add multi-tty support to talk.el.
498
499 (Done.)
500
428a555e
KL
501-- Clean up the source of emacsclient. It is a mess.
502
503 (Done, eliminated stupid proxy-pty kludge.)
504
505-- Fix faces on tty frames during X-tty combo sessions. There is an
506 init_frame_faces call in init_sys_modes, see if there is a problem
507 with it.
508
509 (Done, there was a stupid mistake in
510 Ftty_supports_face_attributes_p. Colors are broken, though.)
511
512-- C-x 5 2, C-x 5 o, C-x 5 0 on an emacsclient frame unexpectedly
513 exits emacsclient. This is a result of trying to be clever with
514 delete-frame-functions.
515
516 (Fixed, added delete-tty-after-functions, and changed server.el to
517 use it.)
518
519-- Something with (maybe) multi-keyboard support broke function keys
520 and arrows on ttys during X+tty combo sessions. Debug this.
521
522 (I can't reproduce it, maybe the terminal type was wrong.)
523
524-- Fix input from raw ttys (again).
525
526 (Now it seems to work all right.)
527
528-- During an X-tty combo session, a (message "Hello") from a tty frame
529 goes to the X frame. Fix this.
530
531 (Done. There was a safeguard against writing to the initial
532 terminal frame during bootstrap which prevented echo_area_display
533 from working correctly on a tty frame during a combo session.)
534
114a8b8c
KL
535-- If there are no frames on its controlling terminal, Emacs should
536 exit if the uses presses C-c there.
537
538 (Done, as far as possible. See the SIGTERM comment in
539 interrupt_signal on why this seems to be impossible to solve this
540 in general.)
541
542-- During an X session, Emacs seems to read from stdin. Also, Emacs
543 fails to start without a controlling tty.
544
545 (Fixed by replacing the troublesome termcap display with a dummy
546 bootstrap display during bootstrap.
547
548-- Do tty output through struct display, like graphical display
549 backends.
550
551 (Done.)
552
553-- Define an output_initial value for output_method for the initial
554 frame that is dumped with Emacs. Checking for this frame (e.g. in
555 cmd_error_internal) is ugly.
556
557 (Done, broking interactive temacs.)
558
559-- The command `emacsclient -t -e '(delete-frame)'' fails to exit.
560
561 (Fixed.)
562
4ca927b4
KL
563-- frame-creation-function should always create a frame that is on the
564 same display as the selected frame. Maybe frame-creation-function
565 should simply be removed and make-frame changed to do the right
566 thing.
567
568 (Done, with a nice hack. frame-creation-function is now frame-local.)
569
570-- Fix C-g on raw ttys.
571
572 (Done. I disabled the interrupt/quit keys on all secondary
573 terminals, so Emacs sees C-g as normal input. This looks like an
574 overkill, because emacsclient has extra code to pass SIGINT to
575 Emacs, so C-g should remain the interrupt/quit key on emacsclient
576 frames. See the next entry why implementing this distinction would
577 be a bad idea.)
578
579-- Make sure C-g goes to the right frame with ttys. This is hard, as
580 SIGINT doesn't have a tty parameter. :-(
581
582 (Done, the previous change fixes this as a pleasant side effect.)
583
c0707982
KL
584-- I have seen a case when Emacs with multiple ttys fell into a loop
585 eating 100% of CPU time. Strace showed this loop:
586
587 getpid() = 30284
588 kill(30284, SIGIO) = 0
589 --- SIGIO (I/O possible) @ 0 (0) ---
590 ioctl(6, FIONREAD, [0]) = -1 EIO (Input/output error)
591 ioctl(5, FIONREAD, [0]) = -1 EIO (Input/output error)
592 ioctl(0, FIONREAD, [0]) = 0
593 sigreturn() = ? (mask now [])
594 gettimeofday({1072842297, 747760}, NULL) = 0
595 gettimeofday({1072842297, 747806}, NULL) = 0
596 select(9, [0 3 5 6], NULL, NULL, {0, 0}) = 2 (in [5 6], left {0, 0})
597 select(9, [0 3 5 6], NULL, NULL, {0, 0}) = 2 (in [5 6], left {0, 0})
598 gettimeofday({1072842297, 748245}, NULL) = 0
599
600 I have seen something similar with a single X frame, but have not
601 been able to reproduce it for debugging.
602
603 Update: This may have been caused by checking for nread != 0
604 instead of nread > 0 after calling read_socket_hook in
605 read_avail_input.
606
607 (Fixed. This was caused by unconditionally including stdin in
608 input_wait_mask in init_process. The select call in
609 wait_reading_process_input always returned immediately, indicating
610 that there is pending input from stdin, which nobody read.
611
612 Note that the above strace output seems to be an unrelated but
613 similar bug. I think that is now fixed.)
4ca927b4 614
2246281f
KL
615-- Exiting Emacs while there are emacsclient frames doesn't restore the
616 ttys to their default states.
617
618 (This seems to be fixed by some previous change.)
619
620-- Allow opening an X session after -nw.
621
622 (Done.)
623
d448e982
KL
624-- Fix color handling during tty+X combo sessions. (It seems that tty
625 sessions automatically convert the face colors to terminal colors
626 when the face is loaded. This conversion must happen instead on
627 the fly in write_glyphs, which might be problematic, as color
628 approximation is currently done in lisp (term/tty-colors.el).)
629 (Update: hm, colors seem to work fine if I start emacs with -nw and
630 then create an X frame. Maybe it's just a small buglet somewhere.)
631
632 (Seems to be fixed. The problem was in startup.el, it did not
633 initialize tty colors when the initial window system was
634 graphical.)
2246281f 635
2441679b
KL
636-- emacs -nw --eval '(y-or-n-p "Foobar")' segfaults. (Reported by
637 Romain Francoise)
638
639 (Fixed, there was a keyboard initialization problem.)
640
3bbdbec9
KL
641-- Fix interactive use of temacs. There are face-related SEGVs, most
642 likely because of changes in realize_default_face, realize_face.
643
644 (Fixed.)
645
bacb6689
KL
646-- Don't exit Emacs when the last X connection fails during a
647 multi-display session.
648
649 (Fixed.)
650
0c72d684
KL
651
652-- Dan Nicolaescu noticed that starting emacsclient on the same
653 terminal device that is the controlling tty of the Emacs process
654 gives unexpected results.
655
656 (Fixed.)
657
4edd8a5c
KL
658-- Istvan Marko reported that Emacs hang on ttys if it was started
659 from a shell script.
660
661 (Fixed. There was a bug in the multi-tty version of
662 narrow_foreground_group. tcsetpgrp blocks if it is called from a
663 process that is not in the same process group as the tty.)
664
28d440ab 665;;; arch-tag: 8da1619e-2e79-41a8-9ac9-a0485daad17d