[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r107948: Add user, group name complet
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r107948: Add user, group name completion to dired |
Date: |
Mon, 16 Apr 2012 21:49:40 -0400 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 107948
fixes bug(s): http://debbugs.gnu.org/7900
author: Dmitry Antipov <address@hidden>
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Mon 2012-04-16 21:49:40 -0400
message:
Add user, group name completion to dired
Note from committer:
I modified the original patch, by adding the new collection argument
at the end of the argument list rather than in the middle.
* dired-aux.el (dired-mark-read-string): Offer optional completion.
(dired-do-chxxx): Complete chown, chgrp over users, groups.
modified:
lisp/ChangeLog
lisp/dired-aux.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2012-04-17 00:04:53 +0000
+++ b/lisp/ChangeLog 2012-04-17 01:49:40 +0000
@@ -1,3 +1,8 @@
+2012-04-17 Dmitry Antipov <address@hidden>
+
+ * 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 <address@hidden>
* mouse.el (mouse-drag-track):
=== modified file 'lisp/dired-aux.el'
--- a/lisp/dired-aux.el 2012-04-01 02:44:24 +0000
+++ b/lisp/dired-aux.el 2012-04-17 01:49:40 +0000
@@ -245,7 +245,11 @@
" (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
@@ -385,7 +389,7 @@
(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).
@@ -399,9 +403,9 @@
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))
;;; Cleaning a directory: flagging some backups for deletion.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r107948: Add user, group name completion to dired,
Glenn Morris <=