From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.cc-mode.general,gmane.emacs.help Subject: Re: imenu with cc-mode in emacs 22 (win32) Date: Wed, 12 Nov 2008 12:58:40 +0000 Message-ID: <20081112125840.GC1188@muc.de> References: <55935300-52c8-4641-a644-01c6d06e4362@z28g2000prd.googlegroups.com> Reply-To: bug-cc-mode@gnu.org NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1226494042 4350 80.91.229.12 (12 Nov 2008 12:47:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 12 Nov 2008 12:47:22 +0000 (UTC) Cc: bug-cc-mode@gnu.org, help-gnu-emacs@gnu.org To: Rudolfo Ungern Original-X-From: cc-mode-help-bounces@lists.sourceforge.net Wed Nov 12 13:48:23 2008 Return-path: Envelope-to: sf-cc-mode-help@m.gmane.org Original-Received: from lists.sourceforge.net ([216.34.181.88]) by lo.gmane.org with esmtp (Exim 4.50) id 1L0F8w-0003MH-IT for sf-cc-mode-help@m.gmane.org; Wed, 12 Nov 2008 13:48:22 +0100 Original-Received: from localhost ([127.0.0.1] helo=sfs-ml-3.v29.ch3.sourceforge.com) by h25xhf1.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1L0F7n-0008PP-C9; Wed, 12 Nov 2008 12:47:11 +0000 Original-Received: from sfi-mx-3.v28.ch3.sourceforge.com ([172.29.28.123] helo=mx.sourceforge.net) by h25xhf1.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1L0F7m-0008PI-AU for cc-mode-help@lists.sourceforge.net; Wed, 12 Nov 2008 12:47:10 +0000 Received-SPF: neutral (3b2kzd1.ch3.sourceforge.com: 140.186.70.10 is neither permitted nor denied by domain of muc.de) client-ip=140.186.70.10; envelope-from=acm@muc.de; helo=fencepost.gnu.org; Original-Received: from fencepost.gnu.org ([140.186.70.10]) by 3b2kzd1.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.69) id 1L0F7h-0002cI-T2 for cc-mode-help@lists.sourceforge.net; Wed, 12 Nov 2008 12:47:10 +0000 Original-Received: from mx10.gnu.org ([199.232.76.166]:56054) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1L0F4b-0004tz-2q for bug-cc-mode@gnu.org; Wed, 12 Nov 2008 07:43:53 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1L0F7b-0004xk-Bc for bug-cc-mode@gnu.org; Wed, 12 Nov 2008 07:47:00 -0500 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on monty-python X-Spam-Level: X-Spam-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00, DNS_FROM_SECURITYSAGE,FORGED_RCVD_HELO,SPF_PASS autolearn=no version=3.1.0 Original-Received: from colin.muc.de ([193.149.48.1]:4666 helo=mail.muc.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L0F7a-0004wC-DH for bug-cc-mode@gnu.org; Wed, 12 Nov 2008 07:46:59 -0500 Original-Received: (qmail 11469 invoked by uid 3782); 12 Nov 2008 12:46:54 -0000 Original-Received: from acm.muc.de (pD9E51AA7.dip.t-dialin.net [217.229.26.167]) by colin2.muc.de (tmda-ofmipd) with ESMTP; Wed, 12 Nov 2008 13:46:52 +0100 Original-Received: (qmail 2877 invoked by uid 1000); 12 Nov 2008 12:58:40 -0000 Content-Disposition: inline In-Reply-To: <55935300-52c8-4641-a644-01c6d06e4362@z28g2000prd.googlegroups.com> User-Agent: Mutt/1.5.9i X-Delivery-Agent: TMDA/1.1.5 (Fettercairn) X-Primary-Address: acm@muc.de X-detected-operating-system: by monty-python.gnu.org: FreeBSD 4.6-4.9 X-Spam-Score: -2.8 (--) X-Spam-Report: Spam detection software, running on the system "g92kzd1.ch3.sourceforge.com", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: [ Reply-To: set to bug-cc-mode@gnu.org ] Hi, Rolf! On Wed, Nov 12, 2008 at 03:21:32AM -0800, Rudolfo Ungern wrote: > Hi, [...] Content analysis details: (-2.8 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -4.0 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [140.186.70.10 listed in list.dnswl.org] 1.2 SPF_NEUTRAL SPF: sender does not match SPF record (neutral) 0.0 AWL AWL: From: address is in the auto white-list X-Headers-End: 1L0F7h-0002cI-T2 X-BeenThere: cc-mode-help@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: "Bug reports, feature requests, and general talk about CC Mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: cc-mode-help-bounces@lists.sourceforge.net Xref: news.gmane.org gmane.emacs.cc-mode.general:5267 gmane.emacs.help:59688 Archived-At: [ Reply-To: set to bug-cc-mode@gnu.org ] Hi, Rolf! On Wed, Nov 12, 2008 at 03:21:32AM -0800, Rudolfo Ungern wrote: > Hi, > i switched to emacs-22.3 recently and have a problem with speedbar/ > imenu in cc-mode. When I try to navigate with imenu to a function emacs > eats up all the CPU resources and is not responding anymore. Not good. Does this happen with any C file, or just sometimes? If the latter, could you possibly pare a file down to the minimum which shows the bug, then post it? Thanks! Please give an exact recipe (in terms of keystrokes or mouse clicks) to reproduce the problem. I've redirected this mail to the CC Mode list at bug-cc-mode@gnu.org, because it smells like that sort of problem. > Imenu is working with perl files (with perl-mode) with sql files, but > not with cc mode. No matter if it is c++ or plain c code. What is your CC exact Mode configuration? (Please do C-c C-b in a CC Mode buffer. That will open a mail buffer with all the information, pre-addressed to bug-cc-mode@gnu.org. If you use a different mail client, just copy everything across. Thanks!) > It must be something in my .emacs, because navigating in the same > source files with imenu works if I skip my .emacs (that is: start emacs > as another user) It might well be your .emacs which is triggering the bug, but the bug itself is mine. :-) > On the other hand the same .emacs file works find with emacs-21.3 and > imenu. (of course i use some different code depending on the emacs > version, but that does not affect imenu nor cc-mode. CC Mode was amended a lot between Emacs 21.3 and 22.1. > It seems like the imenu related lisp code runs in some never-ending > loop. I guess it would help me a lot, if I can have some hints how to > activate the elisp debugger. The simplest ways are (setq debug-on-error t) and (setq debug-on-quit t). The second one seems the most relevant here. After setting debug-on-quit, get into the infinite loop and C-g it - this gets you into the debugger, with a display of the calling stack. The debugger is documented on the page "debugger" in the Elisp manual. Or for really heavy debugging, look up Edebug in the elisp manual. With edebug, you have to "instrument" a function first. When you get to that function, you can then do things like single stepping, etc. > I know that this post is pretty vague, but the alternative would have > been to paste 400 lines of the .emacs into this post. Well, who know, I might ask you to do just that a bit later. :-) > I usually use > (add-hook 'c-mode-common-hook 'my-c-mode-hook) > in my .emacs file, with some indentation adjustments in my-c-mode- > hook. but even if I deactivate this add-hook expression I still run in > the problem with imenu. > The other suspected piece of code is in customization: > (custom-set-variables > ; > '(imenu-sort-function (quote imenu--sort-by-name))) > but commenting it out, doesn't help either. > If someone knows what areas have changed in imenu from emacs21 to > emacs22, that could give me a hint where to search for the root of the > problem. CC Mode changed from version 5.28 to 5.31.n. This contains the bulk of the imenu code for C, etc. The pertinent file in Emacs is in .../emacs/lisp/progmodes/cc-menu.el. The imenu code itself is in .../emacs/lisp/imenu.el. You can see recent changes to it in .../emacs/lisp/ChangeLog. Alternatively, have a look at the CVS repository at http://cvs.savannah.gnu.org/viewvc/emacs/emacs/lisp/imenu.el. Have fun! > Thanks, Rolf -- Alan Mackenzie (Nuremberg, Germany). ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/