From: Michael Albinus <michael.albinus@gmx.de>
To: Stefan Monnier <monnier@IRO.UMontreal.CA>
Cc: 10160@debbugs.gnu.org
Subject: bug#10160: 24.0.91; diff-hunk-file-names returns quoted file names
Date: Tue, 29 Nov 2011 20:01:21 +0100 [thread overview]
Message-ID: <87ehwqlpmm.fsf@gmx.de> (raw)
In-Reply-To: <jwv4nxmrcjw.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Tue, 29 Nov 2011 13:50:00 -0500")
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.
next prev parent reply other threads:[~2011-11-29 19:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-29 11:32 bug#10160: 24.0.91; diff-hunk-file-names returns quoted file names Michael Albinus
2011-11-29 18:50 ` Stefan Monnier
2011-11-29 19:01 ` Michael Albinus [this message]
2021-07-16 13:50 ` Lars Ingebrigtsen
2021-08-14 13:51 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ehwqlpmm.fsf@gmx.de \
--to=michael.albinus@gmx.de \
--cc=10160@debbugs.gnu.org \
--cc=monnier@IRO.UMontreal.CA \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).