diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml new file mode 100644 index 0000000..db8562d --- /dev/null +++ b/.forgejo/workflows/ci.yml @@ -0,0 +1,26 @@ +on: [push] +jobs: + test: + name: Test config on ${{matrix.node}} + runs-on: docker + strategy: + matrix: + node: ["20"] + + steps: + - name: Checkout + uses: https://code.forgejo.org/actions/checkout@v4 + + - name: Setup NodeJS + uses: https://code.forgejo.org/actions/setup-node@v4 + with: + node-version: ${{matrix.node}} + + - name: Install eask + run: npm install -g @emacs-eask/cli + + - name: Run tests + run: eask test buttercup + + - name: Uninstall eask + run: npm uninstall -g @emacs-eask/cli diff --git a/.gitignore b/.gitignore index 1304fa2..edf700e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ *.elc -/.cask/ +/.eask/ +/dist/ diff --git a/Cask b/Cask deleted file mode 100644 index ce1fddc..0000000 --- a/Cask +++ /dev/null @@ -1,10 +0,0 @@ -(source gnu) -(source melpa) - -(package-file "counsel-projectile.el") - -(files "*.el") - -(development - (depends-on "counsel") - (depends-on "projectile")) diff --git a/Eask b/Eask new file mode 100644 index 0000000..f2ee0d1 --- /dev/null +++ b/Eask @@ -0,0 +1,18 @@ +(package "counsel-projectile" + "0.4.0" + "Ivy integration for Projectile") + +(website-url "https://git.icejam.ee/maciej/counsel-projectile") +(keywords "project" "convenience") + +(package-file "counsel-projectile.el") + +(source "gnu") +(source "melpa") + +(depends-on "emacs" "26.1") +(depends-on "projectile") +(depends-on "counsel") + +(development + (depends-on "buttercup")) diff --git a/Makefile b/Makefile index d473676..eb4e300 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,13 @@ emacs ?= emacs -CASK = ~/.cask/bin/cask -BEMACS = $(emacs) -batch -l targets/elpa.el +EASK ?= eask all: compile -cask: - $(CASK) +eask: + $(EASK) compile: - $(BEMACS) -l targets/compile.el + $(EASK) compile .PHONY: all compile clean cask diff --git a/counsel-projectile.el b/counsel-projectile.el index 81b6b01..8cc42b8 100644 --- a/counsel-projectile.el +++ b/counsel-projectile.el @@ -3,10 +3,10 @@ ;; Copyright (C) 2016-2021 Eric Danan ;; Author: Eric Danan -;; URL: https://github.com/ericdanan/counsel-projectile +;; URL: https://git.icejam.ee/maciej/counsel-projectile ;; Keywords: project, convenience -;; Version: 0.3.2 -;; Package-Requires: ((counsel "0.13.4") (projectile "2.5.0")) +;; Version: 0.4.0 +;; Package-Requires: ((counsel "0.13.4") (projectile "2.5.0") (emacs "26.1")) ;; This file is NOT part of GNU Emacs. @@ -348,7 +348,7 @@ on `counsel-find-file-ignore-regexp'." ;; We apply `counsel--find-file-matcher' to `cands' so we can ;; honor `ivy-use-ignore', but we don't need to filter ;; again. - (counsel--find-file-matcher nil cands)))) + (counsel--find-file-matcher nil cands)))) (defun counsel-projectile-find-file-action (file) "Find FILE and run `projectile-find-file-hook'." @@ -450,7 +450,7 @@ The sorting function can be modified by adding an entry for ("p" counsel-projectile-find-dir-action-switch-project "switch project")) 'counsel-projectile) - + (defun counsel-projectile--project-directories () "Return a list of current project's directories." (if projectile-find-dir-includes-top-level @@ -923,7 +923,7 @@ is called with a `\\[universal-argument]' prefix argument." (projectile--globally-ignored-file-suffixes-glob) (projectile-ignored-files-rel) (projectile-ignored-directories-rel)) - " ")) + " ")) (counsel-rg-base-command (let ((counsel-ag-command counsel-rg-base-command)) (counsel--format-ag-command ignored "%s")))) @@ -1110,7 +1110,7 @@ The format is the same as in `org-capture-templates-contexts'." "Switch project action for `counsel-projectile-org-capture'." (setq org-capture-templates counsel-projectile--org-capture-templates-backup) (counsel-projectile-switch-project 'counsel-projectile-switch-project-action-org-capture)) - + ;;;###autoload (defun counsel-projectile-org-capture (&optional from-buffer) "Capture into the current project. @@ -1576,7 +1576,7 @@ files." (if (member name counsel-projectile--buffers) (ivy--kill-buffer-action name) (counsel-projectile-find-file-action-delete name))) - + (defun counsel-projectile-action-find-file-manually (name) "Call `counsel-find-file' from default directory of buffer directory of file named NAME." diff --git a/targets/compile.el b/targets/compile.el deleted file mode 100644 index 06ed493..0000000 --- a/targets/compile.el +++ /dev/null @@ -1,3 +0,0 @@ -(setq files '("counsel-projectile.el")) -(setq byte-compile--use-old-handlers nil) -(mapc #'byte-compile-file files) diff --git a/targets/elpa.el b/targets/elpa.el deleted file mode 100644 index 3e15e4e..0000000 --- a/targets/elpa.el +++ /dev/null @@ -1,6 +0,0 @@ -(setq package-user-dir - (expand-file-name (format ".cask/%s/elpa" emacs-version))) -(package-initialize) -(message "ELPA dir: %S" package-user-dir) -(add-to-list 'load-path default-directory) - diff --git a/tests/test-counsel-projectile.el b/tests/test-counsel-projectile.el new file mode 100644 index 0000000..d616661 --- /dev/null +++ b/tests/test-counsel-projectile.el @@ -0,0 +1,5 @@ +;;; -*- lexical-binding: t; -*- + +(describe "counsel-projectile" + (it "always passes" + (expect 1 :to-equal 1)))