You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Today I was made aware, by @rafd, that evaluate top-level form “works” when the ignored form is at the top level. This makes sense, but it would also make sense that this should include the ignore marker in the evaluation, and then nothing (or something similar to nothing) should happen. We have actually intended for the latter, but because reasons, this is quite tricky business and we have failed with the intent.
It's likely that some users has started to rely on the current behaviour (at least one has), so I think we should make the current behaviour explicit and intended in the code. It gets important when dealing with issues like these:
In rangeForDefun when we traverse the forms upwards to find the top level we check for if we are in a comment form and treat that as the top level context.
I think this probably is the function to deal with this, since it would allow us to figure out the general handling of ignored forms without risking that evaluating top level ignored forms stop working as intended.
The text was updated successfully, but these errors were encountered:
Today I was made aware, by @rafd, that evaluate top-level form “works” when the ignored form is at the top level. This makes sense, but it would also make sense that this should include the ignore marker in the evaluation, and then nothing (or something similar to nothing) should happen. We have actually intended for the latter, but because reasons, this is quite tricky business and we have failed with the intent.
It's likely that some users has started to rely on the current behaviour (at least one has), so I think we should make the current behaviour explicit and intended in the code. It gets important when dealing with issues like these:
In
rangeForDefun
when we traverse the forms upwards to find the top level we check for if we are in acomment
form and treat that as the top level context.https://github.com/BetterThanTomorrow/calva/blob/published/src/cursor-doc/token-cursor.ts#L768
I think this probably is the function to deal with this, since it would allow us to figure out the general handling of ignored forms without risking that evaluating top level ignored forms stop working as intended.
The text was updated successfully, but these errors were encountered: