From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: DaLoverhino Newsgroups: gmane.emacs.help Subject: Re: Starting emacs in ediff mode. Date: Thu, 24 Jan 2008 08:40:48 -0800 (PST) Organization: http://groups.google.com Message-ID: <560a3e25-00da-4f6e-9f1a-8f62ac298bd8@c4g2000hsg.googlegroups.com> References: <7b79188f-cb09-46ae-b88c-65b611b39ae1@d4g2000prg.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1201196545 6151 80.91.229.12 (24 Jan 2008 17:42:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 24 Jan 2008 17:42:25 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jan 24 18:42:45 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 1JI668-0001Kf-Rl for geh-help-gnu-emacs@m.gmane.org; Thu, 24 Jan 2008 18:42:45 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JI65i-0004es-PO for geh-help-gnu-emacs@m.gmane.org; Thu, 24 Jan 2008 12:42:18 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!c4g2000hsg.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 37 Original-NNTP-Posting-Host: 216.57.82.2 Original-X-Trace: posting.google.com 1201192848 29478 127.0.0.1 (24 Jan 2008 16:40:48 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Thu, 24 Jan 2008 16:40:48 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: c4g2000hsg.googlegroups.com; posting-host=216.57.82.2; posting-account=D7lNFAoAAAA0V64hSKsFQlaJ2htE_g1z User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11,gzip(gfe),gzip(gfe) Original-Xref: shelby.stanford.edu gnu.emacs.help:155512 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:50919 Archived-At: On Jan 23, 9:42 pm, 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")' > > -- > Kevin Rodgers > Denver, Colorado, USA Thanks. It works from the command line, but when I put it in a shell, it doesn't seem to work. Do you know what is going on? #!/bin/bash fileA=$1 fileB=$2 if [[ -z "$fileA" && -z "$fileB" ]] then echo "Need two files to ediff." exit 1 fi evalArg="'(ediff-files \"$fileA\" \"$fileB\" )'" echo emacs --geometry 150x80 --eval $evalArg emacs --geometry 150x80 --eval $evalArg exit 0