From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Kifer Newsgroups: gmane.emacs.devel Subject: Re: Ediff-patch-file with wrong default buffer Date: Mon, 14 Dec 2009 01:15:40 -0500 Organization: Stony Brook University Message-ID: <20091214011540.583ab64a@kiferserv> References: <874oo5nfsl.fsf@lola.goethe.zz> <87ljhey8gx.fsf@mail.jurta.org> <874oo2jzq2.fsf@lola.goethe.zz> <87aaxnjfkg.fsf@lola.goethe.zz> <87pr6iskww.fsf@mail.jurta.org> <87eimytcl1.fsf@stupidchicken.com> <87ocm2p1vf.fsf_-_@mail.jurta.org> <20091214004325.61e9afe3@kiferserv> <87ocm2m6v3.fsf@mail.jurta.org> Reply-To: kifer@cs.sunysb.edu NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1260771366 30692 80.91.229.12 (14 Dec 2009 06:16:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 14 Dec 2009 06:16:06 +0000 (UTC) Cc: emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 14 07:15:59 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NK4Du-0006Xu-Mh for ged-emacs-devel@m.gmane.org; Mon, 14 Dec 2009 07:15:58 +0100 Original-Received: from localhost ([127.0.0.1]:58601 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NK4Du-0003iu-2y for ged-emacs-devel@m.gmane.org; Mon, 14 Dec 2009 01:15:58 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NK4Dj-0003gI-IA for emacs-devel@gnu.org; Mon, 14 Dec 2009 01:15:47 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NK4De-0003eV-W9 for emacs-devel@gnu.org; Mon, 14 Dec 2009 01:15:46 -0500 Original-Received: from [199.232.76.173] (port=40452 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NK4De-0003eS-Ov for emacs-devel@gnu.org; Mon, 14 Dec 2009 01:15:42 -0500 Original-Received: from sbcs.cs.sunysb.edu ([130.245.1.15]:59772) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NK4De-00034I-Lk for emacs-devel@gnu.org; Mon, 14 Dec 2009 01:15:42 -0500 Original-Received: from kiferserv (compserv2 [130.245.1.58]) by sbcs.cs.sunysb.edu (8.13.6/8.12.11) with ESMTP id nBE6FcUE005594; Mon, 14 Dec 2009 01:15:38 -0500 (EST) In-Reply-To: <87ocm2m6v3.fsf@mail.jurta.org> X-Mailer: Claws Mail 3.7.1 (GTK+ 2.16.1; i486-pc-linux-gnu) X-detected-operating-system: by monty-python.gnu.org: Solaris 10 (1203?) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:118608 Archived-At: Sounds good. Are you going to install it while you are at it? On Mon, 14 Dec 2009 07:47:36 +0200 Juri Linkov wrote: > > So, either the patch that you are referring to broke the above behavior or > > the current buffer does not match ediff-context-diff-label-regexp. > > The problem is that the current buffer with a non-CVS patch does not > match ediff-context-diff-label-regexp. The GNU unified format diff 2-liner > requires whitespace (and a date) after the file name: > > (defcustom ediff-context-diff-label-regexp > (concat "\\(" ; context diff 2-liner > "^\\*\\*\\* +\\([^ \t]+\\)[^*]+[\t ]*\n--- +\\([^ \t]+\\)" > "\\|" ; GNU unified format diff 2-liner > "^--- +\\([^ \t]+\\)[\t ]+.*\n\\+\\+\\+ +\\([^ \t]+\\)" > Problematic part underlined ====== > > but Git produces patches in the format without whitespace and a date after > the name of the first file (on the line that begins with ---), e.g. > > --- a/lisp/info.el > +++ b/lisp/info.el > > The following patch fixes this problem: > > Index: lisp/ediff-ptch.el > =================================================================== > RCS file: /sources/emacs/emacs/lisp/ediff-ptch.el,v > retrieving revision 1.47 > diff -u -r1.47 ediff-ptch.el > --- lisp/ediff-ptch.el 31 Jan 2009 22:10:29 -0000 1.47 > +++ lisp/ediff-ptch.el 14 Dec 2009 05:47:01 -0000 > @@ -127,7 +127,7 @@ > (concat "\\(" ; context diff 2-liner > "^\\*\\*\\* +\\([^ \t]+\\)[^*]+[\t ]*\n--- +\\([^ \t]+\\)" > "\\|" ; GNU unified format diff 2-liner > - "^--- +\\([^ \t]+\\)[\t ]+.*\n\\+\\+\\+ +\\([^ \t]+\\)" > + "^--- +\\([^ \t]+\\)[\t ]*.*\n\\+\\+\\+ +\\([^ \t]+\\)" > "\\)") > "Regexp matching filename 2-liners at the start of each context diff. > You probably don't want to change that, unless you are using an obscure patch >