Live data from Hacker News

Making Emacs Popular Again

lwn.net

761–770 of 782 posts

Re: Making Emacs Popular Again

#761
post #739
post #502

Earlier quoted context omitted.

I think you misunderstood. Control, alt, meta, hyper, and super are (at least on my current OS) distinct modifiers. There are also keys bearing some of those names on most keyboards which makes things confusing to talk about. Each modifier can be mapped to any physical key. For example, I'm one of those control as caps lock people you mentioned. I then have hyper on the left control key, alt and meta (yes both) on th…

I've never seen a keyboard with hyper or super. I doubt many people have, since they were only present on hardware obsoleted decades ago. Meta, aka the windows key on most PC keyboard, is usually present, but most people wouldn't know its name. On Windows, it's not even usefully bindable since Windows uses various shortcuts for it by default. On Linux, it's not bound to Meta by default by most distributions. So for t…

Neither have I outside of photographs! The trouble is that they did exist previously and X11 settled on an abstracted model that supports 5 modifiers (in addition to control, shift, and lock). You have to bear in mind that Emacs can't just stop supporting certain (now defunct to the mainstream) modifiers as many users have setups which depend on them.

I suppose that cosmetically they could update the documentation by changing M- to A- or Alt- or something. Would it really make a difference though?

Aside: Not meaning to be pedantic, but at least under X11 Super is the "Windows Key" and Meta doesn't exist by default. I just checked and (on my machine) the keycap with the Windows logo maps to X11 keycode 133 (hardware specific) which produces keysym Super_L at both levels 1 and 3 which in turn maps to mod4.

Re: Making Emacs Popular Again

#762
post #502

Earlier quoted context omitted.

I think you misunderstood. Control, alt, meta, hyper, and super are (at least on my current OS) distinct modifiers. There are also keys bearing some of those names on most keyboards which makes things confusing to talk about. Each modifier can be mapped to any physical key. For example, I'm one of those control as caps lock people you mentioned. I then have hyper on the left control key, alt and meta (yes both) on th…

Could you explain your rationale for this configuration?

Unfortunately I didn't notice your reply earlier (the consequence of being productive).

Rereading my previous comment I've realized there are some slight inaccuracies - keybindings are conceptually a bit complicated (at least under the historical X11 model). My Alt keycap actually just produces the corresponding Alt keysym, which maps to mod1. My confusion was due to the Meta keysym also mapping to mod1 (this is the default configuration) even though no key on my keyboard is currently configured to emit it. I set everything up quite a while ago and then forgot some of the details.

* Caps Lock -> Control: This is simply more comfortable for frequent use, particularly in combination with the Vi directional keybindings (hjkl).

* Right Alt -> Level 3: AKA AltGr, this is useful for entering common Unicode characters.

* Right Control -> Compose: Useful for a number of other Unicode operations. I don't seem to make much use of it in practice though.

* Left Control -> Hyper (-> mod3): I had a free key. This gives me an extra modifier for use with things like my window manager that's pretty much guaranteed not to conflict.

* Shift + Space -> Underscore: Makes C programming _way_ nicer.

* AltGr + Space -> Nonbreaking Space: I don't actually remember why I configured this one. I never use it.

* Shift + Shift (ie left & right) -> Caps Lock: I don't actually use it, but this way it's still available.

Re: Making Emacs Popular Again

#763
I like Vim better because it's easier for me to press one key to do an action or write :command. I can also use Vim on the mobile (Termux and other terminals). Having to press CTRL+A CTRL+whatever doesn't make sense IMO.

Re: Making Emacs Popular Again

#764

Earlier quoted context omitted.

Choosing an editor like emacs or vi is a major decision which will have long-lasting effects. I love vi, and the homerow movement keys are now hard-wired into my brain, so much so that using 'normal' applications is noticeably frustrating. Sure, I can try to add plugins to everything, but that only goes so far and requires a lot of setup work on every new computer or VM. That said, the old school editors bring plenty…

I’m also a long time vim user. I basically cannot edit text without vim keybindings these days. A few weeks back I decided to give emacs a third try, after installing it once a while ago and giving up, installing it again with spacemacs a bit later and giving up when I couldn’t figure out what layer of that behemoth errors were coming from or how to fix them. Anyway, I finally decided to give it another shot with van…

That's how I settled things down finally, Emacs for org-mode and magit (actually spacemacs) synced with all my devices with syncthing, on mobile I use orgzly, and everything is under version control. I use Vim for everything else.

Re: Making Emacs Popular Again

#765
post #512

Earlier quoted context omitted.

It's ridiculous that end users should rely on third parties for reliable documentation. For any other tool, if you wanted to know this kind of builtin functionality it'd be readily accessible in --help, the man page, or first-party online docs. Why should Emacs be an exception?

