Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

stops working after fast undo sequence #7

Closed
andreyorst opened this issue Jun 8, 2020 · 5 comments
Closed

stops working after fast undo sequence #7

andreyorst opened this issue Jun 8, 2020 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@andreyorst
Copy link
Contributor

indent the some multiline code by some amount of spaces, then undo all by holding undo shortcut and parinfer no longer does anything when indenting code again. No error messages are thrown.

Recording: https://asciinema.org/a/Wk6eSQ2ecVxgFTqFHPThVUEKh

@justinbarclay justinbarclay self-assigned this Jun 9, 2020
@justinbarclay justinbarclay added the bug Something isn't working label Jun 9, 2020
@justinbarclay
Copy link
Owner

justinbarclay commented Jun 11, 2020

Hi @andreyorst thanks for submitting this issue, that recording was very helpful.

I was able to recreate your bug and I think I was able to fix it. At least, it's fixed on my machine 😅. I pushed it and a few other changes up under tag v0.5.4. Can you let me know if this fixes the issue for you?

@andreyorst
Copy link
Contributor Author

this seems to be fixed, but still one problem persisted, that was observed in my recording as well, although I didn't mentioned it explicetly. In:

(defvar a
  '(:a 1
    :b 2))

add space before quote:

(defvar a
   '(:a 1
     :b 2))

Structure is preserved. Undo once:

(defvar a
   '(:a 1
    :b 2))

Structure is broken. Another undo will fix it, but If you've added more than one space structure will remain broken with each undo until final undo. Recording: https://asciinema.org/a/H5NdmLxw0j2Lm9N47z642veLM

I'm using undo-tree package, but it can be reproduced without any undo plugin as well.

@justinbarclay
Copy link
Owner

Unfortunately, that's kind of expected behavior within the Emacs Undo system. I've tried various work arounds so that Emacs treats a self-insert-command and the call to parinfer-rust--execute within the same undo boundary but I haven't had much luck, yet. I'll keep this issue open to track my progress with the undo system.

@andreyorst
Copy link
Contributor Author

Maybe there are some facilities to group modifications into single undo item?

@andreyorst
Copy link
Contributor Author

andreyorst commented Jun 16, 2020

I'll keep this issue open to track my progress with the undo system.

I feel that this is a different issue, so let's close this, since the main issue is fixed, and I'll open a new one, explicitly for this undo problem

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants