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

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

Re: diff-find-file-name and /dev/null


From: Nikolaj Schumacher
Subject: Re: diff-find-file-name and /dev/null
Date: Sun, 19 Aug 2007 23:06:53 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (darwin)

michael@cadilhac.name (Michaël Cadilhac) wrote:

> Nikolaj Schumacher <n_schumacher@web.de> writes:
>
>> --- /dev/null
>> +++ b/foo/bar.c
>>
>> I noticed that `diff-goto-source' opens /dev/null, which is usually not
>> desirable.  I use the attached small change to get the actual file.
>
> Just for my information, why do you think it's not a good thing?

Since there's nothing to view or edit in /dev/null.

Also in a usual diff file

--- /dev/null   2007-08-17 06:03:27.000000000 +0200
+++ /foo/bar.c  2007-08-18 00:48:25.000000000 +0200

`diff-goto-source' would visit /foo/bar.c

git's peculiar a/ b/ prefixes are the problem here.  Usually it works,
because `diff-find-file-name' chops those off, if the file doesn't
exist.  It will try b/foo/bar.c first.  But then /dev/null, before
foo/bar.c.

I admit the actual fault could be the fact that it looks for first one
at all (or at least _before_ chopping off prefixes of the second one),
even when diff-jump-to-old-file is nil.  /dev/null is just the only
cause of such behavior.


regards,
Nikolaj Schumacher




reply via email to

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