From: Dani Moncayo <dmoncayo@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 13705-done@debbugs.gnu.org
Subject: bug#13705: 24.2.93; "^M" characters in diff buffers
Date: Wed, 13 Feb 2013 19:59:23 +0100 [thread overview]
Message-ID: <CAH8Pv0gBTVOxySDC4nuXVn=+cpX31GRXEh0jhoDa+T=muYRV=Q@mail.gmail.com> (raw)
In-Reply-To: <83r4kk41vo.fsf@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 1976 bytes --]
> It's most probably your Diff, not Emacs. I cannot reproduce the
> problem with the version of Diff I have here (which is a GnuWin32
> port). My crystal says that yours is from MSYS or maybe Cygwin
Yes, my diff (at that moment) was from MSYS.
>, and
> writes its output with Unix-style LF-only EOL format. That presents
> to Emacs text that has inconsistent EOLs (because the files you diff
> have DOS CR-LF EOLs), so Emacs punts and doesn't decode the EOL
> format.
>
> To see if my crystal ball is as clear as it gets, try this:
>
> (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).
> If they don't have the ^M character at their end, your problem is as I
> described.
>
> With my Diff, the above snippet gives me _all_ the lines with ^M,
> which is consistent.
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).
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).
But anyway, if there is a problem here, it is not in Emacs, and
therefore, I'm closing this bug report.
As always, thanks for your time Eli.
---- Footnotes ----
[1]
In GNU Emacs 24.3.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.13)
of 2013-02-11 on LeG570-ubuntu
Bzr revision: 111735 eliz@gnu.org-20130211173232-odvn6s0c9gs3jclc
Windowing system distributor `The X.Org Foundation', version 11.0.11300000
System Description: Ubuntu 12.10
--
Dani Moncayo
[-- Attachment #2: Screenshot-MS-Windows.png --]
[-- Type: image/png, Size: 2707 bytes --]
[-- Attachment #3: Screenshot-Ubuntu.png --]
[-- Type: image/png, Size: 16964 bytes --]
next prev parent reply other threads:[~2013-02-13 18:59 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 [this message]
2013-02-13 21:44 ` 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAH8Pv0gBTVOxySDC4nuXVn=+cpX31GRXEh0jhoDa+T=muYRV=Q@mail.gmail.com' \
--to=dmoncayo@gmail.com \
--cc=13705-done@debbugs.gnu.org \
--cc=eliz@gnu.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.