From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tino Calancha Newsgroups: gmane.emacs.bugs Subject: bug#21851: (no subject) Date: Wed, 27 Apr 2016 20:13:27 +0900 (JST) Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII X-Trace: ger.gmane.org 1461755483 20364 80.91.229.3 (27 Apr 2016 11:11:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 27 Apr 2016 11:11:23 +0000 (UTC) To: 21851@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Apr 27 13:11:17 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1avNNC-00045Z-Iy for geb-bug-gnu-emacs@m.gmane.org; Wed, 27 Apr 2016 13:11:14 +0200 Original-Received: from localhost ([::1]:42579 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1avNNC-0000Yd-2A for geb-bug-gnu-emacs@m.gmane.org; Wed, 27 Apr 2016 07:11:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41352) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1avNN5-0000TS-21 for bug-gnu-emacs@gnu.org; Wed, 27 Apr 2016 07:11:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1avNN0-0006tf-Qs for bug-gnu-emacs@gnu.org; Wed, 27 Apr 2016 07:11:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:37230) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1avNN0-0006ta-NR for bug-gnu-emacs@gnu.org; Wed, 27 Apr 2016 07:11:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1avNN0-0003pb-FB for bug-gnu-emacs@gnu.org; Wed, 27 Apr 2016 07:11:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Tino Calancha Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 27 Apr 2016 11:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21851 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch fixed Original-Received: via spool by 21851-submit@debbugs.gnu.org id=B21851.146175541414660 (code B ref 21851); Wed, 27 Apr 2016 11:11:02 +0000 Original-Received: (at 21851) by debbugs.gnu.org; 27 Apr 2016 11:10:14 +0000 Original-Received: from localhost ([127.0.0.1]:49567 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1avNME-0003oN-F2 for submit@debbugs.gnu.org; Wed, 27 Apr 2016 07:10:14 -0400 Original-Received: from calancha-ilc.kek.jp ([130.87.234.234]:36267) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1avNMC-0003o8-Vw for 21851@debbugs.gnu.org; Wed, 27 Apr 2016 07:10:13 -0400 Original-Received: by calancha-ilc.kek.jp (Postfix, from userid 500) id 39E0B72DC; Wed, 27 Apr 2016 20:13:27 +0900 (JST) Original-Received: from localhost (localhost [127.0.0.1]) by calancha-ilc.kek.jp (Postfix) with ESMTP id 2957952C2 for <21851@debbugs.gnu.org>; Wed, 27 Apr 2016 20:13:27 +0900 (JST) X-X-Sender: calancha@calancha-ilc.kek.jp User-Agent: Alpine 2.20 (LRH 67 2015-01-07) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:116907 Archived-At: Hi Lars, i think this thread should be considered a wish list; the doc. string doesn't say that PATCH-BUF could be a buffer name: "If optional PATCH-BUF is given, use the patch in that buffer and don't ask the user." So in principle there is nothing wrong if (epatch nil "buffer-name") signal an error. In fact, most of the folks would call this function interactively, so there would not be issue at all. *) If we prefer to keep the code as it is, maybe is worth to remark in the doc. string the type of PATCH-BUF, someting like: "If optional arg PATCH-BUF non-nil, then it is a buffer containing the patch; use that patch and don't ask the user." *) We may extend this function, so that, PATCH-BUF is a buffer or the name of a buffer, like in many others functions in emacs. Following patch do that: diff --git a/lisp/vc/ediff.el b/lisp/vc/ediff.el index 71099ab..f9f2370 100644 --- a/lisp/vc/ediff.el +++ b/lisp/vc/ediff.el @@ -1367,7 +1367,9 @@ ediff-patch-file (require 'ediff-ptch) (setq patch-buf (ediff-get-patch-buffer - (if arg (prefix-numeric-value arg)) patch-buf)) + (and arg (prefix-numeric-value arg)) + (and (or (stringp patch-buf) (bufferp patch-buf)) + (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)) "GNU Emacs 25.0.93.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.30) of 2016-04-27"