Live data from Hacker News

916 Days of Emacs

sqrtminusone.xyz

281–290 of 309 posts

Re: 916 Days of Emacs

#281
post #39

Earlier quoted context omitted.

I had a similar experience, but came to the opposite conclusion. I walked away replacing vim with emacs as my daily driver. Elisp is far more extensible than vimscript and evil-mode is pretty much at 1-1 feature parity with the real vim. I don't care much for the emacs movement keybindings except for the readline movement commands. > to this day I still don't see what the hype was about. Most of vim is written in C w…

Vimscript is a pain but these days you can use Neovim which supports Lua as a replacement. I’d recommend checking out what Neovim has to offer. ThePrimeagen has a great video on setting up Neovim as an IDE from scratch. https://m.youtube.com/watch?v=w7i4amO_zaE

Thank you. Been a vi (not vim, vi) user for decades for editing files in /etc.

Tried using vim, neovim, Emacs, mg, etc a month ago and quickly went back to pycharm which hogs resources on my ancient computer.

Have been looking for a "how-to" on various editors. This video seems to be it for neovim.

Offtopic: I'll pay you in blood for configs for fvwm

Re: 916 Days of Emacs

#282

Earlier quoted context omitted.

ADM-3A also has - the : key to the right of the 0 on the number row, no Shift needed. - the Enter key to the right of the P. I've made both changes to my keyboard layout and, not surprisingly, it's quite convenient. Downside is, you'll have to move the original keys somewhere else. But since I already intended to totally reshuffle all the non-alpha keys for RSI reasons, it wasn't an issue for me.

I'm in the process of rearranging my keyboard due to occasional mild pain. Mind if I ask what layout you ended up with for the other keys? Any experience with the more esoteric arrangements like triggering modifiers when holding down the home row keys?

Here is my current keyd configuration (on US QWERTY hardware): https://dpaste.org/aGp3o/slim (I'm not entirely happy with it, though.)

The one thing I wanted the most was to avoid any long presses. Everything that requires holding a modifier, even if I do it touch-typing style, with the opposite hand, is unpleasant (to me). So, besides moving most of the punctuation characters to lowercase positions, I also switched to sticky modifiers. (keyd might have some flaws wrt sticky modifiers, and they... get stuck. Not when I want them to be. I might try to go back to XKB.)

Regarding the home-row modifiers, I've only tried moving Control there. I always ended up triggering it by mistake when typing, because when you are typing fast, there is an almost unavoidable overlap in certain sequences, you press the next key before fully releasing the previous key. Some people advice practicing, other software provides various options with timeouts, it's a rabbit hole of work-arounds. So I settled with sticky modifiers.

Re: 916 Days of Emacs

#283
post #31

I've been a hardcore vi user pretty much my entire life, but I decided to force myself to spend a year using emacs a while back just to see what all the fuss was about. When the year was over and I "allowed" myself to return to vi, it was like a huge weight lifted off my shoulders... to this day I still don't see what the hype was about. On the plus side, though, I memorized the emacs cursor movement commands, which…

The default cursor movement commands probably predate emacs. Such that you are used to readline defaults. https://news.ycombinator.com/item?id=24083753 is the first post I'm finding on that. That said, I'm curious what the weight of emacs was on you? If it was that you were wanting to be in the other editor, than it makes sense that you should stay in the other editor. But this is no different than a lot of things. I…

Emacs predates readline by 13 years

Re: 916 Days of Emacs

#284
post #101

Earlier quoted context omitted.

> what the weight of emacs was on you What I've noticed about emacs lovers is that they all customize it heavily - I didn't want to do that, since to me the point of using a plain text editor is that it's always available in exactly the same form wherever I happen to be. I did start to looking into all the ways to customize it, but at that point, I couldn't really see much benefit over just using an IDE. But that's j…

I've been using Emacs for more than 30 years and my init file is mostly loading and configuring extra packages, and not customizing the editing behavior. I have no problem working in a basic "emacs -q" session (which skips loading the init file) when I don't want to "pollute" my main session (eg. working with huge logs/dumps).

