emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: emacsclientw


From: Lennart Borgman
Subject: Re: emacsclientw
Date: Tue, 14 Nov 2006 01:45:46 +0100
User-agent: Thunderbird 1.5.0.8 (Windows/20061025)

Juanma Barranquero wrote:
On 11/13/06, Lennart Borgman <address@hidden> wrote:

Though I am unsure
about some details ... - if setup of a network socket fails, is it then
ok to try again later? I mean I assume that the socket setup failed
because there was no emacs server running. Can those cases be recognized?

That's one of the reasons I don't like this. emacsclient is based upon
the idea that you try to connect to Emacs, and if you can't, you just
run the alternate editor. Now, you're going to be forced to
distinguish between running the alternate editor, and running Emacs,
because they should be treated in two very different ways, and have
all sort of configuration options for the case that you run Emacs.
Unless you're thinking of getting rid of --alternate-editor, which
wouldn't be a good idea.

It would be far easier, I think, to have a second program (let's call
it launchemacs) that does:

 1) Run Emacs and wait until Emacs is running the server. The program
should have options to start Emacs the way the user wants (either a
config file, command line options, environmente variables, whatever)
 2) Once the seerver is running, execvp emacsclient(w?).exe with the
original arguments passed to launchemacs.

The trick is that then you can do

 emacsclient --alternate-editor=launchemacs myfile.txt

and you don't have to modify emacsclient *at all*.

My idea is a little, little bit different. Keep --alternative-editor. Add a new option --start-timeout=[seconds]. If this new option is given then wait max that many seconds for emacs server to be available after launching --alternative-editor.

Let the default for --alternative-editor be "emacs" (or "runemacs" on w32). With full path taken from emacsclient path.

Doing it this way no second program is needed and it is (I hope) easy to wait for emacs server.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]