GNU bug report logs - #36678
27.0.50; imenu not working in C++ (maybe because of namespace)

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs,cc-mode; Reported by: Ergus <spacibba@HIDDEN>; dated Mon, 15 Jul 2019 20:34:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 36678 <at> debbugs.gnu.org:


Received: (at 36678) by debbugs.gnu.org; 3 Aug 2019 14:43:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Aug 03 10:43:37 2019
Received: from localhost ([127.0.0.1]:59748 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1htvFw-0002On-Tf
	for submit <at> debbugs.gnu.org; Sat, 03 Aug 2019 10:43:37 -0400
Received: from eggs.gnu.org ([209.51.188.92]:38648)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <psmith@HIDDEN>) id 1htvFv-0002Ob-Vr
 for 36678 <at> debbugs.gnu.org; Sat, 03 Aug 2019 10:43:36 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:58312)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <psmith@HIDDEN>)
 id 1htvFq-00043q-Fn; Sat, 03 Aug 2019 10:43:30 -0400
Received: from pool-98-118-0-140.bstnma.fios.verizon.net ([98.118.0.140]:34772
 helo=homebase.home)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <psmith@HIDDEN>)
 id 1htvFj-0006ir-1I; Sat, 03 Aug 2019 10:43:23 -0400
Message-ID: <fa562743615e6f587d45665c7da89a9766a72593.camel@HIDDEN>
Subject: Re: bug#36678: 27.0.50; imenu not working in C++ (maybe because of
 namespace)
From: Paul Smith <psmith@HIDDEN>
To: rms@HIDDEN
Date: Sat, 03 Aug 2019 10:43:21 -0400
In-Reply-To: <E1htjjb-0002eO-Fo@HIDDEN>
References: <mailman.1463.1563222851.2688.bug-gnu-emacs@HIDDEN>
 <20190717163427.18177.qmail@HIDDEN>
 <20190731155610.x33urisumbblyryu@Ergus> <20190802193315.GC11966@ACM>
 <dba7a41398e9fe42d5f3869c1c1f85c407e88aa6.camel@HIDDEN>
 <E1htjjb-0002eO-Fo@HIDDEN>
Organization: GNU's Not UNIX!
Content-Type: text/plain; charset="UTF-8"
User-Agent: Evolution 3.32.1-2 
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 36678
Cc: acm@HIDDEN, spacibba@HIDDEN, 36678 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: psmith@HIDDEN
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

On Fri, 2019-08-02 at 22:25 -0400, Richard Stallman wrote:
>   > The future (again IMO) for indexing and code introspection is in LSP:
>   > there are very good LSP servers for C++ that are free (I use ccls
>   > personally) and there are also very good LSP clients for Emacs (I use
>   > lsp-mode).
> 
> Using a server to do your ocmputing job is bad for your freedom
> (unless it's your own server).

Sorry, I guess I should have provided more details.  When I say
"server" I mean in the traditional sense, of a background process
running on your local system.  I don't mean "service", as in Internet
service.

LSP stands for "Language Server Protocol" and is a public protocol
(invented and driven by Microsoft, but a public effort).

The goal is to split the work of indexing source code and the work of
editing source code into two parts, and LSP is the protocol between
those two parts.  The protocol is language agnostic, so if you have a
client that speaks LSP, that same client can work for ANY language for
which you have an LSP server.  There are (free) LSP servers available
for most popular languages.

More info here: https://langserver.org/

An Internet service would be quite untenable since the server is used
to index your source code, and virtually no one would be interested in
uploading all of their source code to some third party for indexing.
Plus it's indexing your particular code so it would have to support
uploading every individual developers workspace, and uploading every
change to that workspace, etc.

There are many free software LSP server implementations.  The one I
mentioned, ccls, supports C and C++ and is licensed via Apache 2.0:

https://github.com/MaskRay/ccls

Of course the Emacs client implementations are all free software
(available on ELPA etc.)





Information forwarded to bug-gnu-emacs@HIDDEN, bug-cc-mode@HIDDEN:
bug#36678; Package emacs,cc-mode. Full text available.

Message received at 36678 <at> debbugs.gnu.org:


Received: (at 36678) by debbugs.gnu.org; 3 Aug 2019 11:27:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Aug 03 07:27:40 2019
Received: from localhost ([127.0.0.1]:58372 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1htsCK-0005MY-6u
	for submit <at> debbugs.gnu.org; Sat, 03 Aug 2019 07:27:40 -0400
Received: from colin.muc.de ([193.149.48.1]:14958 helo=mail.muc.de)
 by debbugs.gnu.org with smtp (Exim 4.84_2)
 (envelope-from <acm@HIDDEN>) id 1htsCH-0005MO-B0
 for 36678 <at> debbugs.gnu.org; Sat, 03 Aug 2019 07:27:38 -0400
Received: (qmail 33498 invoked by uid 3782); 3 Aug 2019 10:35:02 -0000
Received: from acm.muc.de (p2E5D5CC5.dip0.t-ipconnect.de [46.93.92.197]) by
 colin.muc.de (tmda-ofmipd) with ESMTP;
 Sat, 03 Aug 2019 12:35:01 +0200
Received: (qmail 5710 invoked by uid 1000); 3 Aug 2019 11:27:34 -0000
Date: Sat, 3 Aug 2019 11:27:34 +0000
To: Paul Smith <psmith@HIDDEN>
Subject: Re: bug#36678: 27.0.50; imenu not working in C++ (maybe because of
 namespace)
Message-ID: <20190803112734.GA5573@ACM>
References: <mailman.1463.1563222851.2688.bug-gnu-emacs@HIDDEN>
 <20190717163427.18177.qmail@HIDDEN>
 <20190731155610.x33urisumbblyryu@Ergus>
 <20190802193315.GC11966@ACM>
 <dba7a41398e9fe42d5f3869c1c1f85c407e88aa6.camel@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <dba7a41398e9fe42d5f3869c1c1f85c407e88aa6.camel@HIDDEN>
User-Agent: Mutt/1.10.1 (2018-07-13)
X-Delivery-Agent: TMDA/1.1.12 (Macallan)
From: Alan Mackenzie <acm@HIDDEN>
X-Primary-Address: acm@HIDDEN
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 36678
Cc: Ergus <spacibba@HIDDEN>, 36678 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hello, Paul.

On Fri, Aug 02, 2019 at 15:56:59 -0400, Paul Smith wrote:
> I certainly don't want to discourage anyone from pursuing new features
> and capabilities if they want to.

> However, my personal opinion is that it's likely not the most
> productive use of time.  IMHO cc-mode should continue to focus on
> formatting (which is clearly no small task, but which it's very good
> at!) and not attempt to also get involved with indexing.

CC Mode has had imenu type indexing right from its inception.  What is
changing is the increasing complexity of function definitions, in
particular, the slow demise of the convention of function names being in
column zero.

> The future (again IMO) for indexing and code introspection is in LSP:
> there are very good LSP servers for C++ that are free ....

Free as in speech (not beer)?  (Just checking.)

> .... (I use ccls personally) and there are also very good LSP clients
> for Emacs (I use lsp-mode).  And of course there are LSP servers for
> many languages which can all be used with the same LSP client.  Since
> the servers are external ....

External to what?  External to Emacs, or external to the machine running
Emacs?  If the latter, that would restrict full Emacs functionality to
networked machines, which would be a big negative, possibly a decisive
one.

> .... (ccls is based on clang) ....

This makes it controversial, since clang isn't free software in the
copyleft sense of the term.

> .... they are very fast and can do much, MUCH more than imenu-type
> indexing.

Could you please give some idea of what you mean by "much more"?

> I honestly can't imagine working on a larger codebase without it,
> anymore.

Does the server you're using run on your own machine?  (I'm guessing
yes.)

