From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Who indeed?" Newsgroups: gmane.emacs.help Subject: Re: ediff-files from command line ? Date: Mon, 27 Jan 2003 22:10:18 GMT Organization: Hewlett-Packard Company Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: main.gmane.org X-Trace: main.gmane.org 1043705754 27187 80.91.224.249 (27 Jan 2003 22:15:54 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 27 Jan 2003 22:15:54 +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 18dHXk-00074N-00 for ; Mon, 27 Jan 2003 23:15:53 +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 18dHY5-0006Vk-0D for gnu-help-gnu-emacs@m.gmane.org; Mon, 27 Jan 2003 17:16:14 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!nntp-relay.ihug.net!ihug.co.nz!news.compaq.com!news.cpqcorp.net!53ab2750!not-for-mail Original-Newsgroups: comp.emacs,gnu.emacs.help User-Agent: Xnews/5.04.25 Original-Lines: 71 Original-NNTP-Posting-Host: 16.141.152.137 Original-X-Complaints-To: abuse@Compaq.com Original-X-Trace: news.cpqcorp.net 1043705418 16.141.152.137 (Mon, 27 Jan 2003 14:10:18 PST) Original-NNTP-Posting-Date: Mon, 27 Jan 2003 14:10:18 PST Original-Xref: shelby.stanford.edu comp.emacs:77207 gnu.emacs.help:109467 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:5987 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:5987 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 > >