configure external editor a script
Simon King
simon at simonking.org.uk
Wed Oct 19 13:58:30 UTC 2016
On Wed, Oct 19, 2016 at 2:49 PM, Uwe Brauer <oub at mat.ucm.es> wrote:
>
> > On Wed, Oct 19, 2016 at 2:14 PM, Uwe Brauer <oub at mat.ucm.es> wrote:
>
>
> > So if you set one of those environment variables before committing,
> > you can control the location of the temporary file. You could even do
> > that in an alias:
>
> > [alias]
> > uwecommit = !TMPDIR=$($HG root) $HG commit "$@"
>
>
> Thanks very much. However there is a problem.
>
> I have set
> setenv EDITOR /opt/emacs25/bin/emacsclient
> using tcsh.
>
> Then hg commit -e
> works as I described.
>
> However when I run
>
> hg uwecommit -e
>
> /opt/emacs25/bin/emacsclient: can't find socket; have you started the server?
> To start the server in Emacs, type "M-x server-start".
> /opt/emacs25/bin/emacsclient: No socket or alternate editor. Please use:
>
> --socket-name
> --server-file (or environment variable EMACS_SERVER_FILE)
> --alternate-editor (or environment variable ALTERNATE_EDITOR)
> abort: edit failed: emacsclient exited with status 1
>
> That is absurd, why does hg commit -e work,
> but hg uwecommit
> or hg uwecommit -e
>
> Gives this bizarre error?
emacs and emacsclient probably use a similar set of environment
variables for their control socket location. Try the other 2
environment variables (TMP and TEMP), and if none of them work, you
could try passing the --server-file argument to emacsclient.
Simon
More information about the Mercurial
mailing list