[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: xref window switching problems
From: |
Dmitry Gutov |
Subject: |
Re: xref window switching problems |
Date: |
Thu, 6 Aug 2015 10:05:25 +0300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:40.0) Gecko/20100101 Thunderbird/40.0 |
On 08/05/2015 11:30 PM, Ingo Lohmar wrote:
Maybe I was not expressing my thoughts clearly. Reusing the second
window is what the functions did, and that's just fine --- only the
current window when calling the command should be left alone (and now,
it is).
Ah, ok.
Except for factoring out xref--goto-char, your patch looks just like my
private testing.
Good.
Maybe xref-pop-marker-stack could benefit from a discussion as well.
Maybe it could benefit from a patch proposal.
That sounds a bit snarky to me...
Sorry if it came across wrong. I only meant that a technical proposal
would be the best way to start that discussion.
across wrong. Given the preceding sentences (which you did not quote),
I thought it would have been clear this is merely a related
afterthought, and not meant to disparage your work on xref in any way.
In fact, I am happy about that effort to unify and standardize commands.
Thank you.
Disclaimer: Recent discussion seems to have centered around the question
if the newly opened file buffers should be cleaned up somehow. I am not
worried nor bothered by having all these buffers opened. It's always
been that way in Emacs, and it's never been a problem for me.
It's nice, but there will be scenarios when it's convenient for an xref
implementation to open lots of buffers. Depending on you input to
xref-find-regexp, likely too many.
I care more (but it's not all that important to me) about the buffers
and points *shown* in windows. In that respect, what if
xref--marker-ring stored, together with the location where
xref-push-marker-stack is called, the window where it is called.
That's possible. Although then the callers will have to be more careful
and not call it in some intermediate state.
Then
xref-pop-marker-stack could look at the top of the stack and:
- if window is same as current: same as now, ie, goto buffer and point
in same window
- if window is different, still there and showing the buffer of the
stack location, switch to that window and go to location's point
Then you'll still have the newly opened window (or this window might've
been showing a different buffer before). Still, this could be the best
we can reasonably do.
- if the window no longer exists, or shows a different buffer now, use
the current window to switch to the buffer and goto location's point
I guess so.