bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#10160: 24.0.91; diff-hunk-file-names returns quoted file names


From: Michael Albinus
Subject: bug#10160: 24.0.91; diff-hunk-file-names returns quoted file names
Date: Tue, 29 Nov 2011 20:01:21 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux)

Stefan Monnier <monnier@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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]