GNU bug report logs - #39972
28.0.50; which-function no longer returning current Java method in Emacs 27

Previous Next

Package: emacs;

Reported by: Philipp Stephani <p.stephani2 <at> gmail.com>

Date: Sat, 7 Mar 2020 13:09:02 UTC

Severity: normal

Found in version 28.0.50

Done: Philipp Stephani <p.stephani2 <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #17 received at 39972 <at> debbugs.gnu.org (full text, mbox):

From: Philipp Stephani <p.stephani2 <at> gmail.com>
To: Alan Mackenzie <acm <at> muc.de>
Cc: 39972 <at> debbugs.gnu.org
Subject: Re: bug#39972: 28.0.50; which-function no longer returning current
 Java method in Emacs 27
Date: Thu, 21 May 2020 17:56:16 +0200
Am Mi., 20. Mai 2020 um 21:13 Uhr schrieb Alan Mackenzie <acm <at> muc.de>:
>
> Hello, Philipp.
>
> On Sun, Mar 08, 2020 at 11:33:02 -0000, Alan Mackenzie wrote:
> > In article <mailman.2226.1583586546.2412.bug-gnu-emacs <at> gnu.org> 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!

Seems to work as expected, thanks.
Do you think you could push these patches onto the release branch, as
this appears to be a regression?




This bug report was last modified 4 years and 359 days ago.

Previous Next


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