GNU bug report logs - #23567
find-function-search-for-symbol of find-func.el leaves point moved but should not

Previous Next

Package: emacs;

Reported by: Robert Weiner <rswgnu <at> gmail.com>

Date: Wed, 18 May 2016 01:41:02 UTC

Severity: normal

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

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 23567 in the body.
You can then email your comments to 23567 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#23567; Package emacs. (Wed, 18 May 2016 01:41:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Robert Weiner <rswgnu <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 18 May 2016 01:41:02 GMT) Full text and rfc822 format available.

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

From: Robert Weiner <rswgnu <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: find-function-search-for-symbol of find-func.el leaves point moved
 but should not
Date: Tue, 17 May 2016 15:51:40 -0400
[Message part 1 (text/plain, inline)]
find-function-search-for-symbol in find-func.el is called for its
return value and not for side-effects but presently it moves point
around in the buffers it affects.  It needs some save-excursion
protection.  This is true for the most recent 25.1 release I looked at
and I don't think any changes have been made to it since then.

One example of where this causes a problem is in xref-location-marker
of elisp-mode.el.  Again, that is called simply to return the marker
but because it calls find-function-search-for-symbol, it can move
point and cause other problems.

It would be best if someone familiar with this first function made the
change to ensure it is correct.
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#23567; Package emacs. (Thu, 19 May 2016 23:48:02 GMT) Full text and rfc822 format available.

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

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Robert Weiner <rswgnu <at> gmail.com>, 23567 <at> debbugs.gnu.org
Subject: Re: bug#23567: find-function-search-for-symbol of find-func.el leaves
 point moved but should not
Date: Fri, 20 May 2016 02:47:48 +0300
Hi Robert,

On 05/17/2016 10:51 PM, Robert Weiner wrote:

> One example of where this causes a problem is in xref-location-marker
> of elisp-mode.el.  Again, that is called simply to return the marker
> but because it calls find-function-search-for-symbol, it can move
> point and cause other problems.

Could you please describe a step-by-step scenario illustrating such 
problem? Preferably starting with 'emacs -Q'.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#23567; Package emacs. (Mon, 23 May 2016 17:55:02 GMT) Full text and rfc822 format available.

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

From: Robert Weiner <rswgnu <at> gmail.com>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 23567 <at> debbugs.gnu.org
Subject: Re: bug#23567: find-function-search-for-symbol of find-func.el leaves
 point moved but should not
Date: Mon, 23 May 2016 13:53:23 -0400
[Message part 1 (text/plain, inline)]
On Thu, May 19, 2016 at 7:47 PM, Dmitry Gutov <dgutov <at> yandex.ru> wrote:

> Hi Robert,
>
> On 05/17/2016 10:51 PM, Robert Weiner wrote:
>
> One example of where this causes a problem is in xref-location-marker
>> of elisp-mode.el.  Again, that is called simply to return the marker
>> but because it calls find-function-search-for-symbol, it can move
>> point and cause other problems.
>>
>
> Could you please describe a step-by-step scenario illustrating such
> problem? Preferably starting with 'emacs -Q'.
>

As of Emacs 25.0.94, I can no longer replicate the problem, so some updates
must have fixed it.  Great.  Please close this issue.

If you ever need a test case for this, the following code should show the
definition of outline-show-all in only the upper window but when the bug
existed, both windows would be scrolled to its definition.

(progn
  (delete-other-windows)
  (find-library "outline")
  (display-buffer-pop-up-window "outline.el.gz" nil)
  (find-function-search-for-symbol 'outline-show-all nil "outline"))
[Message part 2 (text/html, inline)]

Reply sent to Dmitry Gutov <dgutov <at> yandex.ru>:
You have taken responsibility. (Mon, 23 May 2016 21:18:02 GMT) Full text and rfc822 format available.

Notification sent to Robert Weiner <rswgnu <at> gmail.com>:
bug acknowledged by developer. (Mon, 23 May 2016 21:18:02 GMT) Full text and rfc822 format available.

Message #16 received at 23567-done <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Robert Weiner <rswgnu <at> gmail.com>
Cc: 23567-done <at> debbugs.gnu.org
Subject: Re: bug#23567: find-function-search-for-symbol of find-func.el leaves
 point moved but should not
Date: Tue, 24 May 2016 00:17:01 +0300
On 05/23/2016 08:53 PM, Robert Weiner wrote:

> As of Emacs 25.0.94, I can no longer replicate the problem, so some
> updates must have fixed it.  Great.  Please close this issue.

Good to hear, closing. And that why we usually ask for the reproduction 
scenario in bug reports, not just "this code doesn't look right to me".

I don't think any of the recent changes fixed this. Even as we discussed 
this issue in private (a couple of weeks ago?), I tried to produce a 
problem scenario, and failed.





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 21 Jun 2016 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 9 years and 2 days ago.

Previous Next


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