gcv / julia-snail

An Emacs development environment for Julia
GNU General Public License v3.0
236 stars 23 forks source link

RFC: Added basic support for searching and viewing REPL history #14

Closed dahtah closed 2 years ago

dahtah commented 4 years ago

This is an experiment (code is pretty dirty) but I think the functionality could be useful. I added some functions that make use of the command history recorded by the Julia REPL.

gcv commented 4 years ago

I like this! It's a great set of features to add to Snail.

For now, I have two concerns about the implementation.

  1. Instead of adding a hard dependency on Ivy / Counsel, we should use a user-configurable read function. That way, people can use Ido, Ivy, Helm, Selectrum, or just vanilla completing-read. See https://github.com/nex3/perspective-el/blob/2ac6aff/perspective.el#L79-L83 for an example.

  2. Your code uses calls to JuliaSnail.start to delineate sessions, but that doesn't work with multiple REPLs, does it? Snail supports multiple simultaneous REPLs, and the session history feature won't work right if they're used. Something can probably be done by tweaking the JULIA_HISTORY environment variable on startup, but doing it cleanly will require some careful thought. It'd be nice not to break history for anyone who mixes Snail and non-Snail Julia use.

gcv commented 2 years ago

Replaced with #58.