1. 11 Sep, 2005 1 commit
  2. 10 Sep, 2005 1 commit
    • Karoly Lorentey's avatar
      Fix `emacsclient -ne '(+ 2 2)'' (reported by Han Boetes), and clean up some... · 92071250
      Karoly Lorentey authored
      Fix `emacsclient -ne '(+ 2 2)'' (reported by Han Boetes), and clean up some corner cases in Emacs server.
      
      * lib-src/emacsclient.c (decode_options): Make --no-wait imply
        --current-frame, except when it is the only option given.  Make sure no
        frame is opened when --current-frame is set.  
        (main): Pass --current-frame to server.el.
      
      * lisp/server.el (server-process-filter): Handle -current-frame command.
        Don't create frames when it is given.  Don't bind X frames to the
        client when we are in -no-wait mode.
      
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-407
      92071250
  3. 06 Aug, 2005 1 commit
  4. 16 Jul, 2005 1 commit
  5. 11 Jul, 2005 1 commit
    • Karoly Lorentey's avatar
      Cosmetic changes in server.el. · 6d93dbff
      Karoly Lorentey authored
      * lisp/server.el: Use `device' instead of `display' or `display-id' in
        variable and client parameter names.
      
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-383
      6d93dbff
  6. 06 Jul, 2005 2 commits
    • Karoly Lorentey's avatar
      Handle and document that `delete-frame' may call functions in `delete-frame-functions' twice. · e519a50b
      Karoly Lorentey authored
      * src/frame.c (syms_of_frame): Add warning to `delete-frame-functions' description.
      
      * lisp/frame.el (terminal-handle-delete-frame): Check that the frame is alive.
      * lisp/server.el (server-handle-delete-frame): Ditto.  Remove bogus comment.
      
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-375
      e519a50b
    • Karoly Lorentey's avatar
      Small enhancements. · 626ea340
      Karoly Lorentey authored
      * lisp/international/mule-cmds.el (set-locale-environment): Use
        server-getenv, not getenv.
      
      * lisp/server.el (server-handle-delete-frame): Add note on possible race
        condition.
      
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-374
      626ea340
  7. 04 Jul, 2005 1 commit
  8. 16 May, 2005 1 commit
  9. 03 May, 2005 1 commit
    • Karoly Lorentey's avatar
      Support for ttys with different character locale settings. · 97c57fb2
      Karoly Lorentey authored
      * lisp/server.el (server-process-filter): Set locale environment
        variables from client while creating tty frames.
      
      * lisp/faces.el (tty-create-frame-with-faces): Call set-locale-environment.
      
      * lisp/international/mule-cmds.el (set-display-table-and-terminal-coding-system): 
        Add DISPLAY parameter.  Pass it to set-terminal-coding-system.
        (set-locale-environment): Add DISPLAY parameter.
      
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-340
      97c57fb2
  10. 28 Mar, 2005 1 commit
    • Karoly Lorentey's avatar
      Fix error when creating tty clients. · 4a932511
      Karoly Lorentey authored
      * lisp/server.el (server-process-filter): Disable call to configure-display-for-locale.
      
      
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-323
      4a932511
  11. 20 Feb, 2005 1 commit
  12. 10 Feb, 2005 1 commit
  13. 09 Feb, 2005 1 commit
  14. 04 Feb, 2005 1 commit
    • Karoly Lorentey's avatar
      Prevent emacsclient errors when Emacs is compiled without X support. · 6afdd335
      Karoly Lorentey authored
      * lisp/frame.el (make-frame-on-display): Protect condition on
        x-initialized when x-win.el is not loaded.
      
      * lib-src/emacsclient.c (main): Handle -window-system-unsupported
        command.  Doc update.
      
      * lisp/server.el (server-process-filter): Don't try to create an X frame
        when Emacs does not support it.  Improve logging.
      
      * lisp/server.el (server-send-string): New function.
        (server-handle-suspend-tty, server-process-filter): Use it.
      
      * lisp/server.el (server-process-filter, server-unquote-arg)
        (server-quote-arg): Doc updates.
      
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-286
      6afdd335
  15. 30 Dec, 2004 1 commit
  16. 17 Oct, 2004 1 commit
  17. 10 Oct, 2004 2 commits
    • Karoly Lorentey's avatar
      Set ncurses-related environment variables while creating a new tty frame.... · 65f64034
      Karoly Lorentey authored
      Set ncurses-related environment variables while creating a new tty frame. (Reported by Dan Nicolaescu.)
      
      * lisp/server.el (server-with-client-environment): New macro.
        (server-process-filter): Temporarily set ncurses-related environment
        variables to those of the client while creating a new tty frame.
      
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-257
      65f64034
    • Karoly Lorentey's avatar
      Small tweaks in server.el. · 6d3a46f7
      Karoly Lorentey authored
      * lisp/server.el: Doc updates.
        (server-select-display): Remove (unused).
        (server-handle-suspend-tty): Kill the client in case of errors from
        process-send-string.
      
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-255
      6d3a46f7
  18. 08 Oct, 2004 1 commit
  19. 23 Aug, 2004 1 commit
  20. 16 Aug, 2004 1 commit
  21. 10 Jul, 2004 1 commit
  22. 04 Jul, 2004 1 commit
    • Karoly Lorentey's avatar
      Implemented display ids for multiple emacsclients on the same tty. Plus assorted bugfixes. · b6660415
      Karoly Lorentey authored
      * 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
      b6660415
  23. 03 Jul, 2004 1 commit
    • Karoly Lorentey's avatar
      Fix --no-wait in emacsclient (reported by Dan Nicolaescu). · fc2040c0
      Karoly Lorentey authored
      * lib-src/emacsclient.c (main): Don't exit prematurely on --no-wait,
        let Emacs close the connection for us.
      
      * lisp/server.el (server-visit-files): Don't set client-record when nowait.
      
      
      
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-205
      fc2040c0
  24. 08 Jun, 2004 1 commit
  25. 27 May, 2004 1 commit
    • Karoly Lorentey's avatar
      Fix background mode initialization on client tty frames (rep. by Dan Nicolaescu). · 3a258474
      Karoly Lorentey authored
      lisp/server.el (server-process-filter): Add the client parameter to
      the initialization parameters of new frames.
      (server-getenv): Use the 'client frame parameter and not
      server-clients-with to get the client; server-getenv is called during
      frame initialization. (Dan Nicolaescu)
      
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-179
      3a258474
  26. 25 May, 2004 1 commit
  27. 23 May, 2004 2 commits
    • Karoly Lorentey's avatar
      Use the remote locale for terminal & keyboard coding system. · 14de9163
      Karoly Lorentey authored
      lisp/international/mule-cmds.el (set-locale-translation-file-name)
      (get-locale-real-name, get-locale-coding-system)
      (configure-display-for-locale): New functions.
      (set-locale-environment): Factored contents into separate functions.
      
      lisp/server.el (server-process-filter): Call
      configure-display-for-locale after creating a new terminal frame.
      
      lisp/startup.el (command-line): Call set-locale-translation-file-name.
      
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-171
      14de9163
    • Karoly Lorentey's avatar
      Fix environment variables on emacsclient frames. · 44070fdf
      Karoly Lorentey authored
      lisp/server.el (server-getenv): Fix string lookup in alist.
      
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-170
      44070fdf
  28. 18 May, 2004 1 commit
  29. 08 May, 2004 1 commit
    • Karoly Lorentey's avatar
      Fixed environment variable handling during terminal initialization. · 2cd1371d
      Karoly Lorentey authored
      lisp/server.el (server-getenv): New inline function.
      
      lisp/term/rxvt.el (rxvt-set-background-mode): Use server-getenv
      instead of getenv.
      lisp/term/x-win.el (x-initialize-window-system): Ditto.
      lisp/term/xterm.el (xterm-rxvt-set-background-mode): Ditto.
      
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-158
      2cd1371d
  30. 19 Apr, 2004 2 commits
    • Karoly Lorentey's avatar
      Fix one more case of the previous error. · de93c791
      Karoly Lorentey authored
      lisp/server.el (server-delete-client): Added noframe parameter.
      (server-handle-delete-frame): Use it.
      
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-149
      de93c791
    • Karoly Lorentey's avatar
      Fix error on deleting an emacsclient terminal (Dan Nicolaescu). · 6ed9e43a
      Karoly Lorentey authored
      lisp/server.el (server-delete-client): Check that the buffer is live
      before switching to it.  Also, check that the tty display still has
      live buffers before deleting it.  
      (server-handle-delete-frame): Don't do anything if the frame was on a
      tty device (reported by Dan Nicolaescu).
      
      
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-148
      6ed9e43a
  31. 18 Apr, 2004 2 commits
    • Karoly Lorentey's avatar
      Fix frame parameter handling in server.el. · 54021676
      Karoly Lorentey authored
      lisp/server.el (server-process-filter): Work around make-frame
      frame parameter bogosity by using modify-frame-parameters.
      
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-145
      54021676
    • Karoly Lorentey's avatar
      Another server.el overhaul. · 9002956f
      Karoly Lorentey authored
      lib-src/emacsclient.c (xstrdup): New function.
      (quote_argument): Use xmalloc, not malloc.
      (main): Send environment variable values.
      
      lisp/server.el (server-clients): Documentation update.
      (server-ttys, server-frames): Removed.
      (server-client, server-client-get, server-client-set)
      (server-clients-with, server-add-client)
      (server-delete-client): New functions.
      (server-sentinel, server-handle-suspend-tty)
      (server-handle-delete-tty, server-handle-delete-frame)
      (server-start, server-process-filter, server-visit-files)
      (server-buffer-done, server-kill-buffer-query-function)
      (server-kill-emacs-query-function, server-switch-buffer): Use them.
      (server-log): Handle both kinds of client references.
      (server-start): Set up all hooks here.
      (server-process-filter): Cleanup.  Store version in client.
      Handle -env commands for passing environment variable values.
      (server-buffer-done): Don't close clients that were created bufferless.
      (server-switch-buffer): Only look at frameless clients.
      Don't switch away from current buffer if there is no next-buffer.
      (server-unload-hook): Remove frame/tty hooks, too.
      
      lisp/server.el (server-quote-arg, server-unquote-arg)
      (server-process-filter, server-kill-buffer-query-function)
      (server-kill-emacs-query-function): Doc update.
      (server-buffer-done, server-switch-buffer): Use buffer-live-p, not
      buffer-name.
      
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-143
      9002956f
  32. 19 Mar, 2004 1 commit
  33. 11 Mar, 2004 1 commit
  34. 28 Feb, 2004 1 commit
    • Karoly Lorentey's avatar
      Implemented suspending of emacsclient frames. · 0b0d3e0b
      Karoly Lorentey authored
      lib-src/emacsclient.c (quote_file_name): Renamed to quote_argument.
      (unquote_argument, handle_sigcont, handle_sigtstp): New functions.
      (out, in): New global variables for communicating with the Emacs process.
      (init_signals): Set up handlers for SIGCONT, SIGTSTP and SIGTTOU.
      (main): Changed out and in to global variables.  Prepend `-eval' or
      '-file' to each argument.  Use fsync to force sending the strings to Emacs.
      Removed obsolete -bad-version code.  Support the -suspend command.
      Cleaned up newline handling.
      
      lisp/frame.el (suspend-frame): New function.
      Substitute key definition of suspend-emacs with suspend-frame.
      
      lisp/server.el (server-log): Cosmetic change in log format.
      (server-handle-delete-tty, server-handle-delete-frame): Added logging.
      (server-handle-suspend-tty, server-quote-arg): New functions.
      (server-start): Install server-handle-suspend-tty.
      (server-process-filter): Reorganized source code for clarity.
      Implemented -resume, -suspend and -ignore commands.
      
      lisp/term/x-win.el (x-initialize-window-system): Don't change the
      binding of C-z.
      
      src/cm.c: Replaced TTY_INPUT, TTY_OUTPUT, TTY_TERMSCRIPT calls with
      their macro expansion.
      src/dispnew.c: Ditto.
      src/frame.c: Ditto.
      src/keyboard.c: Ditto.
      src/sysdep.c: Ditto.
      
      src/keyboard.c (tty_read_avail_input): Don't read if the terminal is
      suspended.
      src/sysdep.c (discard_tty_input, init_sys_modes, reset_sys_modes): Ditto.
      src/term.c (tty_set_terminal_modes, tty_reset_terminal_modes): Ditto.
      
      src/term.c (Vsuspend_tty_functions, Vresume_tty_functions): New hooks.
      (syms_of_term): Defvar them.
      (term_init): Don't allow opening a new frame on a suspended tty device.
      (Fsuspend_tty, Fresume_tty): New functions.
      (syms_of_term): Defsubr them.
      
      src/termchar.c (struct tty_display_info): Update documentation of
      input and output.
      (TTY_INPUT, TTY_OUTPUT, TTY_TERMSCRIPT): Removed.
      
      
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-105
      0b0d3e0b
  35. 20 Feb, 2004 1 commit
    • Karoly Lorentey's avatar
      Verify the version of Emacsclient. · a9298135
      Karoly Lorentey authored
      lib-src/emacsclient.c (main): Send the version number of emacsclient
      to the Emacs process, and exit with error if Emacs does not accept it.
      
      lisp/server.el (server-with-errors-reported): Removed.
      (server-process-filter): Cleaned up error handling.
      Compare the version of emacsclient with emacs-version; 
      signal an error if they do not match.
      
      git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-84
      a9298135