GNU bug report logs - #10160
24.0.91; diff-hunk-file-names returns quoted file names

Previous Next

Package: emacs;

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


Message #11 received at 10160 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Cc: 10160 <at> debbugs.gnu.org
Subject: Re: bug#10160: 24.0.91; diff-hunk-file-names returns quoted file names
Date: Tue, 29 Nov 2011 20:01:21 +0100
Stefan Monnier <monnier <at> IRO.UMontreal.CA> 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
>
>> Such quoted file names result in problems when used as parameter for
>> file name functions, like in diff-find-file-name.
>
> Not sure what to do about them: this "parsing the diff command line" is
> brittle in any case because this line is printed by various tools, and
> I don't think they're very consistent in how they handle quoting.
> We should probably try to minimize the problem first, by using relative
> file names when possible.

In my use case, it was superfluous, because the correct file names are
also parsed in the diff output (thanks to the -L label option). I don't
know whether we could generalize this, trusting just the given file
names of the diff result.

(And, btw, ediff could also use the -L argument. This would look better
than the local temp file names, as produced by Tramp for remote
files. But this is another story).

>         Stefan

Best regards, Michael.




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.