all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Rupert Swarbrick <rswarbrick@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: dired command on marked files
Date: Wed, 18 Jun 2008 22:10:57 +0100	[thread overview]
Message-ID: <g3btl1$8uo$1@news.albasani.net> (raw)
In-Reply-To: g3bmeh$fsn$1@tamarack.fernuni-hagen.de

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


  reply	other threads:[~2008-06-18 21:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-16 19:13 dired command on marked files Fabian Braennstroem
2008-06-16 21:04 ` Joel J. Adamson
     [not found] ` <mailman.13422.1213650548.18990.help-gnu-emacs@gnu.org>
2008-06-18 19:08   ` Fabian Braennstroem
2008-06-18 21:10     ` Rupert Swarbrick [this message]
2008-06-20 19:54       ` Fabian Braennstroem
2008-06-19  3:27 ` Kevin Rodgers
     [not found] ` <mailman.13550.1213846072.18990.help-gnu-emacs@gnu.org>
2008-06-20 19:56   ` Fabian Braennstroem

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='g3btl1$8uo$1@news.albasani.net' \
    --to=rswarbrick@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.