summaryrefslogtreecommitdiff
path: root/lib-src/emacsclient.c
Commit message (Collapse)AuthorAgeFilesLines
* Add 2007 to copyright years.Glenn Morris2007-01-211-1/+1
|
* [WINDOWSNT] (set_fg, get_wc): New variables.Juanma Barranquero2006-12-181-19/+58
| | | | | | [WINDOWSNT] (w32_find_emacs_process, w32_give_focus): New functions. (main) [WINDOWSNT]: Remove code to release the focus; call w32_give_focus instead.
* Comment and whitespace changes.Richard M. Stallman2006-12-151-5/+5
|
* Rework a few comments.Juanma Barranquero2006-12-151-3/+3
|
* (w32_execvp): New function; wrapper for `execvp'.Juanma Barranquero2006-12-151-3/+37
| | | | | (execvp) [WINDOWSNT]: Redefine to `w32_execvp'. (fail): Remove Windows-specific fix (subsumed in w32_execvp).
* (emacs_pid): New variable.Juanma Barranquero2006-11-301-35/+30
| | | | | | | | (message): Remove leftover code. (get_server_config): Set emacs_pid. Don't allow Emacs to grab the focus yet; emacsclient can still display an informational message before sending requests to Emacs. (main): Allow Emacs to grab the focus. Simplify message() call.
* (message): Make sure the message is properly written even if it contains printfJuanma Barranquero2006-11-301-2/+7
| | | | | | escapes, and flush the result. (set_tcp_socket): Make the message for non-local connections informational rather than an error.
* (file_name_absolute_p) [WINDOWSNT]: Use isalpha().Jason Rumney2006-11-251-1/+1
|
* (file_name_absolute_p) [WINDOWSNT]: Support absolute file names with forwardEli Zaretskii2006-11-241-1/+1
| | | | slashes.
* Space/tab mixup.Juanma Barranquero2006-11-241-1/+1
|
* (print_help_and_exit): Tweak message contents and tabs/spacesJuanma Barranquero2006-11-231-8/+9
| | | | to improve alignment in message boxes.
* Include <stdarg.h>.Juanma Barranquero2006-11-221-30/+77
| | | | | | | | | [WINDOWSNT]: Include <windows.h>. (w32_check_console_app): New function. (message): New function. (decode_options, print_help_and_exit, fail, main, initialize_sockets, get_server_config, set_tcp_socket, set_local_socket, set_socket): Use message().
* Let config.h define HAVE_SOCKETS and HAVE_INET_SOCKETS.Jason Rumney2006-11-131-5/+0
|
* [WINDOWSNT]: Undef _WINSOCKAPI_ and _WINSOCK_H.Juanma Barranquero2006-11-131-1/+8
|
* [!WINDOWSNT]: Include <sys/types.h>.Juanma Barranquero2006-11-101-0/+2
|
* (get_server_config): Declare set_fg as FARPROC to avoid a compiler warning.Juanma Barranquero2006-11-081-1/+1
|
* (get_server_config) [WINDOWSNT]: Search the server file on APPDATAJuanma Barranquero2006-11-071-4/+9
| | | | if it doesn't exist on HOME, even if HOME is defined.
* (get_server_config): Extract also the Emacs pid from the server file.Juanma Barranquero2006-11-071-2/+29
| | | | On Windows, try to force the Emacs frame to the foreground.
* (longopts) [! NO_SOCKETS_IN_FILE_SYSTEM]: Don't show option --socket-name.Juanma Barranquero2006-11-061-44/+107
| | | | | | | | | | | | | | | | (decode_options): Don't get EMACS_SERVER_FILE here, it could override command line options. (decode_options) [! NO_SOCKETS_IN_FILE_SYSTEM]: Don't parse "-s" option. (fail): Don't check for missing arguments, it is now done in set_socket. (file_name_absolute_p): New function (loosely based on the one in fileio.c). (initialize_sockets): Don't check for duplicate loading of Winsock. (get_server_config): Only try relative paths in the default directory locations. (set_tcp_socket): Don't call INITIALIZE(). Warn when connecting to a remote server. (set_socket): Call INITIALIZE(). Search explicit command-line arguments, then environment variable EMACS_SERVER_FILE, then implicit socket paths, before trying the alternate editor. (main): Use file_name_absolute_p.
* (initialize_sockets): Don't initialize Winsock more than once.Juanma Barranquero2006-11-031-0/+4
|
* [WINDOWSNT]: Define HAVE_INET_SOCKETS.Juanma Barranquero2006-11-021-22/+7
| | | | | | | [!WINDOWSNT]: Include <netinet/in.h> if available. [HAVE_SOCKETS]: Also require HAVE_INET_SOCKETS. (IOCTL, IOCTL_BOOL_ARG): Remove. (set_tcp_socket): Don't set the socket in blocking mode. Remove c_arg.
* [WINDOWSNT]: Force the first argv passed to execvp to point to alternate_editorJuanma Barranquero2006-11-011-0/+3
| | | | (otherwise .BAT scripts can't run).
* [WINDOWSNT]: Include <malloc.h> and <stdlib.h>.Juanma Barranquero2006-10-311-8/+14
| | | | (close_winsock): Declare as __cdecl.
* [!WINDOWSNT]: Include <fcntl.h> if available.Juanma Barranquero2006-10-311-0/+11
| | | | | (set_tcp_socket): Prefer O_NONBLOCK, then O_NDELAY, then FIONBIO to set the socket in non-blocking mode.
* Fixes to emacsclient.c for GNU/Linux.Juanma Barranquero2006-10-311-2/+5
| | | | | | | [!WINDOWSNT] <top level>: Include <netinet/in.h> and <sys/ioctl.h>. (INVALID_SOCKET): Define. (initialize_sockets): Put #endif at the right place. (set_local_socket): Use progname, not argv[0].
* Add support for TCP sockets.Juanma Barranquero2006-10-311-155/+400
| | | | | | | | | | | | | | | | | | | | | | | | | | (SEND_STRING, SEND_QUOTED, HSOCKET, CLOSE_SOCKET, IOCTL, INITIALIZE): New macros. (IOCTL_BOOL_ARG): New typedef. (server_file): New global variable. (longopts): New option --server-file. (decode_options): Process new option --server-file and environment variable EMACS_SERVER_FILE. (print_help_and_exit): Document new option. (fail): If no connection available and no alternate editor, suggest using options to make them explicit. (AUTH_KEY_LENGTH, SEND_BUFFER_SIZE): New constants. (send_buffer, sblen): New variables. (send_to_emacs): New function to buffer output and send it with send(). (quote_file_name): Use SEND_STRING. (close_winsock, initialize_sockets): New functions to load and unload Winsock. (get_server_config, set_tcp_socket): New functions to create and set up TCP sockets. (set_local_socket): New function to create and set up Unix socket (code moved from previous implementation). (set_socket): New function to chose between TCP and Unix sockets. (main): Use SEND_STRING and SEND_QUOTED. Most code moved to set_local_socket. Use set_socket. Get answers from server.el with recv(), not file stream functions.
* * ebrowse.c (usage, version): Mark as NO_RETURN.Dan Nicolaescu2006-07-181-1/+1
| | | | | | | | | | | | | | | | | * emacsclient.c (print_help_and_exit): Likewise. * xterm.c (x_connection_closed, x_error_quitter): Mark as NO_RETURN. * textprop.c (text_read_only): Likewise. * lread.c (end_of_file_error): Likewise. * lisp.h (circular_list_error, memory_full, buffer_memory_full): Likewise. * eval.c (unwind_to_catch): Likewise. * buffer.h (buffer_slot_type_mismatch): Likewise.
* Update years in copyright notice; nfc.Thien-Thi Nguyen2006-02-061-1/+1
|
* Update years in copyright notice; nfc.Thien-Thi Nguyen2005-08-071-2/+2
|
* Update FSF's address.Lute Kamstra2005-07-041-2/+2
|
* * emacsclient.c: Avoid expansion of getcwd when defined as a macro.Jan Djärv2005-03-181-1/+1
|
* (quote_file_name): Pass COPY thru %s to output it.Richard M. Stallman2004-07-171-1/+1
|
* Throughout, replace 0 destined for `exit' arg with `EXIT_SUCCESS'.Thien-Thi Nguyen2004-05-081-14/+13
| | | | | Likewise, replace 1 with `EXIT_FAILURE'. (main): Use `EXIT_SUCCESS' or `EXIT_FAILURE' for return value.
* (decode_options): Fix handling of alternate editor.Stefan Monnier2004-02-051-2/+2
|
* (main): Don't use the hostname in the socket name.Stefan Monnier2004-01-271-31/+14
| | | | Look for relative socket names in the /tmp dir rather than in cwd.
* (main): Restore errno from saved_errno,Richard M. Stallman2004-01-241-0/+4
| | | | so the error message comes from socket_status.
* (main): Stop if socket name too long.Stefan Monnier2004-01-201-6/+20
| | | | | Only try su-fallback if the socket name was not explicit. Check socket name length in su-fallback case as well.
* (main): Save errno from socket_status.Andreas Schwab2004-01-081-2/+5
|
* (main): Fix socket name when using another user.Andreas Schwab2004-01-041-1/+1
|
* Comment change.Richard M. Stallman2003-10-131-3/+2
|
* (quote_file_name): Print the result instead ofEli Zaretskii2003-09-281-18/+44
| | | | | | returning it. Fix the return type accordingly. (main): Under --eval, don't fail if left with additional arguments after decoding options. Quote file names.
* Comment change.Richard M. Stallman2003-09-191-1/+1
|
* (socket_name): New variable.Richard M. Stallman2003-09-121-2/+23
| | | | | | | (longopts, decode_options, print_help_and_exit): Handle --socket-name argument. (main): Use socket_name.
* Add arch taglinesMiles Bader2003-09-011-0/+3
|
* (main): Fix having macros in a printf statement.Juanma Barranquero2003-07-281-4/+4
|
* (main): Use new safe location for socket.Stefan Monnier2003-04-121-1/+1
|
* (print_help_and_exit): Print to stdout. Exit successfully. Added some blankJuanma Barranquero2003-03-121-8/+19
| | | | | | | lines for readability. (decode_options): Don't call print_help_and_exit in default case. Print version information to stdout. (main): Don't call print_help_and_exit.
* (main): Tell user how to start server within Emacs if socket could notStephen Eglen2002-12-021-1/+2
| | | | be found.
* (main): Test HAVE_GETCWD rather than BSD_SYSTEM.Richard M. Stallman2002-12-021-6/+6
|
* Remove reference to SERVER_HOME_DIR completely.Markus Rost2002-10-011-3/+0
|