Fork me on GitHub
#emacs
<
2021-04-08
>
blak3mill3r00:04:25

I use use-package and :demand t for every single package, and then use CRIU to reduce the startup time to almost nothing with all the elisp eagerly loaded

blak3mill3r00:04:07

https://gitlab.com/blak3mill3r/emacs-ludicrous-speed for the curious I absolutely LOVE this setup

👍 3
blak3mill3r00:04:23

I start emacs quite frequently (because I like having a separate instance of emacs for each project) so I care about startup time a lot, and having all the elisp eagerly loaded is a nice little performance boost

❤️ 3
jjttjj20:04:36

I have a chromebook with "Linux Development Environment" setup and emacs and clojure CLI installed and both work independently. But when I try to start a repl with inf-clojure I get

Couldn't find 'java'. Please set JAVA_HOME.
Process inf-clojure exited abnormally with code 1
even though JAVA_HOME is in fact set. (Using sdkmon directory) echo $JAVA_HOME works correcly in the emacs shell and eshell, however the java command only works in shell and not eshell. Any tips to figure this out?

lukasz20:04:50

I have these in my init.el - https://github.com/lukaszkorecki/command-center/blob/master/init.el#L17-L25 fixed the issue for me, for both ansi-term and eshell

3
jjttjj20:04:29

Also, I have (setenv "JAVA_HOME" "/home/me/.sdkman/candidates/java/current/bin/java") in my init.el

dpsutton20:04:34

no idea. inf-clojure works best with socket repls though so it might be easier to just clj -M:socket where socket has a socket repl option and then inf-clojure-connect to that port. that's what i've been doing. I don't actually know the specifics of what needs to be set to start up java

dpsutton20:04:12

probably (add-to-list 'exec-path "/home/me/.sdkman/candidates/java/current/bin")

dpsutton20:04:54

i have "/Users/dan/.sdkman/candidates/java/current/bin/" on my exec-path. i didn't do anything special to get it there though besides using

(use-package exec-path-from-shell
    :demand t
    :init
    (exec-path-from-shell-initialize))

jjttjj21:04:47

Thanks @dpsutton and @lukaszkorecki it's working now. I believe I needed to both add the java dir to the exec path, use the exec-path-from-shell-initialize, and (setenv "PATH" (concat (getenv "PATH")... but it's working now

dpsutton21:04:20

are you sure you need it with (setenv "PATH" ...)?

dpsutton21:04:49

i would expect the other two to fix it all up. my experience is only using exec-path-from-shell-initialize

jjttjj21:04:57

Yeah, can confirm I need that line