all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stephen Berman <stephen.berman@gmx.net>
To: Brendan Leber <brendan@brendanleber.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Extend Dired to Call a Function on a File?
Date: Wed, 12 Oct 2016 22:18:38 +0200	[thread overview]
Message-ID: <87lgxts4m9.fsf@rub.de> (raw)
In-Reply-To: <CAC77Q0GrDNmV=2bc2VDd+emZy5wsf-YzzdtDx=HiFcXkmnEpWQ@mail.gmail.com> (Brendan Leber's message of "Wed, 12 Oct 2016 10:46:07 -0700")

On Wed, 12 Oct 2016 10:46:07 -0700 Brendan Leber <brendan@brendanleber.com> wrote:

> Greetings!
>
> I have a function I've used to work on files that right now I call
> manually with M-x my-shiny-function RET my-shiny.file.  This works
> great for the one off file.  Yet I usually have to process batches of
> files in a given directory.  Being able to add a key binding to dired
> would be awesome as I'm already using dired on the directory to rename
> files and such.
>
> I know enough elisp to add the key binding and write the function, I
> think.  The place I'm stuck is getting the file name as the first
> argument to the function when the binding is pressed.  Can anyone
> share some pointers to make this happen?

Perhaps the function dired-get-filename does what you want.

Steve Berman



  parent reply	other threads:[~2016-10-12 20:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-12 17:46 Extend Dired to Call a Function on a File? Brendan Leber
2016-10-12 20:12 ` Drew Adams
2016-10-12 20:36   ` Brendan Leber
2016-10-13  0:34     ` Drew Adams
2016-10-13 16:59       ` Brendan Leber
2016-10-12 20:18 ` Stephen Berman [this message]
2016-10-12 21:12 ` John Mastro

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=87lgxts4m9.fsf@rub.de \
    --to=stephen.berman@gmx.net \
    --cc=brendan@brendanleber.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.