> I don't personally use imenu but a quick search shows that there are
> integrations of imenu and lsp-mode available.

> Just my $0.02!!

Thanks!

-- 
Alan Mackenzie (Nuremberg, Germany).




Information forwarded to bug-gnu-emacs@HIDDEN, bug-cc-mode@HIDDEN:
bug#36678; Package emacs,cc-mode. Full text available.

Message received at 36678 <at> debbugs.gnu.org:


Received: (at 36678) by debbugs.gnu.org; 3 Aug 2019 07:20:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Aug 03 03:20:39 2019
Received: from localhost ([127.0.0.1]:58246 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1htoLH-0007VD-H0
	for submit <at> debbugs.gnu.org; Sat, 03 Aug 2019 03:20:39 -0400
Received: from eggs.gnu.org ([209.51.188.92]:47256)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1htoLF-0007Uy-JB
 for 36678 <at> debbugs.gnu.org; Sat, 03 Aug 2019 03:20:38 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:53629)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1htoL6-0006hJ-QX; Sat, 03 Aug 2019 03:20:28 -0400
Received: from [176.228.60.248] (port=1067 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1htoKs-0002jP-8b; Sat, 03 Aug 2019 03:20:16 -0400
Date: Sat, 03 Aug 2019 10:20:09 +0300
Message-Id: <83v9veemvq.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: rms@HIDDEN
In-reply-to: <E1htjjb-0002eO-Fo@HIDDEN> (message from Richard
 Stallman on Fri, 02 Aug 2019 22:25:27 -0400)
Subject: Re: bug#36678: 27.0.50;
 imenu not working in C++ (maybe because of namespace)
References: <mailman.1463.1563222851.2688.bug-gnu-emacs@HIDDEN>
 <20190717163427.18177.qmail@HIDDEN>
 <20190731155610.x33urisumbblyryu@Ergus> <20190802193315.GC11966@ACM>
 <dba7a41398e9fe42d5f3869c1c1f85c407e88aa6.camel@HIDDEN>
 <E1htjjb-0002eO-Fo@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 36678
Cc: acm@HIDDEN, spacibba@HIDDEN, 36678 <at> debbugs.gnu.org, psmith@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Richard Stallman <rms@HIDDEN>
> Date: Fri, 02 Aug 2019 22:25:27 -0400
> Cc: acm@HIDDEN, spacibba@HIDDEN, 36678 <at> debbugs.gnu.org
> 
>   >   And of course there are LSP servers for many languages
>   > which can all be used with the same LSP client.  Since the servers are
>   > external (ccls is based on clang)
> 
> That is not a moral issue but it is something we don't want to support.
> Let's make GNU Emacs do a better job of this.

It is unreasonable to expect Emacs to be able to do a job as good as
the language servers, because that requires to have experts on board
that can implement similar capabilities in Emacs's own code, for the
plethora of languages that we want to and do support in Emacs major
modes.  I counted at least 2 dozen programming-language we support in
lisp/progmodes/, at least a dozen of them major programming languages
that are actively used today to develop and maintain very large
software systems.  We will never be able to have the expertise about
all of these languages nor resources to track their development in a
timely fashion.  Doing that entirely in Emacs Lisp is already
inadequate for several languages, so we will have to go to C, where we
have even less expertise and manpower.

Therefore, supporting language servers should be an important trend in
Emacs development, one of the trends that will ensure its relevance
and vitality in the very near future, let alone in the long run.

We should definitely want to support that.  Whether that server is
installed on the end-user's machine or not is a separate issue, but we
will simply be unable to support modern IDE features without having an
LSP client.  Support for editing programs is the main feature of
Emacs, so we cannot fall back too much in that department.

I see your point about outsourcing some work to an external server,
but I think in this case we have no other way but to support such
servers, because there's no practical alternative.

P.S. Such issues should not be discussed in a bug report.




Information forwarded to bug-gnu-emacs@HIDDEN, bug-cc-mode@HIDDEN:
bug#36678; Package emacs,cc-mode. Full text available.

Message received at 36678 <at> debbugs.gnu.org:


Received: (at 36678) by debbugs.gnu.org; 3 Aug 2019 02:25:46 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 02 22:25:46 2019
Received: from localhost ([127.0.0.1]:58090 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1htjjt-00046i-SU
	for submit <at> debbugs.gnu.org; Fri, 02 Aug 2019 22:25:46 -0400
Received: from eggs.gnu.org ([209.51.188.92]:58698)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rms@HIDDEN>) id 1htjjs-00046V-Ae
 for 36678 <at> debbugs.gnu.org; Fri, 02 Aug 2019 22:25:44 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:49793)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <rms@HIDDEN>)
 id 1htjji-0003R1-Ia; Fri, 02 Aug 2019 22:25:36 -0400
