all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Kifer <kifer@cs.sunysb.edu>
To: Juri Linkov <juri@jurta.org>
Cc: emacs-devel@gnu.org
Subject: Re: Ediff-patch-file with wrong default buffer
Date: Mon, 14 Dec 2009 01:15:40 -0500	[thread overview]
Message-ID: <20091214011540.583ab64a@kiferserv> (raw)
In-Reply-To: <87ocm2m6v3.fsf@mail.jurta.org>

Sounds good. Are you going to install it while you are at it?

On Mon, 14 Dec 2009 07:47:36 +0200
Juri Linkov <juri@jurta.org> 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
> 




  reply	other threads:[~2009-12-14  6:15 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-05 23:48 Fix info display of images David Kastrup
2009-12-07 17:55 ` Juri Linkov
2009-12-07 20:28   ` David Kastrup
2009-12-13 11:09     ` David Kastrup
2009-12-13 18:31       ` Juri Linkov
2009-12-14  4:16         ` Chong Yidong
2009-12-14  5:14           ` Ediff-patch-file with wrong default buffer (was: Fix info display of images) Juri Linkov
2009-12-14  5:43             ` Michael Kifer
2009-12-14  5:47               ` Ediff-patch-file with wrong default buffer Juri Linkov
2009-12-14  6:15                 ` Michael Kifer [this message]
2009-12-14  6:54                   ` Juri Linkov
2010-02-02  0:31                     ` Juri Linkov
2010-02-02  2:34                       ` Stefan Monnier
2010-02-02 22:38                         ` Juri Linkov
2010-02-02  0:33                     ` Juri Linkov
2009-12-14  9:35                 ` Andreas Schwab

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=20091214011540.583ab64a@kiferserv \
    --to=kifer@cs.sunysb.edu \
    --cc=emacs-devel@gnu.org \
    --cc=juri@jurta.org \
    /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.