all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Giorgos Keramidas <keramida@ceid.upatras.gr>
Cc: emacs-devel@gnu.org
Subject: Re: ediff maximum line length?
Date: Fri, 11 Feb 2011 09:27:26 -0500	[thread overview]
Message-ID: <jwvpqqyr6zo.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <xeialj1n3pwq.fsf@kobe.laptop> (Giorgos Keramidas's message of "Fri, 11 Feb 2011 01:02:13 -0800")

> I am looking for something that can compare two files, so that I can
> launch Emacs as my diff tool, e.g. from Perforce, Subversion, etc.  I
> don't know if diff-mode can compare two files instead of a buffer and
> its file.

diff-mode is not a replacement for ediff in that it only helps you read
contextual diffs (i.e. the output of `diff' or other tools that output
in the same format).
So, if you do

  exec emacs --eval "(diff \"$1\" \"$2\")"

the resulting *diff* buffer will be in diff-mode.
  
> That's why I used ediff.  (Another reason is that I know its
> key bindings from vc, but that's not something I can't live without.)

From VC, C-x v = will give you a diff that's displayed in diff-mode.

For some uses, this is much better than ediff, but for others ediff is
more appropriate.  I've gotten so used to reading diffs that I don't use
ediff nearly as much as diff-mode, tho.

> Is it possible to use diff-mode for the same sort of comparison?

Yes, see above.


        Stefan


PS: For 3-way "diffs", smerge-mode provides a similar alternative to
ediff3, and also supports highlighting of fine diffs.
And there's probably a way to get diff3-style output from `diff', so as
to use smerge-mode for 2-way comparisons.



  parent reply	other threads:[~2011-02-11 14:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-11  4:18 ediff maximum line length? Giorgos Keramidas
2011-02-11  4:48 ` Stefan Monnier
2011-02-11  9:02   ` Giorgos Keramidas
2011-02-11  9:06     ` Lennart Borgman
2011-02-11  9:17       ` Giorgos Keramidas
2011-02-11 14:27     ` Stefan Monnier [this message]
2011-02-11 21:45       ` Giorgos Keramidas
2011-02-11 22:01         ` Andreas Schwab
2011-02-12  9:00           ` Giorgos Keramidas

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=jwvpqqyr6zo.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=keramida@ceid.upatras.gr \
    /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.