Received: from rms by fencepost.gnu.org with local (Exim 4.82)
 (envelope-from <rms@HIDDEN>)
 id 1htjjb-0002eO-Fo; Fri, 02 Aug 2019 22:25:32 -0400
Content-Type: text/plain; charset=Utf-8
From: Richard Stallman <rms@HIDDEN>
To: psmith@HIDDEN
In-Reply-To: <dba7a41398e9fe42d5f3869c1c1f85c407e88aa6.camel@HIDDEN> (message
 from Paul Smith on Fri, 02 Aug 2019 15:56:59 -0400)
Subject: Re: bug#36678: 27.0.50;
 imenu not working in C++ (maybe because of namespace)
References: <mailman.1463.1563222851.2688.bug-gnu-emacs@HIDDEN>
 <20190717163427.18177.qmail@HIDDEN>
 <20190731155610.x33urisumbblyryu@Ergus> <20190802193315.GC11966@ACM>
 <dba7a41398e9fe42d5f3869c1c1f85c407e88aa6.camel@HIDDEN>
Message-Id: <E1htjjb-0002eO-Fo@HIDDEN>
Date: Fri, 02 Aug 2019 22:25:27 -0400
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 36678
Cc: acm@HIDDEN, spacibba@HIDDEN, 36678 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: rms@HIDDEN
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > The future (again IMO) for indexing and code introspection is in LSP:
  > there are very good LSP servers for C++ that are free (I use ccls
  > personally) and there are also very good LSP clients for Emacs (I use
  > lsp-mode).

Using a server to do your ocmputing job is bad for your freedom
(unless it's your own server).  We call it Service as a Software Substitute
(https://gnu.org/philosophy/who-does-that-server-really-serve.html).

Since you don't control the code running someone else's service.  it
is never "free" the way a program can be free.  It's not a solution,
it's a problem.

  >   And of course there are LSP servers for many languages
  > which can all be used with the same LSP client.  Since the servers are
  > external (ccls is based on clang)

That is not a moral issue but it is something we don't want to support.
Let's make GNU Emacs do a better job of this.

-- 
Dr Richard Stallman
President, Free Software Foundation (https://gnu.org, https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)






Information forwarded to bug-gnu-emacs@HIDDEN, bug-cc-mode@HIDDEN:
bug#36678; Package emacs,cc-mode. Full text available.

Message received at 36678 <at> debbugs.gnu.org:


Received: (at 36678) by debbugs.gnu.org; 2 Aug 2019 20:07:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 02 16:07:34 2019
Received: from localhost ([127.0.0.1]:57809 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1htdpu-0004bX-Bk
	for submit <at> debbugs.gnu.org; Fri, 02 Aug 2019 16:07:34 -0400
Received: from eggs.gnu.org ([209.51.188.92]:42478)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <psmith@HIDDEN>) id 1htdfm-0002Ac-JL
 for 36678 <at> debbugs.gnu.org; Fri, 02 Aug 2019 15:57:06 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:44718)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <psmith@HIDDEN>)
 id 1htdfg-0003zm-Vl; Fri, 02 Aug 2019 15:57:01 -0400
Received: from [50.226.24.42] (port=56098 helo=pdslaptop)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <psmith@HIDDEN>)
 id 1htdfg-0001rU-6v; Fri, 02 Aug 2019 15:57:00 -0400
Message-ID: <dba7a41398e9fe42d5f3869c1c1f85c407e88aa6.camel@HIDDEN>
Subject: Re: bug#36678: 27.0.50; imenu not working in C++ (maybe because of
 namespace)
From: Paul Smith <psmith@HIDDEN>
To: Alan Mackenzie <acm@HIDDEN>, Ergus <spacibba@HIDDEN>
Date: Fri, 02 Aug 2019 15:56:59 -0400
In-Reply-To: <20190802193315.GC11966@ACM>
References: <mailman.1463.1563222851.2688.bug-gnu-emacs@HIDDEN>
 <20190717163427.18177.qmail@HIDDEN>
 <20190731155610.x33urisumbblyryu@Ergus> <20190802193315.GC11966@ACM>
