-
-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert Inline Eval of a Form into a Comment (add result as a comment) #160
Comments
A great case that I use this for is rich comment forms: (comment
(my-fun-function good-argument) ; [1 2 3 4 5]
(my-fun-function bad-argument) ; OutOfMemoryError
) Another is for screencasts with limited screen real estate where this can be really effective. |
I use eval top level form to comment extensively in my live broadcasts and screencasts, to explain what is going on with code. I also rely on eval to comment when designing, especially with data structure design. This cuts down on cognitive load, as I have a reminder of the structure at a glance. As mentioned by @emilaasa I also use eval to comment in rich comment blocks. This provides living documentation showing what to expect from important API calls in the namespace. Thank you. |
A bit hacky, but hey :)
Conjure stores the results of eval in the named register (comment
(a.inc 2)
(a.inc 3)
) into (comment
(a.inc 2) ; 3
(a.inc 3)
) If you want a history of your execution + results you could also use the log buffer ( |
Works great! Thank you. |
Also testing it now and it works perfectly! |
Going to open this up for a little longer for more work. I want to add some config so people can have it use I also want to refactor how you invoke this, so it becomes something like So, warning, the mapping will be changing on |
I fully support this ;-) |
Looks like a great enhancement.
…On Tue, Jan 26, 2021 at 1:00 PM David Harrigan ***@***.***> wrote:
I fully support this ;-)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#160 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADJSKXF2V5UXQWE4LVHTUXTS32VGFANCNFSM4VUYRV6Q>
.
|
This is a very cool feature, and one I will definitely use when pairing with others. Thanks for adding it. |
So I've split the mapping into |
I've also added |
Hi,
Recently, Conjure (re-)learnt the ability to display the results of an evaluation beside the form as virtual text. This virtual text, being super doopar handy, unfortunately disappears when there is cursor movement.
It would be incredibly useful for composing results on the fly if the inline eval could also be converted into a comment which would greatly aid in train-of-thought, repl-driven development, demos, screencasts and so on. It is noted that another popular editor built upon Emacs offers this feature too (thus having a bit more parity with that would aid in people transitioning across)
A suggestion would be to use
<prefix>ec
to eval the form and add the result of the eval as a comment.The text was updated successfully, but these errors were encountered: