From: Richard Copley <rcopley@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Stefan Monnier <monnier@iro.umontreal.ca>, 29916@debbugs.gnu.org
Subject: bug#29916: 26.0.90; CRLF in diff-command output breaks smerge hunk header parsing
Date: Sun, 31 Dec 2017 21:13:21 +0000 [thread overview]
Message-ID: <CAPM58oj+EG=JBEvY_=WUESv8VeCO1-59SQDZsaJ9oThKWKS3mQ@mail.gmail.com> (raw)
In-Reply-To: <83y3lid8eg.fsf@gnu.org>
On 31 December 2017 at 19:06, Eli Zaretskii <eliz@gnu.org> wrote:
>> 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?
No, with that recipe it is bound to o, <mouse-2>, RET, C-c C-c, M-o,
ESC <mouse-2>, M-RET, <menu-bar> <Diff> <Jump to Source>.
>> 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?
No.
> If not, where did you get the ported Diff command?
It's the (ubiquitous) gnuwin32 port of diff 2.8.7.
>> 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?
Do you mean utf-8, with the end of line conversion left unspecified?
According to the manual (33.10.1), "'emacs-internal’ is an alias for
‘utf-8-emacs’."
next prev parent reply other threads:[~2017-12-31 21:13 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-31 18:33 bug#29916: 26.0.90; CRLF in diff-command output breaks smerge hunk header parsing Richard Copley
2017-12-31 19:06 ` Eli Zaretskii
2017-12-31 21:13 ` Richard Copley [this message]
2018-01-01 4:37 ` Eli Zaretskii
2018-01-01 11:02 ` Richard Copley
2018-01-01 11:51 ` Richard Copley
2018-01-01 16:39 ` Eli Zaretskii
2018-01-01 16:37 ` Eli Zaretskii
2018-01-01 23:23 ` Stefan Monnier
2018-01-02 21:41 ` Richard Copley
2018-01-03 15:18 ` Eli Zaretskii
2018-01-05 9:23 ` Eli Zaretskii
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAPM58oj+EG=JBEvY_=WUESv8VeCO1-59SQDZsaJ9oThKWKS3mQ@mail.gmail.com' \
--to=rcopley@gmail.com \
--cc=29916@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=monnier@iro.umontreal.ca \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).