From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: [n_schumacher@web.de: diff-find-file-name and /dev/null] Date: Sat, 18 Aug 2007 20:44:48 -0400 Message-ID: Reply-To: rms@gnu.org NNTP-Posting-Host: lo.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1187484062 18608 80.91.229.12 (19 Aug 2007 00:41:02 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 19 Aug 2007 00:41:02 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Aug 19 02:41:01 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IMYqh-0000h5-UT for ged-emacs-devel@m.gmane.org; Sun, 19 Aug 2007 02:41:00 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IMYqk-0001JK-4U for ged-emacs-devel@m.gmane.org; Sat, 18 Aug 2007 20:41:02 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IMYqg-0001HU-J0 for emacs-devel@gnu.org; Sat, 18 Aug 2007 20:40:58 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IMYqf-0001Ga-TP for emacs-devel@gnu.org; Sat, 18 Aug 2007 20:40:58 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IMYqf-0001GU-O7 for emacs-devel@gnu.org; Sat, 18 Aug 2007 20:40:57 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IMYqd-0007w3-4W for emacs-devel@gnu.org; Sat, 18 Aug 2007 20:40:55 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.60) (envelope-from ) id 1IMYuO-00058l-B6; Sat, 18 Aug 2007 20:44:48 -0400 X-Detected-Kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:76728 Archived-At: Would someone please install this if it's correct, and then ack? ------- Start of forwarded message ------- X-Spam-Status: No, score=0.0 required=5.0 tests=UNPARSEABLE_RELAY autolearn=failed version=3.1.0 To: bug-gnu-emacs@gnu.org From: Nikolaj Schumacher Date: Sat, 18 Aug 2007 00:53:23 +0200 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Subject: diff-find-file-name and /dev/null - --=-=-= Hello, using diff files (from git) that create new files like this: - --- /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. regards, Nikolaj Schumacher - --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=emacs-diff-find-file-name.patch Content-Description: patch - --- lisp/diff-mode.el 2007-08-17 06:03:27.000000000 +0200 +++ lisp/diff-mode.el 2007-08-18 00:48:25.000000000 +0200 @@ -667,6 +667,7 @@ (or (ignore-errors (diff-beginning-of-file)) (re-search-forward diff-file-header-re nil t))) (let ((fs (diff-hunk-file-names old))) + (setq fs (delete "/dev/null" fs)) (if prefix (setq fs (mapcar (lambda (f) (concat prefix f)) fs))) (or ;; use any previously used preference - --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ bug-gnu-emacs mailing list bug-gnu-emacs@gnu.org http://lists.gnu.org/mailman/listinfo/bug-gnu-emacs - --=-=-=-- ------- End of forwarded message -------