phillord / lentic

Create views of the same content in two Emacs buffers
183 stars 12 forks source link

Lentic interferes with undo #20

Closed tmalsburg closed 8 years ago

tmalsburg commented 9 years ago

Open lentic-org.el and a lentic view of that file in org mode (lentic-orgel-org-init). Write a longer text on one buffer line in either the Elisp view or the org view and execute fill-column to word wrap. This produces several new buffer lines. Then execute undo-tree-undo.

Expected result: the text is on one line as it was before fill-column.

Actual result: I have to execute undo several times to arrive at the original text in several steps. In each step either two adjacent lines are joined, or the comment characters of a line (;;) are removed in the elisp view.

Thanks for lentic mode. It looks very promising and I'm looking forward to use it.

phillord commented 9 years ago

I haven't seen quite that before -- it's not specific to undo-tree, incidentally, and yes, it's clearly buggy.

Lentic and the undo system do not interact well with each other at all at the moment. In general, I find it difficult to predict when switching views. This is the first time that I have seen it happen with a single buffer.

Will investigate! Thanks for the report.

phillord commented 9 years ago

Been investigating this further, and I know why it's happening, but not sure how to fix it yet!

tmalsburg commented 9 years ago

Thanks for looking into it!

phillord commented 8 years ago

So, took a while, but this should be fixed now. It requires compiling from Emacs trunk, am afraid. There should be pretests out in a short while.

Will close this now. Feel free to reopen if it doesn't work.