[Top][All Lists]

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

bug#35564: [PATCH v4] Tweak dired warning about "wildcard" characters

From: Kévin Le Gouguec
Subject: bug#35564: [PATCH v4] Tweak dired warning about "wildcard" characters
Date: Fri, 12 Jul 2019 17:10:26 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)


I have now added '^' markers below the highlighted command, on condition
that the echo area is wide enough not to wrap lines.

Do we want to add some customizability (highlight face, whether or not
to display '^' markers), or is this good enough for now?

The patch series now includes:

- two patches to make y-or-n-p preserve text properties and implement an
  initial version of highlighting,
- Noam's refactoring patch, plus fixups,
- one patch to add '^' markers,
- one last patch to make tests less tedious to maintain.

Attachment: 0001-Preserve-text-properties-in-y-or-n-p-prompts.patch
Description: Text Data

Attachment: 0002-Tweak-dired-warning-about-wildcard-characters.patch
Description: Text Data

Attachment: 0003-Dedup-dired-aux-isolated-char-searching-Bug-35564.patch
Description: Text Data

Attachment: 0004-fixup-Dedup-dired-aux-isolated-char-searching-Bug-35.patch
Description: Text Data

Attachment: 0005-Add-markers-below-non-isolated-chars-in-dired-prompt.patch
Description: Text Data

Attachment: 0006-Simplify-highlighting-assertions.patch
Description: Text Data

Again, thank you for your patience and your reviews.

PS: the prompt now looks like this ('?' characters are highlighted with
the warning face):

With markers:

> Confirm:
> sed 's/\?/!/'
>         ^
> Send 1 occurrence of ‘?’ as-is to shell?

Without markers:

> Confirm:
> sed 's/\?/!/'
> Send 1 occurrence of ‘?’ as-is to shell?

I added the "Confirm:" line because

- y-or-n-p adds "Please answer y or n.  " before the prompt when the
  user fails to answer correctly, so the markers would not line up if
  the command remained on the first line,

- y-or-n-p adds " (y or n)" after the prompt; I find it more legible to
  have the question next to this suffix, so I did not want to move the
  question to the first line.

reply via email to

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