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
Peter, I had brought this up earlier, but never had a decent repro, but stumbled back into this again.
The issue is that this evaluate actually evaluates the current copy on disk, not what is in the buffer (at least for cljs).
Mentally this maps in my mind to the emacs/cider "evaluate buffer", which actually stuffs the current buffer through the repl
and evaluates it.
Thus, if I do this command, but forget to save the buffer first, surprises lurk.
It's probably not that big of a deal, but making changes, evaluating buffer without saving, and have them applied in the repl is a (albiet sloppy) workflow that I had gotten used to in cider.
There is nothing really wrong with evaluating the file on disk, but if the current buffer is dirty then then might be a surprise - and a prompt to save the file first might be in order.
Guess it hinges on what your definition of "current file" is.
C
The text was updated successfully, but these errors were encountered:
Hi! Calva uses the load-file nrepl op for doing this. The behavior you note is tied to that. I was under the impression that cider-load-buffer did the same. Though it auto-saves the buffer first. Calva doesn't, but it's easy to bind the runCommands command to a sequence that first saves the file and then loads it.
Personally I seldom load the entire file. It's mostly only when starting a session. After that I evaluate forms. And then what's in the editor is what counts, rather than what's on file.
It's also pretty easy to use runCommands to give yourself an evaluate buffer command that works more like what you describe.
Greetings,
Peter, I had brought this up earlier, but never had a decent repro, but stumbled back into this again.
The issue is that this evaluate actually evaluates the current copy on disk, not what is in the buffer (at least for cljs).
Mentally this maps in my mind to the emacs/cider "evaluate buffer", which actually stuffs the current buffer through the repl
and evaluates it.
Thus, if I do this command, but forget to save the buffer first, surprises lurk.
It's probably not that big of a deal, but making changes, evaluating buffer without saving, and have them applied in the repl is a (albiet sloppy) workflow that I had gotten used to in cider.
There is nothing really wrong with evaluating the file on disk, but if the current buffer is dirty then then might be a surprise - and a prompt to save the file first might be in order.
Guess it hinges on what your definition of "current file" is.
C
The text was updated successfully, but these errors were encountered: