GNU bug report logs - #20290
25.0.50; Use unified diff format by default, and recommend using it in reports and patches

Previous Next

Package: emacs;

Reported by: Dmitry Gutov <dgutov <at> yandex.ru>

Date: Thu, 9 Apr 2015 20:07:01 UTC

Severity: wishlist

Found in version 25.0.50

Done: Dmitry Gutov <dgutov <at> yandex.ru>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: 20290 <at> debbugs.gnu.org
Subject: bug#20290: 25.0.50; Use unified diff format by default, and recommend using it in reports and patches
Date: Sun, 12 Apr 2015 16:30:01 -0700
As I recall, RMS preferred diff -c to diff -u, and that is partly why 
trouble.texi suggests -c over -u and why diff-switches defaults to -c.  Also, 
traditional Unix 'diff' lacked -u; although GNU diff had -u starting in 1990, 
diff -u wasn't standardized by POSIX until 2008.

These days -u format is far more popular than -c format in practice, and I 
expect that most active Emacs developers prefer -u, so it's appropriate for 
Emacs to default to -u and for trouble.texi to suggest it.

I suppose that in theory there is the issue of Emacs running on an older 
POSIXish platform where 'diff' does not support -u.  I don't have access to any 
such platform, though.  I can confirm that Solaris 10 diff (2005) supports '-u'. 
 So perhaps we don't need to worry about this.




This bug report was last modified 10 years and 46 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.