GNU bug report logs - #13438
24.2.92; Infinite loop in python imenu support

Previous Next

Package: emacs;

Reported by: Ivan Andrus <darthandrus <at> gmail.com>

Date: Mon, 14 Jan 2013 21:00:02 UTC

Severity: important

Found in version 24.2.92

Done: Fabián Ezequiel Gallina <fabian <at> anue.biz>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Glenn Morris <rgm <at> gnu.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Fabián Ezequiel Gallina <fabian <at> anue.biz>, 13438 <at> debbugs.gnu.org
Subject: bug#13438: /srv/bzr/emacs/emacs-24 r111196: * imenu.el (imenu-default-create-index-function): Remove useless
Date: Fri, 25 Jan 2013 03:34:53 -0500
>> Why is this issue (apparently) only seen in Python mode

Answering my own question, it happens in any mode that sets
imenu-prev-index-position-function and
imenu-extract-index-name-function, but there are very few of those.

Eg prolog mode. With buffer contents:

------
fac(0,1).
fac(N,F) :- N > 0, M is N - 1,
       fac(M,Fm), F is N * Fm.
------

and point at point-min, switching to prolog-mode causes the same issue.

How about taking the more cautious approach with:

(when (and (= pos (point))
           (not (bobp)))
   (error "Infinite loop... ))

(IIUC, this was actually the suggestion in
http://lists.gnu.org/archive/html/emacs-devel/2013-01/msg00510.html ?)




This bug report was last modified 12 years and 118 days ago.

Previous Next


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