5 ms·
Tangentially, has there been any work in having more structured scrollback, say one buffer for every command, which can be collapsed, pinned or copied individua
by sen_armstrong 4y ago
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.
- wilsongoode 4y agoIs this different from cells in a notebook (eg Jupyter)?
- zelphirkalt 4y agoI 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.
- mickeyp 4y agoEShell 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): https://www.masteringemacs.org/article/complete-guide-mastering-eshell https://www.masteringemacs.org/article/complete-guide-master... 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.
- xenodium 4y agoAlso eshell imenu support can be enabled https://xenodium.com/imenu-on-emacs-eshell https://xenodium.com/imenu-on-emacs-eshell
- joeman1000 4y agoHey 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?
- xenodium 4y ago> 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.
- agumonkey 4y agosome people made a dom based terminal ui with block based entries, every command is linked to its output it was very ambitious but I don't know where it's at now
- pama 4y agoM-x shell and simple variations (https://github.com/pjj/Emacs-nsh 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.
- joeman1000 4y agoA 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.