GNU bug report logs - #28645
26.0.50; semantic-ia-fast-jump jumps to a random place in buffer

Previous Next

Package: emacs;

Reported by: Constantine <hi-angel <at> yandex.ru>

Date: Fri, 29 Sep 2017 13:25:01 UTC

Severity: normal

Found in version 26.0.50

Done: Dmitry Gutov <dgutov <at> yandex.ru>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Constantine <hi-angel <at> yandex.ru>
Subject: bug#28645: closed (Re: bug#28645: 26.0.50; semantic-ia-fast-jump
 jumps to a random place in buffer)
Date: Sat, 30 Sep 2017 14:20:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#28645: 26.0.50; semantic-ia-fast-jump jumps to a random place in buffer

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 28645 <at> debbugs.gnu.org.

-- 
28645: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=28645
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Dmitry Gutov <dgutov <at> yandex.ru>
To: martin rudalics <rudalics <at> gmx.at>, Constantine <hi-angel <at> yandex.ru>,
 28645-done <at> debbugs.gnu.org
Subject: Re: bug#28645: 26.0.50; semantic-ia-fast-jump jumps to a random place
 in buffer
Date: Sat, 30 Sep 2017 16:19:37 +0200
On 9/29/17 8:18 PM, martin rudalics wrote:
>  > +  (let (switch-to-buffer-preserve-window-point)
>  > +    (switch-to-buffer (current-buffer)))
> 
> I think (pop-to-buffer-same-window (current-buffer)) should be used
> instead.

Done.

Thanks all!

[Message part 3 (message/rfc822, inline)]
From: Constantine <hi-angel <at> yandex.ru>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.0.50; semantic-ia-fast-jump jumps to a random place in buffer
Date: Fri, 29 Sep 2017 16:23:54 +0300
When declaration is in another buffer, semantic-ia-fast-jump often
jumps to this buffer, but to incorrect line. However if the
declaration is in the same buffer where the command was used, it always
— as far as I've seen — jumps to the correct line.

Steps to reproduce:

1. Create the following 2 files with the following content:
    $ grep -n "" myfunc.h test.cpp
    myfunc.h:1:void myfunc1() {
    myfunc.h:2:}
    myfunc.h:3:void myfunc2() {
    myfunc.h:4:}
    test.cpp:1:#include "myfunc.h"
    test.cpp:2:
    test.cpp:3:int main() {
    test.cpp:4:     myfunc1();
    test.cpp:5:     myfunc2();
    test.cpp:6:}
2. Run emacs -Q test.cpp
3. Enable `M-x semantic-mode`
4. Put cursor into "myfunc2", and type `M-x semantic-ia-fast-jump`
    (you'll see it jumped to the correct declaration at myfunc.h file)
5. Use `C-x b RET` to switch back to test.cpp
6. Put cursor into "myfunc1", and type `M-x semantic-ia-fast-jump`

Result: it jumped to "myfunc2" declaration, not to "myfunc1" as it ought to.

I also want to note that though ATM I am using emacs-git, I've seen the
problem for don't remember how long, just didn't report.



This bug report was last modified 7 years and 301 days ago.

Previous Next


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