What tool do you go to the official docs for first and only Google second? I Google everything first. Am I missing out?

A trivial answer is "internal tools"...

A more interesting answer is bash - I will often check the man page before I Google.

Re: Making Emacs Popular Again

#766

I hear a lot about the declining popularity of Emacs, but I always wonder how much it is overstating the case. As a tech enthusiast but (mostly) non-programmer, my perception has actually been that the "cool factor" of Emacs has been on the rise. Around 2011 or so, I hardly ever saw mention of it online. Now a day hardly go by on places like Reddit's "unixporn" board that someone doesn't post their slick setup with E…

Anecdotally, I started learning Emacs a few months ago and am very happy with my decision. I first considered trying roughly 10 years ago, but didn't see the thriving package ecosystem I see today, starting with projects like Spacemacs and Doom. After some time trialing my options, I stuck with Spacemacs, and that choice saved me time in reaching my goal of transitioning my knowledge and project management to org-mod…

I've started learning Emacs a few weeks ago, and have had a similar experience as you. One different is that I considered going with Spacemacs / Doom but decided to take the route of starting from an empty init file and slowly building up from there (at least for now). I identify strongly with the feeling of thrashing; the wealth of different information and flexibility of the program itself can be overwhelming. Would you be willing to share some of your favorite resources (and why you chose them)? That would be immensely helpful for a beginner like me.

Re: Making Emacs Popular Again

#767
post #754

Earlier quoted context omitted.

I think incremental commits are among my favorites in magit. It's so quick and easy to stage and commit selectively. The other thing I love about it is discoverability of git features. Did you know that you can stash index and working tree separately? I only know because of magit. Now that I know, I have actually used it to great success. Also, I've become my team's go-to rebase monkey. What takes my colleagues minut…

Thanks for the examples! The magit page is a little hard for me to grok why it might be worth switching to something else. > Did you know that you can stash index and working tree separately? What does this mean? Can you give an example? > Also, I've become my team's go-to rebase monkey. Haha, hello friend. I love rebasing; it always breaks my heart a little when I see "Merged master into branch X" commits :P My main…

`git status` always shows you some of three things: files not tracked by git, tracked files with modifications that are not staged, and tracked files with modifications that are staged.

You can stash tracked files with modifications, or tracked files without modifications separately! Scenario: I've staged a couple files for a commit I'm preparing, but I see that there's an unrelated change in the unstaged files that I want to do in a commit that should come first. So I stash everything I've staged. I do not stash what I haven't staged! Now I can create that new commit, and pop the stash later to come back to the commit I wanted to originally write.

Re: Making Emacs Popular Again

#768
post #755

Earlier quoted context omitted.

Ahh, that's not what I was going for. I'm actually just curious. I'm willing to give emacs a try, but it just seems like it has kind of a steep learning curve, so want some strong reasons to know if it's worthwhile. This was the best I could find googling: https://www.reddit.com/r/emacs/comments/8h1cxa/any_long_time...

I mean, a lot of it is just the kind of complex one-off text transformations that would normally require a throwaway script or program to express. (They do in Emacs too, but you can write it as inline Lisp forms in the replacement side of a PCRE find-and-replace, and not deal with any boilerplate.) Refactors and stuff like that all happen through LSP providers, just like in VS Code. If you're looking for a strong rea…

This. After having fiddled around with Emacs over the weekend, having tried out Spacemacs and Doom and working through some tutorials, I concluded that I definitely won't replace VSCode with Emacs for coding any time soon. As a Git & PIM-Tool, it seems to be useful though.

Re: Making Emacs Popular Again

#769

Earlier quoted context omitted.

> it's finally conceivable to have software that works reliably. Care to elaborate what you mean by that?

The industry has been trying to write C and then C++ for decades, but it all blows up randomly. Buffer overruns, use after free, shared mutable state. Apparently tooling exists that tries to make Rust-like guarantees, but it's so costly I've literally never seen it used.

I don't get it. What about the JVM or ObjC or C#? How is it that only with Rust the things you stated are coming to us?

Re: Making Emacs Popular Again

#770

Earlier quoted context omitted.

> I'm probably gonna keep doing my technical writing in BBEdit until I die, but that's a different post. Please produce that post. Also, why not developing in BBEdit?

BBEdit's indenting and completion engines just aren't as smart as other editors -- I suspect in the latter case they'll have to add LSP support on their own (right now I don't think it can even be added externally because their API doesn't expose the right event hooks), and in the former case, I have a suspicion Bare Bones Software just has a philosophical objection to context-aware indenting. With those objections a…

> I have a suspicion Bare Bones Software just has a philosophical objection to context-aware indenting

Yeah, either that or they are procrastinating on some quirk deep in their engine they should rewrite already.

Post reply on HN