+2012-04-17 Dmitry Antipov <dmantipov@yandex.ru>
+
+ * dired-aux.el (dired-mark-read-string): Offer optional completion.
+ (dired-do-chxxx): Complete chown, chgrp over users, groups. (Bug#7900)
+
2012-04-17 Glenn Morris <rgm@gnu.org>
* mouse.el (mouse-drag-track):
" (default now): "
": ")))
(new-attribute (dired-mark-read-string prompt nil op-symbol
- arg files default))
+ arg files default
+ (cond ((eq op-symbol 'chown)
+ (system-users))
+ ((eq op-symbol 'chgrp)
+ (system-groups)))))
(operation (concat program " " new-attribute))
failures)
(setq failures
(dired-run-shell-command (dired-shell-stuff-it command file-list nil))))
(defun dired-mark-read-string (prompt initial op-symbol arg files
- &optional default-value)
+ &optional default-value collection)
"Read args for a Dired marked-files command, prompting with PROMPT.
Return the user input (a string).
user enters empty input, this function returns the empty string,
not DEFAULT-VALUE."
(dired-mark-pop-up nil op-symbol files
- 'read-from-minibuffer
+ 'completing-read
(format prompt (dired-mark-prompt arg files))
- initial nil nil nil default-value))
+ collection nil nil initial nil default-value nil))
\f
;;; Cleaning a directory: flagging some backups for deletion.