[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: `align-regexp' fails in Lisp code
From: |
Le Wang |
Subject: |
Re: `align-regexp' fails in Lisp code |
Date: |
Wed, 10 Jul 2013 11:14:00 +0800 |
I can find at least 4 variations of this question on stackoverflow.
This answer describes what's happening well:
http://stackoverflow.com/a/12975000/903943
Essentially, the parameters received by the function are pre-processed
by interactive forms, so you're not calling it correctly.
See also difference between function and command, interactive forms
sections of the docs.
On Wed, Jul 10, 2013 at 8:11 AM, Raffaele Ricciardi <rfflrccrd@gmail.com> wrote:
> Hello everyone,
>
> I'm trying to run `align-regexp' from Lisp code, but it fails with
> the error "align-region: Marker does not point anywhere".
>
> Here is the specification of `align-regexp':
>
> ---
>
> (align-regexp BEG END REGEXP &optional GROUP SPACING REPEAT)
>
> Align the current region using an ad-hoc rule read from the
> minibuffer. BEG and END mark the limits of the region.
>
> ---
>
> Here is my Lisp code:
>
> (align-regexp (point-min) (point-max) " hides ")
>
> Marking the whole buffer and calling `align-regexp' interactively does
> work, though.
>
> Tried with "emacs -Q". I'm using GNU Emacs 24.3.1.
>
> Thank you for your attention.
>
>
>
>
--
Le
Re: `align-regexp' fails in Lisp code,
Le Wang <=
Re: `align-regexp' fails in Lisp code, Jambunathan K, 2013/07/12