[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: dired command on marked files
From: |
Fabian Braennstroem |
Subject: |
Re: dired command on marked files |
Date: |
Wed, 18 Jun 2008 21:08:01 +0200 |
User-agent: |
slrn/0.9.8.1pl1 (Debian) |
* Joel J. Adamson <adamsonj@email.unc.edu> wrote:
> Fabian Braennstroem <f.braennstroem@gmx.de> writes:
>
>> Hi,
>>
>> I would like to use dired to create some plots using
>> xmgrace/gracebat. My idea is to mark some files and plot
>> them all into one diagram using something like:
>>
>> gracebat <file1> <file2> ... <file n> -pexec 'subtitle "<title>"'
>> -hardcopy -hdevice EPS -printfile "<name>"
>>
>> Generally, I would use 'call-process' , but I have no clue, how I can
>> create a call with variable number of files (depending on the marks).
>> In the end, emacs should ask for the 'title' and 'name'.
>
> Are you talking about a program, or interactively? Interactively, I
> would use a shell for loop.
This first part of my problem was easier than I thought:
(defun grace()
"Create Plot using grace"
(interactive)
(call-process-shell-command (concat (dired-shell-stuff-it "xterm -e
'xmgrace " (dired-get-marked-files) nil) " '&"))
)
This would plot all marked files ... now I take a look at the <title> and
<name>.
Greetings!
Fabian