Live data from Hacker News

Emacs 26 Brings Generators and Threads

nullprogram.com

1–10 of 175 posts

Re: Emacs 26 Brings Generators and Threads

#2
Weird place to vent. But I find it so interesting that Emacs in all it's wisdom does not have (to me) acceptable undo behavior. Sometimes when I want to undo a bit, it undoes so much that I have to do a few seconds of copy-pasting.

Re: Emacs 26 Brings Generators and Threads

#3
post #2

Weird place to vent. But I find it so interesting that Emacs in all it's wisdom does not have (to me) acceptable undo behavior. Sometimes when I want to undo a bit, it undoes so much that I have to do a few seconds of copy-pasting.

You should try undo tree (http://www.dr-qubit.org/undo-tree.html), it's a must have extension which brings proper undo-redo and a tree visualisation of history with diffs and many other options.

Re: Emacs 26 Brings Generators and Threads

#4
post #3
post #2

Weird place to vent. But I find it so interesting that Emacs in all it's wisdom does not have (to me) acceptable undo behavior. Sometimes when I want to undo a bit, it undoes so much that I have to do a few seconds of copy-pasting.

You should try undo tree ( http://www.dr-qubit.org/undo-tree.html ), it's a must have extension which brings proper undo-redo and a tree visualisation of history with diffs and many other options.

undo-tree is great! I use it like a "mini git", it supports branches/forks, so I can usually just try something in any order and easily go back to where I want to be. I use it in combination with Evil (vim) bindings, and everything works like a dream.

Re: Emacs 26 Brings Generators and Threads

#5
post #2

Weird place to vent. But I find it so interesting that Emacs in all it's wisdom does not have (to me) acceptable undo behavior. Sometimes when I want to undo a bit, it undoes so much that I have to do a few seconds of copy-pasting.

Undo has many weird sides but what you describe rarely happen to me, if at all

Re: Emacs 26 Brings Generators and Threads

#6
post #2

Weird place to vent. But I find it so interesting that Emacs in all it's wisdom does not have (to me) acceptable undo behavior. Sometimes when I want to undo a bit, it undoes so much that I have to do a few seconds of copy-pasting.

I still haven't figured out how the undo-direction works in emacs. It feels like half the time I'd inadvertently end up redoing.

Re: Emacs 26 Brings Generators and Threads

#7
post #2

Weird place to vent. But I find it so interesting that Emacs in all it's wisdom does not have (to me) acceptable undo behavior. Sometimes when I want to undo a bit, it undoes so much that I have to do a few seconds of copy-pasting.

Well, it's a true full "undo" behavior. It's a bit annoying at times because edits are not grouped, but you can see your entire editing history when you're undoing: no edit is ever lost in this manner.

As typical in emacs, this is not the only undo behavior you can have. undo-tree behaves very similarly to vim by default, but still preserves the entire editing history (with branching), which is visible graphically with "C-x u".

Re: Emacs 26 Brings Generators and Threads

#8
post #6
post #2

Weird place to vent. But I find it so interesting that Emacs in all it's wisdom does not have (to me) acceptable undo behavior. Sometimes when I want to undo a bit, it undoes so much that I have to do a few seconds of copy-pasting.

I still haven't figured out how the undo-direction works in emacs. It feels like half the time I'd inadvertently end up redoing.

If you did an undo in the history, it will look like a redo. So if you just did a bunch of undos, it will feel like redoing, but you are actually removing changes made by your undo.

Re: Emacs 26 Brings Generators and Threads

#9
post #6
post #2

Weird place to vent. But I find it so interesting that Emacs in all it's wisdom does not have (to me) acceptable undo behavior. Sometimes when I want to undo a bit, it undoes so much that I have to do a few seconds of copy-pasting.

I still haven't figured out how the undo-direction works in emacs. It feels like half the time I'd inadvertently end up redoing.

it treats the undos as new changes to the buffer, and adds ;; them to the history:

Re: Emacs 26 Brings Generators and Threads

#10
post #2

Weird place to vent. But I find it so interesting that Emacs in all it's wisdom does not have (to me) acceptable undo behavior. Sometimes when I want to undo a bit, it undoes so much that I have to do a few seconds of copy-pasting.

I too find the undo behavior quite confusing. I don't know the implementation, but I guess it is because by default instead of unwinding the stack of operations it does something like doing the opposite action. This means that sometimes you may redo an operation by mistake: for example

- Paste 5 time the same line - Press undo 3 times: removes 3 lines - Move the cursor by one character - Press undo 2 times: instead of removing 2 lines it adds back 2

It would be better if the two operations (undo/redo) would be distinct.

Post reply on HN