This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-12-15
Channels
- # adventofcode (65)
- # announcements (25)
- # babashka (77)
- # beginners (194)
- # calva (15)
- # clj-kondo (39)
- # cljsrn (7)
- # clojure (81)
- # clojure-dev (4)
- # clojure-europe (46)
- # clojure-japan (1)
- # clojure-nl (8)
- # clojure-norway (2)
- # clojure-provo (4)
- # clojure-uk (17)
- # clojurescript (22)
- # clojurewerkz (1)
- # community-development (4)
- # conjure (2)
- # cryogen (2)
- # cursive (7)
- # datomic (3)
- # duct (3)
- # emacs (29)
- # events (11)
- # fulcro (88)
- # jobs (2)
- # jobs-discuss (68)
- # kaocha (10)
- # meander (119)
- # off-topic (7)
- # pathom (7)
- # perun (1)
- # planck (5)
- # portal (25)
- # re-frame (2)
- # reagent (10)
- # reitit (11)
- # remote-jobs (2)
- # reveal (96)
- # ring (4)
- # shadow-cljs (2)
- # sql (4)
- # tools-deps (46)
Hey! Beginner here with a possibly dumb question. Trying to get clj-kondo going in emacs, but flycheck says the executable isn't found. Have already checked that clj-kondo is present in the emacs path etc - any thoughts on how I might get it working? Here's what M-x flycheck-verify-setup says:
Syntax checkers for buffer core.clj in clojure-mode:
clj-kondo-edn
- may enable: Automatically disabled!
- predicate: nil
- executable: Not found
clj-kondo-clj
- may enable: Automatically disabled!
- predicate: t
- executable: Not found
Flycheck Mode is disabled. Use C-u M-x flycheck-disable-checker to
enable disabled checkers.
--------------------
Flycheck version: 31
Emacs version: 28.0.50
System: x86_64-pc-linux-gnu
Window system: x
possibly this might help: https://gist.github.com/sogaiu/5f93faa7cab1d08a1510d281cadb0b81
Tried this, didn't work unfortunately. Just says the checker doesn't exist, or no selected checker
Or "no syntax checkers disabled in this buffer"
Interestingly, if I M-x flycheck-disable-checker on clj-kondo-clj, it then shows up in the C-u M-x command, but I still can't enable it from there.
My apologies if I'm missing something obvious - I'm learning both Emacs and Clojure at the moment
i noticed you mentioned that clj-kondo is in the emacs path. would you mind elaborating on that point? i am not sure i understood it.
may be you were alluding to the somewhat common issue that occurs when emacs is started not from a terminal but from some kind of launcher or other means that doesn't happen to have an appropriate value for PATH
.
The installation docs mentioned an issue that could happen if the $PATH in Emacs was different from the $PATH in a regular terminal. But I checked and the paths seemed identical
thanks for the clarfication.
so you did the M-x shell
thing followed by echo $PATH
i guess
are you able to invoke clj-kondo
via the sort-of-terminal buffer associated with invoking M-x shell
?
Yes and yes
so i'm revisting when i had what seemed like a similar issue before: https://clojurians-log.clojureverse.org/clj-kondo/2019-10-24
borkdude mentioned that doing M-x flycheck-compile
might be useful -- i think it may give more detailed output.
oh, i see "Flycheck Mode is disabled" in your initial output.
have you done M-x global-flycheck-mode
and/or is there a (global-flycheck-mode)
somewhere in your emacs initialization setup?
I haven't yet. Will try that after a good night's sleep lol. Thanks for your assistance
This is the error you’ll see if you’re using flycheck over TRAMP, https://github.com/flycheck/flycheck/pull/1842, FYI
@U0P7ZBZCK Thanks for the reply, but I'm not working on a remote host, and I don't think I'm using TRAMP.
I guess I could try using M-x flycheck-set-checker-executable
, but I'm not sure how to find the relevant executables
flycheck-default-executable-find
doesn't seem to be exposed to M-x
re: finding the appropriate executable -- for clj-kondo it should just be the full path to the clj-kondo binary.
if you want to try out flycheck-default-executable-find
, the following may work:
* M-:
* (flycheck-default-executable-find "clj-kondo")
* RET
then proceed through the interaction
Tried calling executable-find, it says there's a Lisp error.
Update: solved
@sam694 I think I'm using this tool https://github.com/purcell/exec-path-from-shell
Thanks @U04V15CAJ, but my echo $PATH
output is identical when run in a regular terminal and run in M-x shell
, so I don't think this is my issue. Unless there are other environmental variables that could be affecting this
...no, actually, seems to be missing node - which could be why it's not finding clj-kondo since I installed it with Node. That's interesting, I had assumed M-x echo $PATH
would show the Emacs path
I'll try installing the tool @U04V15CAJ recommended, will see if that fixes the problem
It's working! Thanks for the assistance @UG1C3AD5Z @U04V15CAJ @UFAP0C8KU 🙂
Turns out I had exec-path-from-shell
already installed as part of the emacs starter template I was using, but it lacked a necessary line in init.el