Organization: GNU's Not UNIX!
Content-Type: text/plain; charset="UTF-8"
X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.1 
Mime-Version: 1.0
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 36678
X-Mailman-Approved-At: Fri, 02 Aug 2019 16:07:33 -0400
Cc: 36678 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: psmith@HIDDEN
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

I certainly don't want to discourage anyone from pursuing new features
and capabilities if they want to.

However, my personal opinion is that it's likely not the most
productive use of time.  IMHO cc-mode should continue to focus on
formatting (which is clearly no small task, but which it's very good
at!) and not attempt to also get involved with indexing.

The future (again IMO) for indexing and code introspection is in LSP:
there are very good LSP servers for C++ that are free (I use ccls
personally) and there are also very good LSP clients for Emacs (I use
lsp-mode).  And of course there are LSP servers for many languages
which can all be used with the same LSP client.  Since the servers are
external (ccls is based on clang) they are very fast and can do much,
MUCH more than imenu-type indexing.  I honestly can't imagine working
on a larger codebase without it, anymore.

I don't personally use imenu but a quick search shows that there are
integrations of imenu and lsp-mode available.

Just my $0.02!!






Information forwarded to bug-gnu-emacs@HIDDEN, bug-cc-mode@HIDDEN:
bug#36678; Package emacs,cc-mode. Full text available.

Message received at 36678 <at> debbugs.gnu.org:


Received: (at 36678) by debbugs.gnu.org; 2 Aug 2019 19:33:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 02 15:33:22 2019
Received: from localhost ([127.0.0.1]:57762 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1htdIo-0001Z8-GX
	for submit <at> debbugs.gnu.org; Fri, 02 Aug 2019 15:33:22 -0400
Received: from colin.muc.de ([193.149.48.1]:39560 helo=mail.muc.de)
 by debbugs.gnu.org with smtp (Exim 4.84_2)
 (envelope-from <acm@HIDDEN>) id 1htdIm-0001Yz-MZ
 for 36678 <at> debbugs.gnu.org; Fri, 02 Aug 2019 15:33:21 -0400
Received: (qmail 59201 invoked by uid 3782); 2 Aug 2019 18:40:45 -0000
Received: from acm.muc.de (p4FE15FF0.dip0.t-ipconnect.de [79.225.95.240]) by
 colin.muc.de (tmda-ofmipd) with ESMTP;
 Fri, 02 Aug 2019 20:40:44 +0200
Received: (qmail 17243 invoked by uid 1000); 2 Aug 2019 19:33:15 -0000
Date: Fri, 2 Aug 2019 19:33:15 +0000
To: Ergus <spacibba@HIDDEN>
Subject: Re: bug#36678: 27.0.50; imenu not working in C++ (maybe because of
 namespace)
Message-ID: <20190802193315.GC11966@ACM>
References: <mailman.1463.1563222851.2688.bug-gnu-emacs@HIDDEN>
 <20190717163427.18177.qmail@HIDDEN>
 <20190731155610.x33urisumbblyryu@Ergus>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20190731155610.x33urisumbblyryu@Ergus>
User-Agent: Mutt/1.10.1 (2018-07-13)
X-Delivery-Agent: TMDA/1.1.12 (Macallan)
From: Alan Mackenzie <acm@HIDDEN>
X-Primary-Address: acm@HIDDEN
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 36678
Cc: 36678 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hello, Ergus.

On Wed, Jul 31, 2019 at 17:56:13 +0200, Ergus wrote:
> Hi Alan:

> Sorry for the long delay replying this.

No problem!

> I have been thinking on this for a while because this issue affects me
> constantly as I use most of the time C++ now.

I've actually spent some time on this.  What I now have is the ability of
imenu to find functions, even when they are not at column zero, and to
record the enclosing namespace/class/etc. of these functions.  On M-x
imenu <tab>, which lists all found functions (more or less), the
namespace/class bit only gets displayed as needed to distinguish from
other functions of the same name.

The above is a bit of an exaggeration: it is not yet clean or robust
code, and hasn't been tested much, but does sort of work on the files
I've tried it on.

What is still missing is a scanning of a function's parameters, needed to
distinguish, say, a constructor with two parameters from the same with
none.  This is still looking a bit tricky.

> Maybe this is a stupid suggestion, but I was thinking that if the issue
> is performance (for ii) we could add a special function to implement the
> expensive part for the functional search in C and use the C regexps.

At the moment, the scanning of these C++ files is taking a small number
of seconds on my (pretty fast) Ryzen machine.  This is slow for imenu.

I can't honestly see how we might use a C function to speed all this up.
Currently, my new code is just using (c-beginning-of-defun -1) to find
the next function, thus avoiding the need to write reams of syntactical
analysis code, but not being fast.

> Maybe it could be restrictive somehow, but if this solves a problem,
> could be good enough and important for C++-mode. Because namespace use
> is becoming more and more extended in C++ with the new standards. And
> the most common indentations are the 

> Probably:

> 1) For example it could do a first filtration for the buffer in a C
> function using C regexp (with fake positives) and then filter again in
> the Lisp side?

> 2) Or, we could just iterate the file by lines in C and then modify the
> regex for the next line conditionally (which is cheaper than in
> Lisp). This could create a list in C that we can then use in the Lisp
> side more efficiently.

All this might be workable, I just don't know.  But it would probably
make sense to write it in Lisp first, and only then optimise it with C if
it really is too slow.

