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: diff-find-file-name and /dev/null Date: Sat, 18 Aug 2007 00:53:23 +0200 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: sea.gmane.org 1187391211 3283 80.91.229.12 (17 Aug 2007 22:53:31 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 17 Aug 2007 22:53:31 +0000 (UTC) To: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Aug 18 00:53:28 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 1IMAh6-0006sf-2b for geb-bug-gnu-emacs@m.gmane.org; Sat, 18 Aug 2007 00:53:28 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IMAh5-0000FP-F2 for geb-bug-gnu-emacs@m.gmane.org; Fri, 17 Aug 2007 18:53:27 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IMAh3-0000EK-Hf for bug-gnu-emacs@gnu.org; Fri, 17 Aug 2007 18:53:25 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IMAh2-0000Ch-9M for bug-gnu-emacs@gnu.org; Fri, 17 Aug 2007 18:53:24 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IMAh2-0000CY-6x for bug-gnu-emacs@gnu.org; Fri, 17 Aug 2007 18:53:24 -0400 Original-Received: from fmmailgate03.web.de ([217.72.192.234]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IMAh1-00029j-PZ for bug-gnu-emacs@gnu.org; Fri, 17 Aug 2007 18:53:23 -0400 Original-Received: from smtp06.web.de (fmsmtp06.dlan.cinetic.de [172.20.5.172]) by fmmailgate03.web.de (Postfix) with ESMTP id B33A293C965E for ; Sat, 18 Aug 2007 00:53:22 +0200 (CEST) Original-Received: from [89.60.174.20] (helo=wednesday) by smtp06.web.de with asmtp (TLSv1:AES256-SHA:256) (WEB.DE 4.108 #197) id 1IMAh0-0001CW-00 for bug-gnu-emacs@gnu.org; Sat, 18 Aug 2007 00:53:22 +0200 User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (darwin) X-Sender: n_schumacher@web.de X-Provags-ID: V01U2FsdGVkX1+WB5mSrXAP1UQy6m2zOSJpR7yRkCD1bOTfokBE hE4onlMImhn+eb7IYF4mSQkE8Sn/009R9VRdH/68MTptxJ5wTx ylBsBtX0sUc3yG+xmRrA== 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:16384 Archived-At: --=-=-= 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 --=-=-=--