GNU bug report logs -
#10160
24.0.91; diff-hunk-file-names returns quoted file names
Previous Next
Reported by: Michael Albinus <michael.albinus <at> gmx.de>
Date: Tue, 29 Nov 2011 11:35:02 UTC
Severity: normal
Tags: moreinfo
Found in version 24.0.91
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Michael Albinus <michael.albinus <at> gmx.de> writes:
> diff-hunk-file-names reads file names from the *Diff* buffer. The first
> line (the diff command itself) can contain labels, marked with -L. If
> these labels contains quoted characters like in remote file names, the
> quotation is returned. Example:
>
> diff -c -L /ftp\:slbhao\:/home/albinus/src/tramp/lisp/tramp.el -L /ftp\:slbhao\:/home/albinus/src/emacs/lisp/net/tramp.el /tmp/ange-ftp13518wvE.el /tmp/ange-ftp1351895K.el
Looking at the code, it just returns the first two "words" after
"diff -OPTION":
;; this assumes that there are no spaces in filenames
(when (re-search-backward
"^diff \\(-\\S-+ +\\)*\\(\\S-+\\)\\( +\\(\\S-+\\)\\)?"
nil t)
(list (if old (match-string 2) (match-string 4))
(if old (match-string 4) (match-string 2)))))))))
I guess we could filter out "-L +\\S-+" before matching? But I don't
think I've ever seen "-L" in the wild, so I don't know whether it's
worth doing.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
This bug report was last modified 3 years and 285 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.