[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Ediff-patch-file with wrong default buffer
From: |
Michael Kifer |
Subject: |
Re: Ediff-patch-file with wrong default buffer |
Date: |
Mon, 14 Dec 2009 01:15:40 -0500 |
Sounds good. Are you going to install it while you are at it?
On Mon, 14 Dec 2009 07:47:36 +0200
Juri Linkov <address@hidden> 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
>
- Fix info display of images, David Kastrup, 2009/12/05
- Re: Fix info display of images, Juri Linkov, 2009/12/07
- Re: Fix info display of images, David Kastrup, 2009/12/07
- Re: Fix info display of images, David Kastrup, 2009/12/13
- Re: Fix info display of images, Juri Linkov, 2009/12/13
- Re: Fix info display of images, Chong Yidong, 2009/12/13
- Ediff-patch-file with wrong default buffer (was: Fix info display of images), Juri Linkov, 2009/12/14
- Re: Ediff-patch-file with wrong default buffer (was: Fix info display of images), Michael Kifer, 2009/12/14
- Re: Ediff-patch-file with wrong default buffer, Juri Linkov, 2009/12/14
- Re: Ediff-patch-file with wrong default buffer,
Michael Kifer <=
- Re: Ediff-patch-file with wrong default buffer, Juri Linkov, 2009/12/14
- Re: Ediff-patch-file with wrong default buffer, Andreas Schwab, 2009/12/14