edward@csvaxa.UUCP (Edward Wilkinson) (12/04/87)
Has anyone written such a function which allows the use of csh wildcards? This would be useful. On a similar note, how is the emacs lisp programmers' manual coming on? When I can get my hands on one, I can write things like this myself!-- Ed Wilkinson ...!uunet!vuwcomp!edward or edward@comp.vuw.ac.nz
grady@stinson.uucp (Steven Grady) (12/07/87)
In article <151@csvaxa.UUCP> edward@csvaxa.UUCP (Edward Wilkinson) writes: >Has anyone written such a function which allows the use of csh >wildcards? Yeah, I wrote something like that a couple months ago - find-multiple-files. My favorite use: (find-multiple-files "[ch]$"). Problem: doesn't allow files not in the current directory. (defun find-multiple-files (file-regexp) "Find all files matching FILE-REGEXP. Switches to first matching buffer in FILE-REGEXP after matching to all files in the current directory." (interactive "sWhat files? ") (let ((files (directory-files "." nil file-regexp))) (if (null files) (error "No files")) (message "Retrieving %s" file-regexp) (let ((f files)) (while f (find-file-noselect (car f)) (setq f (cdr f))) (switch-to-buffer (car files))))) Steven grady@postgres.berkeley.edu ...!ucbvax!grady