From: Eli Zaretskii <eliz@gnu.org>
To: Reuben Thomas <rrt@sc3d.org>
Cc: 25082@debbugs.gnu.org
Subject: bug#25082: [PATCH] Add support to emacsclient for command-lline options in ALTERNATE_EDITOR/--alternate-editor
Date: Tue, 29 Aug 2017 19:49:05 +0300 [thread overview]
Message-ID: <83shga2ubi.fsf@gnu.org> (raw)
In-Reply-To: <CAOnWdoie5tz8zhUjTSar3KHogVjGZW7mEwD6myhhCUA_2JZGyA@mail.gmail.com> (message from Reuben Thomas on Tue, 29 Aug 2017 16:49:23 +0100)
> From: Reuben Thomas <rrt@sc3d.org>
> Date: Tue, 29 Aug 2017 16:49:23 +0100
> Cc: Glenn Morris <rgm@gnu.org>, 25082@debbugs.gnu.org
>
> > I've added detail to NEWS. I am wary of adding more detail to the
> > manual, because it could prevent future improvements (for example,
> > implementation of quote escaping): we don't want users to rely on the
> > lack of quote escaping.
>
> We don't want them to rely on the lack of the escaping, but we also
> want to tell them what is supported and how.
>
> So just to check, you would view the current lack of documentation of how the current variable works as
> something that should ideally be improved?
Yes.
> > +Arguments may be quoted, so that for example an absolute path
> > +containing a space may be specified; quote escaping is not supported.
>
> I would say `quoted "like this"', since otherwise it isn't clear what
> kind of quoting is supported. And I think something similar needs to
> be said in the manual.
>
> OK, I'll do that.
Thanks.
> This won't work on Windows, btw, if the arguments include whitespace.
> But that can be fixed by followup changes.
>
> How not? That is precisely the case it aims to support. That's the whole point of dealing with quotes!
> (Previous versions of the patch didn't support quoting, and so didn't support spaces in arguments; this version
> has a passing test to show that spaces in quoted arguments work.)
Did you try that on MS-Windows? If you did and it worked for you,
then perhaps I've misread the code. I didn't actually try running it.
The issue I alluded to is a subtle misfeature in the Windows
implementation of execvp (and similar Posix functions): the arguments
you pass via the argv array get concatenated into a single
command-line string, and that string is passed to the Windows system
API that actually invokes the program. So argv[] elements that
include whitespace need to be quoted(!) to work correctly on
MS-Windows. (Of course, this quoting must be ifdef'ed away for Posix
platforms.)
next prev parent reply other threads:[~2017-08-29 16:49 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-01 15:31 bug#25082: [PATCH] Add support to emacsclient for command-lline options in ALTERNATE_EDITOR/--alternate-editor Reuben Thomas
2016-12-02 10:20 ` Eli Zaretskii
2016-12-02 15:31 ` Reuben Thomas
2016-12-08 23:10 ` Glenn Morris
2016-12-09 13:44 ` Reuben Thomas
2017-08-20 21:08 ` Reuben Thomas
2017-08-22 0:16 ` Glenn Morris
2017-08-22 0:23 ` Reuben Thomas
2017-08-22 0:52 ` Reuben Thomas
2017-08-23 22:59 ` Reuben Thomas
2017-08-27 14:55 ` Eli Zaretskii
2017-08-28 10:15 ` Reuben Thomas
2017-08-29 15:43 ` Eli Zaretskii
2017-08-29 15:49 ` Reuben Thomas
2017-08-29 16:49 ` Eli Zaretskii [this message]
2017-08-29 22:29 ` Reuben Thomas
2017-08-30 16:48 ` Eli Zaretskii
2017-08-30 21:01 ` Reuben Thomas
2017-08-30 21:02 ` bug#25082: Patch installed Reuben Thomas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83shga2ubi.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=25082@debbugs.gnu.org \
--cc=rrt@sc3d.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).