Next: Entering Special Symbols, Previous: Quoted Insert, Up: Editing [Index]
‘M-x diff’ command produces Diff mode, which displays the differences between
two files in a ‘*diff*’ buffer through running the diff
program. Switches
are found in the diff-switches
variable (the default is ‘-u’, a unified
context diff).
Ediff is a more sophisticated alternative to Diff mode. See (ediff)Top.
‘M-x diff-backup’ compares a file with its most recent backup. If you specify the name of a backup file, this command compares it with the source file instead. Otherwise, it is the same as ‘M-x diff’.
‘M-x diff-buffer-with-file’ compares a specified buffer with its corresponding file. This shows you what changes you would make to the file if you save the buffer.
‘M-x compare-windows’ compares the text in the current window with that in the window that was the selected window before you selected the current one.
‘M-x smerge-mode’ turns on Smerge mode, a minor mode for editing output from the ‘diff3’ program.
The Emerge commands compare two files or buffers, and display the comparison in three buffers: one for each input text (the “A buffer” and the “B buffer”), and one (the “merge buffer”) where merging takes place. The merge buffer shows the full merged text, not just the differences. Wherever the two input texts differ, you can choose which one of them to include in the merge buffer.
to merge two specific files.
to merge two files with reference to a common ancestor.
to merge two buffers
to merge two buffers with reference to a common ancestor in a third buffer.
Next: Entering Special Symbols, Previous: Quoted Insert, Up: Editing [Index]