{
    "mode": "man",
    "parameter": "emacsclient.emacs",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/emacsclient.emacs/1/json",
    "generated": "2026-05-30T07:11:15Z",
    "synopsis": "emacsclient [options] files ...",
    "sections": {
        "NAME": {
            "content": "emacsclient - tells a running Emacs to visit a file\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "emacsclient [options] files ...\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This  manual page documents briefly the emacsclient command.  Full documentation is available\nin the GNU Info format; see below.  This manual page was originally written  for  the  Debian\nGNU/Linux distribution, but is not specific to that system.\n\nemacsclient works in conjunction with the built-in Emacs server.\n\nYou can either call emacsclient directly or let other programs run it for you when necessary.\nOn GNU and Unix systems many programs consult the environment variable EDITOR (sometimes also\nVISUAL)  to  obtain the command used for editing.  Thus, setting this environment variable to\n'emacsclient' will allow these programs to use an already running Emacs for  editing.   Other\noperating systems might have their own methods for defining the default editor.\n\nFor emacsclient to work, you need an already running Emacs with a server.  Within Emacs, call\nthe functions \"server-start\" or \"server-mode\".  (Your \".emacs\" file can do this automatically\nif you add either \"(server-start)\" or \"(server-mode 1)\" to it.)\n\nWhen  you've  finished editing the buffer, type \"C-x #\" (\"server-edit\").  This saves the file\nand sends a message back to the emacsclient program telling it to exit.   The  programs  that\nuse  EDITOR  wait  for the \"editor\" (actually, emacsclient) to exit.  \"C-x #\" also checks for\nother pending external requests to edit various files, and selects the next such file.\n\nIf you set the variable \"server-window\" to a window or a frame, \"C-x #\" displays  the  server\nbuffer in that window or in that frame.\n\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "Most  options  follow  the usual GNU command line syntax, with long options starting with two\ndashes (\"-\").\n\n+line[:column]\nGo to the specified line and column.  A missing column is treated as column  1.   This\noption applies only to the next file specified.\n",
            "subsections": [
                {
                    "name": "-a, --alternate-editor=COMMAND",
                    "content": "if the Emacs server is not running, run the specified shell command instead.  This can\nalso be specified via the ALTERNATEEDITOR environment variable.  If the value of  AL‐\nTERNATEEDITOR  is  the  empty  string,  run \"emacs --daemon\" to start Emacs in daemon\nmode, and try to connect to it.\n",
                    "flag": "-a",
                    "long": "--alternate-editor",
                    "arg": "COMMAND"
                },
                {
                    "name": "-c, --create-frame",
                    "content": "create a new frame instead of trying to use the current Emacs frame\n",
                    "flag": "-c",
                    "long": "--create-frame"
                },
                {
                    "name": "-F, --frame-parameters=ALIST",
                    "content": "set the parameters of a newly-created frame.\n",
                    "flag": "-F",
                    "long": "--frame-parameters",
                    "arg": "ALIST"
                },
                {
                    "name": "-d, --display=DISPLAY",
                    "content": "tell the server to display the files on the given display.\n",
                    "flag": "-d",
                    "long": "--display",
                    "arg": "DISPLAY"
                },
                {
                    "name": "-e, --eval",
                    "content": "do not visit files but instead evaluate the arguments as Emacs Lisp expressions.\n",
                    "flag": "-e",
                    "long": "--eval"
                },
                {
                    "name": "-f, --server-file=FILENAME",
                    "content": "use TCP configuration file FILENAME for communication.  This can also be specified via\nthe EMACSSERVERFILE environment variable.\n",
                    "flag": "-f",
                    "long": "--server-file",
                    "arg": "FILENAME"
                },
                {
                    "name": "-n, --no-wait",
                    "content": "returns  immediately without waiting for you to \"finish\" the buffer in Emacs.  If com‐\nbined with --eval, this option is ignored.\n",
                    "flag": "-n",
                    "long": "--no-wait"
                },
                {
                    "name": "-nw, -t, --tty",
                    "content": "open a new Emacs frame on the current terminal\n",
                    "flag": "-t",
                    "long": "--tty"
                },
                {
                    "name": "-s, --socket-name=FILENAME",
                    "content": "use socket named FILENAME for communication.  This  can  also  be  specified  via  the\nEMACSSOCKETNAME environment variable.\n",
                    "flag": "-s",
                    "long": "--socket-name",
                    "arg": "FILENAME"
                },
                {
                    "name": "-V, --version",
                    "content": "print version information and exit\n",
                    "flag": "-V",
                    "long": "--version"
                },
                {
                    "name": "-H, --help",
                    "content": "print this usage information message and exit\n",
                    "flag": "-H",
                    "long": "--help"
                }
            ]
        },
        "EXIT STATUS": {
            "content": "Normally,  the  exit status is 0.  If emacsclient shuts down due to Emacs signaling an error,\nthe exit status is 1.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "The program is documented fully in Using Emacs as a Server available via the Info system.\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "This manual page was written by Stephane Bortzmeyer <bortzmeyer@debian.org>, for  the  Debian\nGNU/Linux system (but may be used by others).\n",
            "subsections": []
        },
        "COPYING": {
            "content": "This manual page is in the public domain.\n\n\n\nEMACSCLIENT(1)",
            "subsections": []
        }
    },
    "summary": "emacsclient - tells a running Emacs to visit a file",
    "flags": [
        {
            "flag": "-a",
            "long": "--alternate-editor",
            "arg": "COMMAND",
            "description": "if the Emacs server is not running, run the specified shell command instead. This can also be specified via the ALTERNATEEDITOR environment variable. If the value of AL‐ TERNATEEDITOR is the empty string, run \"emacs --daemon\" to start Emacs in daemon mode, and try to connect to it."
        },
        {
            "flag": "-c",
            "long": "--create-frame",
            "arg": null,
            "description": "create a new frame instead of trying to use the current Emacs frame"
        },
        {
            "flag": "-F",
            "long": "--frame-parameters",
            "arg": "ALIST",
            "description": "set the parameters of a newly-created frame."
        },
        {
            "flag": "-d",
            "long": "--display",
            "arg": "DISPLAY",
            "description": "tell the server to display the files on the given display."
        },
        {
            "flag": "-e",
            "long": "--eval",
            "arg": null,
            "description": "do not visit files but instead evaluate the arguments as Emacs Lisp expressions."
        },
        {
            "flag": "-f",
            "long": "--server-file",
            "arg": "FILENAME",
            "description": "use TCP configuration file FILENAME for communication. This can also be specified via the EMACSSERVERFILE environment variable."
        },
        {
            "flag": "-n",
            "long": "--no-wait",
            "arg": null,
            "description": "returns immediately without waiting for you to \"finish\" the buffer in Emacs. If com‐ bined with --eval, this option is ignored."
        },
        {
            "flag": "-t",
            "long": "--tty",
            "arg": null,
            "description": "open a new Emacs frame on the current terminal"
        },
        {
            "flag": "-s",
            "long": "--socket-name",
            "arg": "FILENAME",
            "description": "use socket named FILENAME for communication. This can also be specified via the EMACSSOCKETNAME environment variable."
        },
        {
            "flag": "-V",
            "long": "--version",
            "arg": null,
            "description": "print version information and exit"
        },
        {
            "flag": "-H",
            "long": "--help",
            "arg": null,
            "description": "print this usage information message and exit"
        }
    ],
    "examples": [],
    "see_also": []
}