From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Fabian Braennstroem Newsgroups: gmane.emacs.help Subject: Re: dired command on marked files Date: Fri, 20 Jun 2008 21:54:07 +0200 Organization: www.braennstroem.de Message-ID: References: Reply-To: f.braennstroem@gmx.de NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1213994535 15757 80.91.229.12 (20 Jun 2008 20:42:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 20 Jun 2008 20:42:15 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jun 20 22:43:00 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1K9nRj-0008Dz-Gm for geh-help-gnu-emacs@m.gmane.org; Fri, 20 Jun 2008 22:42:59 +0200 Original-Received: from localhost ([127.0.0.1]:53655 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K9nQu-0003Gt-O9 for geh-help-gnu-emacs@m.gmane.org; Fri, 20 Jun 2008 16:42:08 -0400 Original-Path: news.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!zen.net.uk!dedekind.zen.co.uk!feeder.erje.net!news-fra1.dfn.de!news-koe1.dfn.de!tamarack.fernuni-hagen.de!news.fernuni-hagen.de!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 50 Original-NNTP-Posting-Host: e176241124.adsl.alicedsl.de Original-X-Trace: tamarack.fernuni-hagen.de 1213991647 7643 85.176.241.124 (20 Jun 2008 19:54:07 GMT) Original-X-Complaints-To: newsadmin@fernuni-hagen.de Original-NNTP-Posting-Date: Fri, 20 Jun 2008 19:54:07 +0000 (UTC) User-Agent: slrn/0.9.8.1pl1 (Debian) Original-Xref: news.stanford.edu gnu.emacs.help:159643 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:54993 Archived-At: Hi Rupert, thanks. * Rupert Swarbrick wrote: > Fabian Braennstroem 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