diff options
| author | Juri Linkov | 2004-03-31 16:33:00 +0000 |
|---|---|---|
| committer | Juri Linkov | 2004-03-31 16:33:00 +0000 |
| commit | 3ccd3160453f0e4ed037126d0300c601a30986ee (patch) | |
| tree | 432225cd34bf97ecc9107cb9e3afd899aa810a31 | |
| parent | 57654b8c0cfb0983c83239817584b0f5fcc59485 (diff) | |
| download | emacs-3ccd3160453f0e4ed037126d0300c601a30986ee.tar.gz emacs-3ccd3160453f0e4ed037126d0300c601a30986ee.zip | |
(dired-do-touch): New fun.
(dired-do-chxxx): Add argument -t for touch operation.
| -rw-r--r-- | lisp/ChangeLog | 17 | ||||
| -rw-r--r-- | lisp/dired-aux.el | 13 |
2 files changed, 28 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ab9461d7267..f87dc926955 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,20 @@ | |||
| 1 | 2004-03-31 Juri Linkov <juri@jurta.org> | ||
| 2 | |||
| 3 | * dired.el: Add autoload for `dired-do-touch'. | ||
| 4 | (dired-touch-program): New var. | ||
| 5 | (dired-mode-map): Bind `dired-do-touch' to T and add menu-item. | ||
| 6 | (dired-no-confirm): Add `touch' to docstring. | ||
| 7 | |||
| 8 | * dired-aux.el (dired-do-touch): New fun. | ||
| 9 | (dired-do-chxxx): Add argument -t for touch operation. | ||
| 10 | |||
| 11 | * dired-x.el (dired-mark-sexp): Replace hard-coded month names by | ||
| 12 | `dired-move-to-filename-regexp'. | ||
| 13 | |||
| 14 | 2004-03-31 H,Ae(Bkan Granath <hakan.granath@kau.se> (tiny change) | ||
| 15 | |||
| 16 | * dired.el (dired-move-to-filename-regexp): Add . to HH:MM. | ||
| 17 | |||
| 1 | 2004-03-30 Vinicius Jose Latorre <viniciusjl@ig.com.br> | 18 | 2004-03-30 Vinicius Jose Latorre <viniciusjl@ig.com.br> |
| 2 | 19 | ||
| 3 | * progmodes/ebnf2ps.el (ebnf-eps-finish-and-write): Write a buffer if | 20 | * progmodes/ebnf2ps.el (ebnf-eps-finish-and-write): Write a buffer if |
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index 1fc8e0e805a..0709e0cfe1c 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el | |||
| @@ -186,7 +186,7 @@ List has a form of (file-name full-file-name (attribute-list))" | |||
| 186 | (directory-files dir))) | 186 | (directory-files dir))) |
| 187 | 187 | ||
| 188 | (defun dired-do-chxxx (attribute-name program op-symbol arg) | 188 | (defun dired-do-chxxx (attribute-name program op-symbol arg) |
| 189 | ;; Change file attributes (mode, group, owner) of marked files and | 189 | ;; Change file attributes (mode, group, owner, timestamp) of marked files and |
| 190 | ;; refresh their file lines. | 190 | ;; refresh their file lines. |
| 191 | ;; ATTRIBUTE-NAME is a string describing the attribute to the user. | 191 | ;; ATTRIBUTE-NAME is a string describing the attribute to the user. |
| 192 | ;; PROGRAM is the program used to change the attribute. | 192 | ;; PROGRAM is the program used to change the attribute. |
| @@ -203,7 +203,10 @@ List has a form of (file-name full-file-name (attribute-list))" | |||
| 203 | (dired-bunch-files 10000 | 203 | (dired-bunch-files 10000 |
| 204 | (function dired-check-process) | 204 | (function dired-check-process) |
| 205 | (append | 205 | (append |
| 206 | (list operation program new-attribute) | 206 | (list operation program) |
| 207 | (if (eq op-symbol 'touch) | ||
| 208 | '("-t") nil) | ||
| 209 | (list new-attribute) | ||
| 207 | (if (string-match "gnu" system-configuration) | 210 | (if (string-match "gnu" system-configuration) |
| 208 | '("--") nil)) | 211 | '("--") nil)) |
| 209 | files)) | 212 | files)) |
| @@ -236,6 +239,12 @@ This calls chmod, thus symbolic modes like `g+w' are allowed." | |||
| 236 | (error "chown not supported on this system")) | 239 | (error "chown not supported on this system")) |
| 237 | (dired-do-chxxx "Owner" dired-chown-program 'chown arg)) | 240 | (dired-do-chxxx "Owner" dired-chown-program 'chown arg)) |
| 238 | 241 | ||
| 242 | (defun dired-do-touch (&optional arg) | ||
| 243 | "Change the timestamp of the marked (or next ARG) files. | ||
| 244 | This calls touch." | ||
| 245 | (interactive "P") | ||
| 246 | (dired-do-chxxx "Timestamp" dired-touch-program 'touch arg)) | ||
| 247 | |||
| 239 | ;; Process all the files in FILES in batches of a convenient size, | 248 | ;; Process all the files in FILES in batches of a convenient size, |
| 240 | ;; by means of (FUNCALL FUNCTION ARGS... SOME-FILES...). | 249 | ;; by means of (FUNCALL FUNCTION ARGS... SOME-FILES...). |
| 241 | ;; Batches are chosen to need less than MAX chars for the file names, | 250 | ;; Batches are chosen to need less than MAX chars for the file names, |