diff options
| author | Karoly Lorentey | 2004-11-28 14:39:06 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2004-11-28 14:39:06 +0000 |
| commit | 856dd47583918edd7987c13334703d3e7492d8f4 (patch) | |
| tree | f7a693c913861be752d3732c60bac26cbad01611 | |
| parent | 8eaaac8c8b1e45ad8a7612c9878f242103255995 (diff) | |
| download | emacs-856dd47583918edd7987c13334703d3e7492d8f4.tar.gz emacs-856dd47583918edd7987c13334703d3e7492d8f4.zip | |
Remove remaining references to updating_frame.
* src/dispextern.h (updated_window): Remove comment reference to
updating_frame.
* src/dispnew.c (update_window): Remove bogus xassert.
* src/xterm.c: (x_clear_frame): Update comment.
(x_draw_window_cursor): Remove reference to updating_frame.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-270
| -rw-r--r-- | README.multi-tty | 180 | ||||
| -rw-r--r-- | src/dispextern.h | 3 | ||||
| -rw-r--r-- | src/dispnew.c | 1 | ||||
| -rw-r--r-- | src/xterm.c | 6 |
4 files changed, 115 insertions, 75 deletions
diff --git a/README.multi-tty b/README.multi-tty index 98a182f2934..e400eab66fc 100644 --- a/README.multi-tty +++ b/README.multi-tty | |||
| @@ -2,9 +2,8 @@ | |||
| 2 | GOAL | 2 | GOAL |
| 3 | ---- | 3 | ---- |
| 4 | 4 | ||
| 5 | The goal of this branch is to implement support for opening multiple, | 5 | This branch implements support for opening multiple, different tty |
| 6 | different tty devices and simultaneous X and tty frames from a single | 6 | devices and simultaneous X and tty frames from a single Emacs session. |
| 7 | Emacs session. | ||
| 8 | 7 | ||
| 9 | Some use cases: | 8 | Some use cases: |
| 10 | Emacs is notoriously slow at startup, so most people use another | 9 | Emacs is notoriously slow at startup, so most people use another |
| @@ -28,6 +27,34 @@ I'm Károly Lőrentey. My address: lorentey@elte.hu. | |||
| 28 | Comments, bug reports, suggestions and patches are welcome; send them | 27 | Comments, bug reports, suggestions and patches are welcome; send them |
| 29 | to multi-tty@lists.fnord.hu. | 28 | to multi-tty@lists.fnord.hu. |
| 30 | 29 | ||
| 30 | The following is a (sadly incomplete) list of people who have | ||
| 31 | contributed to the project by testing, submitting patches, bug | ||
| 32 | reports, and suggestions. Thanks! | ||
| 33 | |||
| 34 | ARISAWA Akihiro <ari at mbf dot ocn dot ne dot jp> | ||
| 35 | Han Boetes <han at mijncomputer dot nl> | ||
| 36 | Robert J. Chassell <bob at rattlesnake dot com> | ||
| 37 | Romain Francoise <romain at orebokech dot com> | ||
| 38 | Ami Fischman <ami at fischman dot org> | ||
| 39 | Friedrich Delgado Friedrichs <friedel at nomaden dot org> | ||
| 40 | IRIE Tetsuya <irie at t dot email dot ne dot jp> | ||
| 41 | Yoshiaki Kasahara <kasahara at nc dot kyushu-u dot ac dot jp> | ||
| 42 | Jurej Kubelka <Juraj dot Kubelka at email dot cz> | ||
| 43 | David Lichteblau <david at lichteblau dot com> | ||
| 44 | Istvan Marko <mi-mtty at kismala dot com> | ||
| 45 | Ted Morse <morse at ciholas dot com> | ||
| 46 | Dan Nicolaescu <dann at ics dot uci dot edu> | ||
| 47 | Gergely Nagy <algernon at debian dot org> | ||
| 48 | Mark Plaksin <happy at mcplaksin dot org> | ||
| 49 | Francisco Borges <borges at let dot rug dot nl> | ||
| 50 | Frank Ruell <stoerte at dreamwarrior dot net> | ||
| 51 | Dan Waber <dwaber at logolalia dot com> | ||
| 52 | and many others. | ||
| 53 | |||
| 54 | Richard Stallman was kind enough to review an earlier version of my | ||
| 55 | patches. | ||
| 56 | |||
| 57 | |||
| 31 | MAILING LISTS | 58 | MAILING LISTS |
| 32 | ------------- | 59 | ------------- |
| 33 | 60 | ||
| @@ -64,8 +91,42 @@ few tricky test cases for you. | |||
| 64 | 91 | ||
| 65 | Known problems: | 92 | Known problems: |
| 66 | 93 | ||
| 67 | * Mac, Windows and DOS support is broken, probably doesn't | 94 | * The single-kboard mode. |
| 68 | even compile -- this will be solved later. | 95 | |
| 96 | If your multi-tty Emacs session seems to be frozen, you | ||
| 97 | probably have a recursive editing session or a pending | ||
| 98 | minibuffer prompt (which is a kind of recursive editing) on | ||
| 99 | another display. To unfreeze your session, switch to that | ||
| 100 | display and complete the recursive edit, for example by | ||
| 101 | pressing C-] (`abort-recursive-edit'). | ||
| 102 | |||
| 103 | I am sorry to say that currently there is no way to break | ||
| 104 | out of this "single-kboard mode" from a frozen display. If | ||
| 105 | you are unable to switch to the display that locks the | ||
| 106 | others (for example because it is on a remote computer), | ||
| 107 | then you can use emacsclient to break out of all recursive | ||
| 108 | editing sessions: | ||
| 109 | |||
| 110 | emacsclient -e '(top-level)' | ||
| 111 | |||
| 112 | Note that this (perhaps) unintuitive behaviour is by design. | ||
| 113 | Single-kboard mode is required because of an intrinsic Emacs | ||
| 114 | limitation that is very hard to eliminate. (This limitation | ||
| 115 | is related to the single-threaded nature of Emacs.) | ||
| 116 | |||
| 117 | I plan to implement better user notification and support for | ||
| 118 | breaking out of single-kboard mode from locked displays. | ||
| 119 | |||
| 120 | * Mac, Windows and DOS support is broken, doesn't even | ||
| 121 | compile. Multiple display support will probably not provide | ||
| 122 | new Emacs features on these systems, but the multi-tty | ||
| 123 | branch changed a few low-level interfaces, and the | ||
| 124 | system-dependent source files need to be adapted | ||
| 125 | accordingly. The changes are mostly trivial, so almost | ||
| 126 | anyone can help, if only by compiling the branch and | ||
| 127 | reporting the compiler errors. (It is not worth to do this | ||
| 128 | yet, though.) | ||
| 129 | |||
| 69 | 130 | ||
| 70 | HOW TO GET THE BRANCH | 131 | HOW TO GET THE BRANCH |
| 71 | --------------------- | 132 | --------------------- |
| @@ -86,17 +147,17 @@ probably want to you use the Arch supermirror instead: | |||
| 86 | 147 | ||
| 87 | (I use a recent tla development snapshot, but any of the released | 148 | (I use a recent tla development snapshot, but any of the released |
| 88 | versions of arch will do fine, I think.) My GPG key id is 0FB27A3F; | 149 | versions of arch will do fine, I think.) My GPG key id is 0FB27A3F; |
| 89 | it is available from hkp://wwwkeys.eu.pgp.net/, or my homepage at | 150 | it is available from hkp://wwwkeys.eu.pgp.net/, or from my homepage at |
| 90 | http://lorentey.hu/rolam/gpg.html) | 151 | http://lorentey.hu/rolam/gpg.html) |
| 91 | 152 | ||
| 92 | To update your source tree to the latest revision after the first | 153 | Don't worry if the above checkout takes a few minutes to complete; |
| 93 | checkout, simply use the following command: | 154 | once you have a source tree, updating it to the latest revision will |
| 155 | be _much_ faster. Use the following command for the update: | ||
| 94 | 156 | ||
| 95 | tla replay lorentey@elte.hu--2004/emacs--multi-tty--0 | 157 | tla replay |
| 96 | 158 | ||
| 97 | If you are interested, you can find more information about Arch on | 159 | You can find more information about Arch on http://wiki.gnuarch.org/. |
| 98 | http://wiki.gnuarch.org/. It's a wonderful source control system, I | 160 | It's a wonderful source control system, I highly recommend it. |
| 99 | highly recommend it. | ||
| 100 | 161 | ||
| 101 | If you don't have tla, the branch has a homepage from which you can | 162 | If you don't have tla, the branch has a homepage from which you can |
| 102 | download conventional patches against Emacs CVS HEAD: | 163 | download conventional patches against Emacs CVS HEAD: |
| @@ -146,10 +207,10 @@ Creating new frames on the same tty with C-x 5 2 works, and they | |||
| 146 | behave the same way as in previous Emacs versions. If you exit emacs, | 207 | behave the same way as in previous Emacs versions. If you exit emacs, |
| 147 | all terminals should be restored to their previous states. | 208 | all terminals should be restored to their previous states. |
| 148 | 209 | ||
| 149 | This is work in progress, and probably full of bugs. You should | 210 | This is work in progress, and probably full of bugs. It is a good |
| 150 | always run emacs from gdb, so that you'll have a live instance to | 211 | idea to run emacs from gdb, so that you'll have a live instance to |
| 151 | debug if something goes wrong. Please send me | 212 | debug if something goes wrong. Please send me your bug reports on our |
| 152 | (multi-tty@lists.fnord.hu) your bug reports. | 213 | mailing list: multi-tty@lists.fnord.hu |
| 153 | 214 | ||
| 154 | TIPS & TRICKS | 215 | TIPS & TRICKS |
| 155 | ------------- | 216 | ------------- |
| @@ -267,36 +328,6 @@ For the NEWS file: (Needs work) | |||
| 267 | *** The new `initial-window-system' variable contains the | 328 | *** The new `initial-window-system' variable contains the |
| 268 | `window-system' value for the first frame. | 329 | `window-system' value for the first frame. |
| 269 | 330 | ||
| 270 | THANKS | ||
| 271 | ------ | ||
| 272 | |||
| 273 | The following is a (sadly incomplete) list of people who have | ||
| 274 | contributed to the project by testing, submitting patches, bug | ||
| 275 | reports, and suggestions. Thanks! | ||
| 276 | |||
| 277 | ARISAWA Akihiro <ari at mbf dot ocn dot ne dot jp> | ||
| 278 | Han Boetes <han at mijncomputer dot nl> | ||
| 279 | Robert J. Chassell <bob at rattlesnake dot com> | ||
| 280 | Romain Francoise <romain at orebokech dot com> | ||
| 281 | Ami Fischman <ami at fischman dot org> | ||
| 282 | Friedrich Delgado Friedrichs <friedel at nomaden dot org> | ||
| 283 | IRIE Tetsuya <irie at t dot email dot ne dot jp> | ||
| 284 | Yoshiaki Kasahara <kasahara at nc dot kyushu-u dot ac dot jp> | ||
| 285 | Jurej Kubelka <Juraj dot Kubelka at email dot cz> | ||
| 286 | David Lichteblau <david at lichteblau dot com> | ||
| 287 | Istvan Marko <mi-mtty at kismala dot com> | ||
| 288 | Ted Morse <morse at ciholas dot com> | ||
| 289 | Dan Nicolaescu <dann at ics dot uci dot edu> | ||
| 290 | Gergely Nagy <algernon at debian dot org> | ||
| 291 | Mark Plaksin <happy at mcplaksin dot org> | ||
| 292 | Francisco Borges <borges at let dot rug dot nl> | ||
| 293 | Frank Ruell <stoerte at dreamwarrior dot net> | ||
| 294 | Dan Waber <dwaber at logolalia dot com> | ||
| 295 | and many others. | ||
| 296 | |||
| 297 | Richard Stallman was kind enough to review an earlier version of my | ||
| 298 | patches. | ||
| 299 | |||
| 300 | CHANGELOG | 331 | CHANGELOG |
| 301 | --------- | 332 | --------- |
| 302 | 333 | ||
| @@ -310,12 +341,37 @@ is probably not very interesting for anyone else.) | |||
| 310 | THINGS TO DO | 341 | THINGS TO DO |
| 311 | ------------ | 342 | ------------ |
| 312 | 343 | ||
| 313 | ** rif->flush_display_optional (NULL) calls should be replaced by a | 344 | ** The single-keyboard mode of MULTI_KBOARD is extremely confusing |
| 314 | new global function. | 345 | sometimes; Emacs does not respond to stimuli from other keyboards. |
| 346 | At least a beep or a message would be important, if the single-mode | ||
| 347 | is still required to prevent interference. (Reported by Dan | ||
| 348 | Nicolaescu.) | ||
| 349 | |||
| 350 | Update: selecting a region with the mouse enables single_kboard | ||
| 351 | under X. This is very confusing. | ||
| 352 | |||
| 353 | Update: After discussions with Richard, this will be resolved by | ||
| 354 | having locked displays warn the user to wait, and introducing a | ||
| 355 | complex protocol to remotely bail out of single-kboard mode by | ||
| 356 | pressing C-g. | ||
| 357 | |||
| 358 | Update: Warning the user is not trivial to implement, as Emacs has | ||
| 359 | only one echo area. Ideally the warning should not be displayed on | ||
| 360 | the display that is locking the others. Perhaps the high | ||
| 361 | probability of user confusion caused by single_kboard mode deserves | ||
| 362 | a special case in the display code. Alternatively, it might be | ||
| 363 | good enough to signal single_kboard mode by changing the modelines | ||
| 364 | or some other frame-local display element on the locked out displays. | ||
| 365 | |||
| 366 | ** normal-erase-is-backspace-mode in simple.el needs to be updated for | ||
| 367 | multi-tty (rep. by Dan Waber). | ||
| 315 | 368 | ||
| 316 | ** Hunt down display-related functions in frame.el and extend them all | 369 | ** Hunt down display-related functions in frame.el and extend them all |
| 317 | to accept display ids. | 370 | to accept display ids. |
| 318 | 371 | ||
| 372 | ** rif->flush_display_optional (NULL) calls should be replaced by a | ||
| 373 | new global function. | ||
| 374 | |||
| 319 | ** Have a look at fatal_error_hook. | 375 | ** Have a look at fatal_error_hook. |
| 320 | 376 | ||
| 321 | ** Check if we got term-setup-hook right. | 377 | ** Check if we got term-setup-hook right. |
| @@ -332,21 +388,6 @@ THINGS TO DO | |||
| 332 | what if we'd blow it up into several separate functions (with a | 388 | what if we'd blow it up into several separate functions (with a |
| 333 | compatibility definition)? | 389 | compatibility definition)? |
| 334 | 390 | ||
| 335 | ** Lisp-level stuff that needs to be updated for multi-tty: | ||
| 336 | |||
| 337 | - normal-erase-is-backspace-mode (simple.el) (rep. by Dan Waber) | ||
| 338 | |||
| 339 | |||
| 340 | ** The single-keyboard mode of MULTI_KBOARD is extremely confusing | ||
| 341 | sometimes; Emacs does not respond to stimuli from other keyboards. | ||
| 342 | At least a beep or a message would be important, if the single-mode | ||
| 343 | is still required to prevent interference. (Reported by Dan | ||
| 344 | Nicolaescu.) (Update: selecting a region with the mouse enables | ||
| 345 | single_kboard under X. This is very confusing.) Update: | ||
| 346 | After discussions with Richard, this will be resolved by having | ||
| 347 | locked displays warn the user to wait, and introducing a complex | ||
| 348 | protocol to remotely bail out of single-kboard mode by pressing C-g. | ||
| 349 | |||
| 350 | ** The terminal customization files in term/*.el tend to change global | 391 | ** The terminal customization files in term/*.el tend to change global |
| 351 | parameters, which may confuse Emacs with multiple displays. Change | 392 | parameters, which may confuse Emacs with multiple displays. Change |
| 352 | them to tweak only frame-local settings, if possible. | 393 | them to tweak only frame-local settings, if possible. |
| @@ -365,11 +406,6 @@ THINGS TO DO | |||
| 365 | frame, not any other emacsclient frame that may have the same file | 406 | frame, not any other emacsclient frame that may have the same file |
| 366 | opened for editing. I think I agree with him. | 407 | opened for editing. I think I agree with him. |
| 367 | 408 | ||
| 368 | ** Miles Bader suggests that C-x C-c on an emacsclient frame should | ||
| 369 | only close the frame, not exit the entire Emacs session. Update: | ||
| 370 | see above for a function that does this. Maybe this should be the | ||
| 371 | new default? | ||
| 372 | |||
| 373 | ** Very strange bug: visible-bell does not work on secondary | 409 | ** Very strange bug: visible-bell does not work on secondary |
| 374 | terminals in xterm and konsole. The screen does flicker a bit, | 410 | terminals in xterm and konsole. The screen does flicker a bit, |
| 375 | but it's so quick it isn't noticable. | 411 | but it's so quick it isn't noticable. |
| @@ -940,4 +976,12 @@ DIARY OF CHANGES | |||
| 940 | 976 | ||
| 941 | (Done.) | 977 | (Done.) |
| 942 | 978 | ||
| 979 | -- Miles Bader suggests that C-x C-c on an emacsclient frame should | ||
| 980 | only close the frame, not exit the entire Emacs session. Update: | ||
| 981 | see above for a function that does this. Maybe this should be the | ||
| 982 | new default? | ||
| 983 | |||
| 984 | (Done. This is the new default. No complaints so far.) | ||
| 985 | |||
| 986 | |||
| 943 | ;;; arch-tag: 8da1619e-2e79-41a8-9ac9-a0485daad17d | 987 | ;;; arch-tag: 8da1619e-2e79-41a8-9ac9-a0485daad17d |
diff --git a/src/dispextern.h b/src/dispextern.h index d2ca9564ef8..99cf38249ac 100644 --- a/src/dispextern.h +++ b/src/dispextern.h | |||
| @@ -1013,8 +1013,7 @@ extern int fonts_changed_p; | |||
| 1013 | extern struct glyph space_glyph; | 1013 | extern struct glyph space_glyph; |
| 1014 | 1014 | ||
| 1015 | /* Window being updated by update_window. This is non-null as long as | 1015 | /* Window being updated by update_window. This is non-null as long as |
| 1016 | update_window has not finished, and null otherwise. It's role is | 1016 | update_window has not finished, and null otherwise. */ |
| 1017 | analogous to updating_frame. */ | ||
| 1018 | 1017 | ||
| 1019 | extern struct window *updated_window; | 1018 | extern struct window *updated_window; |
| 1020 | 1019 | ||
diff --git a/src/dispnew.c b/src/dispnew.c index a148f27a1ef..f2fac47a7c2 100644 --- a/src/dispnew.c +++ b/src/dispnew.c | |||
| @@ -4071,7 +4071,6 @@ update_window (w, force_p) | |||
| 4071 | 4071 | ||
| 4072 | /* Check that W's frame doesn't have glyph matrices. */ | 4072 | /* Check that W's frame doesn't have glyph matrices. */ |
| 4073 | xassert (FRAME_WINDOW_P (f)); | 4073 | xassert (FRAME_WINDOW_P (f)); |
| 4074 | xassert (updating_frame != NULL); | ||
| 4075 | 4074 | ||
| 4076 | /* Check pending input the first time so that we can quickly return. */ | 4075 | /* Check pending input the first time so that we can quickly return. */ |
| 4077 | if (redisplay_dont_pause) | 4076 | if (redisplay_dont_pause) |
diff --git a/src/xterm.c b/src/xterm.c index 5c7775d6777..480ee1c624a 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -2796,8 +2796,7 @@ x_clear_area (dpy, window, x, y, width, height, exposures) | |||
| 2796 | } | 2796 | } |
| 2797 | 2797 | ||
| 2798 | 2798 | ||
| 2799 | /* Clear entire frame. If updating_frame is non-null, clear that | 2799 | /* Clear an entire frame. */ |
| 2800 | frame. Otherwise clear the selected frame. */ | ||
| 2801 | 2800 | ||
| 2802 | static void | 2801 | static void |
| 2803 | x_clear_frame (struct frame *f) | 2802 | x_clear_frame (struct frame *f) |
| @@ -7390,8 +7389,7 @@ x_draw_window_cursor (w, glyph_row, x, y, cursor_type, cursor_width, on_p, activ | |||
| 7390 | } | 7389 | } |
| 7391 | 7390 | ||
| 7392 | #ifndef XFlush | 7391 | #ifndef XFlush |
| 7393 | if (updating_frame != f) | 7392 | XFlush (FRAME_X_DISPLAY (f)); |
| 7394 | XFlush (FRAME_X_DISPLAY (f)); | ||
| 7395 | #endif | 7393 | #endif |
| 7396 | } | 7394 | } |
| 7397 | 7395 | ||