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: Michael Heerdegen <michael_heerdegen <at> web.de>
Cc: 35564 <at> debbugs.gnu.org, Noam Postavsky <npostavs <at> gmail.com>, Juri Linkov <juri <at> linkov.net>, Stefan Monnier <monnier <at> iro.umontreal.ca>, Eli Zaretskii <eliz <at> gnu.org>, Drew Adams <drew.adams <at> oracle.com>
Subject: bug#35564: [PATCH v5] Tweak dired warning about "wildcard" characters
Date: Tue, 22 Oct 2019 23:32:18 +0200
Michael Heerdegen <michael_heerdegen <at> web.de> writes:

> Without having had a look yet - your last version addresses everything
> brought up so far and can be considered final, right?

I think so.  Going over for bug#28969 and bug#35564, here are the
discussion points I could identify:

- y-or-n-p propertizing its prompt rigidly: out of scope, since we use
  read-multiple-choice now.

- The prompt getting too long: it's now much shorter than the
  four(!)-line version I came up with in v4; it concisely spells out the
  issue (some characters will not be substituted) and invites the user
  to ask for more details if needed.

- Asking the user whether they'd like to actually substitute these
  characters: out of scope; not sure it's necessary, since the new
  "details" buffer explains how to work around this for '?' (using
  backquotes).

  (Though no such workaround exists for '*'.  Allowing '*' to be
   isolated with backquotes just like '?' would be a natural thing to do
   IMO, but that's unrelated to fixing this confusing prompt.)

- Ensuring accessibility: users who cannot distinguish the 'warning'
  face are now invited to add optional '^' markers.

- Preventing '`' being linked to the backquote macro in the docstring
  for dired-do-shell-command: still no idea how to fix that, but that
  can be investigated independently.


Here are some remaining issues I can think of:

- The code that toggles the '^' markers does not check that the command
  is not wrapped/truncated (i.e. that the window is wide enough).

- The details window might not be tall enough, in which case maybe I
  should add [f]orward-/[b]ackward-page actions like nsm.el does.

- In dired--no-subst-confirm, I did my best to make the window-popping
  dance as graceful as possible (unwind-protect so that the details
  buffer is killed even after C-g, save-window-excursion to restore the
  window configuration…), but maybe it falls apart in cases I haven't
  considered.

- UI bikeshedding: maybe drop the leading "Warning:", add the underline
  face to the mix…

- Code quality: some of the small functions I wrote exist for no other
  reason than I found the resulting code to be easier to follow; they
  could probably be inlined if others do not share my preferences.




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

Previous Next


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