help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Extend Dired to Call a Function on a File?


From: Stephen Berman
Subject: Re: Extend Dired to Call a Function on a File?
Date: Wed, 12 Oct 2016 22:18:38 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

On Wed, 12 Oct 2016 10:46:07 -0700 Brendan Leber <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]