From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nikolai Weibull Newsgroups: gmane.emacs.help Subject: Re: Perl "plugin" for Emacs Date: Sat, 24 Sep 2011 00:01:57 +0200 Message-ID: References: <32503889.post@talk.nabble.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: dough.gmane.org 1316815329 5402 80.91.229.12 (23 Sep 2011 22:02:09 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 23 Sep 2011 22:02:09 +0000 (UTC) Cc: Help-gnu-emacs@gnu.org To: paxxus Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Sep 24 00:02:05 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1R7Dor-0005nk-Gr for geh-help-gnu-emacs@m.gmane.org; Sat, 24 Sep 2011 00:02:05 +0200 Original-Received: from localhost ([::1]:41721 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R7Dor-00008X-1I for geh-help-gnu-emacs@m.gmane.org; Fri, 23 Sep 2011 18:02:05 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:43236) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R7Dom-00008M-MJ for Help-gnu-emacs@gnu.org; Fri, 23 Sep 2011 18:02:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R7Dol-0000X2-Ep for Help-gnu-emacs@gnu.org; Fri, 23 Sep 2011 18:02:00 -0400 Original-Received: from mail-yi0-f41.google.com ([209.85.218.41]:54631) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R7Dol-0000Wy-CR for Help-gnu-emacs@gnu.org; Fri, 23 Sep 2011 18:01:59 -0400 Original-Received: by yia25 with SMTP id 25so3561861yia.0 for ; Fri, 23 Sep 2011 15:01:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=QpSKC746+f6DBY5wbdopLwy2JmCurxjfs8QpmSq21+E=; b=i7bEpRSlXt4SMWp7fNrZ/74Z6InFNRuIAJ0hLgrwZpUYD5qq87SMgjt3YDpH4+m1o5 XyY+navlykbk2eXTudH/ibgCJcTK9Zz2ln3nKbRayoU00G4v9y4hDYfKK8qBdg8sYkcC IxTLgZr9KEcNUjAywIZqHmteTUN6Bk1bv2dnk= Original-Received: by 10.68.71.193 with SMTP id x1mr12357681pbu.132.1316815317872; Fri, 23 Sep 2011 15:01:57 -0700 (PDT) Original-Received: by 10.68.47.40 with HTTP; Fri, 23 Sep 2011 15:01:57 -0700 (PDT) In-Reply-To: <32503889.post@talk.nabble.com> X-Google-Sender-Auth: w6m0T83-xp5B9IgQ0lSLJOtoxQE X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.218.41 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 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-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:82318 Archived-At: On Fri, Sep 23, 2011 at 23:22, paxxus wrote: > I'd like to be able to perform some text formatting in Perl as that will be > way faster for me than having to learn Lisp. Here's what I'm after: > > 1. Select a region in Emacs. > 2. Press a key. > 3. The selected text is passed to a Perl script. > 4. Output from Perl script replaces the selected region. > > Is this possible and what exactly would I have to put in my .emacs if, let's > say, the key I want to bind is F5 and the Perl script is located at > ~/Emacs/format.pl Look up the function shell-command-on-region.