Mercurial > emacs
comparison README.multi-tty @ 82987:1682917e56b4
Major bugfixes and slight enhancements.
src/dispextern.h (get_tty_size, tabs_safe_p, init_baud_rate): Update
prototypes.
src/dispnew.c (window_change_signal): Update call to get_tty_size.
src/frame.c (Fmake_terminal_frame): Ditto.
src/keyboard.c (Fsuspend_emacs): Ditto.
src/sysdep.c: Eliminate tty_outputs, wherever possible. (The
exceptions are init_sys_modes and reset_sys_modes, which need access
to tty-local parameters).
(init_baud_rate): Change tty_output parameter to a simple file descriptor.
(narrow_foreground_group, widen_foreground_group): Ditto.
(tabs_safe_p, get_tty_size): Ditto.
(init_sys_modes): Update narrow_foreground_group invocation.
(reset_sys_modes): Update widen_foreground_group invocation.
(request_sigio)[!FASYNC && STRIDE]: Fix function signature.
src/term.c (delete_tty): Only close output file handle if it is
different from input. Re-enable freeing of Wcm.
(term_init): Update get_tty_size, tabs_safe_p and init_baud_rate
invocations.
lib-src/emacsclient.c (here): Renamed to frame.
(longopts): Change --here to --frame. The -h short option may be
confused with --help.
(decode_options, print_help_and_exit): Update to reflect above changes.
(main): Ditto.
lisp/server.el (server-start): Fix frame-live-p call syntax.
(server-process-filter): Handle 'emacsclient -f' without file
arguments. Don't return any values to emacsclient when 'emacsclient
-f -e'.
(server-switch-buffer): Prevent infinite recursion when there are no
files to edit.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-27
author | Karoly Lorentey <lorentey@elte.hu> |
---|---|
date | Tue, 30 Dec 2003 19:27:57 +0000 |
parents | 02a346f99eaf |
children | f82e3a6f5ccb |
comparison
equal
deleted
inserted
replaced
82986:02a346f99eaf | 82987:1682917e56b4 |
---|---|
37 make bootstrap | 37 make bootstrap |
38 | 38 |
39 then start up the emacs server (src/emacs, M-x server-start), and then | 39 then start up the emacs server (src/emacs, M-x server-start), and then |
40 (from a shell prompt on another terminal) start emacsclient with | 40 (from a shell prompt on another terminal) start emacsclient with |
41 | 41 |
42 lib-src/emacsclient -h /optional/file/names... | 42 lib-src/emacsclient -f /optional/file/names... |
43 | 43 |
44 You'll hopefully have two fully working, independent frames on | 44 You'll hopefully have two fully working, independent frames on |
45 separate terminals. (This seems to be very useful, emacsclient starts | 45 separate terminals. (This seems to be very useful, emacsclient starts |
46 up even faster than vi!) :-) You can close the newly opened frame and | 46 up even faster than vi!) :-) You can close the newly opened frame and |
47 return to the shell without exiting Emacs by pressing C-x 5 0, i.e., | 47 return to the shell without exiting Emacs by pressing C-x 5 0, i.e., |
211 -- Change emacsclient/server.el to support the -h argument better, | 211 -- Change emacsclient/server.el to support the -h argument better, |
212 i.e. automatically close the socket when the frame is closed. | 212 i.e. automatically close the socket when the frame is closed. |
213 | 213 |
214 (Seems to be working OK.) | 214 (Seems to be working OK.) |
215 | 215 |
216 THINGS TO DO | 216 -- Fix mysterious memory corruption error with tty deletion. To |
217 ------------ | |
218 | |
219 ** Understand Emacs's low-level input system. It seems | |
220 complicated. :-) | |
221 | |
222 ** Fix mysterious memory corruption error with tty deletion. To | |
223 trigger it, try the following shell command: | 217 trigger it, try the following shell command: |
224 | 218 |
225 while true; do TERM=no-such-terminal-definition emacsclient -h; done | 219 while true; do TERM=no-such-terminal-definition emacsclient -h; done |
226 | 220 |
227 Emacs usually dumps core after a few dozen iterations. (The bug | 221 Emacs usually dumps core after a few dozen iterations. (The bug |
228 seems to be related to the xfree()ing or bzero()ing of | 222 seems to be related to the xfree()ing or bzero()ing of |
229 tty_output.Wcm. Maybe there are outside references to struct Wcm? | 223 tty_output.Wcm. Maybe there are outside references to struct Wcm? |
230 Why were these vars collected into a struct before multi-tty | 224 Why were these vars collected into a struct before multi-tty |
231 support?) | 225 support?) |
232 | 226 |
233 The bug does not seem to happen if the error occurs before terminal | 227 (Done. Whew. It turned out that the problem had nothing to do |
234 initialization or if I comment out all xfree()s in delete_frame. | 228 with hypothetical external references to Wcm, or any other |
235 Update: yes it does, although it is much rarer. Or maybe it's | 229 tty_output component; it was simply that delete_tty closed the |
236 another bug. | 230 filehandles of secondary ttys twice, resulting in fclose doubly |
237 | 231 free()ing memory. Utterly trivial matter. I love the C's memory |
238 Idea: Some of these errors may have been caused by having more | 232 management, it puts hair on your chest.) |
239 file handles than FD_SETSIZE. | 233 |
234 THINGS TO DO | |
235 ------------ | |
236 | |
237 ** Understand Emacs's low-level input system (it seems complicated) :-) | |
238 and maybe rewrite multi-tty input in terms of MULTIKBOARD. | |
240 | 239 |
241 ** Find out why does Emacs abort when it wants to close its | 240 ** Find out why does Emacs abort when it wants to close its |
242 controlling tty. Hint: chan_process[] array. Hey, maybe | 241 controlling tty. Hint: chan_process[] array. Hey, maybe |
243 noninterrupt-IO would work, too? | 242 noninterrupt-IO would work, too? Update: no, there is no process |
243 for stdin/out. | |
244 | 244 |
245 ** Support raw secondary terminals. (Note that SIGIO works only on | 245 ** Support raw secondary terminals. (Note that SIGIO works only on |
246 the controlling terminal.) Hint: extend read_input_waiting() for | 246 the controlling terminal.) Hint: extend read_input_waiting() for |
247 multiple ttys and hopefully this will be fixed. | 247 multiple ttys and hopefully this will be fixed. |
248 | 248 |
250 secondary tty support, but it does not seem to do anything useful. | 250 secondary tty support, but it does not seem to do anything useful. |
251 | 251 |
252 ** Issue with SIGIO: it needs to be disabled during redisplay. See if | 252 ** Issue with SIGIO: it needs to be disabled during redisplay. See if |
253 fcntl() kernel behaviour could be emulated by emacsclient. | 253 fcntl() kernel behaviour could be emulated by emacsclient. |
254 | 254 |
255 ** Get rid of the accessor macros in termchar.h, or define macros for | |
256 all members. | |
257 | |
255 ** Make parts of struct tty_output accessible from Lisp. The device | 258 ** Make parts of struct tty_output accessible from Lisp. The device |
256 name and the type is sufficient. | 259 name and the type is sufficient. |
260 | |
261 ** server.el: There are issues with saving files in buffers of closed | |
262 clients. Try editing a file with emacsclient -f, and (without | |
263 saving it) do a delete-frame. The frame is closed without | |
264 question, and a surprising confirmation prompt appears in another | |
265 frame. | |
266 | |
267 ** emacsclient.el, server.el: Handle eval or file open errors when | |
268 doing -f. | |
257 | 269 |
258 ** Export delete_tty to the Lisp environment, for emacsclient. | 270 ** Export delete_tty to the Lisp environment, for emacsclient. |
259 | 271 |
260 ** Make sure C-g goes to the right frame. This is hard, as SIGINT | 272 ** Make sure C-g goes to the right frame. This is hard, as SIGINT |
261 doesn't have a tty parameter. :-( | 273 doesn't have a tty parameter. :-( |
281 | 293 |
282 ** Fix W32 support (I can't do this myself). | 294 ** Fix W32 support (I can't do this myself). |
283 | 295 |
284 ** Fix DOS support (I can't do this myself). | 296 ** Fix DOS support (I can't do this myself). |
285 | 297 |
286 | 298 ** Do a grep on XXX and ?? for more issues. |
287 | 299 |
288 ;;; arch-tag: 8da1619e-2e79-41a8-9ac9-a0485daad17d | 300 ;;; arch-tag: 8da1619e-2e79-41a8-9ac9-a0485daad17d |