> In case we figure out a nice method for that. Does it makes sense?

[ .... ]

-- 
Alan Mackenzie (Nuremberg, Germany).




Information forwarded to bug-gnu-emacs@HIDDEN, bug-cc-mode@HIDDEN:
bug#36678; Package emacs,cc-mode. Full text available.

Message received at 36678 <at> debbugs.gnu.org:


Received: (at 36678) by debbugs.gnu.org; 31 Jul 2019 15:56:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jul 31 11:56:32 2019
Received: from localhost ([127.0.0.1]:52943 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hsqxq-0003PN-9g
	for submit <at> debbugs.gnu.org; Wed, 31 Jul 2019 11:56:32 -0400
Received: from sonic314-19.consmr.mail.ir2.yahoo.com ([77.238.177.145]:32810)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <spacibba@HIDDEN>) id 1hsqxo-0003P7-5F
 for 36678 <at> debbugs.gnu.org; Wed, 31 Jul 2019 11:56:29 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048;
 t=1564588580; bh=8KUU41qc0kv0uUXWnii+rmPpRMmT/vhvKbG/Pl/7ecc=;
 h=Date:From:To:Cc:Subject:References:In-Reply-To:From:Subject;
 b=aHjE1TeX5ffyLMxDGyGzuRsRYYbuX7BTV3XH1VqJDwmyUztS5KW+EflD92BQ+Q7hhmm+EfBuriFWs1OWWG340tV/Brw/rSv2zesLQflKfT3KJn+CC6XowvYH6AsByNcWKO0WbZfqZIxtMH9+DGEUUf2bYujTEaCOViez/Sn/iZvtj950JN3AJoRX9qt2BJhTVKADo4WfCxTESr5BEQ4ONXHr8qrduX1W9BbWi9oGESR01CwTEsxQJlceSHS8YcD2Bi8K0vCu/6RkvyodmnIspC5CfJF+s+LAgIrhViEnbm8K2J5+KTwfKR32PgDU7V0VIcYQ8g+aHmvRKlmbOKgggQ==
X-YMail-OSG: 450tThIVM1nt7Ejss4qR9CxYdndGwxrhEYlwMH_M1F8c0ZPV6FVIYFSrj6n1h6L
 59yn3Rmh7UlkndOc9NNfPNUU2ratTyJmlkeREwPjGJIdwP8fU98su5.b9J12tqcMj4lGa3I8g1zj
 9XMJzmiscPwJ66oMrgjITPcGo72jLiFoT9FK8MWPqTGsSWJiAhcuAUzjwU3UZGgIvSIObkfHMmGj
 E.XGQgkuxBsnj2krmPCSrjq57NEkcNKTYA_76Yms9EKOi2crgqykmLu9F7rcLOfnxRH1mw8paxdM
 I5NJVHfK95hzc31XCjNzvC_ksiFlr_jEQ_uxLxQXTK3j2An2yuGuhqu6AUnA92pAGQdnskCJi4he
 NVg2P9fL7J5uuQ92SBCMR.b1Hb_OKY.7x3jqyAo3hTisisE9fjCVywQKBmXWD0At_tydAoW5xhyJ
 xsk_1qXkEyB83YHUlSMQ.vhl05wRrJ2GyyTeBYNrrt4ep5uDgiJiCDMZKkKRGZ6CUUM3H9RYIYmR
 Hbn3DFCQTLrH6UQRrKK2Jwc8tabNJZa.qmebng5C7a0K0ZQd5zSlJetX0Qmg2rgoaN_GEZEGYs5q
 EicSVwGpO4RYYvyp2RoqsSVqe6kqkW7GrV7gB2Ryy3tEVT36eLzOLzTa3qRSjiqDXJRdfjXUpJHh
 8vYU9X8hABj_mU63i1ZFQK1hd9tp5.xvX.f9QsHafpmfBp4xMeOgq1wYcTtHvIRdns6wnOCezzgw
 B7KiSXofQPrNazGgP8YIAIzSRSl7lZl3WZaTNV9APi8jSpgdQ_Y26z0ZpEAyKVNO5pSGdJoVJFxH
 yc87MGBsEhadT5VPl7hFeCdxNVq5dW.g0BbEHfgLaLiT6.qUVEqUwVJNvE08MdrzOgVNqFQoo7Gw
 ViibNefZSd7sjhQlYEaiykJgWK2VVsf.thb8szIETE_Q6uHD3uK0EDBYmT7P10c4uBPd7iETH56a
 XHlOe7lAMPTgAWv1LzCoV3Lm.3Cuhp2.KNQaq8MZQGZfCfqnS3s06G8rMbQZM1cNxZ1R.jCl139A
 ppF4Mn2SRBPJMihf3S3Vc81qxDlmoQmpWOmJ74ic.xjJRc2.i3ny8vEubsWIHQB1ji.n5mAdzJ3l
 A0Gt8ONag4dON82crazHuUWFVrNHI8UIck8Q2uqyNGDLhI0hhpg6GlPoY7gUuJ1x38c5TktDF2n7
 KdHqn.dIURe_TAeOMKb3wtfx7bBRowf1Fic6Yhuon4csMJg--
Received: from sonic.gate.mail.ne1.yahoo.com by
 sonic314.consmr.mail.ir2.yahoo.com with HTTP; Wed, 31 Jul 2019 15:56:20 +0000
Received: by smtp418.mail.ir2.yahoo.com (Oath Hermes SMTP Server) with ESMTPA
 ID 30201d61e9e8114a89c041717c2561ab; 
 Wed, 31 Jul 2019 15:56:15 +0000 (UTC)
