From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Bogdan Hlevca Newsgroups: gmane.emacs.help Subject: Re: ediff-files from command line ? Date: Mon, 27 Jan 2003 17:58:33 -0500 Organization: WorldCom Canada Ltd. News Reader Service Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1043708477 8148 80.91.224.249 (27 Jan 2003 23:01:17 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 27 Jan 2003 23:01:17 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18dIFe-00026y-00 for ; Tue, 28 Jan 2003 00:01:14 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18dIGP-0000fC-02 for gnu-help-gnu-emacs@m.gmane.org; Mon, 27 Jan 2003 18:02:01 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!nntp.cs.ubc.ca!cyclone.bc.net!news.uunet.ca!nnrp1.uunet.ca.POSTED!not-for-mail User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3a) Gecko/20021212 X-Accept-Language: en-us, en Original-Newsgroups: comp.emacs,gnu.emacs.help In-Reply-To: Original-Lines: 80 Original-NNTP-Posting-Host: 209.47.38.244 Original-X-Trace: nnrp1.uunet.ca 1043708299 209.47.38.244 (Mon, 27 Jan 2003 17:58:19 EST) Original-NNTP-Posting-Date: Mon, 27 Jan 2003 17:58:19 EST Original-Xref: shelby.stanford.edu comp.emacs:77213 gnu.emacs.help:109471 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:5991 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:5991 Thank you, works just fine, Bogdan Who indeed? wrote: > Bogdan, > > Here is a shell script I use for ediff and emerge: > > #!/bin/sh > SCRIPTNAME=`basename $0` > if [ $# -lt 2 ] > then > echo "usage: $SCRIPTNAME FILE1 FILE2" > exit 1 > fi > # > if [ ! -f "$1" ] > then > echo file $1 does not exist > exit 1 > fi > # > if [ ! -f "$2" ] > then > echo file $2 does not exist > exit 1 > fi > if [ "$SCRIPTNAME" = "ediff" ] > then > emacs --eval "(ediff-files \"$1\" \"$2\")" > elif [ "$SCRIPTNAME" = "emerge" ] > then > emacs --eval "(mlw-emerge-files-command)" $1 $2 > else > echo Unknown script name: $SCRIPTNAME > exit 1 > fi > exit 0 > > Also, here is a relevant portion of my .emacs file: > > (require 'emerge) > (defun mlw-emerge-files-command () > (let ((file-a (nth 0 command-line-args-left)) > (file-b (nth 1 command-line-args-left))) > (setq command-line-args-left (nthcdr 2 command-line-args-left)) > (emerge-files-internal > file-a file-b nil nil nil))) > > I hope this helps. > Mike W. > > Bogdan Hlevca wrote in news:zqgZ9.248016$C8.834913 > @nnrp1.uunet.ca: > > >>Hi, >> >>I'd like to automate an ediff process for a post run test analysis. >>Apparently with -f command line argument you can pass only functions >>without arguments. >> >>ediff-files requires arguments and it will fail when trying to do: >> $ emacs -f ediff-files "file1" "file2" >> >>I could do: $ emacs "file1" "file2" and then issue the command M-x >>ediff-buffers and followed by 2 other key strokes, but this is not > > much > >>of an automation. >> >>Any help/ideea would be appreciated. >>Thanks, >>Bogdan >> >> > >