unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "Who indeed?" <user@host.domain>
Subject: Re: ediff-files from command line ?
Date: Mon, 27 Jan 2003 22:10:18 GMT	[thread overview]
Message-ID: <Xns9310AEADFFC74jngljim48congojungle@16.105.248.153> (raw)
In-Reply-To: zqgZ9.248016$C8.834913@nnrp1.uunet.ca

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 <bhlevca@adexa.com> 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
> 
> 

       reply	other threads:[~2003-01-27 22:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <zqgZ9.248016$C8.834913@nnrp1.uunet.ca>
2003-01-27 22:10 ` Who indeed? [this message]
2003-01-27 22:58   ` ediff-files from command line ? Bogdan Hlevca
2003-01-27 20:19 Bogdan Hlevca
2003-01-27 22:51 ` Kevin Rodgers
2003-01-31 23:36   ` Jeffery B. Rancier
     [not found]   ` <mailman.1288.1044056408.21513.help-gnu-emacs@gnu.org>
2003-02-01 18:56     ` Benjamin Riefenstahl
2003-02-03 17:23     ` Kevin Rodgers
2003-02-03 18:04       ` Jeffery B. Rancier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Xns9310AEADFFC74jngljim48congojungle@16.105.248.153 \
    --to=user@host.domain \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).