cider icon indicating copy to clipboard operation
cider copied to clipboard

Support bookmarks to Cider REPLs

Open axgfn opened this issue 1 year ago • 3 comments

Is your feature request related to a problem? Please describe.

When opening a Clojure project, there are a number of repetitive tasks I have to perform to set things up to begin working.

  1. Open core.clj.
  2. Start a REPL with cider-jack-in or other command.
  3. Send core.clj to be evaluated by the REPL.
  4. Switch to the program's namespace.

I would like it if this were largely automated by just resuming an activity using activities.el.

Describe the solution you'd like

activities.el works with any mode that supports Emacs bookmarks, so the solution would involve adding bookmark support to cider REPLs. The bookmarks don't need to resume the entire state of the REPL session to be useful, it would be good enough for it to simply jack in and switch namespace.

Describe alternatives you've considered

I'm sure there are many ways to automate this kind of thing in Emacs, but interoperating with activities.el makes adding bookmark support the only reasonable solution.

Additional context

There's a very simple example here of a user adding custom bookmark types to resume new modes with activities.el.

axgfn avatar Apr 17 '24 21:04 axgfn

Hi @ajgrf, thanks for the issue!

The use case you describe seems pretty vanilla and well-captured by existing patterns, e.g. customize cider-repl-init-code in .dir-locals.el.

I don't find it likely that we'll add a third-party integration.

If you find an activities pattern that works great with CIDER, probably we'd be happy to add it somewhere in the user manual.

Cheers - V

vemv avatar Apr 17 '24 21:04 vemv

It's fine if you consider this to be out of scope for cider, but I realized from your reply that perhaps I emphasized the wrong things in my use case. The actual thing I want is saving/resuming my buffers & window configuration for Clojure projects such that I can close Emacs, and then later pick up where I left off with the same source files, documentation, and REPL windows open.

Anyway, thanks for all your hard work developing Cider. I'll check back in if I come up with something myself.

axgfn avatar Apr 17 '24 21:04 axgfn