Live data from Hacker News

Take Two: Eshell

yummymelon.com

21–30 of 69 posts

Re: Take Two: Eshell

#21
post #4

I've been using Emacs daily for well over a decade now, but I just can't get myself to use any of its shells, or features that replace standard shell workflows. I think the main reason—besides muscle memory and the scripts, aliases, and commands I'm already used to—is because a POSIX-compliant shell exposes a generic interface for both programs and users. Programs can receive and output data over standard file descri…

> These were essentially drop-in replacements with minimal impact to me. Consider what it would take to replace dired or Magit, as perfect as they might be.

There's a difference of philosophy there. The Unix way is a good concept to align software, but it's not the only one. In Emacs, the primitives are different. Instead of having pipes, redirectors, thinking in terms of lines,... What you have are buffers, windows to displays those buffers in, frames to hold those windows, a lot of functions to manipulate the text in buffers and keybindings to activate those functions. There's also the minibuffer for input and the echo area for messages.

So using those people creates packages that solve each a particular task. But the packages are not closed programs you compose together. They are both libraries and a particular way to use the library. If it does not fit your purpose, you alter it. If it's missing something, you add it. If your workflow requires two or more packages, you link them together, creating a metapackage for that workflow.

So Emacs is something to mold to your own needs. The default configuration is just the most common and the traditional way to do stuff. It's not lego bricks like the Unix way, it's clay. You don't replace ls with eza, you turn ls into eza.

Re: Take Two: Eshell

#22
post #3
post #2

I wish someone could write a "The Good Parts" book for Emacs. Even after reading the manual twice, I'm still overwhelmed with the API and forget even the most basic configuration options after a month of inactivity.

No matter you do, inactivity means forgetting. Why do you need the api memorised if you don't use them? I mean, using the editor itself means maybe 10-15 keys/commands. Mastering Emacs is a good overview, btw.

Yeah, the book is definitely worth the asking price.

Re: Take Two: Eshell

#23
post #2

I wish someone could write a "The Good Parts" book for Emacs. Even after reading the manual twice, I'm still overwhelmed with the API and forget even the most basic configuration options after a month of inactivity.

I have the same feeling with Vim after using it for like the past 10 years professionally. Granted, it is much smaller, but for instance editing multiple files using just stock config is surprisingly undiscoverable. It comes with the whole buffer mechanism, which is certainly powerful, but I guess that 99% of newcomers just want to open tabs and go left/right, not to learn set of byzantine commands like :rewind or :last.

At this point, I believe that newcomers should jump straight to Neovim and file manager plugins, than deal with the stock stuff. That's just one thing out of many.

Re: Take Two: Eshell

#24
post #20
post #4

I've been using Emacs daily for well over a decade now, but I just can't get myself to use any of its shells, or features that replace standard shell workflows. I think the main reason—besides muscle memory and the scripts, aliases, and commands I'm already used to—is because a POSIX-compliant shell exposes a generic interface for both programs and users. Programs can receive and output data over standard file descri…

I use a personally-adjusted variant of M-x shell for most of my last 20 years of Emacs use (after trying various hacks including things mentioned in this article). I end up having about 20–100 named shell buffers on each machine, different projects, logs, etc, and I keep all histories of each shell in separate history files. It helps that the buffers are practically infinte size and I can use standard Emacs editing f…

I think if you were to write a post (or better yet a video) to demonstrate your usage of your workflow, that would be a great resource! I love working in M-x shell but your workflow sounds next level.

Re: Take Two: Eshell

#25
Every few years I put time into learning eshell and it's seriously impressive.

But what I really want is eshell outside of emacs. In fact I want all the bits of emacs outside of emacs.

The problem with eshell is the problem with emacs. It's a monolith. I know I know that's also its strength, but what I really want is for all the bits of emacs to be exploded out into components that make up an overall environment (yes, yes, Genera/Lisp Machines).

Unlike emacs purists, I am too much in and out of that environment to really ever feel fully comfortable adopting all its tools as my mainstay tools.

Re: Take Two: Eshell

#26
post #4

I've been using Emacs daily for well over a decade now, but I just can't get myself to use any of its shells, or features that replace standard shell workflows. I think the main reason—besides muscle memory and the scripts, aliases, and commands I'm already used to—is because a POSIX-compliant shell exposes a generic interface for both programs and users. Programs can receive and output data over standard file descri…

vterm takes care of at least the vast majority of the display issues that emacsian shells typically suffer from. It's literally a shell as a buffer. htop and other curses based TUI's seem to run fine in it.

I mean do what works for you of course, but I found it a vast improvement over the historical emacs shell things, which I've also used for decades.

Re: Take Two: Eshell

#27
post #2

I wish someone could write a "The Good Parts" book for Emacs. Even after reading the manual twice, I'm still overwhelmed with the API and forget even the most basic configuration options after a month of inactivity.

I'm not sure that'll happen, because Emacs itself is not so much end-user software as it is a platform/VM for developing and running Elisp code.

There are many great applications and compatibility layers written to run on Emacs:

- Evil for a decent editor,

- calc for a good, flexible calculator,

- magit for version control,

- smerge for conflict resolution,

- dired, org, notmuch, tramp, eshell, outshine, comint, htmlize, etc.

and each of them deserves a "the good parts" book!

Re: Take Two: Eshell

#28
post #10
post #4

I've been using Emacs daily for well over a decade now, but I just can't get myself to use any of its shells, or features that replace standard shell workflows. I think the main reason—besides muscle memory and the scripts, aliases, and commands I'm already used to—is because a POSIX-compliant shell exposes a generic interface for both programs and users. Programs can receive and output data over standard file descri…

I never understood the need to do everything in Emacs either. I love Emacs, and I use it for all kinds of things, but the UNIX ecosystem has great tools too and it seems silly to have to choose one or the other. Calling shell commands from Emacs and inserting their output into a buffer is great, don't get me wrong. But Emacs' terminal experience pales in comparison to plain ol' xterm. At the end of the day, I use the…

> But Emacs' terminal experience pales in comparison to plain ol' xterm.

[lib]vterm reduces this paling to almost zero.

Re: Take Two: Eshell

#29
post #4

I've been using Emacs daily for well over a decade now, but I just can't get myself to use any of its shells, or features that replace standard shell workflows. I think the main reason—besides muscle memory and the scripts, aliases, and commands I'm already used to—is because a POSIX-compliant shell exposes a generic interface for both programs and users. Programs can receive and output data over standard file descri…

eshell : Welcome to the Emacs shell ~ $ btop ERROR: Failed to get size of terminal! ~ [1] $ shell : $ btop Terminal size too small: Width = 79 Height = 22Needed for current config:Width = 80 Height = 24 If I increase the width and height, I get an extremely weird output. ansi-term : Same as shell . Any other Emacs shells I missed? In any case, I do not use any shells within Emacs. I use XTerm separately.

libvterm https://github.com/akermu/emacs-libvterm

M-x vterm

btop => https://i.imgur.com/wZowuzV.png

Re: Take Two: Eshell

#30

Earlier quoted context omitted.

eshell : Welcome to the Emacs shell ~ $ btop ERROR: Failed to get size of terminal! ~ [1] $ shell : $ btop Terminal size too small: Width = 79 Height = 22Needed for current config:Width = 80 Height = 24 If I increase the width and height, I get an extremely weird output. ansi-term : Same as shell . Any other Emacs shells I missed? In any case, I do not use any shells within Emacs. I use XTerm separately.

libvterm https://github.com/akermu/emacs-libvterm M-x vterm btop => https://i.imgur.com/wZowuzV.png

Does it have to be the GUI version of Emacs?
Post reply on HN