From: Dmitry Gutov <dgutov@yandex.ru>
To: Ingo Lohmar <i.lohmar@gmail.com>, emacs-devel@gnu.org
Subject: Re: xref window switching problems
Date: Wed, 5 Aug 2015 15:33:28 +0300 [thread overview]
Message-ID: <55C20298.3010506@yandex.ru> (raw)
In-Reply-To: <87bnemn8mk.fsf@acer.localhost.com>
On 08/04/2015 10:42 PM, Ingo Lohmar wrote:
> - the point of the *current* window is moved to the target location
> (just what the user wanted to avoid, I suppose)
That's clearly a bug. Should be fixed now, thanks.
> - when the current window is the only one showing the buffer in
> question, then the same buffer is newly displayed in another window we
> pop to (hence at the same position)
Aside from the bug above, this seems to be the intended behavior.
> - when another window already shows the same buffer, we pop to this
> buffer --- less annoying, but still unexpected and not helpful
I'm not sure if it's a problem, actually. That's how pop-to-buffer
works. In general, it would even use the current window if it already
displays the buffer in question, but for
xref-find-definitions-other-window, we explicitly ask it to use another
window. So it uses the other window displaying the same buffer.
> The old pre-xref elisp implementations and the tags functions got the
> "...-other-window" behavior right IMO: Leave my current window's buffer
> and point alone in any case, and pop to the target shown in another
> window.
Are you sure it doesn't reuse the second window that displays the same
buffer?
> The change would be easy (see xref--pop-to-location), first get the
> buffer, then do the window business, and only then xref--goto-location.
The choice of how to implement it was not so easy. Pretty much because
(with-current-buffer (current-buffer) (goto-char (point-min)))
moves point in the current window.
> Maybe xref-pop-marker-stack could benefit from a discussion as well.
Maybe it could benefit from a patch proposal.
next prev parent reply other threads:[~2015-08-05 12:33 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-04 19:42 xref window switching problems Ingo Lohmar
2015-08-05 6:56 ` Stephen Leake
2015-08-05 12:40 ` Dmitry Gutov
2015-08-06 9:16 ` Stephen Leake
2015-08-05 12:33 ` Dmitry Gutov [this message]
2015-08-05 20:30 ` Ingo Lohmar
2015-08-06 7:05 ` Dmitry Gutov
2015-08-06 9:36 ` Stephen Leake
2015-08-07 17:25 ` Ingo Lohmar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55C20298.3010506@yandex.ru \
--to=dgutov@yandex.ru \
--cc=emacs-devel@gnu.org \
--cc=i.lohmar@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.