GNU bug report logs - #19940
25.0.50; Infinite loop in `studlify-word' with Subword mode

Previous Next

Package: emacs;

Reported by: Simen Heggestøyl <simenheg <at> gmail.com>

Date: Tue, 24 Feb 2015 21:20:01 UTC

Severity: normal

Found in version 25.0.50

Done: Marcin Borkowski <mbork <at> mbork.pl>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Marcin Borkowski <mbork <at> mbork.pl>
To: Simen Heggestøyl <simenheg <at> gmail.com>
Cc: 19940 <at> debbugs.gnu.org
Subject: bug#19940: 25.0.50; Infinite loop in `studlify-word' with Subword mode
Date: Sun, 03 Apr 2016 05:49:10 +0200
On 2015-02-24, at 21:19, Simen Heggestøyl <simenheg <at> gmail.com> wrote:

> An infinite loop occurs when Subword mode is active and
>
> `studlify-word' is run on a word with more than one subword. The bug
>
>
> seems to have been introduced by changes made to subword.el in commit
>
>
> 6ddc44225e743e2b2a0d5c192f50aefd7a4a915b.
>
>
> Here is a recipe that triggers the bug, starting from emacs -Q:
>
>
> 1. Open a new buffer, and type in "subWord".
>
>
> 2. Activate Subword mode by `M-x subword-mode'.
>
>
> 3. Move point to the beginning of the line, and run `M-x
>
>
> studlify-word'.

Hi,

I can confirm this behavior on GNU Emacs 25.1.50.7 (commit 7570b35).
The problem seems to be that `studlify-region' assumes that
`forward-word' and `backward-word' will stop at non-word characters (in
the sense of the regex `\W').

One possible solution would be to temporarily switch `subword-mode' off
in `studlify-region'.  Given the nonsensicality of the latter, and the
fact that it breaks studlyCapsIdentifiers anyway, this might be the
preferred solution.  If nobody proposes anything better, I'll tryto
prepare such a patch within a few days.

-- 
Marcin Borkowski




This bug report was last modified 9 years and 138 days ago.

Previous Next


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