[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: |
Fri, 20 Jun 2008 21:54:07 +0200 |
User-agent: |
slrn/0.9.8.1pl1 (Debian) |
Hi Rupert,
thanks.
* Rupert Swarbrick <rswarbrick@gmail.com> wrote:
> Fabian Braennstroem <f.braennstroem@gmx.de> writes:
>
>> 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 is of course irrelevant, but you might be interested to note that
> one normally formats lisp code more like the following:
>
> (defun grace ()
> "Create Plot using grace"
> (interactive)
> (call-process-shell-command
> (concat (dired-shell-stuff-it "xterm -e 'xmgrace "
> (dired-get-marked-files) nil)
> " '&")) )
>
> (although the last line's a bit icky). In particular, when in
> emacs-lisp-mode, you'll find that TAB indents the line to the "right
> place".
>
> Also note that the lambda list (which in the above is just "()")
> doesn't have to be connected to the function/macro symbol ("grace") -
> and the normal idiom is to put it as above. This is particularly
> relevant if you've got a long lambda list:
>
> (defun my-func
> (has a very &optional long lambda list here indeed)
> (+ 1 2))
>
> (my-func 0 0 0)
> => 3
>
>
> Hope this is of some interest,
>
> Rupert
Greetings!
Fabian