From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.help Subject: Re: Extend Dired to Call a Function on a File? Date: Wed, 12 Oct 2016 22:18:38 +0200 Message-ID: <87lgxts4m9.fsf@rub.de> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1476310563 24849 195.159.176.226 (12 Oct 2016 22:16:03 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 12 Oct 2016 22:16:03 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: help-gnu-emacs@gnu.org To: Brendan Leber Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Oct 13 00:15:59 2016 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1buRoW-0005Kj-V5 for geh-help-gnu-emacs@m.gmane.org; Thu, 13 Oct 2016 00:15:53 +0200 Original-Received: from localhost ([::1]:36161 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1buRoV-0005fB-N5 for geh-help-gnu-emacs@m.gmane.org; Wed, 12 Oct 2016 18:15:51 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43284) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1buPzD-0007V7-Kr for help-gnu-emacs@gnu.org; Wed, 12 Oct 2016 16:18:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1buPz9-00008e-Da for help-gnu-emacs@gnu.org; Wed, 12 Oct 2016 16:18:47 -0400 Original-Received: from mout.gmx.net ([212.227.17.20]:58621) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1buPz9-00008W-3z for help-gnu-emacs@gnu.org; Wed, 12 Oct 2016 16:18:43 -0400 Original-Received: from rosalinde ([89.245.84.212]) by mail.gmx.com (mrgmx102) with ESMTPSA (Nemesis) id 0Lpgew-1bF19V2cw2-00fQJW; Wed, 12 Oct 2016 22:18:39 +0200 In-Reply-To: (Brendan Leber's message of "Wed, 12 Oct 2016 10:46:07 -0700") X-Provags-ID: V03:K0:r8ImdA4NiN/y+WLvcXt8B93isSIwJwrNoMzlCiYLNzj/JFBIWWN EhGlUD1U7dvgVDgSkrdP0QhzZ0+F67ZpJ/iR6zR8aoctdLSlGeRPAOp9gDk42tXrG/4c1er V0ZK1UrbRKGQWCT+W9AZQCFr+tEd1bTjGnrS7uc9xbazBUTsuI19xxxg5KAZa9CNYsgq3gc 0n9KvGxu5NbHHbhlwVVkw== X-UI-Out-Filterresults: notjunk:1;V01:K0:hXfewJ6+5bU=:WD5SBZHXpy/hWIPw5gN8wJ qu5wT4TtdlrxbYAt1iiG7DpUCq6QFhOkaEmYQSweisA+TKqUHtxZgr7stZ3vZGRHX/H11S8/B MxNN6s5+Eez+1maig/8AIkBaGoFHx9gP0BAzV+jU8m7Z7BNonuZW3iLrvckWdvyb/It4LQq0s koeTk35dvAQfap5gE0DX5Y5JGpw0DG/PAIjUFiy4f3i2d55MbOsMTlEWl/p85I8wBMZ6InV/v UtUTR86CBJn61mzVa6DrpFCQumsJtR+whYmkBpVdWXSZFisCBR2uyq8Pi44B+ylfara7eBSCY 6v/ad6g85pYfq1fzaXBgSDHwITtcbb0I9SNF0MHrTk74As2eAujqfu7YC9F5vfRF5jkdad1mi R0Jq2XZk0H8u1hTRUafXp2YZG+vF+EDmEnalMwd+JrqV0PoY3kcC9NKmKJ+panR2h2E8SsbDw dy3FXbSFZD9WIPiU0pf+qqRuxkATe5vSWW5UQXhfDark2vTACqEOzhvuxXpg2fUUc3d0qkooi Dk5jsoL3ttbePx4hHHZFlCcg9PE35qfsfoRi3oh6QxqueWhKJpR+gIoly7AsPux0B5pGsz87E a8UaAAGBxY8C8YMzeFn75zdZyP9yQ9PoAk1w1n5OlVSbhLWB/R/hw1euYAn835tYLFldJeL72 LL0XLBIUpa9dM/+d+upZsQ1TTdfhSD/PPYS8Dm7PyVa1LDg4lSr0abl8Vbx7g0Mu8hnK+AnVt VUX+Q99oDDH38ebgHdKRFtF7xDMjTPcXz/7G8ykvoI5Jhq981WH4vE1Z7PotZAg8eoNwrC0k X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.17.20 X-Mailman-Approved-At: Wed, 12 Oct 2016 18:12:42 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:111518 Archived-At: On Wed, 12 Oct 2016 10:46:07 -0700 Brendan Leber 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