Is there some magic necessary to make dir-locals.el work? (https://github.com/clojure-emacs/inf-clojure#startup) Following the directions there doesn't give me anything new when I invoke inf-clojure.
Note: This file has to be in the directory in which you're invoking inf-clojure or a parent directory.
Might be a clue, given that I'm using a GUI emacs.
should work out of the box. in the buffer you can evaluate the thing you want to be picked up. M-: inf-clojure-whatever
and see its its shadowed. also m-x describe-variable
i'm not familiar with that error message
that is on the readme in the repo for inf-clojure
ah yeah. where is your project and where are you putting the dir-locals file?
I put dir-locals.el in the root of my project
that should be correct
can you put the dir-locals file here?
I'm using something simple right now for testing
((nil
(inf-clojure-custom-startup . "clojure -A:rebl-jdk8")
(inf-clojure-custom-repl-type . clojure)))
doesn't seem wrong to me. can you do (hack-local-variables)
and then m-x describe-variable [ret] inf-clojure-custom-repl-type
?
value is nil
weird. then its not picking them up
what's the name of your dir-locals file?
dir-locals.el
it needs to be .dir-locals.el
leading dot
so I got a warning about potentially unsafe variable locals list... but accepting (Y) did not affect my available startup commands
and now m-x describe-variable
reports its seeing the new value?
value still nil
try (hack-local-variables)
again
inf-clojure-custom-repl-type is a variable defined in 'inf-clojure.el'.
Its value is 'clojure'
Original value was nil
Local in buffer *Scratch*; global value is nil
This variable's value is directory-local.
ok now its picking it up. it should work now
i'm assuming now it is asking you to choose the repl startup form?
to make sure I'm understanding this correctly: If I invoke inf-clojure
, I should see this new startup?
because I do not
i'm trying to figure out if you're on the most recent version when these were introduced. if your forms are honored you should not get this choice as you are setting them now. but if its not working it should be offering you a list like this:
yes, I get that list currently
let me check my version
this is a new computer which I re-setup my emacs setup from scratch on Aug 17... so it should be a fairly new inf-clojure
ok. its strange that its seeing the value and still offering you the list
version <tel:202008011128|20200801.1128>
yeah, no updates
i can't reproduce that. i put dir-locals and it just worked
/t/stuff ❯❯❯ tree -a .
.
├── .dir-locals.el
└── stuff.clj
0 directories, 2 files
/t/stuff ❯❯❯ cat .dir-locals.el
((nil
(inf-clojure-custom-startup . "clojure -A:async")
(inf-clojure-custom-repl-type . clojure)))
/t/stuff ❯❯❯
and then m-x inf-clojure
and it dumps me into a repland you are doing this from a buffer that is underneath this directory?
correct, I'm in a src/thing.clj
and .dir-locals.el is in root (parent of src)
I'm using a bare skeleton of a project to test this. It's just deps.edn, .dir-locals.el and src/thing.clj
me too. not sure what's going on
alright, I'm going to pack up what I'm doing here and kill my emacs server and clients then see if restarting it makes any difference
after a complete restart of emacs on my system, it works.
thanks @dpsutton
awesome. no idea why that was acting so funky but glad its working
are you on osx by any chance?
mention this just because there's kind of a show stopper bug in the emacs C code that will break you
all comint based emacs packages on osx are broken. and it blows my mind that more people haven't complained
well, anything that sends largish strings through a subprocess. it doesn't buffer correctly
I've encountered that issue a few times, but only when the evaluation takes a certain amount of time (seems to be >100ms)
Likely also because those return longer results 🙂