[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How do I get mdiff to produce usable output?

On Sun, 05 Feb 2012 17:37:41 +0000, Hendrik Boom wrote:

> On Sun, 05 Feb 2012 16:49:48 +0000, Camaleón wrote:
>> Mmm... I would start by having a deep look at the manual, it seems very
>> complete and detailed:
>> A word difference finder (and others)
>> http://www.gnu.org/software/wdiff/manual/wdiff.html
> I've already found that manual, have read it a few tines, but haven't
> figured out how to get the normal output it describes as follows:

I pointed to the manual because I think "mdiff" is not what you think is 
all about. There it's said that mdiff output is still experimental and 
can change:

The standard diff program is meant for when there are exactly two input 
files, for which crossed members should be ignored. mdiff output format 
has been designed in such a way that it should resemble diff output for 
this precise case. However, diff formats are not sufficient for 
representing all cases which mdiff may address, and this is not mature 
yet. That is why mdiff, in its current state, still experiments with 
output formats, which are subject to change. 

> Each line in the hunk, after the header, comes from the compared files,
> but is shifted right so the first column (or the first few columns) of
> each line gives information about where the line is coming from. A space
> indicates a line which is common to all files. In case there are only
> two input files, a minus sign indicates a line from the first file and a
> plus sign a line from the second file. Else, a letter from ‘a’ to ‘z’,
> or more than one letter if there are more than 26 files, indicates to
> which file the line pertains. If a line or a block of line pertains to
> many files but not to all of them, the first column holds a vertical
> bar, and the line or block of lines is bracketed between ‘@/’ and ‘@\’
> lines, which are kind of comments within the hunk. The initial bracket
> lists all file letters that are related to the incoming line.
> Now that's just what I would assume us its default output format, and
> it's *just  exactly* what I'd like to see.  But I haven't been able to
> get it.  Presumably there's some kind of option I have to specify to get
> this, but I haven't been able to find it.

If I read it correctly, the above was said within a context, specifically 
when mdiff is run "inside" Emacs:

If one manages to execute mdiff within GNU Emacs so the output described 
above is collected into the *compilation* buffer, the command C-` (‘M-x 
next-error’) will proceed to the next cluster member in the other window, 
and similarily for other compilation mode commands. This is a useful way 
for handling mdiff output. 

Anyway, the list of the available parameters is quite short so you can 
try all of them without much pain. I would start with "-0" for 
debugging :-)



Reply to: