From: Le Wang <l26wang@gmail.com>
To: Raffaele Ricciardi <rfflrccrd@gmail.com>
Cc: GNU Emacs List <help-gnu-emacs@gnu.org>
Subject: Re: `align-regexp' fails in Lisp code
Date: Wed, 10 Jul 2013 11:14:00 +0800 [thread overview]
Message-ID: <CAM=K+iqSxfmvfMOB3m=sQb7Sk2HV6s3WK_7zCK5UJMSTDZ8+0g@mail.gmail.com> (raw)
In-Reply-To: <b43n5vFe8o1U1@mid.individual.net>
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
next prev parent reply other threads:[~2013-07-10 3:14 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-10 0:11 `align-regexp' fails in Lisp code Raffaele Ricciardi
2013-07-10 2:58 ` Leo Liu
2013-07-10 3:14 ` Michael Heerdegen
2013-07-11 11:55 ` andrea crotti
2013-07-11 12:02 ` Nicolas Richard
[not found] ` <mailman.723.1373426169.12400.help-gnu-emacs@gnu.org>
2013-07-11 23:29 ` Raffaele Ricciardi
2013-07-12 0:26 ` Michael Heerdegen
[not found] ` <mailman.883.1373588795.12400.help-gnu-emacs@gnu.org>
2013-07-12 13:04 ` Raffaele Ricciardi
2013-07-12 23:16 ` Michael Heerdegen
2013-07-10 3:14 ` Le Wang [this message]
2013-07-12 13:18 ` Jambunathan K
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAM=K+iqSxfmvfMOB3m=sQb7Sk2HV6s3WK_7zCK5UJMSTDZ8+0g@mail.gmail.com' \
--to=l26wang@gmail.com \
--cc=help-gnu-emacs@gnu.org \
--cc=rfflrccrd@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.