From: Eli Zaretskii <eliz@gnu.org>
To: Dani Moncayo <dmoncayo@gmail.com>
Cc: 13705@debbugs.gnu.org
Subject: bug#13705: 24.2.93; "^M" characters in diff buffers
Date: Wed, 13 Feb 2013 23:44:21 +0200 [thread overview]
Message-ID: <83ehgj51oq.fsf@gnu.org> (raw)
In-Reply-To: <CAH8Pv0gBTVOxySDC4nuXVn=+cpX31GRXEh0jhoDa+T=muYRV=Q@mail.gmail.com>
> Date: Wed, 13 Feb 2013 19:59:23 +0100
> From: Dani Moncayo <dmoncayo@gmail.com>
> Cc: 13705-done@debbugs.gnu.org
>
> > (let ((coding-system-for-read 'no-conversion))
> > (call-process shell-file-name nil t nil
> > shell-command-switch "diff -c fa fb"))
> >
> > and look at the lines generated by Diff, like these:
> >
> > *** fa 2013-02-12 18:41:03.201375000 +0200
> > --- fb 2013-02-08 16:25:03.161000000 +0200
>
> The above expression produces the output shown in
> "Screenshot-MS-Windows.png" (attached).
As expected.
> Yes, the problem seems to be the one you've spotted, but note that
> I've just reproduced the exact same problem on Ubuntu [1]. See the
> screenshot "Screenshot-Ubuntu.png" (attached).
On Ubuntu, it is expected to see the ^M characters, because that's
what you'd see if you invoke Diff from the shell prompt as well.
IOW, on Windows, two files which have DOS EOLs should not show ^M in
the Diff output, because DOS EOLs are native on Windows, and ^M at the
end of the line is not considered part of the text there. On Unix,
files with DOS EOLs are expected to be seen with the ^M explicit,
because it _is_ part of the text.
> Therefore, the problem seems to be more general: it affects to every
> diff made from two files with DOS-type EOLs, unless the "diff" program
> is adapted to deal with this scenario (like the one from GnuWin32).
It _is_ general, but it is not a problem. When Emacs sees
inconsistent EOL format it _always_ refrains from decoding the EOLs.
prev parent reply other threads:[~2013-02-13 21:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-13 9:40 bug#13705: 24.2.93; "^M" characters in diff buffers Dani Moncayo
2013-02-13 16:25 ` Eli Zaretskii
2013-02-13 18:59 ` Dani Moncayo
2013-02-13 21:44 ` Eli Zaretskii [this message]
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=83ehgj51oq.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=13705@debbugs.gnu.org \
--cc=dmoncayo@gmail.com \
/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).