Came here to say this. I use org-mode to do what OP's package is doing. But OP provides some features like
> one keystroke executes all specially-marked lines from a
buffer and inserts the results inline
Not sure if we can make such specially-marked lines using org-mode. Never needed this feature myself. But for those who want a workflow like this the new package could be useful. But again maybe there is a way to do this without an external package with a little bit of elisp?
Tangentially, has there been any work in having more structured scrollback, say one buffer for every command, which can be collapsed, pinned or copied individually? Presently there's the minor annoyance when (accidentally) running any program with lots of output, which is that all the scrollback above it becomes inaccessible. Yeah, could have run them in different splits or redirected to begin with, but sometimes you don't know beforehand. And being able to reuse the output of a slow command after the fact would be handy too.
I was thinking that this'd be a feature of the terminal, but on second thought the terminal doesn't know where one command begins or ends, so it'd have to be the shell that saves the output.
EShell in Emacs can preserve point at the prompt that executed the command. You can then hit space to page through the output, or start typing to immediately jump to the end of the buffer (and thus a blank prompt):
There's also `C-c C-p` to jump to the previous command prompt in the likes of M-x shell. That's not quite what you want, but it's another way to jump back up.
Hey Xenodium, thanks for this post. I love your site and use Plain Org regularly. I wanted to ask: what utility do you get in jumping back to the old prompts? Can you edit them in-place and re-run them or something?
> Hey Xenodium, thanks for this post. I love your site and use Plain Org regularly.
Thank you. Really nice to hear it.
> I wanted to ask: what utility do you get in jumping back to the old prompts?
Mostly about jumping back to specific points in buffer. If you’ve been investigating or troubleshooting in a shell session, you can quickly jump back to previous invocations of a command to view its output.
By now, I’ve become used to imenu being available in most modes/contexts, so I figured why not eshell too.
A lot of programming modes in emacs give you a quick shortcut to send a given section to the REPL for evaluation. For instance, you can do it in sly-mode and julia-mode (I think it’s named that). Hit C-c C-c to eval one section and see output in the REPL. Works really well.
M-x shell and simple variations (https://github.com/pjj/Emacs-nsh) allow for infinite scrollback, separate histories, comint-based or plain emacs navigation, and ease the manipulation of arbitrary output. Occasionally I close a shell buffer if the output has exceeded a GB or so, but they typically last weeks or months and I never lost info. They are not full terminals, so not everything works and I bind a lot of terminal-only commands (htop, nvtop) to execute in vterm.
I would guess, that it is running code directly using the interpreter of the respective language and does not require an "I<language>Kernel". As such it does not require you to install Jupyter or its many dependencies. I guess you only need the correct configuration of Emacs and the language's interpreter/compiler.
Another difference might be, that the result is just the result, not some structure in a JSON file, like it would be in a Jupyter notebook.
As a slightly sight-impaired user (no colors, and I never could learn/figure-out icons (fsck they bother me!)), I really enjoy "screen-shots" but I really wish there was a text alt-image that would render in lynx or emacs-w3m through emacspeak.
For the exact same reasons You are mentioning. Thanks.
I looked through all of the example files, and it generally looks cool. I won’t use it for personal reasons: I like to keep my Emacs configuration simple. Really simple, currently 82 lines https://github.com/mark-watson/emacs_setup/blob/main/.emacs using straight.el.
I love seeing projects like this, but I seldom use them. Emacs out of the box, with my really simple configuration, supports all programming languages I use as well as my markdown-based book writing activities.
Org+babel is probably my favorite thing about emacs, magit being a close second.
I tried doing Literate Programming using this blog as my guide http://fgiasson.com/blog/index.php/2016/06/21/optimal-emacs-..., but I got burned out pretty quickly. I think my problem was I put literally everything in a single README.org file, and it was so taxing scrolling up and down. I might try again but with multiple org files.
Org mode provides a supercharged version of this functionality that will work for any language as long as you can point it to an appropriate runtime. It's definitely a little more verbose, since you have to declare the language and stuff inside the org mode syntax, but I'm sure that you could get it to work ad-hoc with a little hacking.
There is lively.el [1]! It is also on MELPA in a more recent version [2].
It allows to put an elisp expression into any buffer and then replaces that with the output in a time interval or manually. I use that frequently.
in my first exposure to emacs I had used it in high school with “C Shape Edit” as an interface to alpha_1 CAD software at the Utah CS department. Just executing lines in the buffer, and waiting for a rerender on the ultrasparc
OTOH, org-mode already does this, without any need for external package and minimal config. It works really well, too!