GNU bug report logs - #55204
29.0.50; Improve quoting consistency in Eshell predicates/modifiers

Previous Next

Package: emacs;

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

Date: Sun, 1 May 2022 04:38:01 UTC

Severity: normal

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


View this message in rfc822 format

From: Jim Porter <jporterbugs <at> gmail.com>
To: 55204 <at> debbugs.gnu.org
Subject: bug#55204: [PATCH] 29.0.50; Improve quoting consistency in Eshell predicates/modifiers
Date: Sat, 30 Apr 2022 21:50:42 -0700
[Message part 1 (text/plain, inline)]
See the attached patches. Some comments about the patch below.

On 4/30/2022 9:37 PM, Jim Porter wrote:
> Currently, there are some inconsistencies with how string parameters 
> should be quoted in Eshell argument predicates/modifiers (hereafter just 
> "predicates"). First, the possible delimiters for a given predicate vary 
> based on which predicate is used. Currently, the allowed delimiters are:
> 
> Any non-digit character:
>    u (user)
>    g (group)
>    a (access time)
>    m (modification time)
>    c (change time)
> Any character:
>    :i (include)
>    :x (exclude)
>    :s (substitute)
> "'" or "/":
>    :j (join)
>    :S (split)

To resolve this, I've standardized on using the following delimiter 
pairs: "...", '...', /.../, |...|, (...), [...], <...>, and {...}. This 
is a smaller valid set than what's was allowed for some of the above 
predicates, but is still considerably more than what was actually 
documented (just '...' and /.../). I've updated the manual to list the 
accepted delimiters, but maybe we should add more to the list. However, 
since some predicates take an *optional* string parameter, it's best not 
to be too loose with acceptable delimiters so that there isn't 
confusion; this is already a problem with "/", since that could be a 
string delimiter *or* a predicate meaning "match directories", but it'd 
be too hard to change either of those at this point. (Users can avoid 
this issue by being careful about the order they write their predicates in.)

I'm not sure if this change warrants a NEWS entry. On the one hand, it's 
just a bug fix, but on the other hand, it's an incompatible change. On 
the third(?) hand, it was never documented, and I'm not sure if anyone 
would have guessed that you can use, say, alphabetic characters as 
string delimiters in predicates.
[0001-Use-a-common-set-of-string-delimiters-for-all-Eshell.patch (text/plain, attachment)]
[0002-Handle-escaped-characters-in-Eshell-argument-predica.patch (text/plain, attachment)]
[0003-Handle-escaped-characters-in-Eshell-special-referenc.patch (text/plain, attachment)]

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

Previous Next


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