Skip to content

Commit d6a2ece

Browse files
committed
Check for eca on PATH
1 parent 6476af1 commit d6a2ece

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ M-x package-install eca
3636
## Quickstart
3737

3838
1. Run `M-x eca` to start the eca process and initialize the workspace.
39-
- eca-emacs will download `eca` automatically and cache it, or use `eca-custom-command` to start server.
39+
- eca-emacs will check for `eca-custom-command`;
40+
- if not set, will check for a `eca` on `$PATH`;
41+
- if not found, will download `eca` automatically and cache it.
4042
2. The dedicated chat window `<eca-chat>` pops up.
4143
3. Type your prompt after the `> ` and press RET.
4244
4. Attach more context auto completing after the `@`.

eca.el

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,8 @@ If not provided, download and start eca automatically."
149149
(defun eca--server-command ()
150150
"Return the command to start server."
151151
(or eca-custom-command
152+
(when-let* ((command (executable-find "eca")))
153+
(list command "server"))
152154
(list eca-server-install-path "server")))
153155

154156
(defun eca--parse-header (s)

0 commit comments

Comments
 (0)