From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: Starting emacs in ediff mode. Date: Fri, 25 Jan 2008 11:45:42 +0200 Message-ID: References: <7b79188f-cb09-46ae-b88c-65b611b39ae1@d4g2000prg.googlegroups.com> <4798C1BD.3030600@gmail.com> NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1201254433 19346 80.91.229.12 (25 Jan 2008 09:47:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 25 Jan 2008 09:47:13 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jan 25 10:47:30 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JIL9m-00079k-AN for geh-help-gnu-emacs@m.gmane.org; Fri, 25 Jan 2008 10:47:30 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JIL9M-0006oT-4g for geh-help-gnu-emacs@m.gmane.org; Fri, 25 Jan 2008 04:47:04 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JIL8U-0006Wu-NY for help-gnu-emacs@gnu.org; Fri, 25 Jan 2008 04:46:10 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JIL8T-0006WX-Md for help-gnu-emacs@gnu.org; Fri, 25 Jan 2008 04:46:10 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JIL8T-0006WM-Fz for help-gnu-emacs@gnu.org; Fri, 25 Jan 2008 04:46:09 -0500 Original-Received: from romy.inter.net.il ([213.8.233.24]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JIL8T-0006BX-5v for help-gnu-emacs@gnu.org; Fri, 25 Jan 2008 04:46:09 -0500 Original-Received: from HOME-C4E4A596F7 (IGLD-80-230-250-87.inter.net.il [80.230.250.87]) by romy.inter.net.il (MOS 3.7.3-GA) with ESMTP id KAG57208 (AUTH halo1); Fri, 25 Jan 2008 11:45:19 +0200 (IST) In-reply-to: <4798C1BD.3030600@gmail.com> (lennart.borgman@gmail.com) X-detected-kernel: by monty-python.gnu.org: FreeBSD 4.7-5.2 (or MacOS X 10.2-10.4) (2) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:50945 Archived-At: > Date: Thu, 24 Jan 2008 17:50:05 +0100 > From: "Lennart Borgman (gmail)" > CC: help-gnu-emacs@gnu.org > > Kevin Rodgers wrote: > > DaLoverhino wrote: > >> Hello. I would like to use emacs as I would use say diff or sdiff. > >> > >> Is there a way to start emacs in ediff mode and pass along with it > >> through the command line, the two files I want to ediff? If the > >> command line is unwieldy, I can always wrap it up in a script. > > > > emacs --eval '(ediff-files "file_1" "file_2")' > > It is a bit more difficult on Windows: This works for me on Windows: emacs --eval "(ediff-files \"file_1\" \"file_2\")" > @rem Put this file (ediff.cmd) in your PATH. > @rem (Created by Setup Helper at Tue Apr 03 20:48:56 2007) > @rem ----------------------------- > @rem Starts Emacs ediff (through gnuserv) from command line. > @rem Takes the two file to compare as parameters. > @setlocal > @set f1=%1 > @set f2=%2 > @set f1=%f1:\=/% > @set f2=%f2:\=/% > @set emacs_cd=%CD:\=/% > @set emacs_client="c:\emacs\p\070403\emacs\bin\emacsclient.exe" > @%emacs_client% -n > @%emacs_client% -e "(setq default-directory \"%emacs_cd%\")" > @%emacs_client% -n -e "(ediff-files \"%f1%\" \"%f2%\")" Can you explain what did you need all this complexity for?