From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#36678: 27.0.50; imenu not working in C++ (maybe because of namespace) Date: 17 Jul 2019 16:34:27 -0000 Organization: muc.de e.V. Message-ID: <20190717163427.18177.qmail@mail.muc.de> References: <20190715203338.btcmpy3jnfmxa3f7@Ergus> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="93163"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: tin/2.4.2-20171224 ("Lochhead") (UNIX) (FreeBSD/11.2-RELEASE-p9 (amd64)) Cc: 36678@debbugs.gnu.org To: Ergus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jul 17 18:35:10 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hnmtZ-000O6L-Me for geb-bug-gnu-emacs@m.gmane.org; Wed, 17 Jul 2019 18:35:09 +0200 Original-Received: from localhost ([::1]:59066 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hnmtY-0003U4-A8 for geb-bug-gnu-emacs@m.gmane.org; Wed, 17 Jul 2019 12:35:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51198) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hnmtV-0003Ty-Jl for bug-gnu-emacs@gnu.org; Wed, 17 Jul 2019 12:35:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hnmtU-0002v0-GL for bug-gnu-emacs@gnu.org; Wed, 17 Jul 2019 12:35:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44071) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hnmtS-0002tx-AW; Wed, 17 Jul 2019 12:35:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hnmtS-0005zQ-4A; Wed, 17 Jul 2019 12:35:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Wed, 17 Jul 2019 16:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36678 X-GNU-PR-Package: emacs,cc-mode Original-Received: via spool by 36678-submit@debbugs.gnu.org id=B36678.156338127422981 (code B ref 36678); Wed, 17 Jul 2019 16:35:02 +0000 Original-Received: (at 36678) by debbugs.gnu.org; 17 Jul 2019 16:34:34 +0000 Original-Received: from localhost ([127.0.0.1]:52892 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hnmt0-0005ya-Ck for submit@debbugs.gnu.org; Wed, 17 Jul 2019 12:34:34 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:44230 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1hnmsy-0005yO-Ax for 36678@debbugs.gnu.org; Wed, 17 Jul 2019 12:34:33 -0400 Original-Received: (qmail 18178 invoked by uid 3782); 17 Jul 2019 16:34:27 -0000 In-Reply-To: X-Newsgroups: gnu.emacs.bug X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:163256 Archived-At: Hello again, Ergus. In article you wrote= : > [-- text/plain, encoding 7bit, charset: us-ascii, 91 lines --] > --text follows this line-- > In the example code (attachement) imenu does not recognizes the > functions. So it shows that there are not candidates when there are. [ .... ] > Major mode: C++//l The problem is that the function names are not at column zero. If they were, they'd get recognised properly. If CC Mode's imenu were to recognise indented functions there'd be too many false positives. This problem has actually come up before (on 2016-11-25, in a post to the CC Mode list by Jens Kjerrstr=C3=B6m), and I then hacked up three defuns = which would search for functions functionally rather than by regexp. This wasn't wholly satisfactory since (i) this searching was slow; and (ii) if there were two functions of the same name (e.g., in different namespaces), imenu would only find the first one in the buffer. If you are interested, I could send you this hack, which is not all that big. Maybe you could play around with it and make it work well. Maybe it would be possible to bring this approach up to a usable part of CC Mode - possibly solving (ii) by constructing a hierarchical menu, but problem (i) would remain. In any case this would be a substantial enhancement rather than a simple bug fix. [ .... ] > [-- text/plain, encoding 7bit, charset: us-ascii, 45 lines, name: make_= local_matrix.hpp --] > #ifndef _make_local_matrix_hpp_ > #define _make_local_matrix_hpp_ > #include > #include > #include > #include > #include > namespace miniFE { > void get_recv_info_task(CSRMatrix *A, size_t id, size_t numboxe= s > const size_t *nrows_array, > size_t Annz, size_t Anrows) > { > } > void get_send_info_task(CSRMatrix *A, size_t id, > size_t numboxes, > int *send_length_local) > { > } > void set_send_info_task(CSRMatrix *A_array, size_t id, > size_t numboxes, > int nelements_to_send_local, > int *elements_to_send_local) > { > } > void make_local_matrix(CSRMatrix *A_array, singleton *sing, siz= e_t numboxes) > { > } > }//namespace miniFE > #endif --=20 Alan Mackenzie (Nuremberg, Germany).