Date: Wed, 31 Jul 2019 17:56:13 +0200
From: Ergus <spacibba@HIDDEN>
To: Alan Mackenzie <acm@HIDDEN>
Subject: Re: bug#36678: 27.0.50; imenu not working in C++ (maybe because of
 namespace)
Message-ID: <20190731155610.x33urisumbblyryu@Ergus>
References: <mailman.1463.1563222851.2688.bug-gnu-emacs@HIDDEN>
 <20190717163427.18177.qmail@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1; format=flowed
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <20190717163427.18177.qmail@HIDDEN>
User-Agent: NeoMutt/20180716
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 36678
Cc: 36678 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hi Alan:

Sorry for the long delay replying this.

I have been thinking on this for a while because this issue affects me
constantly as I use most of the time C++ now.

Maybe this is a stupid suggestion, but I was thinking that if the issue
is performance (for ii) we could add a special function to implement the
expensive part for the functional search in C and use the C regexps.

Maybe it could be restrictive somehow, but if this solves a problem,
could be good enough and important for C++-mode. Because namespace use
is becoming more and more extended in C++ with the new standards. And
the most common indentations are the 

Probably:

1) For example it could do a first filtration for the buffer in a C
function using C regexp (with fake positives) and then filter again in
the Lisp side?

2) Or, we could just iterate the file by lines in C and then modify the
regex for the next line conditionally (which is cheaper than in
Lisp). This could create a list in C that we can then use in the Lisp
side more efficiently.

In case we figure out a nice method for that. Does it makes sense?



On Wed, Jul 17, 2019 at 04:34:27PM -0000, Alan Mackenzie wrote:
>Hello again, Ergus.
>
>In article <mailman.1463.1563222851.2688.bug-gnu-emacs@HIDDEN> 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?m), 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 <vector>
>> #include <map>
>
>> #include <cassert>
>> #include <cstdio>
>
>> #include <fstream>
>
>
>> namespace miniFE {
>
>
>>         void get_recv_info_task(CSRMatrix *A, size_t id, size_t numboxes
>>                                 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, size_t numboxes)
>>         {
>>         }
>
>> }//namespace miniFE
>
>> #endif
>
>-- 
>Alan Mackenzie (Nuremberg, Germany).
>




Information forwarded to bug-gnu-emacs@HIDDEN, bug-cc-mode@HIDDEN:
bug#36678; Package emacs,cc-mode. Full text available.

Message received at 36678 <at> debbugs.gnu.org:


Received: (at 36678) by debbugs.gnu.org; 17 Jul 2019 16:34:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jul 17 12:34:34 2019
Received: from localhost ([127.0.0.1]:52892 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hnmt0-0005ya-Ck
	for submit <at> debbugs.gnu.org; Wed, 17 Jul 2019 12:34:34 -0400
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 <acm@HIDDEN>) id 1hnmsy-0005yO-Ax
 for 36678 <at> debbugs.gnu.org; Wed, 17 Jul 2019 12:34:33 -0400
Received: (qmail 18178 invoked by uid 3782); 17 Jul 2019 16:34:27 -0000
Date: 17 Jul 2019 16:34:27 -0000
Message-ID: <20190717163427.18177.qmail@HIDDEN>
From: Alan Mackenzie <acm@HIDDEN>
To: Ergus <spacibba@HIDDEN>
Subject: Re: bug#36678: 27.0.50;
 imenu not working in C++ (maybe because of namespace)
Organization: muc.de e.V.
In-Reply-To: <mailman.1463.1563222851.2688.bug-gnu-emacs@HIDDEN>
X-Newsgroups: gnu.emacs.bug
User-Agent: tin/2.4.2-20171224 ("Lochhead") (UNIX) (FreeBSD/11.2-RELEASE-p9
 (amd64))
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 36678
Cc: 36678 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hello again, Ergus.

In article <mailman.1463.1563222851.2688.bug-gnu-emacs@HIDDEN> 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 <vector>
> #include <map>

> #include <cassert>
> #include <cstdio>

> #include <fstream>


> 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).





Information forwarded to bug-gnu-emacs@HIDDEN, bug-cc-mode@HIDDEN:
bug#36678; Package emacs,cc-mode. Full text available.

Message received at 36678 <at> debbugs.gnu.org:


