Ediff

From WikEmacs
Jump to navigation Jump to search

Ediff makes patching easier:

  • Never read that diff output again!
  • Apply patch interactively!
  • Merge with ease!

This package provides a convenient way of simultaneous browsing through the differences between a pair (or a triple) of files or buffers. The files being compared, file-A, file-B, and file-C (if applicable) are shown in separate windows (side by side, one above the other or in separate frames) and the differences are highlighted as you step through them. You can also copy difference regions from one buffer to another (and recover old differences if you change your mind).

Ediff also supports merging operations on files and buffers, including merging using ancestor versions. Both comparison and merging operations can be performed on directories, i.e. by pairwise comparison of files in those directories.

In addition Ediff can apply a patch to a file and then let you step through both files, the patched and the original one, simultaneously, difference-by-difference. You can even apply a patch right out of a mail buffer, i.e. patches received by mail don't even have to be saved. Since Ediff lets you copy differences between buffers, you can, in effect, apply patches selectively (i.e. you can copy a difference region from file_orig to file, thereby undoing any particular patch that you don't like).