GNU bug report logs - #35564
27.0.50; [PATCH] Tweak dired-do-shell-command warning about "wildcard" characters

Previous Next

Package: emacs;

Reported by: Kévin Le Gouguec <kevin.legouguec <at> gmail.com>

Date: Sat, 4 May 2019 18:03:02 UTC

Severity: normal

Tags: fixed, moreinfo, patch

Merged with 28969

Found in version 27.0.50

Fixed in version 28.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: Kévin Le Gouguec <kevin.legouguec <at> gmail.com>
To: Noam Postavsky <npostavs <at> gmail.com>
Cc: 35564 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: bug#35564: [PATCH v3] Tweak dired warning about "wildcard" characters
Date: Fri, 28 Jun 2019 08:15:44 +0200
[Message part 1 (text/plain, inline)]
Noam Postavsky <npostavs <at> gmail.com> writes:

> Yes, this was kind of bugging me, so here's a patch to reuse that logic
> (it applies on top of yours).  While doing this I noticed that we
> earlier missed that `*` is not considered isolated, unlike `?`.

Thank you very much!

> Assuming no problems, I'll just push your two patches followed by mine

Fine by me, although it just occurs to me that I forgot to mention the
bug number in my commit messages.  Here are updated patches:

[0001-Preserve-text-properties-in-y-or-n-p-prompts.patch (text/x-patch, attachment)]
[0002-Tweak-dired-warning-about-wildcard-characters.patch (text/x-patch, attachment)]
[Message part 4 (text/plain, inline)]
> +(defun dired--no-subst-prompt (command char-positions)
> […]
> +              ((setq confirmations (dired--need-confirm-positions command "*"))
> +               (y-or-n-p (dired--no-subst-prompt confirmations command)))
> +              ((setq confirmations (dired--need-confirm-positions command "?"))
> +               (y-or-n-p (dired--no-subst-prompt command confirmations)))

Mmmm, am I missing something, or have the arguments to
dired--no-subst-prompt been reversed in the "*" case?  I.e. shoudn't

> +               (y-or-n-p (dired--no-subst-prompt confirmations command)))

rather be

> +               (y-or-n-p (dired--no-subst-prompt command confirmations)))

?  As things stand, "! grep 'foo.*'" in Dired fails, saying:

    let: Wrong type argument: stringp, (9)

This bug report was last modified 4 years and 297 days ago.

Previous Next


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