From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#39972: 28.0.50; which-function no longer returning current Java method in Emacs 27 Date: Wed, 20 May 2020 19:13:03 +0000 Message-ID: <20200520191303.GA19762@ACM> References: <20200308113302.43082.qmail@mail.muc.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="121133"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 39972@debbugs.gnu.org To: Philipp Stephani Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed May 20 21:14:19 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jbUAU-000VOn-H4 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 20 May 2020 21:14:18 +0200 Original-Received: from localhost ([::1]:58390 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jbUAT-0004gj-Hf for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 20 May 2020 15:14:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36688) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jbUAE-0004gK-C3 for bug-gnu-emacs@gnu.org; Wed, 20 May 2020 15:14:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42749) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jbUAE-0007Dp-2i for bug-gnu-emacs@gnu.org; Wed, 20 May 2020 15:14:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jbUAD-0006Fv-U4 for bug-gnu-emacs@gnu.org; Wed, 20 May 2020 15:14:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 20 May 2020 19:14:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39972 X-GNU-PR-Package: emacs Original-Received: via spool by 39972-submit@debbugs.gnu.org id=B39972.159000198823970 (code B ref 39972); Wed, 20 May 2020 19:14:01 +0000 Original-Received: (at 39972) by debbugs.gnu.org; 20 May 2020 19:13:08 +0000 Original-Received: from localhost ([127.0.0.1]:54295 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jbU9M-0006EX-DQ for submit@debbugs.gnu.org; Wed, 20 May 2020 15:13:08 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:13882 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1jbU9K-0006EN-1h for 39972@debbugs.gnu.org; Wed, 20 May 2020 15:13:06 -0400 Original-Received: (qmail 55198 invoked by uid 3782); 20 May 2020 19:13:04 -0000 Original-Received: from acm.muc.de (p4fe15b23.dip0.t-ipconnect.de [79.225.91.35]) by localhost.muc.de (tmda-ofmipd) with ESMTP; Wed, 20 May 2020 21:13:03 +0200 Original-Received: (qmail 31060 invoked by uid 1000); 20 May 2020 19:13:03 -0000 Content-Disposition: inline In-Reply-To: <20200308113302.43082.qmail@mail.muc.de> X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:180686 Archived-At: Hello, Philipp. On Sun, Mar 08, 2020 at 11:33:02 -0000, Alan Mackenzie wrote: > In article you wrote: > > Assume there's a file /tmp/Foo.java: > > $ cat /tmp/Foo.java > > class Foo { > > void bar() { > > // body > > } > > } > > Emacs 26: > > $ emacs -Q -batch -l which-func /tmp/Foo.java -eval '(progn > > (search-forward "// body") (print (which-function)))' > > "bar" > > Emacs 27 pretest: > > $ emacs -Q -batch -l which-func /tmp/Foo.java -eval '(progn > > (search-forward "// body") (print (which-function)))' > > "class Foo" > > That is, Emacs 27 now prints the clas name instead of the method name. > > I think the Emacs 26 behavior is preferrable. [ .... ] > I'll look more closely into this in the coming days. I've committed two patches to savannah master which I hope have fixed this. One was to CC Mode, the other to lisp/progmodes/which-func.el. Could you possibly try out these and let me know whether they have, in fact, fixed the problem. Thanks! > > In GNU Emacs 28.0.50 (build 10, x86_64-pc-linux-gnu, GTK+ Version 3.24.12, cairo version 1.16.0) > > of 2020-02-25 > > Repository revision: 03c07c88d90b5747456b9d286bace2dd4a713aac > > Repository branch: master > > Windowing system distributor 'The X.Org Foundation', version 11.0.12004000 > > System Description: Debian GNU/Linux rodete > [ .... ] -- Alan Mackenzie (Nuremberg, Germany).