help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ediff from command line?


From: Johan Bockgård
Subject: Re: ediff from command line?
Date: Fri, 08 Jul 2005 19:32:45 +0200
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

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

-- 
Johan Bockgård


reply via email to

[Prev in Thread] Current Thread [Next in Thread]