Hacker News new | ask | show | jobs
by safety1st 902 days ago
I'm an emacs believer (the idea of a programmer's text editor really just being a lisp environment makes a ton of sense), but I'm a very part-time user. There are just so many idiosyncracies that make it hard to get into. No one seems to drink their own kool-aid more fervently than the emacs community, it just feels like "this would make it easier for new users" is never allowed to be a design rationale for anything.

For me things started to get easier once I discovered cua-mode and xclip-mode. I have read some arguments about why these aren't the default, I think those arguments are sensible if you have a PhD in emacs, but for the other 99.99% of humanity they are just big signs that say "go away." It's very silly to me that the defaults haven't evolved and become more usable - the definition of being a power user is that you can and do override lots of defaults anyway, so the defaults should be designed to support new users, not the veterans.

4 comments

That's because learning how to use Emacs is basically the equivalent of Navy Seals training except for programmers. For Emacs believers, that's a feature, not a bug. The good news is that llamafile is designed to be easy and inclusive for everyone. Emacs users are just one of the many groups I hope will enjoy and benefit from the project.
> I think those arguments are sensible if you have a PhD in emacs.

To get that PhD just start reading „Mastering Emacs“ by Mickey Peterson: https://www.masteringemacs.org

Many people try learning by doing Emacs and it’s not a bad approach. However, I believe learning the fundamental „theory of editing“ will help you quite a lot to grasp this tool’s inherent complexity much faster. And it’s a fun read, I think.

`xclip-mode` looks like it should definitely be included by default. `cua-mode` is tougher because it messes with the default keybindings, making you type C-x twice (or Shift-C-x) for the large number of keybindings that start with C-x. That might be better for newcomers though, and bring more people to Emacs. Personally I would disable `cua-mode` if it were default.
Warning: This turned into a pretty long response somehow

Doesn't cua mode kind of break the keybindings of emacs?

For instance I use:

- C-c C-c

- C-c C-e

Maybe those get moved to some other prefix?

Also I get the argument that C-v in emacs for paste would be nice, but doesn't that make it harder for you to discover yank-pop aka C-y M-y?

The problem to me it seems with using cua-mode medium or long term is not thinking in the system and patterns of emacs.

I assume if one doesn't want to learn different copy paste commands, they also probably don't want to read emacs high quality info manuals which impart deep understanding well.

EDIT: I found a good discussion on this.

Question:

> CUA mode is very close to the workflow I am used to outside Emacs, so I am tempted to activate it.

> But I have learned that Emacs may have useful gems hidden in its ways, and CUA mode seems something that was attached later on.

Parts of response:

> In short, what you “lose” is the added complexity to the key use. Following is more detailed explanation.

> Emacs C-x is prefix key for general commands, and C-c is prefix key of current major mode's commands.

> CUA mode uses C-x for cut and C-c for copy. In order to avoid conflict, cua uses some tricks. Specifically, when there's text selection (that is, region active), then these keys acts as cut and copy.

> But, sometimes emacs commands work differently depending on whether there's a text selection. For example, comment-dwim will act on a text selection if there's one, else just current line. (when you have transient-mark-mode on.) This is a very nice feature introduced since emacs 23 (in year 2009). It means, for many commands, you don't have to first make a selection.

full response: https://emacs.stackexchange.com/a/26878

I suppose it all hinges upon your response to reading this:

> CUA mode is very close to the workflow I am used to outside Emacs,

My response: Workflow outside of emacs?! How can we fix that? Outside of emacs I'm in danger of hearing "you have no power here!".

Typical response: Why can't emacs be more like other programs so I can more easily use it from time to time?