GNU bug report logs - #12399
24.2.50; dired-do-touch doesn't recognize empty input in minibuffer

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> jurta.org>

Date: Sun, 9 Sep 2012 22:50:01 UTC

Severity: normal

Found in version 24.2.50

Done: Juri Linkov <juri <at> jurta.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Juri Linkov <juri <at> jurta.org>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#12399: closed (24.2.50; dired-do-touch doesn't recognize
 empty input in minibuffer)
Date: Thu, 13 Sep 2012 23:46:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Fri, 14 Sep 2012 02:42:53 +0300
with message-id <87r4q5cww2.fsf <at> mail.jurta.org>
and subject line Re: bug#12399: 24.2.50; dired-do-touch doesn't recognize empty input in minibuffer
has caused the debbugs.gnu.org bug report #12399,
regarding 24.2.50; dired-do-touch doesn't recognize empty input in minibuffer
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
12399: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=12399
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Juri Linkov <juri <at> jurta.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.2.50; dired-do-touch doesn't recognize empty input in minibuffer
Date: Mon, 10 Sep 2012 01:43:14 +0300
`dired-do-touch' used to get the current time for empty input.
Its prompt says that the default value is "now".

But currently its default value is the file modification time,
not the current time.  Thus `T RET' has no effect in dired.

The problem is that `dired-mark-read-string' now uses `completing-read'
(to be able to provide completion) instead of `read-from-minibuffer'.

These functions differ in how they handle defaults:
`read-from-minibuffer' returns the empty string for empty input, but
`completing-read' returns the default value and can't recognize
empty input.

This requires a new function that provides completion like
`completing-read-default' but without these two lines:

    (when (and (equal result "") def)
      (setq result (if (consp def) (car def) def)))


[Message part 3 (message/rfc822, inline)]
From: Juri Linkov <juri <at> jurta.org>
To: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Cc: Bastien <bzg <at> altern.org>, 12399-done <at> debbugs.gnu.org
Subject: Re: bug#12399: 24.2.50;
	dired-do-touch doesn't recognize empty input in minibuffer
Date: Fri, 14 Sep 2012 02:42:53 +0300
>> There's another way to do that: check (eq val default), since the
>> returned value will be `eq' to the `default' if the minibuffer was
>> empty, whereas if it comes from a non-empty minibuffer it will at best
>> be `equal'.
>
> I tried this in the following patch and it works.

Installed.


This bug report was last modified 12 years and 330 days ago.

Previous Next


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