From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.bugs Subject: bug#3424: align-regexp: Infinite loop with default regexp Date: Sat, 30 May 2009 20:24:43 +0200 Message-ID: References: <87my8upk47.fsf@iki.fi> Reply-To: Lennart Borgman , 3424@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1243708655 10841 80.91.229.12 (30 May 2009 18:37:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 30 May 2009 18:37:35 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org To: Teemu Likonen , 3424@emacsbugs.donarmstrong.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat May 30 20:37:31 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MATQw-0003w0-Sp for geb-bug-gnu-emacs@m.gmane.org; Sat, 30 May 2009 20:37:31 +0200 Original-Received: from localhost ([127.0.0.1]:45134 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MATQw-00043r-3P for geb-bug-gnu-emacs@m.gmane.org; Sat, 30 May 2009 14:37:30 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MATQr-00043I-0j for bug-gnu-emacs@gnu.org; Sat, 30 May 2009 14:37:25 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MATQm-000421-Ge for bug-gnu-emacs@gnu.org; Sat, 30 May 2009 14:37:24 -0400 Original-Received: from [199.232.76.173] (port=48364 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MATQm-00041u-57 for bug-gnu-emacs@gnu.org; Sat, 30 May 2009 14:37:20 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:43157) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MATQl-0008Ig-Hp for bug-gnu-emacs@gnu.org; Sat, 30 May 2009 14:37:19 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n4UIbHOv016469; Sat, 30 May 2009 11:37:17 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n4UIU4DG014726; Sat, 30 May 2009 11:30:04 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Lennart Borgman Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sat, 30 May 2009 18:30:04 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 3424 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.124370789413671 (code B ref -1); Sat, 30 May 2009 18:30:04 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 30 May 2009 18:24:54 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n4UIOoNb013663 for ; Sat, 30 May 2009 11:24:51 -0700 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MATEf-0003yb-SI for bug-gnu-emacs@gnu.org; Sat, 30 May 2009 14:24:49 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MATEb-0003qz-7i for bug-gnu-emacs@gnu.org; Sat, 30 May 2009 14:24:49 -0400 Original-Received: from [199.232.76.173] (port=56626 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MATEb-0003qf-1f for bug-gnu-emacs@gnu.org; Sat, 30 May 2009 14:24:45 -0400 Original-Received: from mail-bw0-f161.google.com ([209.85.218.161]:54334) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MATEa-0005LN-N2 for bug-gnu-emacs@gnu.org; Sat, 30 May 2009 14:24:44 -0400 Original-Received: by bwz5 with SMTP id 5so7386968bwz.42 for ; Sat, 30 May 2009 11:24:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=mBotuwh/T6DjFuvYPg/e2xsYX6B3HjXCAzaL26EO9S8=; b=dh1a7yM27+j2L1S3WpvlEYXgdYy09C27DtNijjM6CJ4RvR/813rLBYovaVIyVo1L55 XziltfQHWZRCpBfuScl2ETnsr60aFLddPukPR0T5NG/KOPN52KPcsq6bAeAOGIO7FkU7 hLI6Uub313HyEESmGJdQN7JqLkEiamsPeTj9g= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=d/VUyZkdptTxTEoPX567uRDqCRiJq0bBhtGK/oVmu+NvXCojqO74V3K1r3KDh1HjWL p2kX5r/E3r8ohV/+99yyaH3eMqYjXBEMc2aHcVeC92Hs9hD613OkIY2tQ6iJPsQuBa1y lzIic/3ILqh+Du/lpT35ZaKc+sXwDltIb4jUs= Original-Received: by 10.239.163.69 with SMTP id o5mr284181hbd.40.1243707883562; Sat, 30 May 2009 11:24:43 -0700 (PDT) In-Reply-To: <87my8upk47.fsf@iki.fi> X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Sat, 30 May 2009 14:37:24 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:28330 Archived-At: On Sat, May 30, 2009 at 7:37 PM, Teemu Likonen wrote: > The align-regexp command enters infinite loop when it is used with the > default regexp and with REPEAT argument. It's seems to be because the > regexp \s-* matches also zero-length strings. > > Steps to reproduce: > > =C2=A01. Put the following line to the *scratch* buffer: > > =C2=A0 =C2=A0 =C2=A0 =C2=A0foo bar > > =C2=A02. Put the line inside a region > > =C2=A03. Type command: > > =C2=A0 =C2=A0 =C2=A0 =C2=A0C-u M-x align-regexp RET \(\s-*\) RET 1 RET 1 = RET y > > =C2=A04. Loop infinitely. This does not happen for me with the latest pretest Emacs 23. Have you tested there? > I suggest changing the default regexp to \(\s-+\), like the attached > patch illustrates. > >