Open jonadelson opened 3 years ago
Hi @jonadelson, thanks!
Following your comment, I now deployed a small change that allows configuring the source base path.
(notespace.api/update-config
#(assoc % :source-base-path "src/main/clojure"))
should make it work in your case.
Does it seem to work?
Thanks for such a quick response! It seems to work, but I did accidentally stumble on one issue.
Everything works fine if I run the following namespace by first evaluating the forms in the comment and then using the notespace/eval-this-notespace
emacs command.
(comment
(notespace.api/init-with-browser)
(notespace.api/update-config
#(assoc % :source-base-path "src/main/clojure"))
)
(+ 1 2)
However, the following seems to hang after evaluating the comment forms and running the notespace/eval-this-notespace
emacs command.
(comment
(notespace.api/init-with-browser)
(notespace.api/update-config
#(assoc % :source-base-path "src/main/clojure"))
)
(notespace.api/update-config
#(assoc % :source-base-path "src/main/clojure"))
(+ 1 2)
I'm not sure if this is a legitimate problem or a misunderstanding of the library on my part. Thanks.
Thanks @jonadelson !
In general, notespace API function calls are not recommended to be part of the notespace itself, but rather live inside comments (or be called from the REPL by some other method).
For some of the API functions, this may result in an infinite loop (for example, when the function is trying to evaluate the note that contains itself).
In the case of this function, I am not sure why this hangs. It seems like a good idea to understand that, so let us leave the issue open for now.
I was trying to make a mixed java/clojure project in which the java files would be under
src/main/java
and the clojure files would be undersrc/main/clojure
and found that Notespace assumes that any namespaces would be in thesrc
directory. I'm not sure if this is really an issue but was wondering if you recommended some workaround. Also, really love the library!