[Top][All Lists]

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

bug#25082: [PATCH] Add support to emacsclient for command-lline options

From: Reuben Thomas
Subject: bug#25082: [PATCH] Add support to emacsclient for command-lline options in ALTERNATE_EDITOR/--alternate-editor
Date: Fri, 2 Dec 2016 15:31:02 +0000

On 2 December 2016 at 10:20, Eli Zaretskii <address@hidden> wrote:
Does this work if -batch is added to the switches?

​It depends what you mean by "work". Since, according to the original implementation, only non-option are passed to the ALTERNATE_EDITOR, ​nothing useful happens (that I can see), because Emacs is run as

emacs --batch file1 file2 # etc.

and so it starts up and immediately shuts down. If, for example you try to run

export ALTERNATE_EDITOR="emacs --batch"
emacsclient --eval "(print t)"

then the actual process run is:

emacs --batch "(print t)"

which again does nothing useful. But maybe that's OK, because I am guessing you ask this because:

If so, can you add
​ ​
a test for this capability?

​There seems to be nothing much to check, other than that it returns 0, but that is already sufficient, since with the current implementation,

export ALTERNATE_EDITOR="emacs --batch"
emacsclient foo

Gives the error:

emacsclient: error executing alternate editor "emacs --batch".

​So, I tried to write a test. It works fine except that it doesn't run the right emacsclient binary (instead, it runs the one on my PATH).

Since I can't see any other tests that run built executables from the source tree, I'm not sure how I should go about this (modify PATH? Explicitly patch in srcdir somehow?). Hints appreciated.

I attach an updated patch with the test so far.


Attachment: 0005-Add-support-for-arguments-in-ALTERNATE_EDITOR-to-ema.patch
Description: Text Data

reply via email to

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