Received: (at 36678) by debbugs.gnu.org; 17 Jul 2019 14:39:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jul 17 10:39:56 2019
Received: from localhost ([127.0.0.1]:52820 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hnl64-0000yF-Jt
	for submit <at> debbugs.gnu.org; Wed, 17 Jul 2019 10:39:56 -0400
Received: from colin.muc.de ([193.149.48.1]:16726 helo=mail.muc.de)
 by debbugs.gnu.org with smtp (Exim 4.84_2)
 (envelope-from <acm@HIDDEN>) id 1hnl61-0000y6-R2
 for 36678 <at> debbugs.gnu.org; Wed, 17 Jul 2019 10:39:54 -0400
Received: (qmail 87669 invoked by uid 3782); 17 Jul 2019 14:39:49 -0000
Date: 17 Jul 2019 14:39:49 -0000
Message-ID: <20190717143949.87668.qmail@HIDDEN>
From: Alan Mackenzie <acm@HIDDEN>
To: Ergus <spacibba@HIDDEN>
Subject: Re: bug#36678: 27.0.50;
 imenu not working in C++ (maybe because of namespace)
Organization: muc.de e.V.
In-Reply-To: <mailman.1463.1563222851.2688.bug-gnu-emacs@HIDDEN>
X-Newsgroups: gnu.emacs.bug
User-Agent: tin/2.4.2-20171224 ("Lochhead") (UNIX) (FreeBSD/11.2-RELEASE-p9
 (amd64))
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 36678
Cc: 36678 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hello, Ergus.

In article <mailman.1463.1563222851.2688.bug-gnu-emacs@HIDDEN> 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.

OK.  I'll look into this.

> In GNU Emacs 27.0.50 (build 5, x86_64-pc-linux-gnu, GTK+ Version 3.24.10)
> of 2019-07-14 built on Ergus
> Repository revision: 783eca57159065ea575622b74e1446853f31621a
> Repository branch: master
> System Description: Arch Linux

[ .... ]

> Major mode: C++//l

> Minor modes in effect:
>  tooltip-mode: t
>  global-eldoc-mode: t
>  electric-indent-mode: t
>  mouse-wheel-mode: t
>  tool-bar-mode: t
>  menu-bar-mode: t
>  file-name-shadow-mode: t
>  global-font-lock-mode: t
>  font-lock-mode: t
>  auto-composition-mode: t
>  auto-encryption-mode: t
>  auto-compression-mode: t
>  line-number-mode: t
>  transient-mark-mode: t
>  abbrev-mode: t

[ .... ]

> #ifndef _make_local_matrix_hpp_
> #define _make_local_matrix_hpp_

> #include <vector>
> #include <map>

> #include <cassert>
> #include <cstdio>

> #include <fstream>


> namespace miniFE {


>         void get_recv_info_task(CSRMatrix *A, size_t id, size_t numboxes
>                                 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, size_t numboxes)
>         {
>         }

> }//namespace miniFE

> #endif

-- 
Alan Mackenzie (Nuremberg, Germany).





Information forwarded to bug-gnu-emacs@HIDDEN, bug-cc-mode@HIDDEN:
bug#36678; Package emacs,cc-mode. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 15 Jul 2019 20:33:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jul 15 16:33:57 2019
Received: from localhost ([127.0.0.1]:49248 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hn7fZ-0001Tb-0p
	for submit <at> debbugs.gnu.org; Mon, 15 Jul 2019 16:33:57 -0400
Received: from lists.gnu.org ([209.51.188.17]:52142)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <spacibba@HIDDEN>) id 1hn7fV-0001TS-QZ
 for submit <at> debbugs.gnu.org; Mon, 15 Jul 2019 16:33:55 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:33792)
 by lists.gnu.org with esmtp (Exim 4.86_2)
 (envelope-from <spacibba@HIDDEN>) id 1hn7fU-0007HL-FI
 for bug-gnu-emacs@HIDDEN; Mon, 15 Jul 2019 16:33:53 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM,
 RCVD_IN_DNSWL_NONE autolearn=disabled version=3.3.2
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <spacibba@HIDDEN>) id 1hn7fS-0000zK-VO
 for bug-gnu-emacs@HIDDEN; Mon, 15 Jul 2019 16:33:52 -0400
Received: from sonic313-21.consmr.mail.ir2.yahoo.com ([77.238.179.188]:34018)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <spacibba@HIDDEN>) id 1hn7fS-0000wh-Cg
 for bug-gnu-emacs@HIDDEN; Mon, 15 Jul 2019 16:33:50 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048;
 t=1563222828; bh=zDsIGOKfZfWZKkiXbJvM6fEfNWC4NFGqUGjYfRMM/ps=;
 h=Date:From:To:Subject:From:Subject;
 b=oXuBA55HAeYfVQ5JywOTZp5Fzd2Zg+oCGXElXe41r0ZiZ0qHVmOmdjm3Ge6c4QbtDtozzNkBEmLdUx6130cKjxMWrdhpC9WTs3Gt6eEOSI175hXjvXSAZzF0Bs8Zu+jLYyqTGeYwik2LV6UHcDrZt8XM7CRmykjx85VYn1CiYkEJSpnDgdvyw8iPgm9ksGeSbV8XluPyp12ao+3nRWYm2OrTRQ5EOWY8Fp9qIPPKnB6z9CoWwdkSUrlxy1LYhxm1DjkDs8jhB3P2k6Ql6ICY8B9Fl1KUgxnSLTWBj8Kug7r0jA7CTtv9Sof29QcYPHQNwYPwTobCXN/Qk78mcvFJow==
