bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#29916: 26.0.90; CRLF in diff-command output breaks smerge hunk heade


From: Eli Zaretskii
Subject: bug#29916: 26.0.90; CRLF in diff-command output breaks smerge hunk header parsing
Date: Sun, 31 Dec 2017 21:06:31 +0200

> From: Richard Copley <rcopley@gmail.com>
> Date: Sun, 31 Dec 2017 18:33:56 +0000
> 
> On Windows, CRLF line endings in the output of diff-command can lead to
> an error in `smerge-refine-regions'. To reproduce, download this patch:
> 
> https://lists.gnu.org/archive/html/emacs-devel/2017-06/txtWF9rI8yqfI.txt
> 
> (It is an example of a perfectly ordinary patch, with Unix line endings.)
> 
> >From 'emacs -Q', visit the patch file, do "M-x diff-mode RET", then
> move point into the second diff hunk (in editfns.c) and type RET
> (diff-goto-source).

You mean M-RET, not RET, right?

> The minibuffer shows this error, with a literal carriage return, shown
> here as ^M:
> 
>   Error running timer: (error "Unexpected patch hunk header: 41a42,121^M")

I cannot reproduce this.  I get "Hunk not yet applied at offset 205
lines" and no error message.  Are your Emacs source files checked out
with CRLF EOL format or something?  If not, where did you get the
ported Diff command?

> As a data point, the error doesn't happen after applying the attached
> patch which partially reverts this commit:

I suggest to use utf-8-emacs instead of emacs-mule (you _really_ don't
want the latter).  I do agree that forcing -unix EOL when decoding the
output of Diff is probably wrong.  Stefan?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]