[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#70725: 29.3; dired-do-touch completion
From: |
Thierry Volpiatto |
Subject: |
bug#70725: 29.3; dired-do-touch completion |
Date: |
Sat, 18 May 2024 15:46:41 +0000 |
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Juri Linkov <juri@linkov.net>
>> Cc: Andreas Schwab <schwab@linux-m68k.org>, christopher@librehacker.com,
>> Eli Zaretskii <eliz@gnu.org>, 70725@debbugs.gnu.org
>> Date: Tue, 07 May 2024 19:48:54 +0300
>>
>> > However this doesn't explain why dired-do-touch uses a completing-read
>>
>> Indeed, this was an oversight. Here is the patch
>> that replaces 'completing-read' with 'read-string':
>
> Thierry, is this solution okay with you?
This fix one issue, but default is still wrong IMHO:
When pressing RET with an empty prompt the value is different than what
is inserted in minibuffer with M-n. Why do we bother setting the
timesamp at the exact time when pressing RET instead of when pressing
"T", I mean user would consider the timestamp is set once "T" is
pressed, with this the behavior would be consistent with RET and M-n and
the code much simpler.
>> diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
>> index a2ce3083cfe..f3343b9b637 100644
>> --- a/lisp/dired-aux.el
>> +++ b/lisp/dired-aux.el
>> @@ -658,10 +658,13 @@ dired-mark-read-string
>>
>> Optional arg COLLECTION is a collection of possible completions,
>> passed as the second arg to `completing-read'."
>> - (dired-mark-pop-up nil op-symbol files
>> - 'completing-read
>> - (format prompt (dired-mark-prompt arg files))
>> - collection nil nil initial nil default-value nil))
>> + (apply #'dired-mark-pop-up
>> + nil op-symbol files
>> + (if (eq op-symbol 'touch) 'read-string 'completing-read)
>> + (format prompt (dired-mark-prompt arg files))
>> + (if (eq op-symbol 'touch)
>> + `(,initial nil ,default-value nil)
>> + `(,collection nil nil ,initial nil ,default-value nil))))
>>
>>
>> ;;; Cleaning a directory: flagging some backups for deletion
--
Thierry
signature.asc
Description: PGP signature
- bug#70725: 29.3; dired-do-touch completion, (continued)
- bug#70725: 29.3; dired-do-touch completion, Juri Linkov, 2024/05/05
- bug#70725: 29.3; dired-do-touch completion, Thierry Volpiatto, 2024/05/06
- bug#70725: 29.3; dired-do-touch completion, Juri Linkov, 2024/05/06
- bug#70725: 29.3; dired-do-touch completion, Thierry Volpiatto, 2024/05/06
- bug#70725: 29.3; dired-do-touch completion, Andreas Schwab, 2024/05/06
- bug#70725: 29.3; dired-do-touch completion, Thierry Volpiatto, 2024/05/06
- bug#70725: 29.3; dired-do-touch completion, Juri Linkov, 2024/05/07
- bug#70725: 29.3; dired-do-touch completion, Eli Zaretskii, 2024/05/18
- bug#70725: 29.3; dired-do-touch completion,
Thierry Volpiatto <=
- bug#70725: 29.3; dired-do-touch completion, Juri Linkov, 2024/05/21
- bug#70725: 29.3; dired-do-touch completion, Thierry Volpiatto, 2024/05/21
- bug#70725: 29.3; dired-do-touch completion, Thierry Volpiatto, 2024/05/21
- bug#70725: 29.3; dired-do-touch completion, Juri Linkov, 2024/05/21
- bug#70725: 29.3; dired-do-touch completion, Thierry Volpiatto, 2024/05/21
- bug#70725: 29.3; dired-do-touch completion, Thierry Volpiatto, 2024/05/22
- bug#70725: 29.3; dired-do-touch completion, Juri Linkov, 2024/05/22
- bug#70725: 29.3; dired-do-touch completion, Thierry Volpiatto, 2024/05/22
- bug#70725: 29.3; dired-do-touch completion, Thierry Volpiatto, 2024/05/23
- bug#70725: 29.3; dired-do-touch completion, Drew Adams, 2024/05/21