Cursive 1.14.0-eap4

40 views
Skip to first unread message

Cursive

unread,
Nov 12, 2024, 6:47:57 AM11/12/24
to cur...@googlegroups.com

Hi everyone,

Cursive 1.14.0-eap4 is out. All the details are in the release blog post, which you can find here.

Cheers,
Colin

timothypratley

unread,
Nov 12, 2024, 9:56:24 PM11/12/24
to Cursive
Hi Colin,

Great, this patch solved my issue when evaluating code not under the cursor via a command - thank you!

Is it possible to dismiss the inline values? Oh I just accidentally pressed ESC, and that does it. Pressing ESC twice removes it (once moves it to the side, then twice removes it). FWIW it wasn't obvious to me how to do this, but I am glad I can. :)

One remaining small trouble I have when evaluating code not under the cursor is that I do care when an exception occurs, because it indicates that i made a mistake. I don't want it shown inline (and it is not with the current patch), but if there were some other way to indicate an exception occurred, that would be very helpful and then I'd look at the REPL window for the error. Some things I've been thinking of is that I could try/catch, but then I still don't know where to send error alert. I think I'd like to get a notification (that annoying bell that turns red yellow all the time hehehehe). Ooooo or you know how when you "run all tests in current namespace" it pops up a little window saying "Ran x tests containing ..." -- that would be nice in this situation.

Colin Fleming

unread,
Nov 18, 2024, 7:09:26 PM11/18/24
to Cursive Group
Hi Timothy,

Just to confirm, when are you getting errors that are not as a result of a direct evaluation? REPL commands is one obvious case, are there others that you're encountering? I agree that the notification balloon is probably the best place for it.

Cheers,
Colin
--
You received this message because you are subscribed to the Google Groups "Cursive" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cursive+u...@googlegroups.com.

Timothy Pratley

unread,
Nov 18, 2024, 7:51:07 PM11/18/24
to cur...@googlegroups.com
Just to confirm, when are you getting errors that are not as a result of a direct evaluation?

I have a few REPL Commands where this applies:

1. "Retry" just executes `(user/retry)` -- I made a 4minute video about why I find this helpful https://youtu.be/fY8KgXf2Pjs?si=YF1iad48IbBJfwtK&t=128 -- I like this because the command syncs any code changes first, and reloads files after executing (often the output is a file I'm watching). You've mentioned this can be solved with bookmarked forms but I haven't tried those, and I suspect they wouldn't do code-syncing *shrug*.

2. Running Clay to create a notebook out of the current namespace -- this command is not relative to a current form.

Of course if I suspect there is a problem, I can just look in the REPL and see it there :)
So this isn't a big issue even for my zany workflow, more of a very minor gee it would be nice to have a way to get a popup of some sort eventually, after all the other cool stuff (like inline html *wink* *wink*).
Also it might be something that can be solved with your tagged literals system, maybe sending a `cursive/popup` could show a message in a similar way to test reports? That might be useful for people with other workflows *shrug*.
 
You received this message because you are subscribed to a topic in the Google Groups "Cursive" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cursive/GctVt18iBhk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cursive+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/cursive/dcbad2be-a6fc-4e4c-8806-877ca3e91ba0%40app.fastmail.com.

Timothy Pratley

unread,
Dec 16, 2024, 12:32:42 PM12/16/24
to cur...@googlegroups.com
Thinking about this more I realized that the main problem is indirect evaluation rather than direct evaluation, as you hinted at in your reply. To clarify there are 2 things that can go wrong when using any custom command:

1. The command tries to run some code that fails  (direct)
2. The command has a setting to first synchronize before running code, and the sync fails  (indirect)

What I've noticed is that in scenario (2) no user feedback is given about the sync failing.
Indeed the code that gets sent can run and succeed, even though the sync failed.
The sync will fail if I edit a namespace and introduce an error.
So from my perspective, everything seems fine, but the code has not been synced with my new changes.

This can't be solved by the user because the only indication of sync is that if it succeeds it will write a message to the REPL log, but if it fails it will not. This is different from the explicit sync action. The explicit sync action will show an exception, whereas the sync option of a custom command will not.

So one option would be to just make the sync option on custom commands raise the exception in the repl and not do the action.





 

Reply all
Reply to author
Forward
0 new messages