[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
diff-find-file-name and /dev/null
From: |
Nikolaj Schumacher |
Subject: |
diff-find-file-name and /dev/null |
Date: |
Sat, 18 Aug 2007 00:53:23 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (darwin) |
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
--- 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
- diff-find-file-name and /dev/null,
Nikolaj Schumacher <=