GNU bug report logs - #54682
29.0.50; [PATCH] Improve Eshell's logic for finding delimiters in arguments

Previous Next

Package: emacs;

Reported by: Jim Porter <jporterbugs <at> gmail.com>

Date: Sat, 2 Apr 2022 17:31:02 UTC

Severity: normal

Tags: patch

Found in version 29.0.50

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Jim Porter <jporterbugs <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 29.0.50; [PATCH] Improve Eshell's logic for finding delimiters in
 arguments
Date: Sat, 2 Apr 2022 10:30:10 -0700
[Message part 1 (text/plain, inline)]
From "emacs -Q --eval '(eshell)'":

  ;; Good:
  ~ $ echo "\\foo"
  \foo

  ;; Bad:
  ~ $ echo "\\"
  Expecting completion of delimiter " ...

This is an issue with the logic for `eshell-find-delimiter'. When seeing 
the first '\', it didn't recognize that the second '\' was being 
escaped. Then, it looked at the second '\' and saw that it preceded a 
'"', thus thinking that the '"' was escaped and the string was 
unterminated. The fix is that `eshell-find-delimiter' should treat '\' 
as an escapable character when using backslash escapes.

In addition, I fixed the docstring. Previously, it said that backslash 
escaping only occurred when BACKSLASH-P was non-nil *and* the opening 
and closing delimiters are the same. However, when the opening and 
closing delimiters are different, backslash escaping is always used.
[0001-Fix-handling-of-inside-double-quotes-in-Eshell.patch (text/plain, attachment)]

This bug report was last modified 3 years and 108 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.