[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How do I do _THIS_ with emacsclient?
From: |
Ehud Karni |
Subject: |
Re: How do I do _THIS_ with emacsclient? |
Date: |
Sun, 29 Jul 2007 23:10:05 +0300 |
On Sun, 29 Jul 2007 21:56:27, David Kastrup wrote:
>
> "Ehud Karni" <address@hidden> writes:
>
> > On Sun, 29 Jul 2007 19:53:05, David Kastrup wrote:
> >>
> >>
> >> Hi, I have the following problem: I try using something like
> >> ${EDITOR} --eval "(ediff-files (pop command-line-args-left) \
> >> (pop command-line-args-left))" "file1" "file2"
> >>
> >> and when ${EDITOR} is equal to emacsclient, this fails pretty badly:
> >> command-line-args-left is nil, and Emacs tried to execute file1 and
> >> file2, leading to undefined variable complaints.
> >
> > I don't know what to do about the arguments not available with
> > `command-line-args-left' but why not use a simpler command like:
> > ${EDITOR} --eval '(ediff-files "file1" "file2")'
>
> Because file1 and file2 may not be properly quoted for use in Lisp
> strings.
Is it a real problem or a principal one ?
For real life you can always do:
ln -s "file1" /tmp/file1_$$
ln -s "file2" /tmp/file2_$$
${EDITOR} --eval '(ediff-files "'/tmp/file1_$$'" "'/tmp/file2_$$'")'
rm -f /tmp/file1_$$ /tmp/file2_$$
Ehud.
--
Ehud Karni Tel: +972-3-7966-561 /"\
Mivtach - Simon Fax: +972-3-7966-667 \ / ASCII Ribbon Campaign
Insurance agencies (USA) voice mail and X Against HTML Mail
http://www.mvs.co.il FAX: 1-815-5509341 / \
GnuPG: 98EA398D <http://www.keyserver.net/> Better Safe Than Sorry