Hacker News new | ask | show | jobs
by tzs 926 days ago
> The most important flaw was that after you hit C-x r SPC (save-to-register), whatever key you hit next, you'd save the text into the register associated with that key. In particular, the universal Emacs cancel key, C-g, would not work here: instead, the text or position would be saved to a register called ^g

I'm not very familiar with Emacs, so possibly stupid questions incoming.

If you start to type C-x r SPC t to save to register t, does C-g work right after the C-X and the r?

If so is that because the C-x, r, and SPC are part of the command sequence whereas the t is just an argument used by the command, and the C-g handling is done in the command sequence processing?

Emacs is pretty famous for its flexibility in letting users bind and unbind key sequences to commands. Could people who like the old behavior fairly easily effectively restore it by unbinding the handler for C-x r SPC, and then bind handlers for C-x r SPC a, C-x r SPC b, C-X r SPC c, and so on for all registers they want to use, with each of those handlers just copying to the appropriate register?

That should let them use the same keystrokes they now use, and if my guess above about C-g handling is right also make C-g work to cancel after C-x r SPC.