[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: automatic selection of emacsclient/emacs?
From: |
Jochen Küpper |
Subject: |
Re: automatic selection of emacsclient/emacs? |
Date: |
Wed, 08 Jun 2005 09:56:53 +0200 |
Hattuari <susudata@setidava.kushan.aa> writes:
> Is there a clean way to get Emacs to start as a client when there is an
> available server?
RTFM
,----[ (info "(emacs)Invoking emacsclient") ]
| The option `--alternate-editor=COMMAND' is useful when running
| `emacsclient' in a script. It specifies a command to run if
| `emacsclient' fails to contact Emacs. For example, the following
| setting for the EDITOR environment variable will always give you an
| editor, even if no Emacs server is running:
|
| EDITOR="emacsclient --alternate-editor emacs +%d %s"
|
| The environment variable ALTERNATE_EDITOR has the same effect, but the
| value of the `--alternate-editor' takes precedence.
|
| Alternatively, the file `etc/emacs.bash' defines a bash function
| which will communicate with a running Emacs server, or start one if
| none exists.
`----
Greetings,
Jochen
--
Einigkeit und Recht und Freiheit http://www.Jochen-Kuepper.de
Liberté, Égalité, Fraternité GnuPG key: CC1B0B4D
(Part 3 you find in my messages before fall 2003.)