help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Problem quoting expression to be eval'ed by emacsclient


From: Sebastien Vauban
Subject: Re: Problem quoting expression to be eval'ed by emacsclient
Date: Fri, 25 Oct 2013 14:37:28 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (windows-nt)

Eli Zaretskii wrote:
> Sebastien Vauban wrote:
>> Eli Zaretskii wrote:
>>>>>
>>>>> I'm trying to evaluate an expression via `emacsclient' (from a Zsh shell),
>>>>> for example:
>>>>>
>>>>> $ emacsclient -e "(message \"hello\")"
>>
>> The above tests I made are from a Cygwin Zsh session.
>
> And emacsclient was a Cygwin build or a native build? If the latter, your
> problems could be due to this mix. (Your example works for me from cmd and
> even from MSYS Bash.)

That does indeed makes a difference:

--8<---------------cut here---------------start------------->8---
$ emacsclient -e "(message \"hello\")"

*ERROR*: End of file during parsing
--8<---------------cut here---------------end--------------->8---

--8<---------------cut here---------------start------------->8---
$ /usr/bin/emacsclient -e "(message \"hello\")"
/usr/bin/emacsclient: can't find socket; have you started the server?
To start the server in Emacs, type "M-x server-start".
"hello"
--8<---------------cut here---------------end--------------->8---

However, that still leaves me with the following problem:

  How can I work in a correct shell on Windows (read: not `cmd.exe'), and
  edit in my graphical Emacs w32?

More generally, as:

- it happens I switch between GNU Emacs 23/24 versions (for test purpose, in
  case of problem)

- an Emacs server must be contacted by an `emacsclient' of the same release

- Cygwin (/usr/bin) is second in my PATH, after ~/bin

I currently have a small `~/bin/emacsclient' script (one-liner) which allows me
to set the full path to the right `emacsclient' without having to fiddle with
the PATH environment variable (as that requires me to quit my shell, and start
a new one):

--8<---------------cut here---------------start------------->8---
"C:/Program Files (x86)/emacs-trunk/bin/emacsclient" $@
--8<---------------cut here---------------end--------------->8---

This is a hack. Indeed, I'd like to be able to launch whichever Emacs version
(clicking on one of the many versions I have on my Windows desktop), and that
launching `emacsclient' in the shell would work in all contexts.

Am I missing a better way to handle this?

Best regards,
  Seb

-- 
Sebastien Vauban


reply via email to

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