Subject: Re: bug#37257: failure of emacsclient ... --alternate-editor="emacs --eval"

From: Cambell Barton <[email-masked]>
Date: Sun, 15 Sep 2019 06:45:46 +1000

On 2019-09-15 06:34, Lars Ingebrigtsen wrote:
> , I guess we should just revert the patch -- I don't see any obvious
> way to determine whether --alternate-editor is Emacs (which will then
> understand the rest of the parameters) or something else (which will
> then not).  So leaving it the way it was is best.

I'm not sure what the best solution is here, it's just I had something 
that worked and now I can't get emacs27 to work usefully in the same way.

It should be possible to run the code in the client or a new instance, 
but I didn't manage to get this working.

CODE='(progn (message "HELLO WOLD"))'
emacsclient --eval "$CODE" --alternate-editor  "emacs --eval '$CODE'"

Instead of starting a new emacs and printing HELLO WOLD,
it reports:

emacsclient: error executing alternate editor "emacs --eval '(progn 
(message "HELLO WORLD"))'"