Skip to main content
deleted 166 characters in body
Source Link
Drew
  • 80.9k
  • 10
  • 125
  • 265

On 2020-10-18 00:34, Stefan Monnier wrote:

How to end text-insert undo segment after cursor jump (caused by mouse)?

Note that the behavior you describe comes from code in Evil. The way undo steps are divided in non-Evil Emacs is different (mostly, finer grained).

More specifically, I believe that if you perform the undo before you finish your insertion (i.e. before hitting ESC), you should get (more or less) the behavior you want, i.e. the cursor jump due to your mouse event will indeed have ended an undo sequence. Evil then collapses those undo steps into a single one when you leave insertion mode.

In any case, maybe setting evil-want-fine-undo will also do the trick.

Stefan

Hey Stefan, thanks for your help!

You were absolutely right, theThe issue was caused by evil layer. YourThe solution suggested by Stefan, to set evil-want-fine-undoevil-want-fine-undo worked perfectly!.

I went to emacsEmacs customization interface for this variableoption, I set it to Yes (nonnon-nil) and clicked "Apply and Save" and voila, from that moment onand saved. Then I was able to undo up until the problematic point, and the undo action no longer grouped everything between start and end of insert command, but recognized piece-wise undo segments.

Thanks again and have a great day,

David

On 2020-10-18 00:34, Stefan Monnier wrote:

How to end text-insert undo segment after cursor jump (caused by mouse)?

Note that the behavior you describe comes from code in Evil. The way undo steps are divided in non-Evil Emacs is different (mostly, finer grained).

More specifically, I believe that if you perform the undo before you finish your insertion (i.e. before hitting ESC), you should get (more or less) the behavior you want, i.e. the cursor jump due to your mouse event will indeed have ended an undo sequence. Evil then collapses those undo steps into a single one when you leave insertion mode.

In any case, maybe setting evil-want-fine-undo will also do the trick.

Stefan

Hey Stefan, thanks for your help!

You were absolutely right, the issue was caused by evil layer. Your solution to set evil-want-fine-undo worked perfectly!

I went to emacs customization interface for this variable, I set it to Yes (non-nil) and clicked "Apply and Save" and voila, from that moment on I was able to undo up until the problematic point and the undo action no longer grouped everything between start and end of insert command, but recognized piece-wise undo segments.

Thanks again and have a great day,

David

On 2020-10-18 00:34, Stefan Monnier wrote:

How to end text-insert undo segment after cursor jump (caused by mouse)?

Note that the behavior you describe comes from code in Evil. The way undo steps are divided in non-Evil Emacs is different (mostly, finer grained).

More specifically, I believe that if you perform the undo before you finish your insertion (i.e. before hitting ESC), you should get (more or less) the behavior you want, i.e. the cursor jump due to your mouse event will indeed have ended an undo sequence. Evil then collapses those undo steps into a single one when you leave insertion mode.

In any case, maybe setting evil-want-fine-undo will also do the trick.

The issue was caused by evil layer. The solution suggested by Stefan, to set evil-want-fine-undo worked.

I went to Emacs customization interface for this option, set it to non-nil, and saved. Then I was able to undo up until the problematic point, and the undo action no longer grouped everything between start and end of insert command, but recognized piece-wise undo segments.

Source Link

On 2020-10-18 00:34, Stefan Monnier wrote:

How to end text-insert undo segment after cursor jump (caused by mouse)?

Note that the behavior you describe comes from code in Evil. The way undo steps are divided in non-Evil Emacs is different (mostly, finer grained).

More specifically, I believe that if you perform the undo before you finish your insertion (i.e. before hitting ESC), you should get (more or less) the behavior you want, i.e. the cursor jump due to your mouse event will indeed have ended an undo sequence. Evil then collapses those undo steps into a single one when you leave insertion mode.

In any case, maybe setting evil-want-fine-undo will also do the trick.

Stefan

Hey Stefan, thanks for your help!

You were absolutely right, the issue was caused by evil layer. Your solution to set evil-want-fine-undo worked perfectly!

I went to emacs customization interface for this variable, I set it to Yes (non-nil) and clicked "Apply and Save" and voila, from that moment on I was able to undo up until the problematic point and the undo action no longer grouped everything between start and end of insert command, but recognized piece-wise undo segments.

Thanks again and have a great day,

David