* turning a list (variable) into process &rest ARGS ...
@ 2004-05-26 21:46 Florian von Savigny
2004-05-26 22:04 ` Stefan Monnier
0 siblings, 1 reply; 3+ messages in thread
From: Florian von Savigny @ 2004-05-26 21:46 UTC (permalink / raw)
Hi there,
I have just hit upon a problem you never expect when you once started
off using Perl ...
I am writing a function that is to invoke (call-process ...) and take
the program name and the &rest ARGS from a list variable of unknown
length. While this is of course straightforward for the command name,
I have no idea of how to do the rest, since, as all old lispers here
will know, I cannot simply supply the relevant portion of the
list. call-process wants strings, not lists.
Is there ANY workaround (I wouldn't like to have the function take the
whole command from a variable, which would be possible by setting the
latter to '(progn (call-process ... etc., because I want the function
to control the other arguments of call-process) for this
list-to-elements problem?
Thanks for any help,
--
Florian v. Savigny
If you are going to reply in private, please be patient, as I only
check for mail something like once a week. - Si vous allez répondre
personellement, patientez s.v.p., car je ne lis les courriels
qu'environ une fois par semaine.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: turning a list (variable) into process &rest ARGS ...
2004-05-26 21:46 turning a list (variable) into process &rest ARGS Florian von Savigny
@ 2004-05-26 22:04 ` Stefan Monnier
2004-05-26 22:17 ` Florian von Savigny
0 siblings, 1 reply; 3+ messages in thread
From: Stefan Monnier @ 2004-05-26 22:04 UTC (permalink / raw)
> I am writing a function that is to invoke (call-process ...) and take
> the program name and the &rest ARGS from a list variable of unknown
You want to use `apply'.
Stefan
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: turning a list (variable) into process &rest ARGS ...
2004-05-26 22:04 ` Stefan Monnier
@ 2004-05-26 22:17 ` Florian von Savigny
0 siblings, 0 replies; 3+ messages in thread
From: Florian von Savigny @ 2004-05-26 22:17 UTC (permalink / raw)
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> You want to use `apply'.
You're reading me like a book;-) Thank you so much, also for
responding /so/ promptly!
--
Florian v. Savigny
If you are going to reply in private, please be patient, as I only
check for mail something like once a week. - Si vous allez répondre
personellement, patientez s.v.p., car je ne lis les courriels
qu'environ une fois par semaine.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-05-26 22:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-26 21:46 turning a list (variable) into process &rest ARGS Florian von Savigny
2004-05-26 22:04 ` Stefan Monnier
2004-05-26 22:17 ` Florian von Savigny
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.