feat: allow users to programmatically call quick-find-files
Some checks failed
CI / build (emacs-26-alpine-ci-eask) (push) Failing after 5s
CI / build (emacs-27-alpine-ci-eask) (push) Failing after 3s
CI / build (emacs-28-alpine-ci-eask) (push) Failing after 21s
CI / build (emacs-29-alpine-ci-eask) (push) Failing after 18s
CI / build (emacs-master-alpine-ci-eask) (push) Failing after 20s
Some checks failed
CI / build (emacs-26-alpine-ci-eask) (push) Failing after 5s
CI / build (emacs-27-alpine-ci-eask) (push) Failing after 3s
CI / build (emacs-28-alpine-ci-eask) (push) Failing after 21s
CI / build (emacs-29-alpine-ci-eask) (push) Failing after 18s
CI / build (emacs-master-alpine-ci-eask) (push) Failing after 20s
This commit is contained in:
parent
f3e6987ccd
commit
3907a31632
@ -148,7 +148,7 @@ Return a list of paths to files."
|
|||||||
quick-find-files-dirs-and-exts)))
|
quick-find-files-dirs-and-exts)))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun quick-find-files(&optional arg)
|
(defun quick-find-files (&optional arg dir ext)
|
||||||
"Quickly find and open files in directories with specific extensions.
|
"Quickly find and open files in directories with specific extensions.
|
||||||
|
|
||||||
Directories in which to look for files with specific extensions
|
Directories in which to look for files with specific extensions
|
||||||
@ -159,15 +159,14 @@ user for the root directory of their search and the file
|
|||||||
extention they are looking for. When the file extension is left
|
extention they are looking for. When the file extension is left
|
||||||
empty, all files are to be looked for."
|
empty, all files are to be looked for."
|
||||||
(interactive "P")
|
(interactive "P")
|
||||||
(let (dir ext)
|
(when arg
|
||||||
(when arg
|
(setq dir (read-file-name "Root directory: "))
|
||||||
(setq dir (read-file-name "Root directory: "))
|
(setq ext (read-string "File extension (leave blank for all files): ")))
|
||||||
(setq ext (read-string "File extension (leave blank for all files): ")))
|
(find-file (funcall quick-find-files-completing-read
|
||||||
(find-file (funcall quick-find-files-completing-read
|
"Open file: "
|
||||||
"Open file: "
|
(quick-find-files-list-files dir ext))))
|
||||||
(quick-find-files-list-files dir ext)))))
|
|
||||||
|
|
||||||
; Provides ;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
; Provides ;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
(provide 'quick-find-files)
|
(provide 'quick-find-files)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user