Mercurial > emacs
comparison README.multi-tty @ 83013:e77d1a63471b
Don't select on stdin unconditionally.
src/process.c (init_process): Don't add stdin to input_wait_mask.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-53
author | Karoly Lorentey <lorentey@elte.hu> |
---|---|
date | Sun, 11 Jan 2004 11:26:00 +0000 |
parents | 4aa172a45af1 |
children | f5cadabb36dd |
comparison
equal
deleted
inserted
replaced
83012:4aa172a45af1 | 83013:e77d1a63471b |
---|---|
178 secondary tty support, but it does not seem to do anything useful. | 178 secondary tty support, but it does not seem to do anything useful. |
179 (Update: Look again. X unconditionally enables this, maybe that's | 179 (Update: Look again. X unconditionally enables this, maybe that's |
180 why raw terminal support is broken again. I really do need to | 180 why raw terminal support is broken again. I really do need to |
181 understand input.) | 181 understand input.) |
182 | 182 |
183 ** I have seen a case when Emacs with multiple ttys fell into a loop | 183 ** emacsclient -t from an Emacs term buffer does not work, complains |
184 about face problems. This can even lock up Emacs (if the recursive | |
185 frame sets single_kboard). Update: the face problems are caused by | |
186 bugs in term.el, not in multi-tty. The lockup is caused by | |
187 single_kboard mode, and is not easily solvable. The best thing to | |
188 do is to simply refuse to create a tty frame of type `eterm'. | |
189 | |
190 DIARY OF CHANGES | |
191 ---------------- | |
192 | |
193 (ex-TODO items with explanations.) | |
194 | |
195 -- Introduce a new struct for terminal devices. | |
196 | |
197 (Done, see struct tty_output. The list of members is not yet | |
198 complete.) | |
199 | |
200 -- Change the bootstrap procedure to initialize tty_list. | |
201 | |
202 (Done, but needs review.) | |
203 | |
204 -- Change make-terminal-frame to support specifying another tty. | |
205 | |
206 (Done, new frame parameters: `tty' and `tty-type'.) | |
207 | |
208 -- Implement support for reading from multiple terminals. | |
209 | |
210 (Done, read_avail_input tries to read from each terminal, until one | |
211 succeeds. MULTI_KBOARD is not used. Secondary terminals don't send | |
212 SIGIO!) | |
213 | |
214 (Update: They do, now.) | |
215 | |
216 (Update2: After enabling X, they don't.) | |
217 | |
218 -- other-frame should cycle through the frames on the `current' | |
219 terminal only. | |
220 | |
221 (Done, by trivially modifiying next_frame and prev_frame.) | |
222 | |
223 -- Support different terminal sizes. | |
224 | |
225 (Done, no problem.) | |
226 | |
227 -- Make sure terminal resizes are handled gracefully. (Could be | |
228 problematic.) | |
229 | |
230 (Done. We don't get automatic SIGWINCH for additional ttys, | |
231 though.) | |
232 | |
233 -- Extend emacsclient to automatically open a new tty when it connects | |
234 to Emacs. | |
235 | |
236 (Done. It's an ugly hack, needs more work.) | |
237 | |
238 -- Redisplay must refresh the topmost frame on *all* terminals, not | |
239 just the initial terminal. | |
240 | |
241 (Done, but introduced an ugly redisplay problems. Ugh.) | |
242 | |
243 -- Fix redisplay problems. | |
244 | |
245 (Done; it turned out that the entire Wcm structure must be moved | |
246 inside tty_output. Why didn't I catch this earlier?) | |
247 | |
248 -- Provide a way for emacsclient to tell Emacs that the tty has been | |
249 resized. | |
250 | |
251 (Done, simply forward the SIGWINCH signal.) | |
252 | |
253 -- Each keypress should automatically select the frame corresponding | |
254 to the terminal that it was coming from. This means that Emacs | |
255 must know from which terminal the last keyboard event came from. | |
256 | |
257 (Done, it was quite simple, the input event system already | |
258 supported multiple frames.) | |
259 | |
260 -- Fix SIGIO issue with secondary terminals. | |
261 | |
262 (Done, emacsclient signals Emacs after writing to the proxy pseudo | |
263 terminal. Note that this means that multi-tty does not work with | |
264 raw ttys!) | |
265 | |
266 (Update: This is bullshit. There is a read_input_waiting function, | |
267 extend that somehow.) | |
268 | |
269 (Update of update: The first update was not right either, extending | |
270 read_input_waiting was not necessary. Secondary ttys do seem to | |
271 send signals on input.) | |
272 | |
273 (Update^3: Not any more.) | |
274 | |
275 -- Make make-terminal-frame look up the `tty' and `tty-type' frame | |
276 parameters from the currently selected terminal before the global | |
277 default. | |
278 | |
279 (Done.) | |
280 | |
281 -- Put all cached terminal escape sequences into struct tty_output. | |
282 Currently, they are still stored in global variables, so we don't | |
283 really support multiple terminal types. | |
284 | |
285 (Done. It was not fun.) | |
286 | |
287 -- Implement sane error handling after initialization. (Currently | |
288 emacs exits if you specify a bad terminal type.) The helpful error | |
289 messages must still be provided when Emacs starts. | |
290 | |
291 (Done.) | |
292 | |
293 -- Implement terminal deletion, i.e., deleting local frames, closing | |
294 the tty device and restoring its previous state without exiting | |
295 Emacs. | |
296 | |
297 (Done, but at the moment only called when an error happens during | |
298 initialization. There is a memory corruption error around this | |
299 somewhere.) (Update: now it is fully enabled.) | |
300 | |
301 -- Implement automatic deletion of terminals when the last frame on | |
302 that terminal is closed. | |
303 | |
304 (Done.) | |
305 | |
306 -- Restore tty screen after closing the terminal. | |
307 | |
308 (Done, we do the same as Emacs 21.2 for all terminals.) | |
309 | |
310 -- 'TERM=dumb src/emacs' does not restore the terminal state. | |
311 | |
312 (Done.) | |
313 | |
314 -- C-g should work on secondary terminals. | |
315 | |
316 (Done, but the binding is not configurable.) | |
317 | |
318 -- Deal with SIGHUP in Emacs and in emacsclient. (After this, the | |
319 server-frames may be removed from server.el.) | |
320 | |
321 (Done, nothing to do. It seems that Emacs does not receive SIGHUP | |
322 from secondary ttys, which is actually a good thing.) (Update: I | |
323 think it would be a bad idea to remove server-frames.) | |
324 | |
325 -- Change emacsclient/server.el to support the -t argument better, | |
326 i.e. automatically close the socket when the frame is closed. | |
327 | |
328 (Seems to be working OK.) | |
329 | |
330 -- Fix mysterious memory corruption error with tty deletion. To | |
331 trigger it, try the following shell command: | |
332 | |
333 while true; do TERM=no-such-terminal-definition emacsclient -h; done | |
334 | |
335 Emacs usually dumps core after a few dozen iterations. (The bug | |
336 seems to be related to the xfreeing or bzeroing of | |
337 tty_output.Wcm. Maybe there are outside references to struct Wcm? | |
338 Why were these vars collected into a struct before multi-tty | |
339 support?) | |
340 | |
341 (Done. Whew. It turned out that the problem had nothing to do | |
342 with hypothetical external references to Wcm, or any other | |
343 tty_output component; it was simply that delete_tty closed the | |
344 filehandles of secondary ttys twice, resulting in fclose doubly | |
345 freeing memory. Utterly trivial matter. I love the C's memory | |
346 management, it puts hair on your chest.) | |
347 | |
348 -- Support raw secondary terminals. (Note that SIGIO works only on | |
349 the controlling terminal.) Hint: extend read_input_waiting for | |
350 multiple ttys and hopefully this will be fixed. | |
351 | |
352 (Done, it seems to have been working already for some time. It | |
353 seems F_SETOWN does work, after all. Not sure what made it fail | |
354 earlier, but it seems to be fixed (there were several changes | |
355 around request_sigio, maybe one of them did it). | |
356 read_input_waiting is only used in sys_select, don't change | |
357 it.) (Update: After adding X support, it's broken again.) | |
358 | |
359 -- Find out why does Emacs abort when it wants to close its | |
360 controlling tty. Hint: chan_process[] array. Hey, maybe | |
361 noninterrupt-IO would work, too? Update: no, there is no process | |
362 for stdin/out. | |
363 | |
364 (Done. Added add/delete_keyboard_wait_descriptor to | |
365 term_init/delete_tty. The hint was right, in a way.) | |
366 | |
367 -- Issue with SIGIO: it needs to be disabled during redisplay. See if | |
368 fcntl kernel behaviour could be emulated by emacsclient. | |
369 | |
370 (Done. Simply disabled the SIGIO emulation hack in emacsclient.) | |
371 (Update: it was added back.) | |
372 | |
373 -- server.el: There are issues with saving files in buffers of closed | |
374 clients. Try editing a file with emacsclient -f, and (without | |
375 saving it) do a delete-frame. The frame is closed without | |
376 question, and a surprising confirmation prompt appears in another | |
377 frame. | |
378 | |
379 (Done. delete-frame now asks for confirmation if it still has | |
380 pending buffers, and modified buffers don't seem to be deleted.) | |
381 | |
382 -- emacsclient.el, server.el: Handle eval or file open errors when | |
383 doing -t. | |
384 | |
385 (Done.) | |
386 | |
387 -- Make parts of struct tty_output accessible from Lisp. The device | |
388 name and the type is sufficient. | |
389 | |
390 (Done, see frame-tty-name and frame-tty-type.) | |
391 | |
392 -- Export delete_tty to the Lisp environment, for emacsclient. | |
393 | |
394 (Done, see delete-tty.) | |
395 | |
396 -- Get rid of the accessor macros in termchar.h, or define macros for | |
397 all members. | |
398 | |
399 (Done.) | |
400 | |
401 -- Move device-specific parameters (like costs) commonly used by | |
402 device backends to a common, device-dependent structure. | |
403 | |
404 (Done. See struct display_method in termhooks.h.) | |
405 | |
406 -- Fix X support. | |
407 | |
408 (Done. Well, it seems to be working.) | |
409 | |
410 -- Allow simultaneous X and tty frames. (Handling input could be | |
411 tricky. Or maybe not.) | |
412 | |
413 (Done. Allowed, that is. It is currently extremely unstable, to | |
414 the point of being unusable. The rif variable causes constant | |
415 core dumps. Handling input is indeed tricky.) | |
416 | |
417 -- Rewrite multi-tty input in terms of MULTI_KBOARD. | |
418 | |
419 (Done. In fact, there was no need to rewrite anything, I just | |
420 added a kboard member to tty_display_info, and initialized the | |
421 frame's kboard from there.) | |
422 | |
423 -- Fix rif issue with X-tty combo sessions. IMHO the best thing to do | |
424 is to get rid of that global variable (and use the value value in | |
425 display_method, which is guaranteed to be correct). | |
426 | |
427 (Done, did exactly that. Core dumps during combo sessions became | |
428 much rarer. In fact, I have not yet met a single one.) | |
429 | |
430 -- Add multi-tty support to talk.el. | |
431 | |
432 (Done.) | |
433 | |
434 -- Clean up the source of emacsclient. It is a mess. | |
435 | |
436 (Done, eliminated stupid proxy-pty kludge.) | |
437 | |
438 -- Fix faces on tty frames during X-tty combo sessions. There is an | |
439 init_frame_faces call in init_sys_modes, see if there is a problem | |
440 with it. | |
441 | |
442 (Done, there was a stupid mistake in | |
443 Ftty_supports_face_attributes_p. Colors are broken, though.) | |
444 | |
445 -- C-x 5 2, C-x 5 o, C-x 5 0 on an emacsclient frame unexpectedly | |
446 exits emacsclient. This is a result of trying to be clever with | |
447 delete-frame-functions. | |
448 | |
449 (Fixed, added delete-tty-after-functions, and changed server.el to | |
450 use it.) | |
451 | |
452 -- Something with (maybe) multi-keyboard support broke function keys | |
453 and arrows on ttys during X+tty combo sessions. Debug this. | |
454 | |
455 (I can't reproduce it, maybe the terminal type was wrong.) | |
456 | |
457 -- Fix input from raw ttys (again). | |
458 | |
459 (Now it seems to work all right.) | |
460 | |
461 -- During an X-tty combo session, a (message "Hello") from a tty frame | |
462 goes to the X frame. Fix this. | |
463 | |
464 (Done. There was a safeguard against writing to the initial | |
465 terminal frame during bootstrap which prevented echo_area_display | |
466 from working correctly on a tty frame during a combo session.) | |
467 | |
468 -- If there are no frames on its controlling terminal, Emacs should | |
469 exit if the uses presses C-c there. | |
470 | |
471 (Done, as far as possible. See the SIGTERM comment in | |
472 interrupt_signal on why this seems to be impossible to solve this | |
473 in general.) | |
474 | |
475 -- During an X session, Emacs seems to read from stdin. Also, Emacs | |
476 fails to start without a controlling tty. | |
477 | |
478 (Fixed by replacing the troublesome termcap display with a dummy | |
479 bootstrap display during bootstrap. | |
480 | |
481 -- Do tty output through struct display, like graphical display | |
482 backends. | |
483 | |
484 (Done.) | |
485 | |
486 -- Define an output_initial value for output_method for the initial | |
487 frame that is dumped with Emacs. Checking for this frame (e.g. in | |
488 cmd_error_internal) is ugly. | |
489 | |
490 (Done, broking interactive temacs.) | |
491 | |
492 -- The command `emacsclient -t -e '(delete-frame)'' fails to exit. | |
493 | |
494 (Fixed.) | |
495 | |
496 -- frame-creation-function should always create a frame that is on the | |
497 same display as the selected frame. Maybe frame-creation-function | |
498 should simply be removed and make-frame changed to do the right | |
499 thing. | |
500 | |
501 (Done, with a nice hack. frame-creation-function is now frame-local.) | |
502 | |
503 -- Fix C-g on raw ttys. | |
504 | |
505 (Done. I disabled the interrupt/quit keys on all secondary | |
506 terminals, so Emacs sees C-g as normal input. This looks like an | |
507 overkill, because emacsclient has extra code to pass SIGINT to | |
508 Emacs, so C-g should remain the interrupt/quit key on emacsclient | |
509 frames. See the next entry why implementing this distinction would | |
510 be a bad idea.) | |
511 | |
512 -- Make sure C-g goes to the right frame with ttys. This is hard, as | |
513 SIGINT doesn't have a tty parameter. :-( | |
514 | |
515 (Done, the previous change fixes this as a pleasant side effect.) | |
516 | |
517 -- I have seen a case when Emacs with multiple ttys fell into a loop | |
184 eating 100% of CPU time. Strace showed this loop: | 518 eating 100% of CPU time. Strace showed this loop: |
185 | 519 |
186 getpid() = 30284 | 520 getpid() = 30284 |
187 kill(30284, SIGIO) = 0 | 521 kill(30284, SIGIO) = 0 |
188 --- SIGIO (I/O possible) @ 0 (0) --- | 522 --- SIGIO (I/O possible) @ 0 (0) --- |
201 | 535 |
202 Update: This may have been caused by checking for nread != 0 | 536 Update: This may have been caused by checking for nread != 0 |
203 instead of nread > 0 after calling read_socket_hook in | 537 instead of nread > 0 after calling read_socket_hook in |
204 read_avail_input. | 538 read_avail_input. |
205 | 539 |
206 ** emacsclient -t from an Emacs term buffer does not work, complains | 540 (Fixed. This was caused by unconditionally including stdin in |
207 about face problems. This can even lock up Emacs (if the recursive | 541 input_wait_mask in init_process. The select call in |
208 frame sets single_kboard). Update: the face problems are caused by | 542 wait_reading_process_input always returned immediately, indicating |
209 bugs in term.el, not in multi-tty. The lockup is caused by | 543 that there is pending input from stdin, which nobody read. |
210 single_kboard mode, and is not easily solvable. The best thing to | 544 |
211 do is to simply refuse to create a tty frame of type `eterm'. | 545 Note that the above strace output seems to be an unrelated but |
212 | 546 similar bug. I think that is now fixed.) |
213 DIARY OF CHANGES | |
214 ---------------- | |
215 | |
216 (ex-TODO items with explanations.) | |
217 | |
218 -- Introduce a new struct for terminal devices. | |
219 | |
220 (Done, see struct tty_output. The list of members is not yet | |
221 complete.) | |
222 | |
223 -- Change the bootstrap procedure to initialize tty_list. | |
224 | |
225 (Done, but needs review.) | |
226 | |
227 -- Change make-terminal-frame to support specifying another tty. | |
228 | |
229 (Done, new frame parameters: `tty' and `tty-type'.) | |
230 | |
231 -- Implement support for reading from multiple terminals. | |
232 | |
233 (Done, read_avail_input tries to read from each terminal, until one | |
234 succeeds. MULTI_KBOARD is not used. Secondary terminals don't send | |
235 SIGIO!) | |
236 | |
237 (Update: They do, now.) | |
238 | |
239 (Update2: After enabling X, they don't.) | |
240 | |
241 -- other-frame should cycle through the frames on the `current' | |
242 terminal only. | |
243 | |
244 (Done, by trivially modifiying next_frame and prev_frame.) | |
245 | |
246 -- Support different terminal sizes. | |
247 | |
248 (Done, no problem.) | |
249 | |
250 -- Make sure terminal resizes are handled gracefully. (Could be | |
251 problematic.) | |
252 | |
253 (Done. We don't get automatic SIGWINCH for additional ttys, | |
254 though.) | |
255 | |
256 -- Extend emacsclient to automatically open a new tty when it connects | |
257 to Emacs. | |
258 | |
259 (Done. It's an ugly hack, needs more work.) | |
260 | |
261 -- Redisplay must refresh the topmost frame on *all* terminals, not | |
262 just the initial terminal. | |
263 | |
264 (Done, but introduced an ugly redisplay problems. Ugh.) | |
265 | |
266 -- Fix redisplay problems. | |
267 | |
268 (Done; it turned out that the entire Wcm structure must be moved | |
269 inside tty_output. Why didn't I catch this earlier?) | |
270 | |
271 -- Provide a way for emacsclient to tell Emacs that the tty has been | |
272 resized. | |
273 | |
274 (Done, simply forward the SIGWINCH signal.) | |
275 | |
276 -- Each keypress should automatically select the frame corresponding | |
277 to the terminal that it was coming from. This means that Emacs | |
278 must know from which terminal the last keyboard event came from. | |
279 | |
280 (Done, it was quite simple, the input event system already | |
281 supported multiple frames.) | |
282 | |
283 -- Fix SIGIO issue with secondary terminals. | |
284 | |
285 (Done, emacsclient signals Emacs after writing to the proxy pseudo | |
286 terminal. Note that this means that multi-tty does not work with | |
287 raw ttys!) | |
288 | |
289 (Update: This is bullshit. There is a read_input_waiting function, | |
290 extend that somehow.) | |
291 | |
292 (Update of update: The first update was not right either, extending | |
293 read_input_waiting was not necessary. Secondary ttys do seem to | |
294 send signals on input.) | |
295 | |
296 (Update^3: Not any more.) | |
297 | |
298 -- Make make-terminal-frame look up the `tty' and `tty-type' frame | |
299 parameters from the currently selected terminal before the global | |
300 default. | |
301 | |
302 (Done.) | |
303 | |
304 -- Put all cached terminal escape sequences into struct tty_output. | |
305 Currently, they are still stored in global variables, so we don't | |
306 really support multiple terminal types. | |
307 | |
308 (Done. It was not fun.) | |
309 | |
310 -- Implement sane error handling after initialization. (Currently | |
311 emacs exits if you specify a bad terminal type.) The helpful error | |
312 messages must still be provided when Emacs starts. | |
313 | |
314 (Done.) | |
315 | |
316 -- Implement terminal deletion, i.e., deleting local frames, closing | |
317 the tty device and restoring its previous state without exiting | |
318 Emacs. | |
319 | |
320 (Done, but at the moment only called when an error happens during | |
321 initialization. There is a memory corruption error around this | |
322 somewhere.) (Update: now it is fully enabled.) | |
323 | |
324 -- Implement automatic deletion of terminals when the last frame on | |
325 that terminal is closed. | |
326 | |
327 (Done.) | |
328 | |
329 -- Restore tty screen after closing the terminal. | |
330 | |
331 (Done, we do the same as Emacs 21.2 for all terminals.) | |
332 | |
333 -- 'TERM=dumb src/emacs' does not restore the terminal state. | |
334 | |
335 (Done.) | |
336 | |
337 -- C-g should work on secondary terminals. | |
338 | |
339 (Done, but the binding is not configurable.) | |
340 | |
341 -- Deal with SIGHUP in Emacs and in emacsclient. (After this, the | |
342 server-frames may be removed from server.el.) | |
343 | |
344 (Done, nothing to do. It seems that Emacs does not receive SIGHUP | |
345 from secondary ttys, which is actually a good thing.) (Update: I | |
346 think it would be a bad idea to remove server-frames.) | |
347 | |
348 -- Change emacsclient/server.el to support the -t argument better, | |
349 i.e. automatically close the socket when the frame is closed. | |
350 | |
351 (Seems to be working OK.) | |
352 | |
353 -- Fix mysterious memory corruption error with tty deletion. To | |
354 trigger it, try the following shell command: | |
355 | |
356 while true; do TERM=no-such-terminal-definition emacsclient -h; done | |
357 | |
358 Emacs usually dumps core after a few dozen iterations. (The bug | |
359 seems to be related to the xfreeing or bzeroing of | |
360 tty_output.Wcm. Maybe there are outside references to struct Wcm? | |
361 Why were these vars collected into a struct before multi-tty | |
362 support?) | |
363 | |
364 (Done. Whew. It turned out that the problem had nothing to do | |
365 with hypothetical external references to Wcm, or any other | |
366 tty_output component; it was simply that delete_tty closed the | |
367 filehandles of secondary ttys twice, resulting in fclose doubly | |
368 freeing memory. Utterly trivial matter. I love the C's memory | |
369 management, it puts hair on your chest.) | |
370 | |
371 -- Support raw secondary terminals. (Note that SIGIO works only on | |
372 the controlling terminal.) Hint: extend read_input_waiting for | |
373 multiple ttys and hopefully this will be fixed. | |
374 | |
375 (Done, it seems to have been working already for some time. It | |
376 seems F_SETOWN does work, after all. Not sure what made it fail | |
377 earlier, but it seems to be fixed (there were several changes | |
378 around request_sigio, maybe one of them did it). | |
379 read_input_waiting is only used in sys_select, don't change | |
380 it.) (Update: After adding X support, it's broken again.) | |
381 | |
382 -- Find out why does Emacs abort when it wants to close its | |
383 controlling tty. Hint: chan_process[] array. Hey, maybe | |
384 noninterrupt-IO would work, too? Update: no, there is no process | |
385 for stdin/out. | |
386 | |
387 (Done. Added add/delete_keyboard_wait_descriptor to | |
388 term_init/delete_tty. The hint was right, in a way.) | |
389 | |
390 -- Issue with SIGIO: it needs to be disabled during redisplay. See if | |
391 fcntl kernel behaviour could be emulated by emacsclient. | |
392 | |
393 (Done. Simply disabled the SIGIO emulation hack in emacsclient.) | |
394 (Update: it was added back.) | |
395 | |
396 -- server.el: There are issues with saving files in buffers of closed | |
397 clients. Try editing a file with emacsclient -f, and (without | |
398 saving it) do a delete-frame. The frame is closed without | |
399 question, and a surprising confirmation prompt appears in another | |
400 frame. | |
401 | |
402 (Done. delete-frame now asks for confirmation if it still has | |
403 pending buffers, and modified buffers don't seem to be deleted.) | |
404 | |
405 -- emacsclient.el, server.el: Handle eval or file open errors when | |
406 doing -t. | |
407 | |
408 (Done.) | |
409 | |
410 -- Make parts of struct tty_output accessible from Lisp. The device | |
411 name and the type is sufficient. | |
412 | |
413 (Done, see frame-tty-name and frame-tty-type.) | |
414 | |
415 -- Export delete_tty to the Lisp environment, for emacsclient. | |
416 | |
417 (Done, see delete-tty.) | |
418 | |
419 -- Get rid of the accessor macros in termchar.h, or define macros for | |
420 all members. | |
421 | |
422 (Done.) | |
423 | |
424 -- Move device-specific parameters (like costs) commonly used by | |
425 device backends to a common, device-dependent structure. | |
426 | |
427 (Done. See struct display_method in termhooks.h.) | |
428 | |
429 -- Fix X support. | |
430 | |
431 (Done. Well, it seems to be working.) | |
432 | |
433 -- Allow simultaneous X and tty frames. (Handling input could be | |
434 tricky. Or maybe not.) | |
435 | |
436 (Done. Allowed, that is. It is currently extremely unstable, to | |
437 the point of being unusable. The rif variable causes constant | |
438 core dumps. Handling input is indeed tricky.) | |
439 | |
440 -- Rewrite multi-tty input in terms of MULTI_KBOARD. | |
441 | |
442 (Done. In fact, there was no need to rewrite anything, I just | |
443 added a kboard member to tty_display_info, and initialized the | |
444 frame's kboard from there.) | |
445 | |
446 -- Fix rif issue with X-tty combo sessions. IMHO the best thing to do | |
447 is to get rid of that global variable (and use the value value in | |
448 display_method, which is guaranteed to be correct). | |
449 | |
450 (Done, did exactly that. Core dumps during combo sessions became | |
451 much rarer. In fact, I have not yet met a single one.) | |
452 | |
453 -- Add multi-tty support to talk.el. | |
454 | |
455 (Done.) | |
456 | |
457 -- Clean up the source of emacsclient. It is a mess. | |
458 | |
459 (Done, eliminated stupid proxy-pty kludge.) | |
460 | |
461 -- Fix faces on tty frames during X-tty combo sessions. There is an | |
462 init_frame_faces call in init_sys_modes, see if there is a problem | |
463 with it. | |
464 | |
465 (Done, there was a stupid mistake in | |
466 Ftty_supports_face_attributes_p. Colors are broken, though.) | |
467 | |
468 -- C-x 5 2, C-x 5 o, C-x 5 0 on an emacsclient frame unexpectedly | |
469 exits emacsclient. This is a result of trying to be clever with | |
470 delete-frame-functions. | |
471 | |
472 (Fixed, added delete-tty-after-functions, and changed server.el to | |
473 use it.) | |
474 | |
475 -- Something with (maybe) multi-keyboard support broke function keys | |
476 and arrows on ttys during X+tty combo sessions. Debug this. | |
477 | |
478 (I can't reproduce it, maybe the terminal type was wrong.) | |
479 | |
480 -- Fix input from raw ttys (again). | |
481 | |
482 (Now it seems to work all right.) | |
483 | |
484 -- During an X-tty combo session, a (message "Hello") from a tty frame | |
485 goes to the X frame. Fix this. | |
486 | |
487 (Done. There was a safeguard against writing to the initial | |
488 terminal frame during bootstrap which prevented echo_area_display | |
489 from working correctly on a tty frame during a combo session.) | |
490 | |
491 -- If there are no frames on its controlling terminal, Emacs should | |
492 exit if the uses presses C-c there. | |
493 | |
494 (Done, as far as possible. See the SIGTERM comment in | |
495 interrupt_signal on why this seems to be impossible to solve this | |
496 in general.) | |
497 | |
498 -- During an X session, Emacs seems to read from stdin. Also, Emacs | |
499 fails to start without a controlling tty. | |
500 | |
501 (Fixed by replacing the troublesome termcap display with a dummy | |
502 bootstrap display during bootstrap. | |
503 | |
504 -- Do tty output through struct display, like graphical display | |
505 backends. | |
506 | |
507 (Done.) | |
508 | |
509 -- Define an output_initial value for output_method for the initial | |
510 frame that is dumped with Emacs. Checking for this frame (e.g. in | |
511 cmd_error_internal) is ugly. | |
512 | |
513 (Done, broking interactive temacs.) | |
514 | |
515 -- The command `emacsclient -t -e '(delete-frame)'' fails to exit. | |
516 | |
517 (Fixed.) | |
518 | |
519 -- frame-creation-function should always create a frame that is on the | |
520 same display as the selected frame. Maybe frame-creation-function | |
521 should simply be removed and make-frame changed to do the right | |
522 thing. | |
523 | |
524 (Done, with a nice hack. frame-creation-function is now frame-local.) | |
525 | |
526 -- Fix C-g on raw ttys. | |
527 | |
528 (Done. I disabled the interrupt/quit keys on all secondary | |
529 terminals, so Emacs sees C-g as normal input. This looks like an | |
530 overkill, because emacsclient has extra code to pass SIGINT to | |
531 Emacs, so C-g should remain the interrupt/quit key on emacsclient | |
532 frames. See the next entry why implementing this distinction would | |
533 be a bad idea.) | |
534 | |
535 -- Make sure C-g goes to the right frame with ttys. This is hard, as | |
536 SIGINT doesn't have a tty parameter. :-( | |
537 | |
538 (Done, the previous change fixes this as a pleasant side effect.) | |
539 | |
540 | 547 |
541 ;;; arch-tag: 8da1619e-2e79-41a8-9ac9-a0485daad17d | 548 ;;; arch-tag: 8da1619e-2e79-41a8-9ac9-a0485daad17d |