-
Notifications
You must be signed in to change notification settings - Fork 331
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
M-. on a symbol doesn't always move the cursor to the right position #391
Comments
Thanks for looking into this. Do you know whether the new recommendation is
backwards compatible with older Emacs versions?
…On Thu, Jun 15, 2017, 11:08 Elias Mårtenson ***@***.***> wrote:
If you press M-. on a symbol that is defined in a file that is already
opened, the cursor doesn't move to the correct location. The problem only
happens on recent versions of Emacs.
The cause of the problem is a change in behaviour of goto-char. It no
longer can be used to move the cursor in an inactive buffer. The old
behaviour can be restored by setting
switch-to-buffer-preserve-window-point to nil.
The root cause is is in SLIME the cursor is set using goto-char, and
later the buffer is displayed using pop-to-buffer. This no longer works,
and according to a discussion on emacs-devel, the function
set-window-point should be used instead.
Here is the discussion on emacs-devel:
https://lists.gnu.org/archive/html/emacs-devel/2017-06/msg00227.html
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#391>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AACyv_gNzP3XchItvFqKcASy9XUHrRAZks5sEQKcgaJpZM4N6_9R>
.
|
Based on the discussion on the mailing list, I think the only reliable solution to this is to change the behaviour of the code so that it switches to the buffer before moving the cursor. I think the propoer solution is to use |
Sounds like a plan. Have you got time for preparing a pull request?
…On Thu, Jun 15, 2017, 19:48 Elias Mårtenson ***@***.***> wrote:
Based on the discussion on the mailing list, I think the only reliable
solution to this is to change the behaviour of the code so that it switches
to the buffer before moving the cursor. I think the propoer solution is to
use pop-to-buffer first, and then place the cursor at the correct
location using goto-char.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#391 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AACyv7RPkFRTTIaQi_rQn-Xexri4w3J_ks5sEXEjgaJpZM4N6_9R>
.
|
I can give it a try. I'll look at it in the next few days or so. |
@lokedhs any news? :-) |
Actually, I haven't looked at it since this was discussed last. If I recall correctly, the code was quite complictaed, and there was no obvious simple way to make the change. I changed the Emacs configuration variable to revert to the old behaviour and I haven't bothered with this since. This is of course not ideal, and a proper solution should be implemented. |
If you press M-. on a symbol that is defined in a file that is already opened, the cursor doesn't move to the correct location. The problem only happens on recent versions of Emacs.
The cause of the problem is a change in behaviour of
goto-char
. It no longer can be used to move the cursor in an inactive buffer. The old behaviour can be restored by settingswitch-to-buffer-preserve-window-point
to nil.The root cause is is in SLIME the cursor is set using
goto-char
, and later the buffer is displayed usingpop-to-buffer
. This no longer works, and according to a discussion on emacs-devel, the functionset-window-point
should be used instead.Here is the discussion on emacs-devel: https://lists.gnu.org/archive/html/emacs-devel/2017-06/msg00227.html
The text was updated successfully, but these errors were encountered: