unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: tury.peter@gmail.com
Subject: Re: ediff customization: -w -B... + refinement
Date: 4 Oct 2006 15:14:36 -0700	[thread overview]
Message-ID: <1160000076.182235.158640@h48g2000cwc.googlegroups.com> (raw)
In-Reply-To: <mailman.7727.1159977183.9609.help-gnu-emacs@gnu.org>

Hi,

thanks for your hints!

Kevin Rodgers wrote:
> Peter Tury wrote:
> > I see different results in Emacs ediff and out-of-emacs command line
> > diff.
> >
> > I try to get rid of white space and new line diffs, so I tried diff -a
> > -w -B --binary ... It produces the desired output in command line, but
> > whitespace- and newline-differences are showed (and treated) in
> > Emacs. Why? I set ediff-diff-options to "-a -w -B --binary", but it
> > seems to be ignored? Why? How to get rid of such whitespace diffs? I
> > tried ##, but nothing changed.
> >
> To see what diff program is used:
>
> M-: (executable-find ediff-diff-program)

Thanks, now I checked it: it's OK.

> I don't think you can find out after the fact what command was run,
> but you could see which options are used dynamically by examining the
> 4th argument passed to ediff-exec-process:
>
> M-x debug-on-entry RET ediff-exec-process

I checked this also now, thanks for the hint, but found nothing
interesting.

> Looking at its source code in ediff-diff.el, I find:
>
>      ;; the --binary option, if present, should be used only for buffer jobs
>      ;; or for refining the differences
>      (or (string-match "buffer" (symbol-name ediff-job-name))
> 	(eq buffer ediff-fine-diff-buffer)
> 	(setq args (delete "--binary" args)))
>
> So maybe you need to use M-x ediff-buffers instead of M-x ediff-files
> to use the --binary option.

Now I find that opening two files and ediff-buffers and ediff-files
them, shows different results!? Maybe because of this --binary stuff?
For first sight ediff-buffers seems to be OK. Maybe some file encoding
makes the difference?

>
> > My other question: what to do if I want refinement to show differences
> > by chars and not by words?
>
> Try: (setq ediff-forward-word-function 'forward-char)

I couldn't: with M-: it became buffer-local, and didn't affect the
result :-((

  parent reply	other threads:[~2006-10-04 22:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-04 13:26 ediff customization: -w -B... + refinement Peter Tury
2006-10-04 15:49 ` Kevin Rodgers
     [not found] ` <mailman.7727.1159977183.9609.help-gnu-emacs@gnu.org>
2006-10-04 22:14   ` tury.peter [this message]
2006-10-05  6:58     ` Peter Tury
2006-10-05 15:35     ` Kevin Rodgers

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=1160000076.182235.158640@h48g2000cwc.googlegroups.com \
    --to=tury.peter@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.
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).