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

[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: Wed, 23 Aug 2017 23:59:01 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1

On 08/12/16 23:10, Glenn Morris wrote:
> Reuben Thomas wrote:
>
>> The attached patch adds support to emacsclient for command-line options
>> when specifying the alternate editor, so that for example one can now say:
>>
>> ALTERNATE_EDITOR="emacs -Q -nw"
> Obvious question: what happens if eg one wants to specify an absolute
> file name for the alternate editor, and it contains spaces?

I've modified my patch to cope with this case. Rather than write a
general escaping parser, or even one that just copes with escaping
quotes (likely to be complex and buggy in C; and I couldn't find code I
could easily lift from elsewhere), I simply allow " as a delimiter as
well as space for quotes. Escaping quotes is not supported.

This suffices to cope with the common case on Windows of needing to
quote a path containing spaces. It also copes with other simple cases.

Is this sufficient?

Updated patch attached.

-- 

https://rrt.sc3d.org

Attachment: 0001-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]