News for hackers. Stuff that matters.
Re:Making Emacs Popular Again (2020) by isolli on Thursday November 04, 2021 @09:28AM (#29106906)
There's nothing worse than reflexively typing ctrl+z to undo in Emacs and instead have the window disappear into the background!
Re:Making Emacs Popular Again (2020) by ajross on Thursday November 04, 2021 @09:42AM (#29107055)
In my .emacs since time immemorial:

     (global-unset-key [(control z)])
It's absolutely true that defaults are "bad" in many modern environments (though remember C-z to suspend in a terminal environment makes perfect sense!).

But the nature of the editor is customization like this. People unwilling to do this just aren't ever going to be happy with emacs. And for those just learning, tricks like that (c.f. emacswiki.org) are a very reasonable entryway into a world of possibilities.

I mean, look, Emacs isn't ever going to be VSCode. If you want VSCode, use VSCode. It's a great editor, and frankly at this stage I think nothing is going to do VSCode better than VSCode already has. Emacs is something different, and we might as well embrace that.

(Not that I'd object to switching some of the dumb defaults around, of course. I just don't think that's going to help very much if your goal is "displace VSCode").

Re:Making Emacs Popular Again (2020) by babypuncher on Thursday November 04, 2021 @02:36PM (#29110916)
I find this at least a little frustrating. I haven't used Emacs, but when using other apps that use non-standard defaults (or just defaults that I am not used to), changing one shortcut leads to a cascade where I have to change many shortcuts. I now have to spend a somewhat significant amount of time configuring a new piece of software before I even know if I actually like it.

Shipping with some easily configurable presets to mimic other popular tools would probably help new users a lot.

Re:Making Emacs Popular Again (2020) by tom_ on Thursday November 04, 2021 @10:12AM (#29107414)
Suggested tweak:

    (when window-system
      (global-unset-key (kbd "C-z")))
Re:Making Emacs Popular Again (2020) by servilio on Thursday November 04, 2021 @10:48AM (#29107892)
The recommended way to do this now seems to be:

  (when display-graphics-p
    (global-unset-key (kbd "C-z")))
Also, though this works with Emacs running as a server, I find it better to just quit emacsclient instead of learning to do something different depending on what environment it is running.
Re:Making Emacs Popular Again (2020) by ajross on Thursday November 04, 2021 @10:32AM (#29107675)
Nope. Again, context matters here. I never use emacs in a terminal; all editting of files on remote systems is done in a local X11 emacs over ssh. And this is not because of circumstance but because making that choice opens up more doors. I can have keybindings not just on C-z but ones that aren't representable in the terminal at all (e.g. I like to put end/beginning-of-buffer on C-. and C-,)

Would I submit my choices as good defaults for new emacs users? Hell no. But they remain good choices nonetheless. That's the essence of my point, not the minutiae.

Re:Making Emacs Popular Again (2020) by a_e_k on Thursday November 04, 2021 @09:03PM (#29114335)
Even better, I repurposed C-z as the prefix for all my custom bindings. That's got a couple of advantages:

1) I don't have to worry about finding free bindings under C-x, C-c, or at the top level. Those spaces are pretty crowded with out-of-the-box bindings.

2) C-z C-h automatically gives me a nice list of my custom bindings.

(For the very rare times when I actually want to suspend Emacs in a terminal, I don't mind typing out M-x suspend-emacs RET.)

Re:Making Emacs Popular Again (2020) by teddyh on Thursday November 04, 2021 @10:10AM (#29107391)
Ctrl-z for suspend is useful in the terminal, though, so maybe something like this?

  (if window-system
      (global-set-key (kbd "C-z") 'undo))
Re:Making Emacs Popular Again (2020) by ReleaseCandidat on Thursday November 04, 2021 @10:21AM (#29107542)
Actually, there is. Typing `C-x C-s` in a 'normal' Editor. Always happens to me :(
Re:Making Emacs Popular Again (2020) by foobarian on Thursday November 04, 2021 @10:56AM (#29107984)
You guys both got nothing on pressing Cmd-W on a MacOS terminal when you intend to copy a selection. :-( I swear whoever designed that UI must have been a vi partisan.
Re:Making Emacs Popular Again (2020) by b3morales on Thursday November 04, 2021 @12:16PM (#29109006)
I found it better to make Option (rather than Command) be Meta for this reason.
Re:Making Emacs Popular Again (2020) by bluecatswim on Thursday November 04, 2021 @10:58AM (#29108006)
Yep, for me it's this. I don't know why others are complaining about the other way around, maybe it's because I thought of Emacs as being different from other editors right from the get go, but I doubt I've ever accidentally entered CUA shortcuts in Emacs. But Emacs shortcuts in normal editors while using school PCs was something I did all the time.
Re:Making Emacs Popular Again (2020) by kwhitefoot on Thursday November 04, 2021 @11:01AM (#29108050)
Done that about a dozen times today!
Re:Making Emacs Popular Again (2020) by isolli on Thursday November 04, 2021 @10:53AM (#29107949)
Same here! It's just easier to undo :)
Re:Making Emacs Popular Again (2020) by jyriand on Thursday November 04, 2021 @11:19AM (#29108282)
Or while cutting a text in browser and typing ctrl+w, thereby closing the tab.