diff options
| author | Karoly Lorentey | 2004-07-04 04:48:55 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2004-07-04 04:48:55 +0000 |
| commit | b6660415b3094d37b27e8d303f2c57c4c2a60700 (patch) | |
| tree | 715ac1a52f92c0e5d6d25bd089ba9c048b012339 /README.multi-tty | |
| parent | 91b726f0f87d0adcec194642256375f4302c52a8 (diff) | |
| download | emacs-b6660415b3094d37b27e8d303f2c57c4c2a60700.tar.gz emacs-b6660415b3094d37b27e8d303f2c57c4c2a60700.zip | |
Implemented display ids for multiple emacsclients on the same tty. Plus assorted bugfixes.
* lisp/frame.el (make-frame-on-display): Update doc.
(make-frame): Handle display-id parameter. Update doc.
(frames-on-display-list): Update for display ids.
(framep-on-display): Ditto.
(suspend-frame): Use display-name, not frame-tty-name.
(selected-display): New function.
* lisp/server.el (server-delete-client): Use delete-display, not delete-tty.
(server-tty-live-p, server-handle-delete-tty): Removed.
(server-handle-delete-frame): Delete tty clients, if needed.
(server-process-filter): Set the display parameter, and use it when appropriate.
(server-handle-suspend-tty): Use the display parameter.
(server-start, server-unload-hook): Removed obsolete delete-tty hook.
* lisp/talk.el (talk): Always use talk-add-display.
(talk-add-tty-frame, talk-handle-delete-tty): Removed.
(talk-handle-delete-frame): New function.
(talk-add-display): Open a new frame only if parameter was not a frame.
* src/dispextern.h (get_display, Fdisplay_tty_type): New prototypes.
(Fframe_tty_type): Removed.
* src/dispnew.c (init_display): Use Fdisplay_tty_type, not Fframe_tty_type.
* src/frame.c (Qdisplay_id, Qdisplay_live_p): New symbols.
(make_terminal_frame): Get display as a parameter.
(Fmake_terminal_frame): Get/create display here; pass it to
make_terminal_frame.
(Fframe_display): New function.
(Fdelete_frame): Stop if the hook deleted the frame.
(syms_of_frame): Register new stuff.
* src/frame.h (Qdisplay_id, Qdisplay_live_p, make_terminal_frame):
Updated prototypes.
* src/keyboard.c (interrupt_signal): Updated comment.
* src/term.c (Vdelete_tty_after_functions): Removed variable.
(Qframe_tty_name, Qframe_tty_type): Removed.
(next_display_id): New var.
(tty_ring_bell): Don't do anything on suspended frames.
(Ftty_display_color_p, Ftty_display_color_cells): Doc update.
(get_display): New function.
(get_tty_display): Use it.
(get_named_tty_display): Ignore suspended displays.
(Fframe_tty_name): Renamed to Fdisplay_name. Handle all kinds of
displays.
(Fframe_tty_type): Renamed to Fdisplay_tty_type.
(init_initial_display): Set display name.
(term_init): Allow more displays on the same device. Set display name.
(Fdelete_tty): Removed.
(delete_tty): Don't run hooks.
(create_display): Set display id.
(delete_display): Free display name.
(Fdelete_display, Fdisplay_live_p, Fdisplay_list): New functions.
(Fsuspend_tty): Call hook with display id. Doc update.
(Fresume_tty): Refuse to resume when there is already an active display
on the same device. Call hook with display id. Doc update.
(syms_of_term): Reflect above changes.
* src/termhooks.h (struct display): Added `id' and `name' members.
(DISPLAY_ACTIVE_P): New macro.
* src/xfns.c (check_x_display_info): Handle display ids.
(Fx_create_frame): Try to get display from `display-id' parameter.
* src/xterm.c (x_term_init): Set display name.
(x_delete_display): Handle the case when `font_table' is NULL.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-207
Diffstat (limited to 'README.multi-tty')
| -rw-r--r-- | README.multi-tty | 93 |
1 files changed, 54 insertions, 39 deletions
diff --git a/README.multi-tty b/README.multi-tty index 2d020d3abb2..c692411e757 100644 --- a/README.multi-tty +++ b/README.multi-tty | |||
| @@ -206,6 +206,9 @@ See arch logs. | |||
| 206 | THINGS TO DO | 206 | THINGS TO DO |
| 207 | ------------ | 207 | ------------ |
| 208 | 208 | ||
| 209 | ** Hunt down display-related functions in frame.el and extend them all | ||
| 210 | to accept display ids. | ||
| 211 | |||
| 209 | ** Have a look at fatal_error_hook. | 212 | ** Have a look at fatal_error_hook. |
| 210 | 213 | ||
| 211 | ** Check if we got term-setup-hook right. | 214 | ** Check if we got term-setup-hook right. |
| @@ -255,45 +258,6 @@ THINGS TO DO | |||
| 255 | ** Miles Bader suggests that C-x C-c on an emacsclient frame should | 258 | ** Miles Bader suggests that C-x C-c on an emacsclient frame should |
| 256 | only close the frame, not exit the entire Emacs session. | 259 | only close the frame, not exit the entire Emacs session. |
| 257 | 260 | ||
| 258 | ** Make `struct display' accessible to Lisp programs. Accessor functions: | ||
| 259 | |||
| 260 | (displayp OBJECT): Returns t if OBJECT is a display. | ||
| 261 | |||
| 262 | (display-list): Returns list of currently active displays. | ||
| 263 | |||
| 264 | (selected-display): Returns the display object of the selected frame. | ||
| 265 | |||
| 266 | (frame-display FRAME): Returns the display object of FRAME. | ||
| 267 | |||
| 268 | (display-frames DISPLAY): Returns a list of frames on DISPLAY. | ||
| 269 | |||
| 270 | (display-type DISPLAY): Returns the type of DISPLAY, as a | ||
| 271 | symbol. (See `framep'.) | ||
| 272 | |||
| 273 | (display-device DISPLAY): Returns the name of the device that | ||
| 274 | DISPLAY uses, as a string. (E.g: "/dev/pts/16", or | ||
| 275 | ":0.0") | ||
| 276 | |||
| 277 | etc. | ||
| 278 | |||
| 279 | See next issue why this is necessary. | ||
| 280 | |||
| 281 | (Update: The consensus on emacs-devel seems to be to do this via | ||
| 282 | integer identifiers. That's fine by me.) | ||
| 283 | |||
| 284 | ** The following needs to be supported: | ||
| 285 | |||
| 286 | $ emacsclient -t | ||
| 287 | C-z | ||
| 288 | $ emacsclient -t | ||
| 289 | (This fails now.) | ||
| 290 | |||
| 291 | The cleanest way to solve this is to allow multiple displays on the | ||
| 292 | same terminal device; each new emacsclient process should create | ||
| 293 | its own display. As displays are currently identified by their | ||
| 294 | device names, this is not possible until struct display becomes | ||
| 295 | accessible as a Lisp-level object. | ||
| 296 | |||
| 297 | ** Very strange bug: visible-bell does not work on secondary | 261 | ** Very strange bug: visible-bell does not work on secondary |
| 298 | terminals in xterm and konsole. The screen does flicker a bit, | 262 | terminals in xterm and konsole. The screen does flicker a bit, |
| 299 | but it's so quick it isn't noticable. | 263 | but it's so quick it isn't noticable. |
| @@ -813,4 +777,55 @@ DIARY OF CHANGES | |||
| 813 | (Fixed. Emacs now uses the locale settings as seen by the | 777 | (Fixed. Emacs now uses the locale settings as seen by the |
| 814 | emacsclient process for server tty frames.) | 778 | emacsclient process for server tty frames.) |
| 815 | 779 | ||
| 780 | |||
| 781 | -- Make `struct display' accessible to Lisp programs. Accessor functions: | ||
| 782 | |||
| 783 | (displayp OBJECT): Returns t if OBJECT is a display. | ||
| 784 | => Implemented as display-live-p. | ||
| 785 | |||
| 786 | (display-list): Returns list of currently active displays. | ||
| 787 | => Implemented. | ||
| 788 | |||
| 789 | (selected-display): Returns the display object of the selected frame. | ||
| 790 | => Not strictly necessary, but implemented anyway. | ||
| 791 | |||
| 792 | (frame-display FRAME): Returns the display object of FRAME. | ||
| 793 | => Implemented. | ||
| 794 | |||
| 795 | (display-frames DISPLAY): Returns a list of frames on DISPLAY. | ||
| 796 | => Already implemented, see frames-on-display-list. | ||
| 797 | |||
| 798 | (display-type DISPLAY): Returns the type of DISPLAY, as a | ||
| 799 | symbol. (See `framep'.) | ||
| 800 | => Implemented as display-live-p. | ||
| 801 | |||
| 802 | (display-device DISPLAY): Returns the name of the device that | ||
| 803 | DISPLAY uses, as a string. (E.g: "/dev/pts/16", or | ||
| 804 | ":0.0") | ||
| 805 | => Implemented as display-name. | ||
| 806 | |||
| 807 | etc. | ||
| 808 | |||
| 809 | See next issue why this is necessary. | ||
| 810 | |||
| 811 | (Update: The consensus on emacs-devel seems to be to do this via | ||
| 812 | integer identifiers. That's fine by me.) | ||
| 813 | |||
| 814 | (Done.) | ||
| 815 | |||
| 816 | -- The following needs to be supported: | ||
| 817 | |||
| 818 | $ emacsclient -t | ||
| 819 | C-z | ||
| 820 | $ emacsclient -t | ||
| 821 | (This fails now.) | ||
| 822 | |||
| 823 | The cleanest way to solve this is to allow multiple displays on the | ||
| 824 | same terminal device; each new emacsclient process should create | ||
| 825 | its own display. As displays are currently identified by their | ||
| 826 | device names, this is not possible until struct display becomes | ||
| 827 | accessible as a Lisp-level object. | ||
| 828 | |||
| 829 | (Done.) | ||
| 830 | |||
| 816 | ;;; arch-tag: 8da1619e-2e79-41a8-9ac9-a0485daad17d | 831 | ;;; arch-tag: 8da1619e-2e79-41a8-9ac9-a0485daad17d |