Fix org-src-edit interaction with undo.
commit8b264d505ee74b3b215fdc1baf4daf2167e9e2e4
authorAaron Ecay <aaronecay@gmail.com>
Wed, 28 Aug 2013 15:50:53 +0000 (28 11:50 -0400)
committerAaron Ecay <aaronecay@gmail.com>
Mon, 28 Oct 2013 19:09:25 +0000 (28 15:09 -0400)
tree4726b2ec16929a34ecf6c5e35ba8c00cdfc26caa
parentdca85fec629e9148cd4c7ea368321edd5637da58
Fix org-src-edit interaction with undo.

* org-src.el (org-edit-src-exit): Place an undo boundary before
writing changes back to parent buffer.

The previous code attempted to preserve the undo information in the
indirect buffer editing the source code, but this interacts poorly
with the undo system, and can lead to undo operations scrambling the
buffer.  The new approach means that edits made in the indirect buffer
cannot be undone piece-by-piece (instead, all changes made in the
indirect buffer constitute one “change” from the point of view of
undo), but the misbehavior of undo is (hopefully) now avoided.
lisp/org-src.el