GNU bug report logs -
#12399
24.2.50; dired-do-touch doesn't recognize empty input in minibuffer
Previous Next
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
Message #17 received at 12399 <at> debbugs.gnu.org (full text, mbox):
> 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.
There is too little space in comments to explain
this hack, so I added a bug reference.
Old (string-equal new-attribute "") remains as
a precaution against possible unexpected changes in
`dired-mark-read-string'.
=== modified file 'lisp/dired-aux.el'
--- lisp/dired-aux.el 2012-09-08 14:48:27 +0000
+++ lisp/dired-aux.el 2012-09-11 22:48:01 +0000
@@ -244,7 +244,10 @@ (defun dired-do-chxxx (attribute-name pr
(function dired-check-process)
(append
(list operation program)
- (unless (string-equal new-attribute "")
+ (unless (or (string-equal new-attribute "")
+ ;; Use `eq' instead of `equal'
+ ;; to detect empty input (bug#12399).
+ (eq new-attribute default))
(if (eq op-symbol 'touch)
(list "-t" new-attribute)
(list new-attribute)))
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.