Live data from Hacker News

Take Two: Eshell

yummymelon.com

61–69 of 69 posts

Re: Take Two: Eshell

#62

> For file management these days, Dired is my interface of choice. It is simply the more elegant tool for the job. Case in point: renaming a bunch of files in a directory to arbitrary names. With a shell, my standard approach would have been to run some variant of `ls -1 > foo.sh`, edit `foo.sh` to insert `mv` on each line to a renamed target file, `chmod u+x foo.sh` to be executable, run `foo.sh`, delete `foo.sh` an…

Emacs Rocks Episode 13 is a wonderful example of how Emacs utilities quickly compound over time. It's worth checking out its editable dired buffer example (with multiple cursors) but also stick around for the ending. Great finale.

Re: Take Two: Eshell

#63
I like the point raised by the author here about the power of elisp in the shell. For context, I've used emacs for well over a decade and write a good bit of elisp most weeks. However, I ended up finding elisp to be the wrong language for replacing a shell: it removes a lot of simplicity/convention for not enough reward, imo: it's just the wrong abstraction because elisp's most natural transformations are very stateful and buffer based, and, additionally, it really doesn't provide that much expanded capability in the end (and this is despite the fact that I'm one of those people who would absolutely never leave my emacs environment even for web browsing if I could feasibly make it work consistently for the kinds of things I need).

However, despite disliking python, I found https://xon.sh/ to be really excellent and provides a lot of the benefits of eshell, but better, in my humble opinion: it has a well-enough structured base language that is essentially already built to be a library glue-code language, which works really well with the unix philosophy that traditional shells utilize (a good library is just a tool that does a thing really well). It's really nice to just do things like this example

    from somelib import process_image #returns a file name that it saved to
    for f in $(some_executable_that_prints_a_file_list).strip().split("\n"):
      img = cv2.imread(f)
      cp @(process_image(img)) publish_dir
      make publish
It feels a lot like an extension of old shells to me rather than a complete replacement.

Re: Take Two: Eshell

#64
post #41
post #13

Earlier quoted context omitted.

Emacs is the type of environment you need to immerse yourself in and build an intuition for. There's no shortcut for that. If you can't spend a couple hours a day for a few months using it, you're never going to feel at home in it. It's quite possible you just don't need Emacs.

As a longtime emacs user, this perfectly summarizes what is most awful about it! It makes me cringe when people wag their fingers to correct the "misperception" that emacs is merely a great text editor and IDE, but rather a programmable elisp application platform. In reality, vanilla emacs with only a little bit of configuration (and as with any other editor, substantially more tinkering with installation and configu…

There's a lot of good text editors out there, though. Vanilla Emacs with some tweaks is decent, sure, but if all you do is use the basic editing commands then you'll probably feel more at home with a different editor.

Look at the tutorial - it does everything it can to encourage you not to use the arrow keys or PGUP/PGDN. No, you're supposed to learn all kinds of whacky key combinations instead. That's all for a good reason but it's hardly encouraging for new users faced with the choice of doing things the "proper" way and building new muscle memory vs. using the keys they already know.

If all you want is a decent editor to get some work done without having to spend a fair amount of time learning the editor itself, Emacs probably isn't the best choice.

(To others reading this comment: Emacs editing commands have a hierarchy of sorts. It's powerful, and context-aware. But it requires you to internalize things like CTRL-f to move the cursor to the right. Unless you make the effort to learn them - or use evil-mode - you miss out on a good chunk of what makes Emacs so great for editing.)

Re: Take Two: Eshell

#66

Earlier quoted context omitted.

Doom Emacs ( https://github.com/doomemacs/doomemacs ) essentially serves this purpose with its curated, modular configuration and excellent documentation that focuses on the most useful parts while hiding complexity.

Doom is really cool and I appreciate the devs’ hard work. It’s seriously impressive. But. Doom is an uncanny valley for me. It looks like Emacs, but feels like something else entirely, something unlike I’ve ever used before. If you want to use all the things available inside Emacs without learning the “bare” version, right on. But if you actually want to learn Emacs, in my opinion, Doom isn’t it. It’s its own thing,…

Doom is in all respects Emacs. It's a relatively thin layer of abstractions on top of Emacs. I've lived through a fair share of emacs.d bankruptcies until finally settling down on using Doom, and I almost don't even use "the official" modules — I use the core of Doom with a set of my own modules. You can easily scroll through early-init.el to understand what Doom adds on top of vanilla Emacs; what's there really to even "learn about"?

I have thought about rebuilding my config from scratch once again, with all the knowledge I gained over the years, but every time I think about it, I conclude that I inevitably would end up replicating some nice macros that Doom has, which do considerably reduce otherwise unavoidable boilerplate I'd have to write.

Doom may have improved discoverability of Emacs — a major complaint of newbies known for decades — but it can't magically make Emacs "something else entirely". I don't even get what you're talking about, it's like finding any complex package written in Elisp and lament that it doesn't even feel like an Emacs thing.

Re: Take Two: Eshell

#67
post #3

Earlier quoted context omitted.

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.

It's worth noting that you'd have to pay for the book only once. Every new edition you'd get for free. Mickey keeps the book updated and relevant for every new release of Emacs.

Re: Take Two: Eshell

#68

I've been using Dired for years and I've not heard of Wdired mode until now. This looks awesome.

One of the reasons why I kept driving into Emacs land was the dopamine effect of "Oh, shit, I didn't even know it could do this..." Over the years my attitude has changed. Now it's purely "task oriented" — whenever I need to get something done, I'd raise a question "can I do that in a more efficient, delightful way?"

Sometimes that manifests into adding a TODO item into my notes. Often I simply start experimenting with basic Elisp in my scratch buffer. These days I may ask an LLM.

When non-emacs muggles mock emacsians for wasting their lives to "maintain" editor config, they don't even realize — for an experienced Lisper their emacs is not like a self-made car that constantly requires attention, it's more like a garden — if you want to eat apples — you'd have to get your hands dirty, but that knowledge and time aren't wasted — you can then use the primitives you built to grow many other things later.

Re: Take Two: Eshell

#69
post #36

The writer is incredibly knowledgable. But all of this is completely unapealing. To me this isn't power, it is just learning a lot more things.

The power comes from the ease with which you can adapt your workflow to varying requirements. If this description doesn’t cover areas you need to work in, forget it. An example: you need to do a bunch of work in a pipeline, but at one point during development you want to stop, examine the output, possibly edit it, and then finish the pipeline. In this case, doing the work in emacs feels good because you can put the i…

Yeah that sounds cool. I will keep an open mind and dip my toes into it at one point.
Post reply on HN