unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: kifer@cs.sunysb.edu, handa@m17n.org
Cc: 1183@emacsbugs.donarmstrong.com, bug-gnu-emacs@gnu.org,
	kifer@cs.stonybrook.edu
Subject: bug#1183: 23.0.60; ediff-buffers is broken
Date: Sat, 18 Oct 2008 11:07:34 +0200	[thread overview]
Message-ID: <uprlyl19l.fsf@gnu.org> (raw)
In-Reply-To: <20081017231731.28a0382f@kiferserv>

> Date: Fri, 17 Oct 2008 23:17:31 -0400
> From: Michael Kifer <kifer@cs.sunysb.edu>
> Cc: "'Eli Zaretskii'" <eliz@gnu.org>, <monnier@iro.umontreal.ca>,
>         <1183@emacsbugs.donarmstrong.com>, <bug-gnu-emacs@gnu.org>,
>         <kifer@cs.stonybrook.edu>
> 
> Ediff-buffers does almost the right thing (at least, was doing until things
> changed in emacs). It would save the buffers in temp files using the *same*
> encoding, so all that crap is pushed out of the way. Then it would run diff on
> the temp files.  Since the encodings are the same, diff would find what is
> different and then ediff will display that. (With all its complexity, ediff is
> just a front-end for diff.) So, for ediff-buffers, the question is which
> encoding to use.

The right encoding in Emacs 23 is utf-8-emacs-unix.  The problem with
that is that ediff-exec-process then uses raw-text to read the output
from Diff back into Emacs.  While raw-text is probably OK for reading
Diff output from comparing _files_, I'm afraid it will not be TRT for
reading output from comparing 2 temporary files encoded in
utf-8-emacs-unix.  If my fears are justified, I guess we will have to
modify ediff-exec-process so as to use utf-8-emacs-unix when
ediff-job-name has "buffers" in it.

> For ediff-files things seem to be worse: it runs diff on the original files, so
> if one has DOS line endings and the other does not then it all depends on what
> diff does.  This is why sometimes you run ediff files on 2 files that are
> nearly identical and get one big diff region equal to the entire file.
> This is a bit annoying, but not too bad, since hitting * should fix the
> problem: it would save the diff regions using the same encoding and will run
> diff over them.

Yes, but will hitting "*" help for Drew's use-case?  AFAIU, it will
"magically" show only the textual diffs, with no real explanation how
come the original display shows that every line is different, is that
right?

(Btw, "M-x ediff" actually does not pass the --binary switch to Diff,
so the original Ediff display is actually what Drew wanted, but let's
say we are doing the same on Unix, where changes in the EOL format are
reported by Diff as differences by default.)

> Back then Stefan suggested emacs-mule instead of no-conversion, but for some
> reason this was not done--don't remember why.

No special reason.

> He also said that things will change in emacs 23, but I did not
> follow that development.

See above.  I see that Stefan introduced emacs-internal into the Emacs
22 branch, but I don't see it on the trunk yet.  If and when it
arrives, we should use that one instead.







  parent reply	other threads:[~2008-10-18  9:07 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <ur66ck3d4.fsf@gnu.org>
2008-10-16 18:47 ` bug#1183: 23.0.60; ediff-buffers is broken Drew Adams
2008-10-16 20:25   ` Eli Zaretskii
2008-10-16 20:45     ` Drew Adams
2008-10-16 21:15       ` Eli Zaretskii
2008-10-16 21:58         ` Drew Adams
2008-10-17 12:38         ` Eli Zaretskii
2008-10-17 14:36           ` Drew Adams
2008-10-17 16:02           ` Stefan Monnier
2008-10-17 16:48             ` Drew Adams
2008-10-17 17:05               ` Michael Kifer
2008-10-17 17:17                 ` Drew Adams
2008-10-17 18:15                   ` Eli Zaretskii
2008-10-17 18:35                     ` Drew Adams
2008-10-18  3:17                       ` Michael Kifer
2008-10-18  3:43                         ` Drew Adams
2008-10-18  9:07                         ` Eli Zaretskii [this message]
2008-10-19  2:17                           ` Stefan Monnier
2008-10-19  7:17                             ` Eli Zaretskii
2008-10-19  7:23                             ` Eli Zaretskii
2008-10-19  8:32                             ` Eli Zaretskii
2008-10-19 15:07                               ` Drew Adams
2008-10-19 15:32                                 ` Eli Zaretskii
2008-10-17 18:19               ` Eli Zaretskii
2008-10-17 18:35                 ` Drew Adams
2008-10-17 18:34             ` Eli Zaretskii
2008-10-19  2:21               ` Stefan Monnier
2008-10-19 15:40   ` bug#1183: marked as done (23.0.60; ediff-buffers is broken) Emacs bug Tracking System

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=uprlyl19l.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=1183@emacsbugs.donarmstrong.com \
    --cc=bug-gnu-emacs@gnu.org \
    --cc=handa@m17n.org \
    --cc=kifer@cs.stonybrook.edu \
    --cc=kifer@cs.sunysb.edu \
    /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).