unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#23567: find-function-search-for-symbol of find-func.el leaves point moved but should not
@ 2016-05-17 19:51 Robert Weiner
  2016-05-19 23:47 ` Dmitry Gutov
  0 siblings, 1 reply; 4+ messages in thread
From: Robert Weiner @ 2016-05-17 19:51 UTC (permalink / raw)
  To: 23567

[-- Attachment #1: Type: text/plain, Size: 673 bytes --]

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.

[-- Attachment #2: Type: text/html, Size: 860 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#23567: find-function-search-for-symbol of find-func.el leaves point moved but should not
  2016-05-17 19:51 bug#23567: find-function-search-for-symbol of find-func.el leaves point moved but should not Robert Weiner
@ 2016-05-19 23:47 ` Dmitry Gutov
  2016-05-23 17:53   ` Robert Weiner
  0 siblings, 1 reply; 4+ messages in thread
From: Dmitry Gutov @ 2016-05-19 23:47 UTC (permalink / raw)
  To: Robert Weiner, 23567

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'.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#23567: find-function-search-for-symbol of find-func.el leaves point moved but should not
  2016-05-19 23:47 ` Dmitry Gutov
@ 2016-05-23 17:53   ` Robert Weiner
  2016-05-23 21:17     ` Dmitry Gutov
  0 siblings, 1 reply; 4+ messages in thread
From: Robert Weiner @ 2016-05-23 17:53 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: 23567

[-- Attachment #1: Type: text/plain, Size: 1030 bytes --]

On Thu, May 19, 2016 at 7:47 PM, Dmitry Gutov <dgutov@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"))

[-- Attachment #2: Type: text/html, Size: 1753 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#23567: find-function-search-for-symbol of find-func.el leaves point moved but should not
  2016-05-23 17:53   ` Robert Weiner
@ 2016-05-23 21:17     ` Dmitry Gutov
  0 siblings, 0 replies; 4+ messages in thread
From: Dmitry Gutov @ 2016-05-23 21:17 UTC (permalink / raw)
  To: Robert Weiner; +Cc: 23567-done

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.






^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-05-23 21:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-17 19:51 bug#23567: find-function-search-for-symbol of find-func.el leaves point moved but should not Robert Weiner
2016-05-19 23:47 ` Dmitry Gutov
2016-05-23 17:53   ` Robert Weiner
2016-05-23 21:17     ` Dmitry Gutov

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).