From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Le Wang Newsgroups: gmane.emacs.help Subject: Re: `align-regexp' fails in Lisp code Date: Wed, 10 Jul 2013 11:14:00 +0800 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1373426103 26977 80.91.229.3 (10 Jul 2013 03:15:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 10 Jul 2013 03:15:03 +0000 (UTC) Cc: GNU Emacs List To: Raffaele Ricciardi Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jul 10 05:15:05 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Uwkr7-0001dd-Vl for geh-help-gnu-emacs@m.gmane.org; Wed, 10 Jul 2013 05:14:14 +0200 Original-Received: from localhost ([::1]:50112 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uwkr7-0004Ac-Gf for geh-help-gnu-emacs@m.gmane.org; Tue, 09 Jul 2013 23:14:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48197) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uwkqx-0004AM-Ie for help-gnu-emacs@gnu.org; Tue, 09 Jul 2013 23:14:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uwkqw-0006NR-JR for help-gnu-emacs@gnu.org; Tue, 09 Jul 2013 23:14:03 -0400 Original-Received: from mail-we0-x234.google.com ([2a00:1450:400c:c03::234]:48734) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uwkqw-0006NI-Dd for help-gnu-emacs@gnu.org; Tue, 09 Jul 2013 23:14:02 -0400 Original-Received: by mail-we0-f180.google.com with SMTP id w56so5393840wes.39 for ; Tue, 09 Jul 2013 20:14:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=r2rSK4+AiK4r+5wEG4XUdFBOu732ph8jeohit45mlLI=; b=xATaQ25sNdYI6F3QF8Qz+LWmkEiLS8miDWbRBz8SGKfmbrreKXLcv+ixDCDpeqPy6A go1VchtJImyxuVR7k9GF5NCA11BI72k9Nw5CZEOM4Rgg4Y2DumxvXYDkbS60Z8oADAhZ rTiBt05765Kd/tev0XdlnLni+sLCyc8odIggea908lmtF4zS7IIANjjLeoR1YM66ZDoK 7Yn86sXIRwvuNWUkn0Gw2VNTJ5lNQz8Wuyurs5CE+3QtlG9IpccdBkiPnidkEgT+RvGS qmklSWAWkWt5To6Q9vOuyfPDu/xNZw2E0w5o0Py11Yi3Z3N/aHKqCBhVcpQB5gx4TPDu G1Cw== X-Received: by 10.180.80.166 with SMTP id s6mr6687313wix.38.1373426041071; Tue, 09 Jul 2013 20:14:01 -0700 (PDT) Original-Received: by 10.217.62.10 with HTTP; Tue, 9 Jul 2013 20:14:00 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c03::234 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:92037 Archived-At: 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 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