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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The reason will be displayed to describe this comment to others. Learn more.
Not sure what the intended functionality is, but the symbol reduce is a sexp too, so it makes sense that eval-sexp-at-point inside reduce would evaluate the reduce.
The reason will be displayed to describe this comment to others. Learn more.
@Malabarba What do you mean by evaluate the reduce? Right now, it simply evaluates the symbol at point, which seems not very useful imo. As far as I can tell, the motivating and intended addition in #1720 was to enable evaluation of the current form around point, e.g. (reduce + [1 2 3]).
The reason will be displayed to describe this comment to others. Learn more.
Evaluating symbols is useful too. :-)
I do that all the time to check the value of a var.
But I see your point about the original feature request. What I did now is not what was initially requested.
Additionally, If we want to evaluate the current form, then the previous code was also wrong, because the previous code would gladly evaluate something like [1 2 3] which is not a form.
2207619
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before this commit:
(inc (red| uce + [1 2 3])) => 6
After this commit:
(inc (red| uce + [1 2 3])) => #function[clojure.core/reduce]
Doesn't this commit break the intended functionality of C-c C-v v?
2207619
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what the intended functionality is, but the symbol
reduce
is a sexp too, so it makes sense thateval-sexp-at-point
insidereduce
would evaluate thereduce
.2207619
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Malabarba What do you mean by evaluate the
reduce
? Right now, it simply evaluates the symbol at point, which seems not very useful imo. As far as I can tell, the motivating and intended addition in #1720 was to enable evaluation of the current form around point, e.g.(reduce + [1 2 3])
.2207619
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Evaluating symbols is useful too. :-)
I do that all the time to check the value of a var.
But I see your point about the original feature request. What I did now is not what was initially requested.
Additionally, If we want to evaluate the current form, then the previous code was also wrong, because the previous code would gladly evaluate something like
[1 2 3]
which is not a form.