From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Richard Copley Newsgroups: gmane.emacs.bugs 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 Message-ID: References: <83y3lid8eg.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1514754744 4226 195.159.176.226 (31 Dec 2017 21:12:24 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 31 Dec 2017 21:12:24 +0000 (UTC) Cc: Stefan Monnier , 29916@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Dec 31 22:12:20 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eVku1-0000aD-QA for geb-bug-gnu-emacs@m.gmane.org; Sun, 31 Dec 2017 22:12:18 +0100 Original-Received: from localhost ([::1]:52390 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eVkvz-0004kA-3k for geb-bug-gnu-emacs@m.gmane.org; Sun, 31 Dec 2017 16:14:19 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58390) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eVkvo-0004jV-Os for bug-gnu-emacs@gnu.org; Sun, 31 Dec 2017 16:14:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eVkvj-0007WA-Mu for bug-gnu-emacs@gnu.org; Sun, 31 Dec 2017 16:14:08 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:50391) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eVkvj-0007W2-Iw for bug-gnu-emacs@gnu.org; Sun, 31 Dec 2017 16:14:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eVkvi-0003hi-6e for bug-gnu-emacs@gnu.org; Sun, 31 Dec 2017 16:14:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Richard Copley Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 31 Dec 2017 21:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 29916 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 29916-submit@debbugs.gnu.org id=B29916.151475483814222 (code B ref 29916); Sun, 31 Dec 2017 21:14:02 +0000 Original-Received: (at 29916) by debbugs.gnu.org; 31 Dec 2017 21:13:58 +0000 Original-Received: from localhost ([127.0.0.1]:59072 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eVkve-0003hK-Em for submit@debbugs.gnu.org; Sun, 31 Dec 2017 16:13:58 -0500 Original-Received: from mail-ot0-f180.google.com ([74.125.82.180]:33386) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eVkvd-0003gv-J6 for 29916@debbugs.gnu.org; Sun, 31 Dec 2017 16:13:57 -0500 Original-Received: by mail-ot0-f180.google.com with SMTP id x15so912263ote.0 for <29916@debbugs.gnu.org>; Sun, 31 Dec 2017 13:13:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=T2nMsRQHBskBKX88KehzQjYrfSILgRA7Ui5lmrGo2qs=; b=Jkr9jkNCc4kpH4ADKT7DwH+3OP8g9vNLYqp3FhW8bRhcmb/bkq2O5UdOuM7agJ9h+M w+OYGJ+OqyqozCv4Dih5HPAgiAIxJCmSWO6s1HyExdFaOlKw8pDuQ0LwLlEyFNcfWWgQ lPyRqSfykv6yfZ/zgHrFELXfx3oq/YbM1V4rMa588Po0XVlBeobWT/Oo/m0SkQnHwQwa LlQyTTydXYNz/v/tuFeSNbsHwIuVC0/ueRoEj/7ibOD3dc4pjHnBegUGqC0BTqG/bTg1 XBOyAR1yfJURM3S+EZiShraLvP5nt2Dj2hucAoxSX1IFEzdfRCMuGBKg5Ao43jIPufqS zqDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=T2nMsRQHBskBKX88KehzQjYrfSILgRA7Ui5lmrGo2qs=; b=ihZeM0c9ydv98Rw0TYIHXeyWo1MaaPv63Px+gyrV9eFX8hivc/hyvSknx6ADzCuLv8 zBV8mjVHXuUacogAiNFXEdqkan3epu61jpjf6qmNiDHw1gfu2UDN1IHRwtfmFyKyJ0ho ZZ+v+cTY9NzRb6KAAifknBgS2sX/zFXCkkomb53PuBSFk4U4pgfxLoHfYIUkdH7LO9sW 1OYK4w9flSeQrPmSv8kb2Ate/0oaplk31tW/DvNLlFfdNk8bGCaX9o96krdLGcwjgzjK Wxt3jctiYGMRgvfIcGcwEISc/jW4GoIS7nPXAN/LAygLr5imWJF/mv3v1Sz6GvPtFanL gaGw== X-Gm-Message-State: AKGB3mKwnxyqZvhaGBHUDXnfM2wkmGQAQ51ZkxBECNZLcith/v173StD r3M1avAxLx9Lfy9gItTsOOEAenCXu9holDnjHD4= X-Google-Smtp-Source: ACJfBotiDD3IM2JYNWw+P1PX/OOBZdZAy4YcTi4fmYTAAmP8e1brCFidxWZ4rM6k/HGKiOktjZIuujZyfdzj1LhBfWo= X-Received: by 10.157.81.13 with SMTP id c13mr38088722oth.88.1514754831890; Sun, 31 Dec 2017 13:13:51 -0800 (PST) Original-Received: by 10.157.6.136 with HTTP; Sun, 31 Dec 2017 13:13:21 -0800 (PST) In-Reply-To: <83y3lid8eg.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:141662 Archived-At: On 31 December 2017 at 19:06, Eli Zaretskii wrote: >> From: Richard Copley >> 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, , RET, C-c C-c, M-o, ESC , M-RET, . >> 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=E2=80=99 is an alias fo= r =E2=80=98utf-8-emacs=E2=80=99."