emacs-devel
[Top][All Lists]
Advanced

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

Re: A not quite stylish proposal for command line processing


From: David Kastrup
Subject: Re: A not quite stylish proposal for command line processing
Date: Mon, 30 Jul 2007 19:11:35 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.51 (gnu/linux)

"Lennart Borgman (gmail)" <address@hidden> writes:

> Richard Stallman wrote:
>>     It would allow to write
>>
>>     emacs --eval '(ediff-files (*argv++) (*argv++))' "$FILE1" "$FILE2"
>>
>> It is a cute hack, but does anyone really want to use this?
>
>
> Maybe on w32, but I prefer using emacsclient for this.

emacsclient does not help here.  And the below assumes that you can
flip backslashes without changing their meaning.  Not likely to be
true for regexps or similar.  Getting them and other strings and
special characters unmolested into Emacs using portable shell scripts
is actually a royal nuisance without using command-line-args-left.

> The command file below handles this:
>
> c:\u\ediff.CMD
> ****** Contents: *******
> @rem Put this file (ediff.cmd) in your PATH.
> @rem (Created by Setup Helper at Tue Apr 03 20:48:56 2007)
> @rem -----------------------------
> @rem Starts Emacs ediff (through gnuserv) from command line.
> @rem Takes the two file to compare as parameters.
> @setlocal
> @set f1=%1
> @set f2=%2
> @set f1=%f1:\=/%
> @set f2=%f2:\=/%
> @set emacs_cd=%CD:\=/%
> @set emacs_client="c:\emacs\p\070403\emacs\bin\emacsclient.exe"
> @%emacs_client% -n
> @%emacs_client% -e "(setq default-directory \"%emacs_cd%\")"
> @%emacs_client% -n  -e "(ediff-files \"%f1%\" \"%f2%\")"

-- 
David Kastrup




reply via email to

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