GNU bug report logs - #21851
ediff-patch-file fails if patch-buf is a buffer nameif patch-buf is a buffer name

Previous Next

Package: emacs;

Reported by: Tino Calancha <f92capac <at> gmail.com>

Date: Sat, 7 Nov 2015 15:10:03 UTC

Severity: minor

Tags: fixed, patch

Fixed in version 26.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Tino Calancha <f92capac <at> gmail.com>
Cc: 21851 <at> debbugs.gnu.org, kifer <at> cs.stonybrook.edu
Subject: bug#21851: ediff-patch-file fails if patch-buf is a buffer nameif patch-buf is a buffer name
Date: Tue, 23 Feb 2016 16:07:32 +1100
Tino Calancha <f92capac <at> gmail.com> writes:

> (epatch nil (get-buffer "patch")) ; ok
> (epatch nil "patch") ; BAD
> epatch: Wrong type argument: bufferp, "patch"

[...]

> -	   (if arg (prefix-numeric-value arg)) patch-buf))
> +	   (if arg (prefix-numeric-value arg)) (and (stringp patch-buf)
> +                                                    (get-buffer patch-buf))))

I don't think that's quite right -- now it'll error out if patch-buf is
a real buffer.

So I've applied the following instead:

diff --git a/lisp/vc/ediff.el b/lisp/vc/ediff.el
index e5e16a1..be4ced9 100644
--- a/lisp/vc/ediff.el
+++ b/lisp/vc/ediff.el
@@ -1367,7 +1367,8 @@ ediff-patch-file
     (require 'ediff-ptch)
     (setq patch-buf
 	  (ediff-get-patch-buffer
-	   (if arg (prefix-numeric-value arg)) patch-buf))
+	   (if arg (prefix-numeric-value arg))
+           (get-buffer patch-buf)))
     (setq source-dir (cond (ediff-use-last-dir ediff-last-dir-patch)
 			   ((and (not ediff-patch-default-directory)
 				 (buffer-file-name patch-buf))


-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 8 years and 224 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.