emacsclient

emacsclient

May 28, 2024 | seedling, permanent

tags :

Summary #

URL

  • EmacsClient allows one to open a file for editing in an already running Emacs. Because it doesn’t start a new Emacs instance at each invocation, you can set up EmacsClient as the default editor, e.g. in the environment variable EDITOR or VISUAL.
  • EmacsClient is part of and works only in conjunction with GNU Emacs. The program GnuClient provides the corresponding functionality for XEmacs, but also works with GnuEmacs. emacs daemon can be started as service and emacsclient can connect to it.

CS #

To kill running server

emacsclient -e "(kill-emacs)"

arguments and options #

-V, –version Just print version info and return -H, –help Print this usage information message -nw, -t, –tty Open a new Emacs frame on the current terminal -c, –create-frame Create a new frame instead of trying to use the current Emacs frame -r, –reuse-frame Create a new frame if none exists, otherwise use the current Emacs frame -F ALIST, –frame-parameters=ALIST Set the parameters of a new frame -e, –eval Evaluate the FILE arguments as ELisp expressions -n, –no-wait Don’t wait for the server to return -w, –timeout=SECONDS Seconds to wait before timing out -q, –quiet Don’t display messages on success -u, –suppress-output Don’t display return values from the server -d DISPLAY, –display=DISPLAY Visit the file in the given display –parent-id=ID Open in parent window ID, via XEmbed -s SOCKET, –socket-name=SOCKET Set filename of the UNIX socket for communication -f SERVER, –server-file=SERVER Set filename of the TCP authentication file -a EDITOR, –alternate-editor=EDITOR Editor to fallback to if the server is not running If EDITOR is the empty string, start Emacs in daemon mode and try connecting again -T PREFIX, –tramp=PREFIX PREFIX to prepend to filenames sent by emacsclient for locating files remotely via Tramp


Links to this note

Go to random page

Previous Next