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

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

bug#54603: 29.0.50; [PATCH] Eshell's external pipe module interferes wit


From: Jim Porter
Subject: bug#54603: 29.0.50; [PATCH] Eshell's external pipe module interferes with other argument parsing hooks
Date: Thu, 31 Mar 2022 16:31:53 -0700

On 3/31/2022 3:48 PM, Sean Whitton wrote:
Thank you for testing.  In the meantime, I've thought it all through
some more, and I think that your original idea of catching the
'eshell-incomplete is the right thing, assuming all tests pass.

I think the error should be caught inside the `or', though?  The idea
would be that if eshell-incomplete is thrown within one of the
disjuncts, that disjunct should return nil.

Hmm, that's an interesting thought. Maybe this code could be more particular about what parse function it calls. Since each of the function calls here:

                         (while (or (eshell-parse-lisp-argument)
                                    (eshell-parse-backslash)
                                    (eshell-parse-double-quote)
                                    (eshell-parse-literal-quote)))

correspond to a particular token here (earlier in the source):

                               (re-search-forward
                                "\\(?:(\\|#?'\\|\"\\|\\\\\\)" bound t)))

perhaps it would be better to match the function call to the corresponding token. That is, if we see a "#?", we call `eshell-parse-lisp-argument', and so on. See the attached patch, which works in my tests (and passes all the existing Eshell unit tests).

Attachment: 0001-Make-Eshell-s-extpipe-more-lenient-when-looking-for-.patch
Description: Text document


reply via email to

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