如何使用带空格的emacs diff?

Ara*_*ion 10 emacs emacs24

给定使用git format-patch(统一补丁格式)创建的diff文件,如何在emacs中加载相同的文件,以便我可以使用Cc Cc转到文件中的相应位置,即使文件或目录名称也是如此在窗户上包含一个空间.

我的项目包含许多包含空格的文件和目录名称.

sds*_*sds 3

这确实是 Emacs 中的一个错误。这是一个似乎可以为我修复它的补丁:

=== modified file 'lisp/vc/diff-mode.el'
--- lisp/vc/diff-mode.el    2013-01-02 16:13:04 +0000
+++ lisp/vc/diff-mode.el    2013-02-26 05:08:48 +0000
@@ -821,9 +821,11 @@ If the OLD prefix arg is passed, tell th
               (progn (diff-hunk-prev) (point))
             (error (point-min)))))
      (header-files
-      (if (looking-at "[-*][-*][-*] \\(\\S-+\\)\\(\\s-.*\\)?\n[-+][-+][-+] \\(\\S-+\\)")
-          (list (if old (match-string 1) (match-string 3))
-            (if old (match-string 3) (match-string 1)))
+           ;; handle filenames with spaces;
+           ;; cf. diff-font-lock-keywords / diff-file-header-face
+      (if (looking-at "[-*][-*][-*] \\([^\t]+\\)\t.*\n[-+][-+][-+] \\([^\t]+\\)")
+          (list (if old (match-string 1) (match-string 2))
+            (if old (match-string 2) (match-string 1)))
         (forward-line 1) nil)))
       (delq nil
        (append
Run Code Online (Sandbox Code Playgroud)

如果没有异议,我会将其提交到 Emacs bzr 源代码树。