# xdiff(3)

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

## NAME

xdiff - External graphical file difference
%xdiff-com - Extenal graphical differnce xdiff(1) command line

## SYNOPSIS

xdiff "leftVersion" "rightVersion"

`%xdiff-com` "string"

X-Windows "`xdiff -wb %lf %rf`" when using xdiff from http://reality.sgiweb.org/rudy/xdiff/

MS-Windows "`bc2.exe %lf %rf /title1=%lt /title2=%rt`" when using Beyond Compare.

## DESCRIPTION

xdiff is a macro wrapper that invokes an external graphical file difference utility, named after the original X-Windows utility of the same name. The utility will usually display two files side by side and color code the differences, the differences may then be selected to merge the changes into a new output file which may (or may not) overwrite one of the original input files.

xdiff executes the difference utility xdiff(1) command (or equivalent) with the command line set by the %xdiff-com variable and the user supplied files leftVersion and rightVersion. The command line variables are referenced from the %xdiff-com as follows:

%lf

The absolute file name of the left-hand file, leftVersion.

%rf

The absolute file name of the right-hand file, rightVersion.

%ln

The base name of the left-hand file, leftVersion.

%rn

The base name of the left-hand file, leftVersion.

The %xdiff-com variable should include the appropriate command to invoke the difference utility and use % place holders for the arguments. MicroEmacs will fill in the % arguments with their correct values on invocation.

UNIX

UNIX environments may use xdiff(1) which is available from http://reality.sgiweb.org/rudy/xdiff/. The variable command line may be defined as:

    set-variable %xdiff-com "xdiff -wb %lf %rf"

The -wb options will ignore while space and trailing blanks.

Microsoft Windows

Microsoft Windows environments may use something like Beyond Compare. The variable command line may be defined as:

    set-variable %xdiff-com "bc2.exe %lf %rf /title1=%lt /title2=%rt"

In this case the %lt values have been used for the title names for each of the windows in the utility.

## NOTES

xdiff is a macro defined in `tools.emf`, inspired by the UNIX utility of the same name xdiff(1)

## SEE ALSO

compare-windows(2), compile(3), diff(1), gdiff(3), gdiff(3f), xgrep(3), %xgrep-com(5).

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

</HMTL>