News for hackers. Stuff that matters.
Re:Why is it so hard to see code from 5 minutes ago? by jolmg on Friday February 19, 2021 @11:28AM (#26194784)
I agree. It's cool that it's lossless, but doing a lot of undos and redos makes the history quickly unwieldy to navigate. I much prefer vim's tree implementation.

I wouldn't say that it's worse than the standard, though. Unwieldy as it may be, I like that I can just keep on pressing C-/ and eventually get to the state I want without risk that I may have lost it because I accidentally made a change after a series of undos.

> Emacs documentation recommends using C-f (forward-character) to switch to redo mode, but in my opinion attaching side effect to movement is awful.

I use C-g (keyboard-quit) for that, which is the general let's-not-do-this-anymore keybinding. I think the documentation mentions C-f as an example keybinding that does the needful without much thought on being the "best" keybinding for it.

Re:Why is it so hard to see code from 5 minutes ago? by b3n on Friday February 19, 2021 @05:56PM (#26199135)
> doing a lot of undos and redos makes the history quickly unwieldy to navigate

Are you aware of the `undo-only` (and `undo-redo`) functions? They make it a breeze to navigate even the most complex undo history.

Re:Why is it so hard to see code from 5 minutes ago? by jolmg on Friday February 19, 2021 @07:37PM (#26200067)
Actually, I wasn't. Thanks for that.

(undo-redo) doesn't seem to be defined in stock Emacs, but undo-tree defines (undo-tree-redo), which does the needful.

My comment was more about lamenting the defaults in comparison with vim's, but it's true that it doesn't take much configuration to make it much better.

Re:Why is it so hard to see code from 5 minutes ago? by im3w1l on Saturday February 20, 2021 @03:56AM (#26202762)
undo-only doesn't have a keybind which makes it inconvient to use many times in a row. You could define one yourself I suppose, but at that point why not just get undo-tree?
Re:Why is it so hard to see code from 5 minutes ago? by im3w1l on Saturday February 20, 2021 @03:58AM (#26202774)
The issue I have is that I want to be able to use C-f and C-g and many others without it changing anything about my history.