Hi fellow Atom/Chlorine users! Does anyone know of a way to replicate the functionality described here: https://lambdaisland.com/blog/2019-12-20-advent-of-parens-20-life-hacks-emacs-ginger-tea in Atom?
it might help people understand better if you provided your own description of the desired functionality.
e.g. emacs has registers, but does chlorine?
it's not immediately obvious to me what analogous functionality would be in chlorine :)
@sogaiu might be that the functionality should not be in chlorine, but in some other Atom plugin, or in Atom itself. I guess I just hoped to find Atom users in this channel 🙂. But to answer your question: I’m not sure if Atom has registers, but I haven’t found any so far. My use case is very similar to the one described in the blog I mentioned above. I’m iterating on some code and to test if it works the way I want to I have run some code which resides in another file. Jumping back and forth between two files is somewhat annoying, it would be great if I could dynamically asign some clojure code to “a register” or something similar in Atom, which could then be eval’d by Chlorine when I press some shortcut. Does this make it clearer?
@jlmr What I do in such situations is add a (comment ,,,)
form in the source file I'm iterating on and inside that I require the other code and add forms to run it. That way I can stay in one file and just eval blocks of code as needed.
That's called a "Rich Comment Form" by some -- because Rich Hickey uses comment forms like that, and Stu Halloway has talked about it in podcasts and/or at conferences.
(I started doing it ages ago and was very pleased to hear Stu talk about it and give it a name! 🙂 )
You can do the same to run tests in other files from within a (comment ,,,)
in a source file; you can do all your setup/teardown for the environment that way too (we rely heavily on Component and have numerous comment
s in source files that have the necessary requires, component builds, and calls to component/start
, in order to make this a smooth process).
yes, much clearer, thanks 🙂
i don't know if there is something like registers in atom or any of its extensions. may be seancorfield's idea is a possible alternative approach?
on a side note, there is a #atom as well -- though i don't know if you'll have more luck there.