From unknown Sun Jun 15 08:18:11 2025
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.509 (Entity 5.509)
Content-Type: text/plain; charset=utf-8
From: bug#39972 <39972@debbugs.gnu.org>
To: bug#39972 <39972@debbugs.gnu.org>
Subject: Status: 28.0.50; which-function no longer returning current Java
method in Emacs 27
Reply-To: bug#39972 <39972@debbugs.gnu.org>
Date: Sun, 15 Jun 2025 15:18:11 +0000
retitle 39972 28.0.50; which-function no longer returning current Java meth=
od in Emacs 27
reassign 39972 emacs
submitter 39972 Philipp Stephani
severity 39972 normal
thanks
From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 07 08:08:20 2020
Received: (at submit) by debbugs.gnu.org; 7 Mar 2020 13:08:20 +0000
Received: from localhost ([127.0.0.1]:46374 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1jAZBk-0002G4-82
for submit@debbugs.gnu.org; Sat, 07 Mar 2020 08:08:20 -0500
Received: from lists.gnu.org ([209.51.188.17]:46546)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from ) id 1jAZBi-0002Fw-Jc
for submit@debbugs.gnu.org; Sat, 07 Mar 2020 08:08:19 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:56773)
by lists.gnu.org with esmtp (Exim 4.90_1)
(envelope-from ) id 1jAZBh-0007Vh-6X
for bug-gnu-emacs@gnu.org; Sat, 07 Mar 2020 08:08:18 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: *
X-Spam-Status: No, score=1.1 required=5.0 tests=BAYES_50,
FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,URIBL_BLOCKED autolearn=disabled
version=3.3.2
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
(envelope-from ) id 1jAZBf-0006VY-QS
for bug-gnu-emacs@gnu.org; Sat, 07 Mar 2020 08:08:17 -0500
Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]:51810)
by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
(Exim 4.71) (envelope-from )
id 1jAZBf-0006U9-Ha
for bug-gnu-emacs@gnu.org; Sat, 07 Mar 2020 08:08:15 -0500
Received: by mail-wm1-x330.google.com with SMTP id a132so5327740wme.1
for ; Sat, 07 Mar 2020 05:08:15 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
h=from:to:subject:date:message-id:mime-version;
bh=C3fYfWpm7mLtPCf7SvZnm3Y2CrKMNGucynK2eQ4zYfE=;
b=qWuaTaHKWyEHp6slkV3dA7vg4GaN+gtr/R/6fMSJgyLdw9Oj2h7pmoYiwFSqr/gmb9
WJ1SGfEUvxlZc/Lnbl+QN60s3QpfBFEgCs6ygprrrcXl0tmHNrOKUbHEX77wSFrv0mvF
o5YjZHaXupQCMfHBCwouwqAtnncJw41JJ6am3XBWygs3Fvo/Wuib7UWmrl8kEqYSNZod
2xm3/TdQ9VkPbqKjpkiqEfA1XUirrumv1xF4eGNLIYP7eXbJVEjO59A9Tacwglz04N+l
cRBmU7TWap2Hd4Vz8i2v3hn6fnsFmq1acTaoXXpMSHh5j9dhLqYrX6DOy+55VxXOlsRO
3sMA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:from:to:subject:date:message-id:mime-version;
bh=C3fYfWpm7mLtPCf7SvZnm3Y2CrKMNGucynK2eQ4zYfE=;
b=emSk+44Z00jU38g7UEbuskicV9pZxuCVE32RpMq62IPeHCVEC6S+aOK/80lmyV6AK/
91TrzMm/WaOTtFs0faGG39qFq5LIVGCb6hgSr6fgyjzIeEZA1jAT4EqWCUf6C2XOp4Hz
zZzIiwrO/lM6d4FTmJf6sISmimnp8a+jvMTI658qN/xn3VsSSRFhDmFgSuG0az6RGtXG
yBN4trJt78Jpv2AsCaPWEvC64FR25X7iJIXGcaCKghbN1wL9pM5GRNTbpIqb+YTvl4Fy
qdL55mVXZZ7psSsePuFDY5GMWQA84EPkP2UyTTil7UxQnUKyPu6mlIiJQYFhy6j5Uqe3
NjRA==
X-Gm-Message-State: ANhLgQ2ZIRe03j8W1BFPonxKBdrTEnCVjT93BvNNzDi53HfaOEAAPNNN
ghPhpXSTluyV5hzA8MBUplPXdQB+
X-Google-Smtp-Source: ADFU+vuMcu+jYBCwLuyIe3NU+MJRQt/oHTU+oAgwDocQuPzWSmf5KcaN6btxZXfl40X0y94yORaASg==
X-Received: by 2002:a1c:a714:: with SMTP id q20mr9758091wme.148.1583586493437;
Sat, 07 Mar 2020 05:08:13 -0800 (PST)
Received: from phst1 (85.233.42.145.dynamic.cablesurf.de. [85.233.42.145])
by smtp.gmail.com with ESMTPSA id w4sm1580144wrl.12.2020.03.07.05.08.12
for
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Sat, 07 Mar 2020 05:08:12 -0800 (PST)
From: Philipp Stephani
To: bug-gnu-emacs@gnu.org
Subject: 28.0.50; which-function no longer returning current Java method in
Emacs 27
Date: Sat, 07 Mar 2020 14:07:42 +0100
Message-ID:
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
recognized.
X-Received-From: 2a00:1450:4864:20::330
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit"
X-Spam-Score: -0.5 (/)
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.
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
Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Configured using:
'configure --enable-gcc-warnings=warn-only
--enable-gtk-deprecation-warnings --without-pop --with-mailutils
--enable-checking --enable-check-lisp-object-type --with-modules
'CFLAGS=-O0 -ggdb3''
Configured features:
XPM JPEG TIFF GIF PNG CAIRO SOUND DBUS GSETTINGS GLIB NOTIFY INOTIFY
LIBSELINUX GNUTLS FREETYPE HARFBUZZ ZLIB TOOLKIT_SCROLL_BARS GTK3 X11
XDBE XIM MODULES THREADS PDUMPER GMP
Important settings:
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8-unix
Major mode: Lisp Interaction
Minor modes in effect:
tooltip-mode: t
global-eldoc-mode: t
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
blink-cursor-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
Load-path shadows:
None found.
Features:
(shadow sort mail-extr emacsbug message rmc dired dired-loaddefs
format-spec rfc822 mml easymenu mml-sec epa epg epg-config gnus-util
rmail rmail-loaddefs text-property-search time-date mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail
rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils phst skeleton
derived edmacro kmacro pcase ffap thingatpt url-parse auth-source cl-seq
eieio eieio-core cl-macs eieio-loaddefs password-cache json map url-vars
subr-x rx gnutls puny seq byte-opt gv bytecomp byte-compile cconv dbus
xml cl-loaddefs cl-lib 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
tab-bar menu-bar rfn-eshadow isearch timer select scroll-bar mouse
jit-lock font-lock syntax facemenu font-core term/tty-colors frame
minibuffer 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 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 dynamic-setting system-font-setting
font-render-setting cairo move-toolbar gtk x-toolkit x multi-tty
make-network-process emacs)
Memory information:
((conses 16 59465 7934)
(symbols 48 8079 1)
(strings 32 20894 1643)
(string-bytes 1 680049)
(vectors 16 12053)
(vector-slots 8 164854 5050)
(floats 8 26 33)
(intervals 56 196 0)
(buffers 1000 11))
From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 08 07:33:07 2020
Received: (at 39972) by debbugs.gnu.org; 8 Mar 2020 11:33:07 +0000
Received: from localhost ([127.0.0.1]:47970 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1jAuB8-0006Ue-Q1
for submit@debbugs.gnu.org; Sun, 08 Mar 2020 07:33:06 -0400
Received: from colin.muc.de ([193.149.48.1]:59945 helo=mail.muc.de)
by debbugs.gnu.org with smtp (Exim 4.84_2)
(envelope-from ) id 1jAuB6-0006UU-Lh
for 39972@debbugs.gnu.org; Sun, 08 Mar 2020 07:33:05 -0400
Received: (qmail 43083 invoked by uid 3782); 8 Mar 2020 11:33:02 -0000
Date: 8 Mar 2020 11:33:02 -0000
Message-ID: <20200308113302.43082.qmail@mail.muc.de>
From: Alan Mackenzie
To: Philipp Stephani
Subject: Re: bug#39972: 28.0.50;
which-function no longer returning current Java method in Emacs 27
Organization: muc.de e.V.
In-Reply-To:
X-Newsgroups: gnu.emacs.bug
User-Agent: tin/2.4.3-20181224 ("Glen Mhor") (UNIX) (FreeBSD/11.3-RELEASE-p3
(amd64))
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 39972
Cc: 39972@debbugs.gnu.org
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit"
X-Spam-Score: -1.0 (-)
Hello, Philipp.
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.
OK. which-function works by trying out a whole series of functions and
returning the first result which is non-nil. CC Mode is now returning a
non-nil value (namely "class Foo") for one of these functions where it
previously didn't.
There're things like backward compatibility (with what exactly, I'm not
sure) to take into account before changing things here.
I'll look more closely into this in the coming days.
> 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).
From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 19 10:03:34 2020
Received: (at 39972) by debbugs.gnu.org; 19 Apr 2020 14:03:34 +0000
Received: from localhost ([127.0.0.1]:45648 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1jQAXi-00011g-0Z
for submit@debbugs.gnu.org; Sun, 19 Apr 2020 10:03:34 -0400
Received: from colin.muc.de ([193.149.48.1]:34549 helo=mail.muc.de)
by debbugs.gnu.org with smtp (Exim 4.84_2)
(envelope-from ) id 1jQAXg-00011W-1E
for 39972@debbugs.gnu.org; Sun, 19 Apr 2020 10:03:29 -0400
Received: (qmail 54419 invoked by uid 3782); 19 Apr 2020 14:03:26 -0000
Received: from acm.muc.de (p4FE151BB.dip0.t-ipconnect.de [79.225.81.187]) by
localhost.muc.de (tmda-ofmipd) with ESMTP;
Sun, 19 Apr 2020 16:03:25 +0200
Received: (qmail 22744 invoked by uid 1000); 19 Apr 2020 14:03:25 -0000
Date: Sun, 19 Apr 2020 14:03:25 +0000
To: Philipp Stephani
Subject: Re: bug#39972: 28.0.50; which-function no longer returning current
Java method in Emacs 27
Message-ID: <20200419140325.GA22514@ACM>
References:
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To:
X-Delivery-Agent: TMDA/1.1.12 (Macallan)
From: Alan Mackenzie
X-Primary-Address: acm@muc.de
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 39972
Cc: 39972@debbugs.gnu.org
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit"
X-Spam-Score: -1.0 (-)
Hello, Philipp.
On Sat, Mar 07, 2020 at 14:07:42 +0100, Philipp Stephani 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.
Yes, indeed.
Just in passing, lisp/progmodes/which-func.el could do with a serious
amount of tender loving care. I reported a bug about it this morning,
and enclose a rough workaround fix to another one in this post.
> 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
CC Mode's support for "name of function at point" is somewhat
bedraggled, too. It gets mixed up with c-defun-tactic, the option which
instructs CC Mode to use the current function within the next enclosing
class, etc., rather than the top level thing.
CC Mode's support includes two different functionalities: one intended
for interactive display (triggered by C-c C-z), the other intended for
add-change-log-entry-other-window (C-x 4 a). I can't actually see why
the second of these is different from the first. However,
which-function has been using this second of these.
A rough patch to CC Mode is as follows:
diff -r 2c9f4cff0753 cc-mode.el
--- a/cc-mode.el Fri Apr 03 20:04:29 2020 +0000
+++ b/cc-mode.el Sun Apr 19 13:37:22 2020 +0000
@@ -778,7 +778,8 @@
(make-local-variable 'add-log-current-defun-function)
(setq add-log-current-defun-function
(lambda ()
- (or (c-cpp-define-name) (c-defun-name)))))
+ (or (c-cpp-define-name)
+ (car (c-defun-name-and-limits nil))))))
(let ((rfn (assq mode c-require-final-newline)))
(when rfn
However, there is a problem in which-function, where when one puts point
after the final } in your test file, it reports "bar" on the mode line.
It really should indicate "no function" or, at a pinch, "class Foo".
The problem here is in `which-function', where it keeps trying different
methods until it finds one which returns non-nil. The last of these
methods is a search of the imode list, which contains only "bar".
Here is a very rough workaround, which might form the basis of a proper
fix at some stage.
diff --git a/lisp/progmodes/which-func.el b/lisp/progmodes/which-func.el
index 1cee552b0c..9be629dafd 100644
--- a/lisp/progmodes/which-func.el
+++ b/lisp/progmodes/which-func.el
@@ -282,6 +282,11 @@ which-function
(when (null name)
(setq name (add-log-current-defun)))
;; If Imenu is loaded, try to make an index alist with it.
+;;;; NEW STOUGH, 2020-04-19
+ ;; If `add-log-current-defun' ran and gave nil, accept this.
+ (when (and (null name)
+ (null add-log-current-defun-function))
+;;;; END OF NEW STOUGH
(when (and (null name)
(boundp 'imenu--index-alist)
(or (null imenu--index-alist)
@@ -328,6 +333,9 @@ which-function
(funcall
which-func-imenu-joiner-function
(reverse (cons (car pair) namestack))))))))))))
+;;;; NEW STOUGH, 2020-04-19
+ )
+;;;; END OF NEW STOUGH
;; Filter the name if requested.
(when name
(if which-func-cleanup-function
--
Alan Mackenzie (Nuremberg, Germany).
From debbugs-submit-bounces@debbugs.gnu.org Wed May 20 15:13:08 2020
Received: (at 39972) by debbugs.gnu.org; 20 May 2020 19:13:08 +0000
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
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
Received: (qmail 55198 invoked by uid 3782); 20 May 2020 19:13:04 -0000
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
Received: (qmail 31060 invoked by uid 1000); 20 May 2020 19:13:03 -0000
Date: Wed, 20 May 2020 19:13:03 +0000
To: Philipp Stephani
Subject: Re: bug#39972: 28.0.50; which-function no longer returning current
Java method in Emacs 27
Message-ID: <20200520191303.GA19762@ACM>
References:
<20200308113302.43082.qmail@mail.muc.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20200308113302.43082.qmail@mail.muc.de>
X-Delivery-Agent: TMDA/1.1.12 (Macallan)
From: Alan Mackenzie
X-Primary-Address: acm@muc.de
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 39972
Cc: 39972@debbugs.gnu.org
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit"
X-Spam-Score: -1.0 (-)
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).
From debbugs-submit-bounces@debbugs.gnu.org Thu May 21 11:56:42 2020
Received: (at 39972) by debbugs.gnu.org; 21 May 2020 15:56:42 +0000
Received: from localhost ([127.0.0.1]:57140 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1jbnYi-00067F-Pe
for submit@debbugs.gnu.org; Thu, 21 May 2020 11:56:42 -0400
Received: from mail-ot1-f52.google.com ([209.85.210.52]:44107)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from ) id 1jbnYf-00066y-6E
for 39972@debbugs.gnu.org; Thu, 21 May 2020 11:56:35 -0400
Received: by mail-ot1-f52.google.com with SMTP id f18so5848732otq.11
for <39972@debbugs.gnu.org>; Thu, 21 May 2020 08:56:33 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
h=mime-version:references:in-reply-to:from:date:message-id:subject:to
:cc; bh=ve/Z+aBYZFjOdnlTjImduwKGcmyNM1owS40ug+Th/7U=;
b=ZF/HSueGU1hPrqovjaDy2uFiSu5pw8835c4VuPLAeYrB4WuZwN9K51mfFnfeqJIoVt
+t1O7/JY7NYcPlCjngWhFb93UxEE4F8ttorwK4EUwarP4qcLE6v2tGDcX8c/mDcpuGrM
EnEIFaXxoeaOjpuYZviPGFNGg7cZZERxW7ADiWSlZUBS92q44Ucby1u5ns5bj3Aq8/PD
bwWHP7H9Jtu4BOE30E1yjStcWb6Ol8yfEbC+eh6vYyl0Y5x2/4Q69WGSDS8J1vskEmop
nx5OZwzySVtO5HGgc8qfWBinCRgwNccZlo9cafhK2e9NZ/dypnRqcU91d9UnCcELG8SE
kvww==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:mime-version:references:in-reply-to:from:date
:message-id:subject:to:cc;
bh=ve/Z+aBYZFjOdnlTjImduwKGcmyNM1owS40ug+Th/7U=;
b=VHhvM8cdsR4Txt+rmoThVx5jhTkR0e7wSnopQ7b+oymf+3aW7UsqsKR/OylyqL0sCq
X24PnTTCVlOcnj+0r4JTAseiwTjIxf3EixVmdVRDhfiTTENuJhPtjtpIBlkAHmMQNKCM
mRP3jjceNJhM5vjDBRZi+vuh/SkCB6yu2O9HVr6SRTYwXwqQt5z21bUHJF58ej6OZ4nw
kNBE3IRjjO4bTxtzQRT/jubXG1zWcC87V9SvLOq/9o/8E1/M+py3e61ORjmd8JSuJCgU
B4YL9S3LLV6mGybdUuB6G9baklN3lpz0KuUzLsfMRzsR3EC62EluBBtWsrPdKoxOYgT4
c6pA==
X-Gm-Message-State: AOAM532RPaSm7N8kOgWLSg6Ke7cMcFlkumlAwJJrBF93oUNI1m2jznzK
dQ61sC1GMO0EDz4PPB9u3X6koMDggLAHE0CXFfTlcjpg
X-Google-Smtp-Source: ABdhPJwUETRtgdgqJTSgxkHvqom19S2WnHl5zpTEWH2nvsXXhLl1Yv4EheZUYjSG5zojus+eFvLAFkzMVDJUSBnpRLk=
X-Received: by 2002:a05:6830:1457:: with SMTP id
w23mr7121910otp.174.1590076587168;
Thu, 21 May 2020 08:56:27 -0700 (PDT)
MIME-Version: 1.0
References:
<20200308113302.43082.qmail@mail.muc.de>
<20200520191303.GA19762@ACM>
In-Reply-To: <20200520191303.GA19762@ACM>
From: Philipp Stephani
Date: Thu, 21 May 2020 17:56:16 +0200
Message-ID:
Subject: Re: bug#39972: 28.0.50; which-function no longer returning current
Java method in Emacs 27
To: Alan Mackenzie
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.3 (/)
X-Debbugs-Envelope-To: 39972
Cc: 39972@debbugs.gnu.org
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit"
X-Spam-Score: -0.7 (/)
Am Mi., 20. Mai 2020 um 21:13 Uhr schrieb Alan Mackenzie :
>
> 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!
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?
From debbugs-submit-bounces@debbugs.gnu.org Thu May 21 12:15:48 2020
Received: (at 39972) by debbugs.gnu.org; 21 May 2020 16:15:48 +0000
Received: from localhost ([127.0.0.1]:57160 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1jbnrH-0006bV-Q9
for submit@debbugs.gnu.org; Thu, 21 May 2020 12:15:48 -0400
Received: from eggs.gnu.org ([209.51.188.92]:39364)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from ) id 1jbnrG-0006bJ-Sp
for 39972@debbugs.gnu.org; Thu, 21 May 2020 12:15:47 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:47034)
by eggs.gnu.org with esmtp (Exim 4.90_1)
(envelope-from )
id 1jbnrB-0000fU-C8; Thu, 21 May 2020 12:15:41 -0400
Received: from [176.228.60.248] (port=2846 helo=home-c4e4a596f7)
by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
(Exim 4.82) (envelope-from )
id 1jbnrA-0003Od-RM; Thu, 21 May 2020 12:15:41 -0400
Date: Thu, 21 May 2020 19:15:42 +0300
Message-Id: <835zcp5knl.fsf@gnu.org>
From: Eli Zaretskii
To: Philipp Stephani
In-Reply-To:
(message from Philipp Stephani on Thu, 21 May 2020 17:56:16 +0200)
Subject: Re: bug#39972: 28.0.50;
which-function no longer returning current Java method in Emacs 27
References:
<20200308113302.43082.qmail@mail.muc.de>
<20200520191303.GA19762@ACM>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 39972
Cc: acm@muc.de, 39972@debbugs.gnu.org
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit"
X-Spam-Score: -3.3 (---)
> From: Philipp Stephani
> Date: Thu, 21 May 2020 17:56:16 +0200
> Cc: 39972@debbugs.gnu.org
>
> Do you think you could push these patches onto the release branch, as
> this appears to be a regression?
The fixes (especially the one for which-func) are too risky for the
release branch. Is it possible to come up with something simpler for
emacs-27? What change(s) caused the regression, exactly?
From debbugs-submit-bounces@debbugs.gnu.org Thu May 21 13:24:47 2020
Received: (at 39972) by debbugs.gnu.org; 21 May 2020 17:24:48 +0000
Received: from localhost ([127.0.0.1]:57225 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1jbovu-0001z1-1U
for submit@debbugs.gnu.org; Thu, 21 May 2020 13:24:47 -0400
Received: from mail-ot1-f42.google.com ([209.85.210.42]:46516)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from ) id 1jbovp-0001yl-48
for 39972@debbugs.gnu.org; Thu, 21 May 2020 13:24:36 -0400
Received: by mail-ot1-f42.google.com with SMTP id g25so6069298otp.13
for <39972@debbugs.gnu.org>; Thu, 21 May 2020 10:24:33 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
h=mime-version:references:in-reply-to:from:date:message-id:subject:to
:cc; bh=BNa9jrIkc73u7e7OqwqrCjZNC+84V7A4v1BlrhnAVhY=;
b=Z37zlCvtaNPiRrtYPTzheRp48YagPmfvDOwwU9h0POeD77qwshDfG6FEbeH+4koH0h
h0WBz9XnVlT+qVzmwn+cwbRDft8fM7PAJZIYu+ibB1CLK8s6NtNbvAl7q8QMFRdDbv/v
ifjaAYgrIj3lyB66wMMAJ/yPI8TTNKR67Vcoh+r1J2Xt3Q3TMyzi+ivacO2YM8nsXhU0
IFFz+uXEswBbm/44dJAWpm9U48vQdG1h5aUrJH8NQWC7RH4hSLM5lunP2L4C/TaFY0u6
2pOu3+JzMa+59MxgGIDg6rtSetnWR/g4Rx5KGJrFbuMC1T2GgpfUIZNou8plzFF2sVfE
AZ8g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:mime-version:references:in-reply-to:from:date
:message-id:subject:to:cc;
bh=BNa9jrIkc73u7e7OqwqrCjZNC+84V7A4v1BlrhnAVhY=;
b=agOkWz57ETqBdIpLoi93qx0y/kc7+fGZjSqsSa1pcjDAPRffedB8M+edLWVSxBPbp6
sItdmgLbckKjEHX8n5Y3aNxrhR6HJgVnwFG7W8Ym2ixp6XSxasOQD+NaTANZ0OJCBm/a
2KWmhdja6bb+5fALlX1BT0HUZtYwig/Xr9x8catVgTwDienzTpdYQfqEndUaj2F/MMN3
5s9tYEN/eju7PyMNWOI+FoglfTp/xnOWlHxy9o9LKZx2/RfkI22/WmSbjrpi8Ju1+6A1
5AKG8vFbFOKlT+msQydMDrmTaUlLL9zJC1sBlT/LCs55Kq2uDkjjPlqwYWBuPeZTlwdD
9QNQ==
X-Gm-Message-State: AOAM530rngXsT3A0pwTWtcOScm0/syYyPtbuvvU1tDMxraF3zXQsWI5w
DCVHwlFwJNnTjAFhRSzW93hJ7jDzesmSmc2A3wQUasxkG7k=
X-Google-Smtp-Source: ABdhPJw3Fx3aTAOWr43ouZRDLqTrUKd3w4WPhIsTZYB1TJVrDXiGTFdWtPxJ+WWXHFbOMLG2ksgHPvYX3aHuu0Tww0c=
X-Received: by 2002:a9d:206b:: with SMTP id n98mr7791103ota.36.1590081867358;
Thu, 21 May 2020 10:24:27 -0700 (PDT)
MIME-Version: 1.0
References:
<20200308113302.43082.qmail@mail.muc.de>
<20200520191303.GA19762@ACM>
<835zcp5knl.fsf@gnu.org>
In-Reply-To: <835zcp5knl.fsf@gnu.org>
From: Philipp Stephani
Date: Thu, 21 May 2020 19:24:15 +0200
Message-ID:
Subject: Re: bug#39972: 28.0.50; which-function no longer returning current
Java method in Emacs 27
To: Eli Zaretskii
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.3 (/)
X-Debbugs-Envelope-To: 39972
Cc: Alan Mackenzie , 39972@debbugs.gnu.org
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit"
X-Spam-Score: -0.7 (/)
Am Do., 21. Mai 2020 um 18:15 Uhr schrieb Eli Zaretskii :
>
> > From: Philipp Stephani
> > Date: Thu, 21 May 2020 17:56:16 +0200
> > Cc: 39972@debbugs.gnu.org
> >
> > Do you think you could push these patches onto the release branch, as
> > this appears to be a regression?
>
> The fixes (especially the one for which-func) are too risky for the
> release branch. Is it possible to come up with something simpler for
> emacs-27? What change(s) caused the regression, exactly?
git bisect says the commit that broke this was
[0613e7a38efc3b0534e0ca5c5fa401e2a3bda906] which-function: Do not
display outdated imenu information
From debbugs-submit-bounces@debbugs.gnu.org Thu May 21 13:27:00 2020
Received: (at 39972) by debbugs.gnu.org; 21 May 2020 17:27:00 +0000
Received: from localhost ([127.0.0.1]:57229 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1jboyC-00022S-4w
for submit@debbugs.gnu.org; Thu, 21 May 2020 13:27:00 -0400
Received: from mail-ot1-f45.google.com ([209.85.210.45]:43671)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from ) id 1jboyA-00022F-Pj
for 39972@debbugs.gnu.org; Thu, 21 May 2020 13:26:59 -0400
Received: by mail-ot1-f45.google.com with SMTP id a68so6095340otb.10
for <39972@debbugs.gnu.org>; Thu, 21 May 2020 10:26:58 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
h=mime-version:references:in-reply-to:from:date:message-id:subject:to
:cc; bh=jos7u3qMXuiEY6eC4ZdjZI7qTG/cKKUc15jEaNYo7xw=;
b=IWkY20EeOnW7y1No4n74IZQKzWmza3UHqjWPGxFgxrTA9v/K/VXRj311orA7Ooprka
5fX68167orAc2aAKhVp1mi67pIellknDabOjEHTp6ZmwmkZeRMx9xqiQnPRSO5bPIzN6
aehy3AMRG/wS/qcvmBaAfSwTVlbdqjpqEVJc6l2hJe9tSpZ6Y/ExX9ViCvy6Ax5LplPn
NByhT8o6T55UA0dJwYFiF8JfZC+M2FwXaEArC6z7sRiJwkEJEWYtoLJzcLmPwdx0eiHa
uzYQn8NxunagdWSiTr4uceIpD7ivTaDAzhEbc3ZilLpTck5RPV+6nUEV9JVHvP8EHXHN
6LXQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:mime-version:references:in-reply-to:from:date
:message-id:subject:to:cc;
bh=jos7u3qMXuiEY6eC4ZdjZI7qTG/cKKUc15jEaNYo7xw=;
b=P1qg98bYIY6HQ3IQ42UzzVvyUn+dTjppAUjBD9VSCQDktnNwVWFjOYUMaj/UG5OSLS
3W0QM+GJi+npMl9bsJI2X5IuKe7p3SXSoVLehv2Ub5Osmfi/vIMoIqLXlzWWwRKyCGrP
RM4v/ox04gztwuB0NYNzUHo3UUCz32+zdZO408p4zG8ZlZCvQ+jVCoMhiXIO4yGp+Bxv
jW/zOQPkNUkTXpvSu/5I+6sQaOQCNGN69rU69XyFl+/7tz3hO9v7zE5tikgWSOuqZYw9
HI37dNwFoF6YRS88T+dHbr6AVsdJ8B7ED6fDTl5r6Tboc4xsIRQ1BVLwCbxs4aNcMIBr
opSg==
X-Gm-Message-State: AOAM532+IBXqc1tXy7c3XuSnCAlRWTZ/d6qSBCzLIaUuff4NJ3ZZaSz8
Y8ngtjVF1N2exr5CaqhNDEz28uB2/9Gnsp4P0Ys=
X-Google-Smtp-Source: ABdhPJyWOXa3MoaLcQAjwa9bKcQweTiopkZ6GLU484blzWk74ZFcYCcQfCHfw0BpInPso3sYeecV7qDKclImU9vs+lY=
X-Received: by 2002:a9d:206b:: with SMTP id n98mr7798765ota.36.1590082013075;
Thu, 21 May 2020 10:26:53 -0700 (PDT)
MIME-Version: 1.0
References:
<20200308113302.43082.qmail@mail.muc.de>
<20200520191303.GA19762@ACM>
<835zcp5knl.fsf@gnu.org>
In-Reply-To:
From: Philipp Stephani
Date: Thu, 21 May 2020 19:26:42 +0200
Message-ID:
Subject: Re: bug#39972: 28.0.50; which-function no longer returning current
Java method in Emacs 27
To: Eli Zaretskii
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.3 (/)
X-Debbugs-Envelope-To: 39972
Cc: Alan Mackenzie , 39972@debbugs.gnu.org
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit"
X-Spam-Score: -0.7 (/)
Am Do., 21. Mai 2020 um 19:24 Uhr schrieb Philipp Stephani
:
>
> Am Do., 21. Mai 2020 um 18:15 Uhr schrieb Eli Zaretskii :
> >
> > > From: Philipp Stephani
> > > Date: Thu, 21 May 2020 17:56:16 +0200
> > > Cc: 39972@debbugs.gnu.org
> > >
> > > Do you think you could push these patches onto the release branch, as
> > > this appears to be a regression?
> >
> > The fixes (especially the one for which-func) are too risky for the
> > release branch. Is it possible to come up with something simpler for
> > emacs-27? What change(s) caused the regression, exactly?
>
> git bisect says the commit that broke this was
> [0613e7a38efc3b0534e0ca5c5fa401e2a3bda906] which-function: Do not
> display outdated imenu information
See also the discussion about
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=33695, which was fixed
by this commit.
From debbugs-submit-bounces@debbugs.gnu.org Thu May 21 13:42:16 2020
Received: (at 39972) by debbugs.gnu.org; 21 May 2020 17:42:16 +0000
Received: from localhost ([127.0.0.1]:57244 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1jbpCx-0002Oz-UI
for submit@debbugs.gnu.org; Thu, 21 May 2020 13:42:16 -0400
Received: from colin.muc.de ([193.149.48.1]:13352 helo=mail.muc.de)
by debbugs.gnu.org with smtp (Exim 4.84_2)
(envelope-from ) id 1jbpCv-0002Op-Rc
for 39972@debbugs.gnu.org; Thu, 21 May 2020 13:42:14 -0400
Received: (qmail 60852 invoked by uid 3782); 21 May 2020 17:42:12 -0000
Received: from acm.muc.de (p4fe15b01.dip0.t-ipconnect.de [79.225.91.1]) by
localhost.muc.de (tmda-ofmipd) with ESMTP;
Thu, 21 May 2020 19:42:11 +0200
Received: (qmail 32186 invoked by uid 1000); 21 May 2020 17:42:11 -0000
Date: Thu, 21 May 2020 17:42:11 +0000
To: Eli Zaretskii
Subject: Re: bug#39972: 28.0.50; which-function no longer returning current
Java method in Emacs 27
Message-ID: <20200521174211.GA12036@ACM>
References:
<20200308113302.43082.qmail@mail.muc.de>
<20200520191303.GA19762@ACM>
<835zcp5knl.fsf@gnu.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <835zcp5knl.fsf@gnu.org>
X-Delivery-Agent: TMDA/1.1.12 (Macallan)
From: Alan Mackenzie
X-Primary-Address: acm@muc.de
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 39972
Cc: 39972@debbugs.gnu.org, Philipp Stephani
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit"
X-Spam-Score: -1.0 (-)
Hello, Eli.
On Thu, May 21, 2020 at 19:15:42 +0300, Eli Zaretskii wrote:
> > From: Philipp Stephani
> > Date: Thu, 21 May 2020 17:56:16 +0200
> > Cc: 39972@debbugs.gnu.org
> > Do you think you could push these patches onto the release branch, as
> > this appears to be a regression?
> The fixes (especially the one for which-func) are too risky for the
> release branch. Is it possible to come up with something simpler for
> emacs-27?
See below.
> What change(s) caused the regression, exactly?
class Foo {
void bar() {
// body <============== Point is here.
}
}
Traditionally, the function which-function (in which-func.el) has tried a
row of methods to find the current function, stopping after finding the
first non-null result.
Emacs 26's CC Mode's value of add-log-current-defun returned nil, after
which which-function tried querying the imenu structures, which worked
OK.
emacs-27's CC Mode's value of add-log-current-defun now returns the top
level function, "class Foo". which-function no longers proceeds to the
imenu stuff. "class Foo" is here the result returned by which-function.
This is not OK.
master's CC Mode's value of add-log-current-defun now returns "bar".
The remainder of the recent patch to which-function ensures that if
add-log-current-defun IS ACTUALLY CALLED and returns nil, this nil
becomes which-function's result. There were previously problems where
add-log-current-defun had returned nil because point was outside any
function, yet imenu would later return a spurious function name.
> Is it possible to come up with something simpler for emacs-27?
I think the change (in master) to CC Mode's value of
add-log-current-defun could be put into emacs-27 on its own. This should
be safe.
The patch which made this change (bug #39972) was:
5989432d15feb4439e759d2c0e28233ca22a7604
"CC Mode: Fix bug #39972, by fixing c-display-defun-name for nested
defuns"
Date: Wed May 20 19:02:26 2020 +0000.
What do you say to putting this into emacs-27?
--
Alan Mackenzie (Nuremberg, Germany).
From debbugs-submit-bounces@debbugs.gnu.org Thu May 21 15:14:35 2020
Received: (at 39972) by debbugs.gnu.org; 21 May 2020 19:14:35 +0000
Received: from localhost ([127.0.0.1]:57301 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1jbqeJ-0004Zp-1Z
for submit@debbugs.gnu.org; Thu, 21 May 2020 15:14:35 -0400
Received: from eggs.gnu.org ([209.51.188.92]:58450)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from ) id 1jbqeH-0004Zd-Po
for 39972@debbugs.gnu.org; Thu, 21 May 2020 15:14:34 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:50055)
by eggs.gnu.org with esmtp (Exim 4.90_1)
(envelope-from )
id 1jbqeC-0008Lw-5I; Thu, 21 May 2020 15:14:28 -0400
Received: from [176.228.60.248] (port=2002 helo=home-c4e4a596f7)
by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
(Exim 4.82) (envelope-from )
id 1jbqe5-0004M6-JW; Thu, 21 May 2020 15:14:24 -0400
Date: Thu, 21 May 2020 22:14:24 +0300
Message-Id: <83367t5cdr.fsf@gnu.org>
From: Eli Zaretskii
To: Alan Mackenzie
In-Reply-To: <20200521174211.GA12036@ACM> (message from Alan Mackenzie on Thu,
21 May 2020 17:42:11 +0000)
Subject: Re: bug#39972: 28.0.50; which-function no longer returning current
Java method in Emacs 27
References:
<20200308113302.43082.qmail@mail.muc.de>
<20200520191303.GA19762@ACM>
<835zcp5knl.fsf@gnu.org> <20200521174211.GA12036@ACM>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 39972
Cc: 39972@debbugs.gnu.org, p.stephani2@gmail.com
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit"
X-Spam-Score: -3.3 (---)
> Date: Thu, 21 May 2020 17:42:11 +0000
> Cc: Philipp Stephani , 39972@debbugs.gnu.org
> From: Alan Mackenzie
>
> > Is it possible to come up with something simpler for emacs-27?
>
> I think the change (in master) to CC Mode's value of
> add-log-current-defun could be put into emacs-27 on its own. This should
> be safe.
>
> The patch which made this change (bug #39972) was:
> 5989432d15feb4439e759d2c0e28233ca22a7604
> "CC Mode: Fix bug #39972, by fixing c-display-defun-name for nested
> defuns"
> Date: Wed May 20 19:02:26 2020 +0000.
>
> What do you say to putting this into emacs-27?
If it fixes the problem reported in this bug report, it's fine by me
to cherry-pick it to emacs-27.
Thanks.
From debbugs-submit-bounces@debbugs.gnu.org Thu May 21 15:15:22 2020
Received: (at 39972) by debbugs.gnu.org; 21 May 2020 19:15:22 +0000
Received: from localhost ([127.0.0.1]:57305 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1jbqf4-0004ba-Cj
for submit@debbugs.gnu.org; Thu, 21 May 2020 15:15:22 -0400
Received: from eggs.gnu.org ([209.51.188.92]:58580)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from ) id 1jbqez-0004bI-Nd
for 39972@debbugs.gnu.org; Thu, 21 May 2020 15:15:21 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:50069)
by eggs.gnu.org with esmtp (Exim 4.90_1)
(envelope-from )
id 1jbqeu-0008RL-9p; Thu, 21 May 2020 15:15:12 -0400
Received: from [176.228.60.248] (port=2054 helo=home-c4e4a596f7)
by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
(Exim 4.82) (envelope-from )
id 1jbqet-0004RY-8r; Thu, 21 May 2020 15:15:11 -0400
Date: Thu, 21 May 2020 22:15:15 +0300
Message-Id: <831rnd5ccc.fsf@gnu.org>
From: Eli Zaretskii
To: Philipp Stephani
In-Reply-To:
(message from Philipp Stephani on Thu, 21 May 2020 19:24:15 +0200)
Subject: Re: bug#39972: 28.0.50; which-function no longer returning current
Java method in Emacs 27
References:
<20200308113302.43082.qmail@mail.muc.de>
<20200520191303.GA19762@ACM>
<835zcp5knl.fsf@gnu.org>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 39972
Cc: acm@muc.de, 39972@debbugs.gnu.org
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit"
X-Spam-Score: -3.3 (---)
> From: Philipp Stephani
> Date: Thu, 21 May 2020 19:24:15 +0200
> Cc: Alan Mackenzie , 39972@debbugs.gnu.org
>
> > The fixes (especially the one for which-func) are too risky for the
> > release branch. Is it possible to come up with something simpler for
> > emacs-27? What change(s) caused the regression, exactly?
>
> git bisect says the commit that broke this was
> [0613e7a38efc3b0534e0ca5c5fa401e2a3bda906] which-function: Do not
> display outdated imenu information
Thanks for investigating this.
From debbugs-submit-bounces@debbugs.gnu.org Thu May 21 16:19:40 2020
Received: (at 39972) by debbugs.gnu.org; 21 May 2020 20:19:40 +0000
Received: from localhost ([127.0.0.1]:57366 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1jbrfI-00067V-KM
for submit@debbugs.gnu.org; Thu, 21 May 2020 16:19:40 -0400
Received: from colin.muc.de ([193.149.48.1]:20913 helo=mail.muc.de)
by debbugs.gnu.org with smtp (Exim 4.84_2)
(envelope-from ) id 1jbrfG-00067K-6B
for 39972@debbugs.gnu.org; Thu, 21 May 2020 16:19:39 -0400
Received: (qmail 97369 invoked by uid 3782); 21 May 2020 20:19:36 -0000
Received: from acm.muc.de (p4fe15b01.dip0.t-ipconnect.de [79.225.91.1]) by
localhost.muc.de (tmda-ofmipd) with ESMTP;
Thu, 21 May 2020 22:19:35 +0200
Received: (qmail 22074 invoked by uid 1000); 21 May 2020 20:19:35 -0000
Date: Thu, 21 May 2020 20:19:35 +0000
To: Eli Zaretskii
Subject: Re: bug#39972: 28.0.50; which-function no longer returning current
Java method in Emacs 27
Message-ID: <20200521201935.GB12036@ACM>
References:
<20200308113302.43082.qmail@mail.muc.de>
<20200520191303.GA19762@ACM>
<835zcp5knl.fsf@gnu.org> <20200521174211.GA12036@ACM>
<83367t5cdr.fsf@gnu.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <83367t5cdr.fsf@gnu.org>
X-Delivery-Agent: TMDA/1.1.12 (Macallan)
From: Alan Mackenzie
X-Primary-Address: acm@muc.de
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 39972
Cc: 39972@debbugs.gnu.org, p.stephani2@gmail.com
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit"
X-Spam-Score: -1.0 (-)
Hello, Eli.
On Thu, May 21, 2020 at 22:14:24 +0300, Eli Zaretskii wrote:
> > Date: Thu, 21 May 2020 17:42:11 +0000
> > Cc: Philipp Stephani , 39972@debbugs.gnu.org
> > From: Alan Mackenzie
> > > Is it possible to come up with something simpler for emacs-27?
> > I think the change (in master) to CC Mode's value of
> > add-log-current-defun could be put into emacs-27 on its own. This should
> > be safe.
> > The patch which made this change (bug #39972) was:
> > 5989432d15feb4439e759d2c0e28233ca22a7604
> > "CC Mode: Fix bug #39972, by fixing c-display-defun-name for nested
> > defuns"
> > Date: Wed May 20 19:02:26 2020 +0000.
> > What do you say to putting this into emacs-27?
> If it fixes the problem reported in this bug report, it's fine by me
> to cherry-pick it to emacs-27.
I've just tried it, and it almost fixes the problem. :-(
With that commit cherry-picked to emacs-27, visit the Java file:
class Foo {
void bar() {
// body
}
}
, and enable which-function-mode. When point is within class Foo or bar,
which-function-mode reports "class Foo" or "bar" correctly.
But when point is _after_ the terminating brace of class Foo, "bar" is
wrongly reported. I now remember that this is the reason for my
amendment to which-func.el.
Sorry to trouble you with such a minor point, but I'm unable to decide
myself whether such a small bug should prevent the cherry-picking of
5989432 into emacs-27. I'm leaning towards doing the cherry-pick.
So, please help me by making the decision. Thanks!
> Thanks.
--
Alan Mackenzie (Nuremberg, Germany).
From debbugs-submit-bounces@debbugs.gnu.org Fri May 22 01:58:24 2020
Received: (at 39972) by debbugs.gnu.org; 22 May 2020 05:58:24 +0000
Received: from localhost ([127.0.0.1]:57889 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1jc0hM-0007Re-9w
for submit@debbugs.gnu.org; Fri, 22 May 2020 01:58:24 -0400
Received: from eggs.gnu.org ([209.51.188.92]:55386)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from ) id 1jc0hJ-0007RQ-UG
for 39972@debbugs.gnu.org; Fri, 22 May 2020 01:58:22 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:58566)
by eggs.gnu.org with esmtp (Exim 4.90_1)
(envelope-from )
id 1jc0hE-0000OE-08; Fri, 22 May 2020 01:58:16 -0400
Received: from [176.228.60.248] (port=1700 helo=home-c4e4a596f7)
by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
(Exim 4.82) (envelope-from )
id 1jc0hC-0001ck-0Y; Fri, 22 May 2020 01:58:14 -0400
Date: Fri, 22 May 2020 08:58:17 +0300
Message-Id: <83zha04ikm.fsf@gnu.org>
From: Eli Zaretskii
To: Alan Mackenzie
In-Reply-To: <20200521201935.GB12036@ACM> (message from Alan Mackenzie on Thu,
21 May 2020 20:19:35 +0000)
Subject: Re: bug#39972: 28.0.50; which-function no longer returning current
Java method in Emacs 27
References:
<20200308113302.43082.qmail@mail.muc.de>
<20200520191303.GA19762@ACM>
<835zcp5knl.fsf@gnu.org> <20200521174211.GA12036@ACM>
<83367t5cdr.fsf@gnu.org> <20200521201935.GB12036@ACM>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 39972
Cc: 39972@debbugs.gnu.org, p.stephani2@gmail.com
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit"
X-Spam-Score: -3.3 (---)
> Date: Thu, 21 May 2020 20:19:35 +0000
> Cc: p.stephani2@gmail.com, 39972@debbugs.gnu.org
> From: Alan Mackenzie
>
> class Foo {
> void bar() {
> // body
> }
> }
>
> , and enable which-function-mode. When point is within class Foo or bar,
> which-function-mode reports "class Foo" or "bar" correctly.
>
> But when point is _after_ the terminating brace of class Foo, "bar" is
> wrongly reported. I now remember that this is the reason for my
> amendment to which-func.el.
>
> Sorry to trouble you with such a minor point, but I'm unable to decide
> myself whether such a small bug should prevent the cherry-picking of
> 5989432 into emacs-27. I'm leaning towards doing the cherry-pick.
>
> So, please help me by making the decision. Thanks!
I agree with you.
From debbugs-submit-bounces@debbugs.gnu.org Fri May 22 05:58:52 2020
Received: (at 39972) by debbugs.gnu.org; 22 May 2020 09:58:52 +0000
Received: from localhost ([127.0.0.1]:58095 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1jc4S4-0006un-GQ
for submit@debbugs.gnu.org; Fri, 22 May 2020 05:58:52 -0400
Received: from colin.muc.de ([193.149.48.1]:63643 helo=mail.muc.de)
by debbugs.gnu.org with smtp (Exim 4.84_2)
(envelope-from ) id 1jc4S2-0006ua-No
for 39972@debbugs.gnu.org; Fri, 22 May 2020 05:58:51 -0400
Received: (qmail 6871 invoked by uid 3782); 22 May 2020 09:58:48 -0000
Received: from acm.muc.de (p4fe15cdf.dip0.t-ipconnect.de [79.225.92.223]) by
localhost.muc.de (tmda-ofmipd) with ESMTP;
Fri, 22 May 2020 11:58:48 +0200
Received: (qmail 5450 invoked by uid 1000); 22 May 2020 09:58:48 -0000
Date: Fri, 22 May 2020 09:58:48 +0000
To: Eli Zaretskii
Subject: Re: bug#39972: 28.0.50; which-function no longer returning current
Java method in Emacs 27
Message-ID: <20200522095848.GA5446@ACM>
References:
<20200308113302.43082.qmail@mail.muc.de>
<20200520191303.GA19762@ACM>
<835zcp5knl.fsf@gnu.org> <20200521174211.GA12036@ACM>
<83367t5cdr.fsf@gnu.org> <20200521201935.GB12036@ACM>
<83zha04ikm.fsf@gnu.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <83zha04ikm.fsf@gnu.org>
X-Delivery-Agent: TMDA/1.1.12 (Macallan)
From: Alan Mackenzie
X-Primary-Address: acm@muc.de
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 39972
Cc: 39972@debbugs.gnu.org, p.stephani2@gmail.com
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit"
X-Spam-Score: -1.0 (-)
Hello, Eli.
On Fri, May 22, 2020 at 08:58:17 +0300, Eli Zaretskii wrote:
> > Date: Thu, 21 May 2020 20:19:35 +0000
> > Cc: p.stephani2@gmail.com, 39972@debbugs.gnu.org
> > From: Alan Mackenzie
[ .... ]
> > Sorry to trouble you with such a minor point, but I'm unable to decide
> > myself whether such a small bug should prevent the cherry-picking of
> > 5989432 into emacs-27. I'm leaning towards doing the cherry-pick.
> > So, please help me by making the decision. Thanks!
> I agree with you.
Thanks. I've committed the cherry-pick to the emacs-27 branch.
--
Alan Mackenzie (Nuremberg, Germany).
From debbugs-submit-bounces@debbugs.gnu.org Sat May 23 15:12:27 2020
Received: (at 39972-done) by debbugs.gnu.org; 23 May 2020 19:12:27 +0000
Received: from localhost ([127.0.0.1]:35694 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1jcZZL-0000bT-Bs
for submit@debbugs.gnu.org; Sat, 23 May 2020 15:12:27 -0400
Received: from mail-oi1-f179.google.com ([209.85.167.179]:37503)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from ) id 1jcZZI-0000bF-Lm
for 39972-done@debbugs.gnu.org; Sat, 23 May 2020 15:12:25 -0400
Received: by mail-oi1-f179.google.com with SMTP id m67so1994323oif.4
for <39972-done@debbugs.gnu.org>; Sat, 23 May 2020 12:12:24 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
h=mime-version:references:in-reply-to:from:date:message-id:subject:to
:cc; bh=I/Vpd7uUda4zxkINbaQdoFizk5cLBUIXI+/AVG/FF/I=;
b=V1OQZEW/DH7bNCPlap1vnRxAd73Kp6W/tFL6uUDwE3KWcmG4CN2kNvRBRNfy5nPfh9
uggngiDZgv7n82Q+wYYmwtT2M2DjK0F07fSniuP65OPOJ19Vf3o3/jYl50seIKvBp7En
IDOaCWT4JCmtdR6E5q6092g4NaGsH0FxotYf8AGJDJVUsq1KcZmVtPLqE833qsymg9Oi
I17YYyce53VkIPEAHwO2uLYOAQmLfGnSQXBUhEo/G3JR2lq7hDo9T498AiQL3mmGi40j
d3cI18ckkGH9TrvXhhpUyGCgbTE9O1FQlZpcWCRv7WpB9eDCJIDOzs6WRx/oe7B15Bjk
p7nA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:mime-version:references:in-reply-to:from:date
:message-id:subject:to:cc;
bh=I/Vpd7uUda4zxkINbaQdoFizk5cLBUIXI+/AVG/FF/I=;
b=HTJdP/cxWYEIrVm3y1hSqu/GCrqypGR/h63kmNHks4anrHRKBAL/Fg9RBWTXwvvIlF
FbDxjd7O2let4CQHhPc6vpvXfwUWeM/sDqkipaC5My7jhVKw+MEY3YGGdhd+F8f+GrM8
SlqBA/FyEW3nqE2+GoQ762fV0qFR2I5NA8Diah87FrF+Rdrtc4dhYnatSGbjwTge5nqX
ng3j+7kjBHS9QpS/pi9OSZnxoLkb6mGnqaHlf9Dwx2RPdROwLfS4BEaNH6EfW3iOadgH
jiCuXVK+4ok7T6KjUi+uc8Kg8mgS6UjPbjhzjep5HExSfiMQEIY/BdbtjGpcYqFhdV7U
GnxQ==
X-Gm-Message-State: AOAM531qL9akjpOHUCWfGYr01xlemEJNYS83++9YtEUU+/TdJgRpTQwx
cK0dK9GeEd8B8nxU2BqlndoHv2Py6Pci74Rx4D4=
X-Google-Smtp-Source: ABdhPJy6bi3j6k078qASqs5rT8TBVQn8pTEg7sKuPxNVdtvYzgQQd08XnSUFkM9/tLzZx6RkNHF1q60G2lKlzmOTJVs=
X-Received: by 2002:aca:cc0b:: with SMTP id c11mr5684669oig.170.1590261138964;
Sat, 23 May 2020 12:12:18 -0700 (PDT)
MIME-Version: 1.0
References:
<20200308113302.43082.qmail@mail.muc.de>
<20200520191303.GA19762@ACM>
<835zcp5knl.fsf@gnu.org> <20200521174211.GA12036@ACM> <83367t5cdr.fsf@gnu.org>
<20200521201935.GB12036@ACM> <83zha04ikm.fsf@gnu.org>
<20200522095848.GA5446@ACM>
In-Reply-To: <20200522095848.GA5446@ACM>
From: Philipp Stephani
Date: Sat, 23 May 2020 21:12:08 +0200
Message-ID:
Subject: Re: bug#39972: 28.0.50; which-function no longer returning current
Java method in Emacs 27
To: Alan Mackenzie
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.3 (/)
X-Debbugs-Envelope-To: 39972-done
Cc: Eli Zaretskii , 39972-done@debbugs.gnu.org
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit"
X-Spam-Score: -0.7 (/)
Am Fr., 22. Mai 2020 um 11:58 Uhr schrieb Alan Mackenzie :
>
> Hello, Eli.
>
> On Fri, May 22, 2020 at 08:58:17 +0300, Eli Zaretskii wrote:
> > > Date: Thu, 21 May 2020 20:19:35 +0000
> > > Cc: p.stephani2@gmail.com, 39972@debbugs.gnu.org
> > > From: Alan Mackenzie
>
> [ .... ]
>
> > > Sorry to trouble you with such a minor point, but I'm unable to decide
> > > myself whether such a small bug should prevent the cherry-picking of
> > > 5989432 into emacs-27. I'm leaning towards doing the cherry-pick.
>
> > > So, please help me by making the decision. Thanks!
>
> > I agree with you.
>
> Thanks. I've committed the cherry-pick to the emacs-27 branch.
Thanks, closing.
From unknown Sun Jun 15 08:18:11 2025
Received: (at fakecontrol) by fakecontrolmessage;
To: internal_control@debbugs.gnu.org
From: Debbugs Internal Request