This is the way. While I do rebind plenty keys to enhanced or do-what-I-mean versions, I'm careful to avoid fundamentally change the meaning of any of the vanilla keys. So I see my config as more of a progressive enhancement over `emacs -q` or `mg` and I can still work with them just fine (if somewhat less comfortably).

Being able to work with `emacs -q` is also important to me for extending Emacs. It's easy to partially roll back a change if I break something in my config, and I can test out new elisp code against base Emacs.

Re: 916 Days of Emacs

#285
emacs is a lot more fun if you explore xmodmap setups too.

i have control left of space, alt left of that. capslock is also alt, and is used for most alt presses.

Re: 916 Days of Emacs

#286
post #254

Earlier quoted context omitted.

Why do you think it's false? Emacs is an interactive lisp environment with at text-oriented interface. Text editing is simply another lisp program that manipulates the interface to work well for this specific task. Emacs also has a built in email client, RSS reader, IRC client, calculator, file browser, web browser, markup language, regex DSL, Vim emulator, terminal emulator, custom elisp based shell, interactive REP…

> Emacs also has a built in email client, RSS reader, IRC client, calculator, file browser, web browser, markup language, regex DSL, Vim emulator, terminal emulator, custom elisp based shell, interactive REPL that works for several programming languages, and probably at least 200 more things that I don't even realize exist yet. Chrome and Firefox also have all this stuff, but I don't see people trying to conflate a w…

Chrome has an elisp interpreter? Details?

Re: 916 Days of Emacs

#287
post #254

Earlier quoted context omitted.

> Emacs also has a built in email client, RSS reader, IRC client, calculator, file browser, web browser, markup language, regex DSL, Vim emulator, terminal emulator, custom elisp based shell, interactive REPL that works for several programming languages, and probably at least 200 more things that I don't even realize exist yet. Chrome and Firefox also have all this stuff, but I don't see people trying to conflate a w…

Chrome has an elisp interpreter? Details?

Sure here's one https://www.programiz.com/python-programming/online-compiler... and I'm sure you could find hundreds of others :)

Re: 916 Days of Emacs

#288

I've been a hardcore vi user pretty much my entire life, but I decided to force myself to spend a year using emacs a while back just to see what all the fuss was about. When the year was over and I "allowed" myself to return to vi, it was like a huge weight lifted off my shoulders... to this day I still don't see what the hype was about. On the plus side, though, I memorized the emacs cursor movement commands, which…

When I was at the university and started programming on UNIX, the professor said we should try both emacs and vi and see which we like better, and provided links to some tutorials. I tried them both and liked vi. Emacs seemed slower. In my undergraduate wisdom, I deemed emacs to be "stupid" and went on with my life using vi. After I had been programming professionally for about ten years, I decided that my harsh judg…

in the same way vi users swap escape with capslock, some emacs users swap left alt with capslock

Re: 916 Days of Emacs

#289

Earlier quoted context omitted.

> to this day I still don't see what the hype was about. As an Emacs user[1], I agree. The flexibility is really cool, and there are a handful of Emacs applications (notice I didn't call them "packages") that are "killer apps", like Magit, Org-Mode, Calc, etc. But, even though I do use and like Emacs, I can't honestly recommend it to anyone and I wouldn't even consider it to be a very good programming environment unl…

I love emacs, but agree with many of your criticisms. Emacs can be slow. I don't use LSP, so can't comment on that, but it's definitely slow on long lines with syntax highlighting. I don't use TRAMP for exactly one of the reasons you mentioned: it can hang Emacs. I want to avoid that at all costs, because I pretty much live in Emacs. Emacs' default handling of windows (in emacs terminology it's "windows", not "buffer…

> Emacs' default handling of windows (in emacs terminology it's "windows", not "buffers" that you're talking about) is painful, but you can improve that through various packages, like popper[1]

Whether I'm complaining about buffer handling or window handling is a matter of perspective. If some event causes Emacs to create a new buffer and to split my frame with a new window to display it, I see that as Emacs handling the buffer *by* creating a window. Not that it matters, because we all know what I mean, because we all share the pain.

