[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: find certain files
From: |
Mark Elston |
Subject: |
Re: find certain files |
Date: |
Tue, 12 Jun 2007 14:05:24 -0700 |
User-agent: |
Thunderbird 1.5.0.12 (Windows/20070509) |
* Drew Adams wrote (on 6/12/2007 12:54 PM):
I use Ctrl-f to find files in a directory, but...I want to
limit it to certain files...for example, only sas files, *.sas.
If if do Ctrl-f /projects/a/*.sas, it will open all the sas files.
I want to do Ctrl-f /projects/a/, and only display .sas files,
so I can choose one. How do I do that?
Use Icicles apropos completion:
C-x C-f \.sas$ S-TAB, if the current directory is /projects/a, or
C-x C-f /projects/a/.*\.sas$ S-TAB, otherwise.
Drew,
I tried this (I have icicles installed) and got the following traceback:
Debugger entered--Lisp error: (error "Bad format environment-variable
substitution")
read-file-name-internal(".*\\.el$" "~/site-lisp-22/" t)
all-completions(".*\\.el$" read-file-name-internal "~/site-lisp-22/" nil)
icicle-unsorted-file-name-prefix-candidates(".*\\.el$")
icicle-file-name-prefix-candidates("~/site-lisp-22/.*\\.el$")
icicle-prefix-complete-1()
icicle-prefix-complete()
icicle-call-then-update-Completions(self-insert-command 1)
icicle-self-insert(1)
call-interactively(icicle-self-insert)
old-read-file-name(#("+ File or directory: " 0 1 nil 1 2 (face
icicle-completing-prompt-prefix) 2 3 nil 3 22 (face minibuffer-prompt))
nil "~/" nil nil nil)
byte-code(<...> [icicle-prompt dir default-filename require-match
initial-input predicate old-read-file-name] 7)] 2)
read-file-name("File or directory: " nil "~/" nil nil nil)
byte-code(<...> [emacs-major-version major-mode default-directory
icicle-find-file-w-wildcards 21 read-file-name "File or directory: " nil
dired-mode fboundp diredp-find-a-file (byte-code <...>
[abbreviate-file-name dired-get-file-for-visit] 2) ((error
default-directory))] 8)
icicle-find-file()
call-interactively(icicle-find-file)
This was while trying to open a number of files in a subdirectory.
I did
C-x C-f /site-lisp-22/.*\.el$
and, before I got the chance to try the S-tab I got the above traceback.
It seems to work OK with files in the current directory, though.
This is NT Emacs 22.0.50.1 with icicles Version 22.
Mark