From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Sebastien Vauban" Newsgroups: gmane.emacs.help Subject: Re: Problem quoting expression to be eval'ed by emacsclient Date: Fri, 25 Oct 2013 14:37:28 +0200 Organization: Sebastien Vauban Message-ID: <86mwlxplvb.fsf@somewhere.org> References: <86y55kcrpc.fsf@somewhere.org> <87a9i02wu4.fsf@gmail.com> <86wql3tzwf.fsf@somewhere.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1382704814 13183 80.91.229.3 (25 Oct 2013 12:40:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 25 Oct 2013 12:40:14 +0000 (UTC) To: help-gnu-emacs-mXXj517/zsQ@public.gmane.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org-mXXj517/zsQ@public.gmane.org Fri Oct 25 14:40:19 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VZggc-0004cr-OC for geh-help-gnu-emacs@m.gmane.org; Fri, 25 Oct 2013 14:40:18 +0200 Original-Received: from localhost ([::1]:59083 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VZggc-0003r2-Dg for geh-help-gnu-emacs@m.gmane.org; Fri, 25 Oct 2013 08:40:18 -0400 Original-Path: usenet.stanford.edu!news.kjsl.com!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 64 Injection-Info: mx05.eternal-september.org; posting-host="402b34550bd938aa98825778083dce0e"; logging-data="32731"; mail-complaints-to="abuse-VVbKFVtnif8H+i2N2EyTrmui9UKz+5OX@public.gmane.org"; posting-account="U2FsdGVkX18rtqiXY4+OUxKXq/ftfQ6j" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (windows-nt) X-Archive: encrypt Cancel-Lock: sha1:lW7IGTkfQP/75VzXVEFCYwACBQU= sha1:vZLBZ9yCbjJ77M2RxQr+pjyaqHM= X-Url: Under construction... Original-Xref: usenet.stanford.edu gnu.emacs.help:201942 X-BeenThere: help-gnu-emacs-mXXj517/zsQ@public.gmane.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org-mXXj517/zsQ@public.gmane.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org-mXXj517/zsQ@public.gmane.org Xref: news.gmane.org gmane.emacs.help:94210 Archived-At: 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