From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Fabian Ezequiel Gallina Newsgroups: gmane.emacs.devel Subject: imenu issue from Bug #13438 Date: Mon, 21 Jan 2013 18:09:20 -0300 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1358802564 17933 80.91.229.3 (21 Jan 2013 21:09:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 21 Jan 2013 21:09:24 +0000 (UTC) To: Emacs-Devel devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 21 22:09:43 2013 Return-path: Envelope-to: ged-emacs-devel@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 1TxOch-00040Y-2a for ged-emacs-devel@m.gmane.org; Mon, 21 Jan 2013 22:09:43 +0100 Original-Received: from localhost ([::1]:60189 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TxOcP-0000Bf-Ng for ged-emacs-devel@m.gmane.org; Mon, 21 Jan 2013 16:09:25 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:42282) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TxOcM-0000Ba-Rv for emacs-devel@gnu.org; Mon, 21 Jan 2013 16:09:23 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TxOcL-0000sa-NL for emacs-devel@gnu.org; Mon, 21 Jan 2013 16:09:22 -0500 Original-Received: from mail-ia0-x22d.google.com ([2607:f8b0:4001:c02::22d]:64328) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TxOcL-0000sS-IT for emacs-devel@gnu.org; Mon, 21 Jan 2013 16:09:21 -0500 Original-Received: by mail-ia0-f173.google.com with SMTP id l29so2884767iag.18 for ; Mon, 21 Jan 2013 13:09:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=X8Sql2FjzGdUN0pt60VyyiC+GauN7Z3hJOoUFCEVMmI=; b=ndrGoc2G9EX/PPLQUKG9leOR+AGG76J0x2h2Z0zwy/Asue7VoyjEIXLlD/BfxmR05y khkJdOxKi5zRSKvD4lXRqXUrmsUFCXK+5t0soYblUHIigX059ywiHlLGX/1CyDRH90LG 7OLpTONo3djzv9+YMFbazlWl5H8BinbnX18WolOUhn7T1ycUF4znSCC2f9h6Hjh6gSI5 bp8KkWNYu0s4idLFSDSSiLsoXGRwdzLEWB1gPWMBpcMiz+9swclvgvHLw7Pbyz9sPXUI pBpZ2SSBcSAr+pl46jf9j4JuzGeW9g7GZpJIORpjQJeEvxUs7yLhlNCZbK3GZgldxwWa ZR+g== X-Received: by 10.50.40.229 with SMTP id a5mr10055239igl.59.1358802560379; Mon, 21 Jan 2013 13:09:20 -0800 (PST) Original-Received: by 10.64.9.143 with HTTP; Mon, 21 Jan 2013 13:09:20 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4001:c02::22d X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:156560 Archived-At: Got a quick look at http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D13438, in there I think the problem is related to how `imenu-default-create-index-function' detects infinite recursion. I this case, because the the point is at the beginning of the latest available defun, the points doesn't move and it throws the infinite loop error. Here's a mindless quick patch that seems to fix the problem. I could install it myself but I'd like some input first. =3D=3D=3D modified file 'lisp/imenu.el' --- lisp/imenu.el 2013-01-01 09:11:05 +0000 +++ lisp/imenu.el 2013-01-21 21:03:57 +0000 @@ -683,7 +683,8 @@ (goto-char (point-max)) ;; Search for the function (while (funcall imenu-prev-index-position-function) - (when (=3D pos (point)) + (when (and (=3D pos (point)) + (save-excursion (beginning-of-defun))) (error "Infinite loop at %s:%d: imenu-prev-index-position-function does not move point" (buffer-name) pos)) (setq pos (point)) (save-excursion Regards, Fabi=E1n