all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ingo Lohmar <i.lohmar@gmail.com>
To: emacs-devel@gnu.org
Subject: Re: xref window switching problems
Date: Fri, 7 Aug 2015 17:25:00 +0000 (UTC)	[thread overview]
Message-ID: <loom.20150807T192013-599@post.gmane.org> (raw)
In-Reply-To: 86mvy4ahd4.fsf@stephe-leake.org

Stephen Leake <stephen_leake <at> stephe-leake.org> writes:

> > That would, I think, be quite close to going back "in time" to the
> > window/buffer setup that the user had before, whenever that is possible.
> > If that is deemed a reasonable goal, 
> 
> I don't think it is.
> 
> xref-pop-marker-stack should cause the previous marker location to be
> displayed; that's _not_ the same as "also cause everything else that was
> displayed at that point in time to be displayed".
> 
> Currently, it always does so in the current window; your proposal
> extends that to consider the other currently visible windows.

You're right, I overstretched the comparison.  But I also think the proposal
is a reasonable and not-too-complex behavior.

> 
> > the last clause seems the only one where the behavior could differ.
> > Maybe one could reuse another window showing the target buffer, 
> 
> Yes, I think that is best. No need to store the window; just look in the
> other currently visible windows; if the location is visible (using
> pos-visible-in-window-p ?), go there. It doesn't matter if it's the same
> window that location was in at some earlier time; it's visible now.

Thinking a bit more about this, I agree: if the user has dumped/changed the
original window, another window showing the same buffer should be reused

> 
> You could almost implement this with `display-buffer-use-some-frame',
> (that I just added), with a frame-predicate that checks
> pos-visible-in-window-p, but that's not precise enough. We'd have to
> extend that with a window-predicate. Which I need to do for another use
> case. Hmm, it might be better to add window-predicate to
> display-buffer-use-some-window.
> 
> > or even choose one of two or three actions, customizable by an option.
> 
> Ah, the Emacs Prime Directive again :).
> 

Yeah, given some time, I think that is not really useful unless somebody
asks for it and presents a compelling case.  Anyway, it would be just a
varibale holding a function, defaulting to #'pop-to-buffer.




      reply	other threads:[~2015-08-07 17:25 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
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 [this message]

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=loom.20150807T192013-599@post.gmane.org \
    --to=i.lohmar@gmail.com \
    --cc=emacs-devel@gnu.org \
    /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.