It's such a universal issue that there are tons of packages and tips for trying to improve the situation, such as popper. I've tried several over the years and have given up on using any of them because it's always a game of whack-a-mole. There's always some new surprise that is not caught by the helper package and/or your own configuration. So, today, I just have some easy-to-hit key bindings to quickly close the most recent buffer/window, or change focus, etc. It's still a pain in the ass to sift through my buffer lists, but oh well.

> Depending on what problems you run in to and your skill level, it could be tricky to debug elisp programs. However, compare that to when you run in to some bug in VSCode... how are you going to debug that? You'll probably have to submit a bug report and wait for the developers to get to it (if they ever do)... how is that better than emacs?

I don't know anything about VSCode, honestly, but I'll pessimistically assume that its plugins are "closed" to the end-user. Is that true?

But, it's all a double-edged sword. Everyone acts like Emacs is so open that you or I can just go in and fix whatever we want, but that's obviously not true- neither in a strict technical sense (can't edit the tons of inner C code directly in my configs), nor in a practical sense. If Emacs is such that you or I can just hack some ELisp to improve whatever we want, then why haven't you or I fixed our troubles with TRAMP, or slow UI rendering, or the buffers/windows problems?

Is Emacs very hackable? Yes. Much more so than any other editing environment. Is it completely changeable? No. Not even close.

Yet, the trade-off is that there's no structure to anything. Packages all do their own thing, and tap into various parts of Emacs when they're loaded. So, if you load the same two packages in different orders, you can end up with different results. This is especially frustrating with keymaps. Plus, a lot of (most?) packages have auto-loading, which means you don't always even *know* the order in which your packages will load, so sometimes your Emacs will behave differently than other times even with no config changes!

I love the philosophy of making everything hackable, but there's definitely something to be said for enforcing some structure or limits on when and how things are modified.

By far the best part about other programming editors compared to Emacs is that I can install umpteen addons/plugins/whatever and still go to ONE settings menu and see/edit all of my keybindings. And those keybindings will always be correct, no matter how many times I restart the editor, no matter what order I do work during an editing session, etc.

> Despite the downsides of emacs, I still use and love it.

Same here. I love it, but I also hate it. It's so powerful and there's so much potential, but it's also just so bad in a lot of ways.

Closing thought:

Sometimes people say Emacs has bad defaults. But that makes it sound like it's just a matter of some settings. Like you just need to pick a nicer font, pick a nice color scheme, change some key bindings, and turn off the splash screen and that'll do it.

But, if you look at all of the buffer/window helper packages (e.g., popper), and all of the package-management helpers that basically every single one of us use (use-package, straight, elpaca, etc), and how many people ask for help with key binding (and use things like general.el), then it starts to seem like the issue of "bad defaults" isn't really about minor settings tweaks--it's just that Emacs doesn't really *work* that well by default.

I'm going to keep using it, but I'm not going to pretend that it's actually a good editor. It's not even actually a good application platform because a hung SSH connection through TRAMP or a slow-to-load email refresh in gnus or mu4e can take the whole thing down--imagine if your OS went down when an SSH connection dropped...

Re: 916 Days of Emacs

#290

I switched from VSCode to Doom Emacs a couple of months ago. I've been using ChatGPT (GPT-4) to help me write config (~1,000 lines of elisp code so far) and it's been very interesting/fun. I'm not going back.

very cool can you share more?

My process is kind of organic.

I'll start working on a project, and if I run into something that feels wrong about the Doom Emacs default config/keybindings, I'll just open up a conversation with ChatGPT (the GPT-4 model, it's much better than 3.5).

I'll tell it that I'm using Doom Emacs, and then explain what I want, or what problem I'm having, and it will output code that I can try. It's not always correct on the first try, and sometimes I have to have a dialogue with it for a little while before it gets it right. Sometimes it struggles and begins to guess - and for those cases, I'll fall back to doing manual searches in Google, and if that fails, give up entirely and just write myself a TODO comment and keep marching forward.

It's help me set up config quickly that would've taken me a very long time to figure out.

Post reply on HN