GNU bug report logs -
#25355
26.0.50; Provide function to non-destructively replace buffer contents
Previous Next
Reported by: Philipp <p.stephani2 <at> gmail.com>
Date: Wed, 4 Jan 2017 12:46:01 UTC
Severity: wishlist
Found in version 26.0.50
Done: Philipp Stephani <p.stephani2 <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
severity 25355 wishlist
quit
Philipp <p.stephani2 <at> gmail.com> writes:
> There are many tools (e.g. auto-formatters) that take buffer contents,
> reformat them, and write the reformatted output somewhere. However,
> there is no good way how to apply the modified output to the source
> buffer. The naive way (erasing and re-inserting the buffer contents)
> loses point and markers. Therefore there should be a function
> (e.g. `replace-buffer-contents') that calculates a minimal diff between
> the old and the new contents and uses editing operations (insert,
> delete, etc.) to apply the diff. Ideally this would be done without any
> external tools (e.g. 'diff').
This is pretty similar (though not identical) to
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=18.
This bug report was last modified 7 years and 342 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.