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

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

RE: Perl "plugin" for Emacs


From: Paxxus
Subject: RE: Perl "plugin" for Emacs
Date: Sat, 24 Sep 2011 00:31:49 +0200



> Date: Sat, 24 Sep 2011 00:01:57 +0200
> Subject: Re: Perl "plugin" for Emacs
> From: now@bitwi.se
> To: paxxus@hotmail.com
> CC: Help-gnu-emacs@gnu.org
>
> On Fri, Sep 23, 2011 at 23:22, paxxus <paxxus@hotmail.com> 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.

Thanks! I put the following code in my .emacs (using cksum as the command for testing):

(global-set-key (kbd "<f5>") '(shell-command-on-region "cksum"))

But I get the following error when I press F5:

Wrong type argument: commandp, (shell-command-on-region "cksum")


reply via email to

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