[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: diffs between a buffer and the underlying file
From: |
Drew Adams |
Subject: |
RE: diffs between a buffer and the underlying file |
Date: |
Tue, 5 Sep 2006 18:39:24 -0700 |
I sometimes get into the following situation: I open a file, make
some changes, then I want to see the changes before saving the file.
The best way to do this seems to be to set the region to the whole
buffer, write the region to some temporary file, and run diff on the
two files. But I find this very unconvenient.
I'd like to have a function in emacs which can be applied to a buffer,
say buffer A, that opens a new buffer displaying all the changes
between the buffer A and the disk file, opened in buffer A.
Searching the emacs documentation I haven't found anything like this.
Only functions for diff'ing two buffers or two files.
You can always use ediff to compare any two buffers. So, with nothing extra,
you can 1) rename buffer A as foo, 2) re-read file A into buffer A, and 3)
compare buffers foo and A. The commands for this are 1) M-x rename-buffer,
2) M-x revert-buffer, and 3) M-x ediff-buffers.
Ediff is your friend, generally.
- diffs between a buffer and the underlying file, Urs Thuermann, 2006/09/05
- diffs between a buffer and the underlying file, Urs Thuermann, 2006/09/14
- Re: diffs between a buffer and the underlying file, David Hansen, 2006/09/14
- Re: diffs between a buffer and the underlying file, Darren, 2006/09/14
- Re: diffs between a buffer and the underlying file, Michaël Cadilhac, 2006/09/14
- Re: diffs between a buffer and the underlying file, Urs Thuermann, 2006/09/17
- Re: diffs between a buffer and the underlying file, Michaël Cadilhac, 2006/09/17
- Message not available
- Re: diffs between a buffer and the underlying file, Urs Thuermann, 2006/09/18
- Re: diffs between a buffer and the underlying file, John Sullivan, 2006/09/20
- Message not available
- Re: diffs between a buffer and the underlying file, Tim X, 2006/09/21
- Re: diffs between a buffer and the underlying file, Romain Francoise, 2006/09/21