feat: allow users to programmatically call quick-find-files
CI / build (emacs-26-alpine-ci-eask) (push) Failing after 5s Details
CI / build (emacs-27-alpine-ci-eask) (push) Failing after 3s Details
CI / build (emacs-28-alpine-ci-eask) (push) Failing after 21s Details
CI / build (emacs-29-alpine-ci-eask) (push) Failing after 18s Details
CI / build (emacs-master-alpine-ci-eask) (push) Failing after 20s Details

This commit is contained in:
Lucien Cartier-Tilet 2023-12-29 13:47:08 +01:00
parent f3e6987ccd
commit 3907a31632
Signed by: phundrak
GPG Key ID: BD7789E705CB8DCA
1 changed files with 8 additions and 9 deletions

View File

@ -148,7 +148,7 @@ Return a list of paths to files."
quick-find-files-dirs-and-exts)))
;;;###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.
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
empty, all files are to be looked for."
(interactive "P")
(let (dir ext)
(when arg
(setq dir (read-file-name "Root directory: "))
(setq ext (read-string "File extension (leave blank for all files): ")))
(find-file (funcall quick-find-files-completing-read
"Open file: "
(quick-find-files-list-files dir ext)))))
(when arg
(setq dir (read-file-name "Root directory: "))
(setq ext (read-string "File extension (leave blank for all files): ")))
(find-file (funcall quick-find-files-completing-read
"Open file: "
(quick-find-files-list-files dir ext))))
; Provides ;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Provides ;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(provide 'quick-find-files)