[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#18236: diff-apply-hunk interacts poorly with line endings
From: |
Marcin Borkowski |
Subject: |
bug#18236: diff-apply-hunk interacts poorly with line endings |
Date: |
Wed, 17 Feb 2016 16:35:04 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) |
On 2014-08-10, at 17:34, Reuben Thomas <rrt@sc3d.org> wrote:
> I'm using Emacs 24.3. Consider the following two files:
>
> foo:
> ----cut here----
> This is a small test file.
> It has DOS line endings.
> ----cut here----
>
> bar:
> ----cut here----
> This is a small test file.
> It too has DOS line endings.
> ----cut here----
>
> Save them with DOS line endings, and
>
> diff foo bar > foo.patch
> cp foo bar
>
> Visit foo.patch. When I do that, each line ends in ^M.
>
> Now, in the patch buffer, M-x diff-apply-hunk. Note that the ^Ms have been
> added to the lines. Writing the buffer and examination with "hd" reveals that
> each line now ends
> \r\r\n.
>
> It seems what's happened here is that diff-mode doesn't try to diagnose the
> character encoding of the patch file.
Hi all,
confirmed on GNU Emacs 25.1.50.2 (commit 4ccd268).
Best,
--
Marcin Borkowski
- bug#18236: diff-apply-hunk interacts poorly with line endings,
Marcin Borkowski <=
- bug#18236: diff-apply-hunk interacts poorly with line endings, Eli Zaretskii, 2016/02/17
- bug#18236: diff-apply-hunk interacts poorly with line endings, Reuben Thomas, 2016/02/17
- bug#18236: diff-apply-hunk interacts poorly with line endings, Eli Zaretskii, 2016/02/17
- bug#18236: diff-apply-hunk interacts poorly with line endings, Eli Zaretskii, 2016/02/20
- bug#18236: diff-apply-hunk interacts poorly with line endings, Reuben Thomas, 2016/02/20
- bug#18236: diff-apply-hunk interacts poorly with line endings, Eli Zaretskii, 2016/02/20
- bug#18236: diff-apply-hunk interacts poorly with line endings, Marcin Borkowski, 2016/02/21
- bug#18236: diff-apply-hunk interacts poorly with line endings, Eli Zaretskii, 2016/02/21