all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
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 18:25:31 +0200	[thread overview]
Message-ID: <83r4kk41vo.fsf@gnu.org> (raw)
In-Reply-To: <CAH8Pv0gqAywUBarkmTqz9PEOtDq6CQ5jeHwJoMHkK_C_SEJCQg@mail.gmail.com>

> Date: Wed, 13 Feb 2013 10:40:22 +0100
> From: Dani Moncayo <dmoncayo@gmail.com>
> 
> Recipe from "emacs -Q":
> 1. Download the two attached files `fa' and `fb'.
> 2. M-x diff RET fb RET fa RET
> 
> In the *Diff* buffer, I see annoying/inappropriate "^M" characters at
> the end of the compared lines. (see attached screenshot)

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, 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

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.





  reply	other threads:[~2013-02-13 16:25 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 [this message]
2013-02-13 18:59   ` Dani Moncayo
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=83r4kk41vo.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 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.