From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: patch: add-log.el: changelog find file under point Date: Fri, 22 Feb 2008 20:26:06 +0100 Message-ID: <47BF21CE.10607@gmx.at> References: <1194211092.13041.13.camel@peder.flower> <200801222310.m0MN9cZq011601@sallyv1.ics.uci.edu> <8763xl492o.fsf@jurta.org> <200801230225.m0N2Ptmx012952@sallyv1.ics.uci.edu> <200801271954.m0RJsmBm003714@sallyv1.ics.uci.edu> <479DAC55.8070302@gmx.at> <200801300258.m0U2w9rr005169@sallyv1.ics.uci.edu> <47B9E0B1.1090908@gmx.at> <87skzpoqke.fsf@jurta.org> <47BA788E.7090406@gmx.at> <87mypv49oe.fsf@jurta.org> <47BD27B0.4060006@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1203708992 6724 80.91.229.12 (22 Feb 2008 19:36:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 22 Feb 2008 19:36:32 +0000 (UTC) Cc: juri@jurta.org, emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Feb 22 20:36:56 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JSdfr-00061d-8t for ged-emacs-devel@m.gmane.org; Fri, 22 Feb 2008 20:35:11 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JSdfL-0006OX-WC for ged-emacs-devel@m.gmane.org; Fri, 22 Feb 2008 14:34:40 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JSde4-0005v5-GO for emacs-devel@gnu.org; Fri, 22 Feb 2008 14:33:20 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JSde2-0005uN-Io for emacs-devel@gnu.org; Fri, 22 Feb 2008 14:33:19 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JSde2-0005uK-Dt for emacs-devel@gnu.org; Fri, 22 Feb 2008 14:33:18 -0500 Original-Received: from mail.gmx.net ([213.165.64.20]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1JSde1-000486-QG for emacs-devel@gnu.org; Fri, 22 Feb 2008 14:33:18 -0500 Original-Received: (qmail invoked by alias); 22 Feb 2008 19:33:13 -0000 Original-Received: from N775P031.adsl.highway.telekom.at (EHLO [62.47.40.223]) [62.47.40.223] by mail.gmx.net (mp020) with SMTP; 22 Feb 2008 20:33:13 +0100 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX19KqXQcbBhKkTd1xMQYR5YAYVedC8U2scqQhIjWG7 qPdfKwvX0EWMMA User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: de-DE, de, en-us, en In-Reply-To: X-Y-GMX-Trusted: 0 X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:90006 Archived-At: > That was my idea when I wrote local-tags.el - presently imenu is useless > for C. > > That is surprising, because it worked in the past. > Can you describe the problem more specifically? > Post a test case? Consider the Emacs src directory. data.c gets me some 100 entries called "DEFUN", nine called "usage:" and things like "GLOBAL" "in" "nil" "therefore" "or" (from the ...or (at your option)... header)) "pair" "zero" in addition to say 20 "useful" entries. buffer.c gets me some 30 "as" three "element" seven "entry", ... For these files one out of three entries created by `imenu-create-index-function' makes sense. Moreover, I don't know how to make imenu list global variables in a consistent way or macro definitions but maybe I'm missing something here. > It seems, however, that hardly anyone uses imenu (which-func, > speedbar tags, ...) together with C mode - at least on this list. Hence > we can probably leave things as they are ;-) > > We don't abandon a combination of features just because it has > a bug. We fix it! We'd have to make imenu aware of Emacs' special "DEFUN" semantics - probably simple. We'd have to parse the buffer's syntax in order to skip matches in comments and strings. Simple as well, but will slow down menu generation and additionally hardened by the fact that `imenu--generic-function' scans the buffer backwards. Finally, we should fix variable, macro, enum, union definitions ... Since no one complained until now I'm not sure whether this should be done the hard way - `cc-imenu-c++-generic-expression' seems a quite fragile regexp - so we'll hardly get much feedback when we change this. It would be far simpler to get tags frome etags and have imenu use them.