GNU bug report logs - #3424
align-regexp: Infinite loop with default regexp

Previous Next

Package: emacs;

Reported by: Teemu Likonen <tlikonen <at> iki.fi>

Date: Sat, 30 May 2009 17:40:08 UTC

Severity: normal

Done: Teemu Likonen <tlikonen <at> iki.fi>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Lennart Borgman <lennart.borgman <at> gmail.com>
To: Teemu Likonen <tlikonen <at> iki.fi>, 3424 <at> debbugs.gnu.org
Cc: bug-gnu-emacs <at> gnu.org
Subject: bug#3424: align-regexp: Infinite loop with default regexp
Date: Sat, 30 May 2009 20:24:43 +0200
On Sat, May 30, 2009 at 7:37 PM, Teemu Likonen <tlikonen <at> iki.fi> 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:
>
>  1. Put the following line to the *scratch* buffer:
>
>        foo bar
>
>  2. Put the line inside a region
>
>  3. Type command:
>
>        C-u M-x align-regexp RET \(\s-*\) RET 1 RET 1 RET y
>
>  4. 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.
>
>



This bug report was last modified 15 years and 347 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.