From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nikolaj Schumacher Newsgroups: gmane.emacs.bugs Subject: Re: diff-find-file-name and /dev/null Date: Sun, 19 Aug 2007 23:06:53 +0200 Message-ID: References: <878x89ag8z.fsf@lrde.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1187557684 28972 80.91.229.12 (19 Aug 2007 21:08:04 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 19 Aug 2007 21:08:04 +0000 (UTC) To: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Aug 19 23:08:02 2007 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IMs09-0000yg-M7 for geb-bug-gnu-emacs@m.gmane.org; Sun, 19 Aug 2007 23:08:01 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IMs09-0002I2-Mi for geb-bug-gnu-emacs@m.gmane.org; Sun, 19 Aug 2007 17:08:01 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IMs07-0002ES-Qj for bug-gnu-emacs@gnu.org; Sun, 19 Aug 2007 17:07:59 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IMs07-0002DJ-2x for bug-gnu-emacs@gnu.org; Sun, 19 Aug 2007 17:07:59 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IMs06-0002D3-Uj for bug-gnu-emacs@gnu.org; Sun, 19 Aug 2007 17:07:58 -0400 Original-Received: from fmmailgate02.web.de ([217.72.192.227]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IMs06-0004oR-7y for bug-gnu-emacs@gnu.org; Sun, 19 Aug 2007 17:07:58 -0400 Original-Received: from smtp07.web.de (fmsmtp07.dlan.cinetic.de [172.20.5.215]) by fmmailgate02.web.de (Postfix) with ESMTP id 341FF951F6F2 for ; Sun, 19 Aug 2007 23:06:52 +0200 (CEST) Original-Received: from [84.175.170.166] (helo=wednesday) by smtp07.web.de with asmtp (TLSv1:AES256-SHA:256) (WEB.DE 4.108 #197) id 1IMrz2-000402-00 for bug-gnu-emacs@gnu.org; Sun, 19 Aug 2007 23:06:52 +0200 In-Reply-To: <878x89ag8z.fsf@lrde.org> (=?utf-8?Q?=22Micha=C3=ABl?= Cadilhac"'s message of "Sat\, 18 Aug 2007 01\:33\:16 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (darwin) X-Sender: n_schumacher@web.de X-Provags-ID: V01U2FsdGVkX1+6KByTfCJewkmuxQ4KWeAFK3QZcKFVK4VNngwh NWt7KpGbcETxqw75EWD/xB4TePbOdsoopeQb8gbCu6idZpoCio qRadhghmXLx+5BRAvW9g== X-Detected-Kernel: Linux 2.4-2.6 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:16394 Archived-At: michael@cadilhac.name (Micha=C3=ABl Cadilhac) wrote: > Nikolaj Schumacher 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