[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ediff from command line?
From: |
Jim Smith |
Subject: |
Re: ediff from command line? |
Date: |
Mon, 11 Jul 2005 05:22:29 -0500 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (usg-unix-v) |
bojohan+news@dd.chalmers.se (Johan Bockgård) writes:
> Jim Smith <3.141592six@gmail.com> writes:
>
>> I would like to use emacs/ediff as an external diff program with
>> tortoise CVS on the windows platform. Basically, this means I need
>> to invoke emacs from the command line with two file arguments and
>> have emacs open an ediff session on those two files.
>
> (defun command-line-diff (switch)
> (let ((file1 (pop command-line-args-left))
> (file2 (pop command-line-args-left)))
> (ediff file1 file2)))
>
> (add-to-list 'command-switch-alist '("diff" . command-line-diff))
>
> ;; Usage: emacs -diff file1 file2
>
Thanks for all the replys. I won't be able to try them out until next
week, but so far It looks like this is exactly what I was looking for.