Closed adrusi closed 3 years ago
This is an interesting question. I'm not sure I like what could be a surprise of rep requiring the namespace, especially conditionally. vim-fireplace just evaluates the namespace form, which seems less destructive. On the other hand, looking at how emacs integration works, where the maximum flexibility means that the user has to do many small things while hold a bunch of state in their heads....
I guess I'm saying I'm not sure what to do about this.
In Kakoune, the current workaround is to first do ,ef
, which is like emacs' evaluate-buffer that users need to do before working with the code in it.
Is there a way to get rep to report a descriptive error when attempting to eval in a non-loaded namespace? Something to the effect of reminding the user to eval the namespace (and maybe adding a command to eval the namespace form without passing --namespace to rep). I don't know what kind of feedback the nrepl server gives when this type of failure happens.
On Fri, Apr 30, 2021, 11:52 Jason Felice @.***> wrote:
This is an interesting question. I'm not sure I like what could be a surprise of rep requiring the namespace, especially conditionally. vim-fireplace just evaluates the namespace form, which seems less destructive. On the other hand, looking at how emacs integration works, where the maximum flexibility means that the user has to do many small things while hold a bunch of state in their heads....
I guess I'm saying I'm not sure what to do about this.
In Kakoune, the current workaround is to first do ,ef, which is like emacs' evaluate-buffer that users need to do before working with the code in it.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/eraserhd/rep/issues/9#issuecomment-830190080, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABMYDNY5QW5TPE5OSKGDXTTLLG3PANCNFSM434PGWAA .
Turns out this is reported differently from exceptions. I added a check and an error message.
rep silently does nothing if passed
--namespace=X
whereX
has not beenrequire
d. I'm not sure what the appropriate fix here is, but possibly silently sending a require invocation to the repl server inrep-find-namespace
or maybeclojure.core/load
instead.