GNU bug report logs - #20276
24.4; diff-mode doesn't handle unified diff file headers without tabs

Previous Next

Package: emacs;

Reported by: Gustav HÃ¥llberg <gustav <at> gmail.com>

Date: Tue, 7 Apr 2015 22:35:01 UTC

Severity: normal

Found in version 24.4

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Gustav HÃ¥llberg <gustav <at> gmail.com>
Cc: 20276 <at> debbugs.gnu.org
Subject: bug#20276: 24.4; diff-mode doesn't handle unified diff file headers without tabs
Date: Wed, 08 Apr 2015 16:50:06 -0400
> Some diff programs will not emit tab + timestamp (as GNU diff does),
> but just the file name.

Which diff programs do that?

> -          (if (looking-at "[-*][-*][-*] \\([^\t]+\\)\t.*\n[-+][-+][-+]
> \\([^\t]+\\)")
> +          (if (looking-at "[-*][-*][-*] \\([^\t\n]+\\).*\n[-+][-+][-+]
> \\([^\t\n]+\\)")

Adding \n in the char-ranges is fine (it's a good change in itself), but
removing the \t increases the risk of false positives, so I'm a bit
worried about that.


        Stefan




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

Previous Next


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