From: Jim Porter <jporterbugs@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Shell quoting in Eshell (was: eshell-batch-file)
Date: Sun, 9 Jun 2024 13:07:05 -0700 [thread overview]
Message-ID: <abfd353c-fedf-1587-a218-60f5de8bbfc4@gmail.com> (raw)
In-Reply-To: <86bk4a9bcs.fsf@gnu.org>
On 6/9/2024 12:15 PM, Eli Zaretskii wrote:
> ... The problem, in
> particular with the Eshell test suite, is that that the same utility
> functions are used with many different commands and many different
> situations, and so in general it is almost impossible to fix this
> inside the utility function which actually quotes the arguments,
> because the function doesn't know how will the command be called and
> even what are the arguments it is quoting.
I'll take a look at this in some more detail. I've tried to be cautious
about this in the tests, but since I only have a GNU/Linux dev
environment set up, it seems some mistakes have slipped through.
> Curiously, there is already eshell-quote-argument, but it doesn't
> produce the same effect as shell-quote-argument with 2nd arg non-nil,
> which is why in esh-proc-tests.el I couldn't use
> eshell-quote-argument. Any idea why eshell-quote-argument is
> different?
Hmm, I'm not immediately sure, although I have a feeling that's a bug.
In particular, 'eshell-quote-argument' doesn't quote parens, which seems
like a problem since that's how you write Lisp forms in Eshell. Surely
we'd want to quote those. I'll take a look though, and see if I can fix
things so we can use 'eshell-quote-argument' in the tests at the right
spots.
> In any case, I suggest at some point to discuss how to handle quoting
> in a more systematic way, because it was a cause of constant problems
> when I ran the Eshell tests today and fixed those which failed.
Thanks for all the fixes. I'll go through them and see if there are any
subsequent improvements I should make. If you run into any similar
problems in the future, feel free to ping me first and I can try to make
the fixes on my end (so long as I'm available) so you don't have to.
next prev parent reply other threads:[~2024-06-09 20:07 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-09 6:11 eshell-batch-file Eli Zaretskii
2024-06-09 18:55 ` eshell-batch-file Jim Porter
2024-06-09 19:06 ` eshell-batch-file Eli Zaretskii
2024-06-09 19:15 ` Shell quoting in Eshell (was: eshell-batch-file) Eli Zaretskii
2024-06-09 20:07 ` Jim Porter [this message]
2024-06-09 22:37 ` Jim Porter
2024-06-15 9:38 ` Eli Zaretskii
2024-06-15 18:36 ` Jim Porter
2024-06-15 19:10 ` Eli Zaretskii
2024-06-15 20:06 ` Jim Porter
2024-06-16 5:21 ` Eli Zaretskii
2024-06-16 5:57 ` Jim Porter
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=abfd353c-fedf-1587-a218-60f5de8bbfc4@gmail.com \
--to=jporterbugs@gmail.com \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.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).