unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* ediff-files from command line ?
@ 2003-01-27 20:19 Bogdan Hlevca
  2003-01-27 22:51 ` Kevin Rodgers
  0 siblings, 1 reply; 8+ messages in thread
From: Bogdan Hlevca @ 2003-01-27 20:19 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: ediff-files from command line ?
       [not found] <zqgZ9.248016$C8.834913@nnrp1.uunet.ca>
@ 2003-01-27 22:10 ` Who indeed?
  2003-01-27 22:58   ` Bogdan Hlevca
  0 siblings, 1 reply; 8+ messages in thread
From: Who indeed? @ 2003-01-27 22:10 UTC (permalink / raw)


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
> 
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: ediff-files from command line ?
  2003-01-27 20:19 ediff-files from command line ? 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>
  0 siblings, 2 replies; 8+ messages in thread
From: Kevin Rodgers @ 2003-01-27 22:51 UTC (permalink / raw)


Bogdan Hlevca wrote:

> 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.


I do this all the time:


emacs --eval '(ediff-files "file1" "file2")'


-- 
<a href="mailto:&lt;kevin.rodgers&#64;ihs.com&gt;">Kevin Rodgers</a>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: ediff-files from command line ?
  2003-01-27 22:10 ` Who indeed?
@ 2003-01-27 22:58   ` Bogdan Hlevca
  0 siblings, 0 replies; 8+ messages in thread
From: Bogdan Hlevca @ 2003-01-27 22:58 UTC (permalink / raw)


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 <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
>>
>>
> 
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: ediff-files from command line ?
  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>
  1 sibling, 0 replies; 8+ messages in thread
From: Jeffery B. Rancier @ 2003-01-31 23:36 UTC (permalink / raw)


>>>>> "Kevin" == Kevin Rodgers <kevin.rodgers@ihs.com> writes:

    > emacs --eval '(ediff-files "file1" "file2")'

On windows, I have to sit and wait for it to process my .emacs, is
there a way to just not load it and run just ediff?  I tried

    runemacs -q --eval '(ediff-files "file1" "file2")'

with to actual file names in double quotes, and I get an end of file
during parsing error.
-- 

Thanks,
Jeff
,----
| Jeffery B. Rancier
| 
| Softechnics
| a METTLER TOLEDO company
`----

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: ediff-files from command line ?
       [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
  1 sibling, 0 replies; 8+ messages in thread
From: Benjamin Riefenstahl @ 2003-02-01 18:56 UTC (permalink / raw)


Hi Jeff,


jeff.rancier@softechnics.com (Jeffery B. Rancier) writes:
> On windows, I have to sit and wait for it to process my .emacs, is
> there a way to just not load it and run just ediff?  I tried

I'd suggest to do it in the way, that the gods intended Emacs to be
used, namely as a server.  Get gnuserv, if you haven't already and use
its gnudoit client (gnuserv has an entry in the NTEmacs FAQ).


so long, benny

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: ediff-files from command line ?
       [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
  1 sibling, 1 reply; 8+ messages in thread
From: Kevin Rodgers @ 2003-02-03 17:23 UTC (permalink / raw)


Jeffery B. Rancier wrote:

>>>>>>"Kevin" == Kevin Rodgers <kevin.rodgers@ihs.com> writes:
>>>>>>
> 
>     > emacs --eval '(ediff-files "file1" "file2")'
> 
> On windows, I have to sit and wait for it to process my .emacs, is
> there a way to just not load it and run just ediff?  I tried
> 
>     runemacs -q --eval '(ediff-files "file1" "file2")'
> 
> with to actual file names in double quotes, and I get an end of file
> during parsing error.

Do you mean that it works without the -q option?

-- 
<a href="mailto:&lt;kevin.rodgers&#64;ihs.com&gt;">Kevin Rodgers</a>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: ediff-files from command line ?
  2003-02-03 17:23     ` Kevin Rodgers
@ 2003-02-03 18:04       ` Jeffery B. Rancier
  0 siblings, 0 replies; 8+ messages in thread
From: Jeffery B. Rancier @ 2003-02-03 18:04 UTC (permalink / raw)


>>>>> "Kevin" == Kevin Rodgers <kevin.rodgers@ihs.com> writes:

    > Do you mean that it works without the -q option?

I couldn't get it to work in either case.
-- 

Thanks,
Jeff
,----
| Jeffery B. Rancier
| 
| Softechnics
| a METTLER TOLEDO company
`----

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2003-02-03 18:04 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-27 20:19 ediff-files from command line ? 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
     [not found] <zqgZ9.248016$C8.834913@nnrp1.uunet.ca>
2003-01-27 22:10 ` Who indeed?
2003-01-27 22:58   ` Bogdan Hlevca

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).