tpope / vim-fireplace

fireplace.vim: Clojure REPL support
https://www.vim.org/scripts/script.php?script_id=4978
1.75k stars 139 forks source link

Fix fireplace#eval() #124

Closed guns closed 10 years ago

guns commented 10 years ago

This broke in 023c857.

Should plugin authors be using fireplace#session_eval() instead of fireplace#eval()?

tpope commented 10 years ago

Actually I had an unpushed commit to kill it entirely. But if people are depending on it I can bring it back.

Internally I've switched to using fireplace#evalparse everywhere I need a session-free eval. Does the semantics of that work for you?

tpope commented 10 years ago

To expand, I see two main use cases:

  1. Query for information, avoiding the session so *1 doesn't get clobbered.
  2. Run some user provided code.

I think fireplace#evalparse and fireplace#session_eval cover those two. Do all your uses fall clearly into one of those two categories?

guns commented 10 years ago

I think fireplace#evalparse and fireplace#session_eval cover those two. Do all your uses fall clearly into one of those two categories?

Yes, I believe so. Thank you for maintaining a nice library interface to fireplace.

tpope commented 10 years ago

Nice, schmice, I can't look at the evalparse/session_eval asymmetry without twitching.

I'm bringing back eval as session_eval for compatibility, but don't rely on it. ClojureScript is raising further questions about the API, and once those are settled, I'll decide what to do with it once and for all.