GNU bug report logs -
#1103
23.0.60; which-func misses functions
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 1103 in the body.
You can then email your comments to 1103 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#1103
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
"Lennart Borgman (gmail)" <lennart.borgman <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
Instead of displaying the last function in an elisp file it may display
the name of a variable that is above the function. I do not know if the
patch below is the right way to fix it.
Index: which-func.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/progmodes/which-func.el,v
retrieving revision 1.25
diff -u -r1.25 which-func.el
--- which-func.el 30 Sep 2008 03:42:47 -0000 1.25
+++ which-func.el 6 Oct 2008 21:56:46 -0000
@@ -313,7 +313,8 @@
(reverse (cons (car pair)
namestack)))))
;; Entries in order, so can skip all those
after point.
(setq alist nil
- imstack nil)))))
+ ;;imstack nil
+ )))))
(setq alist (car imstack)
namestack (cdr namestack)
In GNU Emacs 23.0.60.1 (i386-mingw-nt5.1.2600)
of 2008-10-03
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4) --no-opt --cflags
-Ic:/g/include -fno-crossjumping'
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#1103
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
"Lennart Borgman (gmail)" <lennart.borgman <at> gmail.com>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #10 received at 1103 <at> emacsbugs.donarmstrong.com (full text, mbox):
[Message part 1 (text/plain, inline)]
Lennart Borgman (gmail) wrote:
> Instead of displaying the last function in an elisp file it may display
> the name of a variable that is above the function. I do not know if the
> patch below is the right way to fix it.
Here is a new patch which I think is correct.
[which-func.diff (text/plain, inline)]
Index: which-func.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/progmodes/which-func.el,v
retrieving revision 1.25
diff -u -r1.25 which-func.el
--- which-func.el 30 Sep 2008 03:42:47 -0000 1.25
+++ which-func.el 7 Oct 2008 10:45:56 -0000
@@ -287,11 +287,12 @@
(boundp 'imenu--index-alist) imenu--index-alist)
(let ((alist imenu--index-alist)
(minoffset (point-max))
- offset pair mark imstack namestack)
+ offset pair mark imstack namestack
+ skip-sub)
;; Elements of alist are either ("name" . marker), or
;; ("submenu" ("name" . marker) ... ). The list can be
;; arbitrarily nested.
- (while (or alist imstack)
+ (while (or alist imstack skip-sub)
(if alist
(progn
(setq pair (car-safe alist)
@@ -302,9 +303,12 @@
((imenu--subalist-p pair)
(setq imstack (cons alist imstack)
namestack (cons (car pair) namestack)
- alist (cdr pair)))
+ alist (cdr pair)
+ skip-sub nil
+ ))
((number-or-marker-p (setq mark (cdr pair)))
+ (unless skip-sub
(if (>= (setq offset (- (point) mark)) 0)
(if (< offset minoffset) ; find the closest item
(setq minoffset offset
@@ -312,12 +316,15 @@
which-func-imenu-joiner-function
(reverse (cons (car pair) namestack)))))
;; Entries in order, so can skip all those after point.
- (setq alist nil
- imstack nil)))))
+ ;;(setq alist nil imstack nil)
+ (setq skip-sub t)
+ )
+ ))))
(setq alist (car imstack)
namestack (cdr namestack)
- imstack (cdr imstack))))))
+ imstack (cdr imstack)
+ skip-sub nil)))))
;; Try using add-log support.
(when (and (null name) (boundp 'add-log-current-defun-function)
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#1103
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
Chong Yidong <cyd <at> stupidchicken.com>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #15 received at 1103 <at> emacsbugs.donarmstrong.com (full text, mbox):
> Instead of displaying the last function in an elisp file it may
> display the name of a variable that is above the function.
Could you send (i) a recipe to reproduce this problem, and (ii) a
ChangeLog entry for your patch?
Thanks.
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#1103
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
"Lennart Borgman (gmail)" <lennart.borgman <at> gmail.com>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #20 received at 1103 <at> emacsbugs.donarmstrong.com (full text, mbox):
Chong Yidong wrote:
>> Instead of displaying the last function in an elisp file it may
>> display the name of a variable that is above the function.
>
> Could you send (i) a recipe to reproduce this problem, and
Hm, sorry, I can't reproduce it now. It might be a problem with an imenu
library I loaded, I did not think of that. I have to investigate this
further.
> (ii) a
> ChangeLog entry for your patch?
>
> Thanks.
>
bug closed, send any further explanations to "Lennart Borgman (gmail)" <lennart.borgman <at> gmail.com>
Request was from
Chong Yidong <cyd <at> stupidchicken.com>
to
control <at> emacsbugs.donarmstrong.com
.
(Thu, 09 Oct 2008 00:10:04 GMT)
Full text and
rfc822 format available.
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#1103
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
"Lennart Borgman (gmail)" <lennart.borgman <at> gmail.com>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #27 received at 1103 <at> emacsbugs.donarmstrong.com (full text, mbox):
Lennart Borgman (gmail) wrote:
> Chong Yidong wrote:
>>> Instead of displaying the last function in an elisp file it may
>>> display the name of a variable that is above the function.
>> Could you send (i) a recipe to reproduce this problem, and
>
> Hm, sorry, I can't reproduce it now. It might be a problem with an imenu
> library I loaded, I did not think of that. I have to investigate this
> further.
I am a bit puzzled. I see a bit different things. I just tested with a
checkout from 2008-10-03:
emacs -Q
M-x find-function RET which-function-mode
M-x which-function-mode
This gives me wrong function names in the mode line. But there is
something strange there, I will check with a new checkout later ...
>> (ii) a
>> ChangeLog entry for your patch?
>>
>> Thanks.
>>
>
>
>
>
>
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#1103
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
"Lennart Borgman (gmail)" <lennart.borgman <at> gmail.com>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #32 received at 1103 <at> emacsbugs.donarmstrong.com (full text, mbox):
Lennart Borgman (gmail) wrote:
> Lennart Borgman (gmail) wrote:
>> Chong Yidong wrote:
>>>> Instead of displaying the last function in an elisp file it may
>>>> display the name of a variable that is above the function.
>>> Could you send (i) a recipe to reproduce this problem, and
>> Hm, sorry, I can't reproduce it now. It might be a problem with an imenu
>> library I loaded, I did not think of that. I have to investigate this
>> further.
>
> I am a bit puzzled. I see a bit different things. I just tested with a
> checkout from 2008-10-03:
>
> emacs -Q
> M-x find-function RET which-function-mode
> M-x which-function-mode
>
> This gives me wrong function names in the mode line. But there is
> something strange there, I will check with a new checkout later ...
With a fresh update from today I can still reproduce this problem as above.
Can you please reopen this bug so we do not forget it?
>>> (ii) a
>>> ChangeLog entry for your patch?
>>>
>>> Thanks.
>>>
>>
>>
>>
>>
>
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#1103
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
Chong Yidong <cyd <at> stupidchicken.com>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #37 received at 1103 <at> emacsbugs.donarmstrong.com (full text, mbox):
>> emacs -Q
>> M-x find-function RET which-function-mode
>> M-x which-function-mode
>>
>> This gives me wrong function names in the mode line. But there is
>> something strange there, I will check with a new checkout later ...
>
> With a fresh update from today I can still reproduce this problem as
> above.
Could you send a ChangeLog for your patch (assuming you still think it's
correct)?
bug reopened, originator not changed.
Request was from
Chong Yidong <cyd <at> stupidchicken.com>
to
control <at> emacsbugs.donarmstrong.com
.
(Thu, 09 Oct 2008 20:05:06 GMT)
Full text and
rfc822 format available.
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#1103
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
"Lennart Borgman (gmail)" <lennart.borgman <at> gmail.com>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #44 received at 1103 <at> emacsbugs.donarmstrong.com (full text, mbox):
[Message part 1 (text/plain, inline)]
Chong Yidong wrote:
>>> emacs -Q
>>> M-x find-function RET which-function-mode
>>> M-x which-function-mode
>>>
>>> This gives me wrong function names in the mode line. But there is
>>> something strange there, I will check with a new checkout later ...
>> With a fresh update from today I can still reproduce this problem as
>> above.
>
> Could you send a ChangeLog for your patch (assuming you still think it's
> correct)?
I have attached a changlog.
Daniel, I think you might have been changing which-function before me.
Do you have any comments on my change?
[changelog-which-func (text/plain, inline)]
2008-10-09 Lennart Borgman <lennart.borgman <at> gmail.com>
* which-func.el (which-function): Skip just current sublist when a
possible match is found in an imenu index.
Tags added: moreinfo
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> emacsbugs.donarmstrong.com
.
(Thu, 13 Nov 2008 20:10:07 GMT)
Full text and
rfc822 format available.
Reply sent
to
Glenn Morris <rgm <at> gnu.org>
:
You have taken responsibility.
(Fri, 15 Jul 2011 21:09:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
"Lennart Borgman (gmail)" <lennart.borgman <at> gmail.com>
:
bug acknowledged by developer.
(Fri, 15 Jul 2011 21:09:02 GMT)
Full text and
rfc822 format available.
Message #51 received at 1103-done <at> debbugs.gnu.org (full text, mbox):
I think this should be closed until a description of how to reproduce
the problem is provided.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 13 Aug 2011 11:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 14 years and 6 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.