# gdiff(3f)

[Home] [Commands] [Variables] [Macro-Dev] [Glossary]

## NAME

gdiff - Command line graphical file difference

## SYNOPSIS

me "@gdiff" "version1" "version2"

## DESCRIPTION

MicroEmacs may be executed from the command line to invoke the Graphical Difference gdiff(3) macro, showing the difference(s) between two files.

The editor is invoked in gdiff mode and shows the difference between the two files on the command line. The two files are presented side by side and the lines are matched together, the windows are effectively locked together, scrolling one window causes the other window to scroll.

The changes are shown as color coded regions of highlighted text. Each block (or line) has to be accepted or rejected by the user, when all blocks have been accepted then the buffer may be written out merging the changes from both files depending on the accept/reject status. Blocks which have been accepted are typically shown in green, the rejected lines are shown in red.

## Key Mapping

The keyboard mapping in gdiff mode is defined as follows:

esc-h

Help information.

C-up/p

Advance to the previous difference.

C-down/n

Advance to the next difference.

esc-up/P

Advance to the previous unassigned difference.

esc-down/N

Advance to the next unassigned difference.

g

Globally select all of the differences from the current window as assigned.

G

Globally un-select all of the assigned differences.

r/space/return/left-mouse

Selects the current difference, only operates within a highlighted difference region.

R

Un-selects the current difference, only operates within a highlighted difference region.

l

Selects the current line in a highlighted region for assignment.

L

Unselects the current line in a highlighted region for assignment.

save-buffer

Saves the current buffer, all of the assignment changes are merged and written out to the existing buffer.

write-buffer

Saves the current buffer after merging all of the and assignment changes and prompts the user for the name of a new buffer.

left/right

Scrolls the buffer left or right.

kill-buffer/C-x C-c

Quits gdiff, the user is prompted to save changes.

## NOTES

The macro is defined in file `gdiff.emf`.

## SEE ALSO

gdiff(3), start-up(3), xdiff(3).

(c) Copyright JASSPA 2009
Last Modified: 2009/08/29
Generated On: 2009/10/12

</HMTL>