From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Brendan Leber Newsgroups: gmane.emacs.help Subject: Extend Dired to Call a Function on a File? Date: Wed, 12 Oct 2016 10:46:07 -0700 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: blaine.gmane.org 1476299116 31716 195.159.176.226 (12 Oct 2016 19:05:16 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 12 Oct 2016 19:05:16 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Oct 12 21:05:12 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 1buOpk-00063h-Ql for geh-help-gnu-emacs@m.gmane.org; Wed, 12 Oct 2016 21:04:57 +0200 Original-Received: from localhost ([::1]:35268 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1buOpj-0006jp-Fb for geh-help-gnu-emacs@m.gmane.org; Wed, 12 Oct 2016 15:04:55 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33544) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1buNbX-00057I-W2 for help-gnu-emacs@gnu.org; Wed, 12 Oct 2016 13:46:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1buNbW-0007qV-3u for help-gnu-emacs@gnu.org; Wed, 12 Oct 2016 13:46:10 -0400 Original-Received: from mail-yw0-x233.google.com ([2607:f8b0:4002:c05::233]:34794) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1buNbV-0007qH-Sm for help-gnu-emacs@gnu.org; Wed, 12 Oct 2016 13:46:10 -0400 Original-Received: by mail-yw0-x233.google.com with SMTP id w3so37530808ywg.1 for ; Wed, 12 Oct 2016 10:46:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brendanleber-com.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to; bh=MTTkmOTSJqIeT/hT6yNgDhPVgF14WyVwnhqfv2aII7M=; b=aeT/4ngfMCU/FruDoUpPviOS9bMlq5CdxxkaWufjfRrxGdNxH0N3kKJgXkpzEx1Wlp 1iwCubxJEhqrbUu1gX+VKtR9Y/mGv0USISuSXmubpOtsIcIqBOtBTIRitbxGf1Ny2oSr cBocxloideuIjzYp6P5fkHeS78LRQwGqv6/6cxPstf01a1JKSP8/C5rSBxVJv6Kf4en+ tEXJObj8IY/wg+1J/AcnWMj1DuVYivDMQCjdslTWMoXqy7JHI1eGKYeuXRnwmTYUmM8m 7po1kqTCShQngiD6BeCKBHD9rRvnwOnvIh4+PQVG9Boq4RssI+Vrmn5UYuqh9WceHtO9 Q1dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=MTTkmOTSJqIeT/hT6yNgDhPVgF14WyVwnhqfv2aII7M=; b=YD7x2vx489THLO9x31rctx087F/m9ri5dqQ3KiJ7cEQerOKHMb6Lt26UhvGeV//p4g 6/JL0yiW+8SwUQkJe9NAakA8HcefaDmeg0pTro+50cZ6b1mnLdFQRWXDPA1fcQDK2Jup CyNfJWEavnxEXh7CyhtMO3caZFRFUqwgsfmPzCJtvCH6FZkV4JSAAFfjmv/EjY2Tu/YJ pyQC9QD9hez54LNet3Gg1VQSNpNy4Gb6Id20N7XcHwt7u1BJj14S+olOOsEF+E5WUX1Z 6YZrjHUN4H+8L6xCUWnMVgbg+nxnjgOxtFYuAwFwESAhbp12pfN8Ww8SQxxEs16Qod+D WylA== X-Gm-Message-State: AA6/9RlyZVcjncEtzYX1e00lsYkSx/qqLOGQfqJG578LLQPpCvFHsXQDt5bljp5/QqyOQ4n5PfTx3kAtsiaAGA== X-Received: by 10.13.213.211 with SMTP id x202mr2221467ywd.226.1476294368043; Wed, 12 Oct 2016 10:46:08 -0700 (PDT) Original-Received: by 10.129.146.22 with HTTP; Wed, 12 Oct 2016 10:46:07 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:4002:c05::233 X-Mailman-Approved-At: Wed, 12 Oct 2016 15:03:59 -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:111511 Archived-At: 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? Thanks! B -- C++ tries to guard against Murphy, not Machiavelli. - Damian Conway