[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to get "emacsclient --eval x" to DWIM when Emacs is not started
From: |
Stefan Monnier |
Subject: |
Re: How to get "emacsclient --eval x" to DWIM when Emacs is not started |
Date: |
Sun, 30 Mar 2008 18:49:00 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) |
>> How can I get "emacsclient --eval x" to DWIM when Emacs is not
>> started? I have tried the following:
>>
>> emacsclient -e '(message "Hello!")' -a emacs
>>
>> But that does not work. What happens is that Emacs, when started as
>> the alternate editor, tries to open a file with the name ''(message
>> "Hello!").
>>
>> For normal operation, i.e. not using --eval but just for opening a
>> file, -a emacs works well and does what I expect. Why does not --eval
>> do the same? I have, of course, (server-start) in my .emacs file.
>>
>> As far as I can see, the manual does not mention this case.
> You can always try the patches I use for w32. It works fine for cases like
> the above though you just write something like
> emacsclient -e "(message \"hello\")"
I think it would be a good change for emacsclient to auto-start an Emacs
server if the server is not running yet.
I have not followed closely your work on this (other than knowing it
exists), so maybe if you can take your current code, bring it down to
the simplest/cleanest patch (ignore everything that can be added
later), we can start discussing it (in a new thread).
Stefan