chlorine-clover

mauricio.szabo 2022-11-14T13:27:05.446109Z

Both do - it detects, from current file and position, which namespace it is, and then sends a (in-ns 'namespace.name) before the eval

mauricio.szabo 2022-11-14T13:28:51.187469Z

The detection is basically: search for top-forms that happen before the current file's position to find a ns form. If it doesn't find anything, search for something below it. This second check is basically to solve a weird edge-cases that happens when you try to eval ns forms with metadata on it (for example, because of clj-kondo config)

borkdude 2022-11-14T13:30:19.018649Z

I think CIDER does something similar

2022-11-14T13:37:02.190349Z

Aha. Interesting! I have wondered, idly, how the running process matches the text file when sending specific forms… (and I have a larger question looming about why you have to keep the actual “content” of the process in your head, but that’s a different thing).