From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jambunathan K Newsgroups: gmane.emacs.help Subject: Re: `align-regexp' fails in Lisp code Date: Fri, 12 Jul 2013 18:48:47 +0530 Message-ID: <87wqovc3wo.fsf@gmail.com> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1373635065 16727 80.91.229.3 (12 Jul 2013 13:17:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 12 Jul 2013 13:17:45 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Raffaele Ricciardi Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jul 12 15:17:46 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 1UxdEE-0008Jg-N9 for geh-help-gnu-emacs@m.gmane.org; Fri, 12 Jul 2013 15:17:42 +0200 Original-Received: from localhost ([::1]:38057 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UxdEE-0003uO-70 for geh-help-gnu-emacs@m.gmane.org; Fri, 12 Jul 2013 09:17:42 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38205) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UxdDu-0003rJ-0u for help-gnu-emacs@gnu.org; Fri, 12 Jul 2013 09:17:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UxdDp-0006OP-Ew for help-gnu-emacs@gnu.org; Fri, 12 Jul 2013 09:17:21 -0400 Original-Received: from mail-pb0-x236.google.com ([2607:f8b0:400e:c01::236]:55914) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UxdDp-0006OJ-8g for help-gnu-emacs@gnu.org; Fri, 12 Jul 2013 09:17:17 -0400 Original-Received: by mail-pb0-f54.google.com with SMTP id ro2so9041926pbb.41 for ; Fri, 12 Jul 2013 06:17:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=dypUFfLldfs1Nya2Q9jNEMwv0llSirJcaX3h+TAhLOA=; b=RKBQAUY3CTCePcZJjdXjp4mKSMXEjEVDrvu8iQc2hPJkEhNPfRuWjQ/UQHnObNagOg I46/zEPuFgGLJWzGgDBIGLFwsDE609M74WwZqYj7e4SXoLJoZjWNwPHDaSlJIskS9Z+W gq3Xpe86j62+nKB69RerTqi/qiSqctMlUeCqk26LfdwdpgxqrYONrzlqZvyzieT4NjCY bopenejQEIZvljl6h6EUJIePlNzB8WsoDG2P9gHlyPyYU5hKQoeEa8ElVayP1gaWrplW OMa+55cTHHbctAQVkr2HBvXZiCdaWzVthIjPAzqwbfrvD1+376nN2GUmPYzKlTFztj1Q OZpQ== X-Received: by 10.68.12.165 with SMTP id z5mr41238417pbb.172.1373635036260; Fri, 12 Jul 2013 06:17:16 -0700 (PDT) Original-Received: from debian-6.05 ([115.242.212.29]) by mx.google.com with ESMTPSA id dc5sm5671317pbc.37.2013.07.12.06.17.12 for (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Fri, 12 Jul 2013 06:17:15 -0700 (PDT) In-Reply-To: (Raffaele Ricciardi's message of "Wed, 10 Jul 2013 02:11:42 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c01::236 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:92080 Archived-At: Run the command as usual M-x align-regexp RET Let Emacs tell you what the lisp representation of it is. Do M-x list-command-history RET you will find your very recent command there. Copy, paste that stuff, do some modifications for the region portion and your are done. ---------------------------------------------------------------- You can also get the lisp representation with M-x repeat-complex-command RET M-p M-p etc until you find what you want. Raffaele Ricciardi writes: > 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.