all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Tino Calancha <f92capac@gmail.com>
Cc: 21851@debbugs.gnu.org, kifer@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	[thread overview]
Message-ID: <87povo10bv.fsf@gnus.org> (raw)
In-Reply-To: <alpine.LRH.2.20.1511080005290.11525@calancha-ilc.kek.jp> (Tino Calancha's message of "Sun, 8 Nov 2015 00:12:03 +0900 (JST)")

Tino Calancha <f92capac@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





  reply	other threads:[~2016-02-23  5:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-07 15:12 bug#21851: ediff-patch-file fails if patch-buf is a buffer nameif patch-buf is a buffer name Tino Calancha
2016-02-23  5:07 ` Lars Ingebrigtsen [this message]
2016-03-10  5:08   ` Tino Calancha
2016-04-27 11:13 ` bug#21851: (no subject) Tino Calancha

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87povo10bv.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=21851@debbugs.gnu.org \
    --cc=f92capac@gmail.com \
    --cc=kifer@cs.stonybrook.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.