X-YMail-OSG: lhbb79AVM1mF6LA_d5pmcqVoo6mElDKpa5wVWH.gUct7oqYczpeHHzBpjNHOuUg
 CVQ7WRHKx05C7dNskvCghU0fLx0j2rDRo6liMCurhUPl.Ex3sUlc_NEV71iXnwRwNTx9YSBp7owS
 p2hdsDLMv2gkv8MsIoKkM.rCh_wJ0kMio3bitT2_5tqxJ7cxKzzlcVecN3mzCgsP5B56sPoMpN9H
 hx07daAmcdtz1d_gLXINJitywB3L2iLBiJIcTPWWlXJTGjWq1jF3r79OKvMFewy2DDsvAir0zLii
 WQrp6Qo236E41392UY29UFpS3e3fOOXJa1LrR79fpul.rgs5QsiE1AEzvsC7AEYJUmdyP3S.X0NC
 yFit8vLxctKBGvKdauB3b3kA6hIh1RSvFvlCf8oQ21.QVjoc5Mb77cR0zfvlgJhAmEVjsJgItnn7
 KS.hcHY.MHs_ouftPub11AMGCzm68sOSwPhOF2ZsMfj.mBGiNGn5J5tNpoO4zITuIXoZdUrb3KpM
 5xnENPTRDpkd9fcKOs8TbuIDJIPV1osc0ixzTPogC9kJtS1un7RHcLKyGQ9KvR_ghPqoJ6fGzFn7
 G.R90j7a3glIeoLAnZfm6EnQ3qWZn7NXA28bTjAFET1iuOsnZtCDbpoxF61eapKo7VSv6GCOnB5.
 q5ydKwmaBX4Rqurpqp5zElzqvWxYahl.Kgw5ypEbf5suJOnbZ90hlyX1e8qVDSRkTnASip99Xz0R
 11BgymcWcJWWdUvidsXbmOeY8nhj9KFm4EBB7wKbJktrMdiuYje9.3sd3vsZPWH91oU1WC1df2lF
 1fOtmNe4MqdDboBh2WacuAZ1AqqZZPgCkQe4gb6KqfnZwey7IafCZV_J6Gg7a6v0B3HLc.f4SIQL
 RS1wZF.evOYYKtWvVwLZJTRNHCpKHOtMNKdcQwxeVJUdQbUUexGEY.y5_FB1vbFr9tnpVPb8MAQo
 7U0ARzdBF_1_0dN0EhhXDzluPZQzWbBJQK3wkIRLArZ7Uix82j0Xp6Wo7uhDaDX_0qFTr7i3KnJD
 Pmxtw_mYbwSj_hNI2hXfl_xLahPaG8ObZ7W1Ugg7fi_hrxGoiXFtW4P2TVo.sJPi5i9Ry9zqZMms
 4fxBa36M8JkysP.ik08cxLskqqJ4LCfBq5msCf3M05iZtAQR9DBOziGNaYc9httKs7feJgkZqVQE
 bHmsiw58GSzcqj4zZvS_FKA4qwa36k.QFxUgqag--
Received: from sonic.gate.mail.ne1.yahoo.com by
 sonic313.consmr.mail.ir2.yahoo.com with HTTP; Mon, 15 Jul 2019 20:33:48 +0000
Received: by smtp431.mail.ir2.yahoo.com (Oath Hermes SMTP Server) with ESMTPA
 ID daf81298d6d7446ec5c5ded11a1e4ffa; 
 Mon, 15 Jul 2019 20:33:47 +0000 (UTC)
Date: Mon, 15 Jul 2019 22:33:40 +0200
From: Ergus <spacibba@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 27.0.50; imenu not working in C++ (maybe because of namespace)
Message-ID: <20190715203338.btcmpy3jnfmxa3f7@Ergus>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="7cs7kzxdjaxo4vzt"
Content-Disposition: inline
User-Agent: NeoMutt/20180716
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x
X-Received-From: 77.238.179.188
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)


--7cs7kzxdjaxo4vzt
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Disposition: inline

--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.


In GNU Emacs 27.0.50 (build 5, x86_64-pc-linux-gnu, GTK+ Version 3.24.10)
 of 2019-07-14 built on Ergus
Repository revision: 783eca57159065ea575622b74e1446853f31621a
Repository branch: master
System Description: Arch Linux

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
imenu-unavailable-error: imenu unavailable: "No items suitable for an index found in this buffer"
Making completion list...
funcall-interactively: End of buffer [18 times]

Configured using:
 'configure --prefix=/home/ergo/PhD/emacs/emacs.install_arch
 --with-mailutils --with-x-toolkit=gtk3 --with-xft --with-modules'

Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND GPM DBUS GSETTINGS GLIB NOTIFY INOTIFY
ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS LIBSYSTEMD JSON
PDUMPER LCMS2 GMP

Important settings:
  value of $LC_CTYPE: en_US.UTF-8
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: C++//l

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t
  abbrev-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
format-spec subr-x rfc822 mml mml-sec password-cache epa derived epg
epg-config gnus-util rmail rmail-loaddefs text-property-search time-date
seq byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail
rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils cl-seq imenu
cc-mode cc-fonts easymenu cc-guess cc-menus cc-cmds cc-styles cc-align
cc-engine cc-vars cc-defs cl-loaddefs cl-lib term/tmux term/xterm xterm
elec-pair tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar
dnd fontset image regexp-opt fringe tabulated-list replace newcomment
text-mode elisp-mode lisp-mode prog-mode register page menu-bar
rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core term/tty-colors frame cl-generic cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer
cl-preloaded nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote threads dbusbind
inotify lcms2 dynamic-setting system-font-setting font-render-setting
move-toolbar gtk x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 72274 9319)
 (symbols 48 8631 1)
 (strings 32 22019 1603)
 (string-bytes 1 830903)
 (vectors 16 10696)
 (vector-slots 8 112616 7942)
 (floats 8 25 573)
 (intervals 56 365 57)
 (buffers 992 13))

--7cs7kzxdjaxo4vzt
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="make_local_matrix.hpp"

#ifndef _make_local_matrix_hpp_
#define _make_local_matrix_hpp_

#include <vector>
#include <map>

#include <cassert>
#include <cstdio>

#include <fstream>


namespace miniFE {


	void get_recv_info_task(CSRMatrix *A, size_t id, size_t numboxes
	                        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, size_t numboxes)
	{
	}

}//namespace miniFE

#endif

--7cs7kzxdjaxo4vzt--




Acknowledgement sent to Ergus <spacibba@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#36678; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sat, 3 Aug 2019 14:45:02 UTC

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