diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml new file mode 100644 index 0000000..6902234 --- /dev/null +++ b/.gitea/workflows/test.yml @@ -0,0 +1,45 @@ +name: CI +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + emacs_version: + - 26.3 + - 27.2 + - 28.2 + - 29.1 + - snapshot + steps: + - uses: actions/checkout@v3 + + - uses: actions/cache@v3 + id: cache-nix-conf + with: + path: /etc/nix + key: cache-nix-conf-000 + + - uses: actions/cache@v3 + id: cache-nix-packages + with: + path: /nix + key: cache-nix-packages-000 + + - uses: purcell/setup-emacs@master + with: + version: ${{ matrix.emacs_version }} + + - uses: actions/cache@v3 + id: cache-eask-packages + with: + path: .eask + key: cache-eask-packages-000 + + - uses: emacs-eask/setup-eask@master + with: + version: 'snapshot' + + - name: "Execute Eask CI" + run: make ci diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2a9cabe --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +/.eask/ +/dist/ +*.elc diff --git a/Eask b/Eask new file mode 100644 index 0000000..7fc8ba6 --- /dev/null +++ b/Eask @@ -0,0 +1,14 @@ +(package "quick-find-files" + "0.2.1" + "Quickly find files in directories and by extension") + +(website-url "https://labs.phundrak.com/phundrak/quick-find-files.el") +(keywords "convenience") + +(package-file "quick-find-files.el") + +(script "test" "echo \"Error: no test specified\" && exit 1") + +(source "gnu") + +(depends-on "emacs" "26.1") diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..b16e48c --- /dev/null +++ b/Makefile @@ -0,0 +1,34 @@ +EMACS ?= emacs +EASK ?= eask + +.PHONY: clean package install compile test checkdoc lint + +ci: clean package install compile checkdoc lint + +package: + @echo "Packaging..." + $(EASK) package + +install: + @echo "Installing..." + $(EASK) install + +compile: + @echo "Compiling..." + $(EASK) compile + +test: + @echo "Testing..." + $(EASK) install-deps --dev + $(EASK) test ert ./test/*.el + +checkdoc: + @echo "Checking documentation..." + $(EASK) lint checkdoc --strict + +lint: + @echo "Linting..." + $(EASK) lint package + +clean: + $(EASK) clean all diff --git a/quick-find-files.el b/quick-find-files.el index 61e8db6..284c517 100644 --- a/quick-find-files.el +++ b/quick-find-files.el @@ -2,9 +2,10 @@ ;; Author: Lucien Cartier-Tilet ;; Maintainer: Lucien Cartier-Tilet -;; Version: 0.1.0 -;; Package-Requires: ((emacs "24")) +;; Version: 0.2.1 +;; Package-Requires: ((emacs "26")) ;; Homepage: https://labs.phundrak.com/phundrak/quick-find-files.el +;; Keywords: convenience ;; This file is not part of GNU Emacs @@ -48,8 +49,8 @@ 'find) "Program to find files on your system. -By default, the value is 'fd, but you can change it to 'find too. -For now, no other program is supported. +By default, the value is \\='fd, but you can change it to +\\='find too. For now, no other program is supported. By default, `quick-find-files' will try to find fd or find in your path. You can customize the executable to use with @@ -75,18 +76,18 @@ your path. You can customize the executable to use with Each element should be a pair of a directory path and an extension, such as -'((\"~/Documents/org/\" . \"org\"))" +\\='((\"~/Documents/org/\" . \"org\"))" :group 'quick-find-files :type 'list) (defcustom quick-find-files-fd-additional-options "" - "Additional command-line options for fd." + "Additional command line options for fd." :group 'quick-find-files :type 'string :safe #'stringp) (defcustom quick-find-files-find-additional-options "" - "Additional command-line options for find." + "Additional command line options for find." :group 'quick-find-files :type 'string) @@ -95,7 +96,8 @@ extension, such as The function must accept a prompt as its first argument and the collection of elements to choose from as its second argument." - :group 'quick-find-files) + :group 'quick-find-files + :type 'function) ; Internal functions ;;;;;;;;;;;;;;;;;; @@ -157,7 +159,6 @@ 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") - (message "qff prefix: %S" arg) (let (dir ext) (when arg (setq dir (read-file-name "Root directory: "))