Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kensanata/in-memory-diff
diff lines of two buffers without temp file
https://github.com/kensanata/in-memory-diff
Last synced: 12 days ago
JSON representation
diff lines of two buffers without temp file
- Host: GitHub
- URL: https://github.com/kensanata/in-memory-diff
- Owner: kensanata
- License: gpl-3.0
- Created: 2017-12-13T16:00:40.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-01-05T14:08:37.000Z (almost 7 years ago)
- Last Synced: 2024-08-05T06:05:45.862Z (3 months ago)
- Language: Emacs Lisp
- Size: 18.6 KB
- Stars: 5
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# In Memory Diff
`in-memory-diff` takes two source buffers and treats their content as
a set of unordered lines, as one would expect for a file like
`~/.authinfo.gpg`, for example. We don't use diff(1) to diff the
buffers and thus we don't write temporary files to disk. The result is
two buffers, `*A*` and `*B*`. Each contains the lines the other buffer
does not contain. These files are in a major mode with the following
interesting keys bindings:* `c` – copy the current line to the other source buffer
* `k` - kill the current line from this source buffer
* `RET` - visit the current line in this source bufferIn theory, using `c` and `k` on all the lines should result in the two
source containing the same lines a subsequent call of `in-memory-diff`
showing two empty buffers.