[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to set ignored pattern in ediff in emacs

From: Josef . Bauer . nospam
Subject: Re: How to set ignored pattern in ediff in emacs
Date: 05 Dec 2004 22:25:50 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

 gan> I have another small question: Is there a way to specify file1
 gan> and file2 in command line when launch emacs, else I have to
 gan> input the long filenames in emacs.

 Kevin> Do you mean
 Kevin>  emacs long_file_name_1 long_file_name_2
 Kevin> or
 Kevin>  emacs --eval '(ediff-files "long_file_name_1" "long_file_name_2")'

But who would want to start a _new_ emacs?

Here is a perl script that I use to ediff files in my (one-and-only
running) emacs:

#! /sw/local/bin/perl -w

sub filename2AbsFilename
    my $fn = shift(@_);

    if ( ! ($fn =~ '^/' ) )

$hostopt = "-h uhu";

if ( $#ARGV != 1 ) 
    print "$0: call ediff in emacs" , "\n";
    print "$0 --- usage: $0 file1 file2" , "\n";

$file1 = shift;
$file2 = shift;

$file1 = filename2AbsFilename($file1);
$file2 = filename2AbsFilename($file2);

$COMMAND = "(raise-frame) (ediff-files \"$file1\" \"$file2\")";

system "gnudoit $hostopt \'$COMMAND\'";

Maybe the hostname could be handeled in some more advanced way thatn
hard coding it in the script.

Best regards


reply via email to

[Prev in Thread] Current Thread [Next in Thread]