From: martin rudalics <rudalics@gmx.at>
To: Dmitry Gutov <dgutov@yandex.ru>, Eli Zaretskii <eliz@gnu.org>
Cc: Helmut Eller <eller.helmut@gmail.com>, emacs-devel@gnu.org
Subject: Re: xref and displaying locations in appropriate window or frame
Date: Sun, 24 Jan 2016 19:12:31 +0100 [thread overview]
Message-ID: <56A5140F.2040905@gmx.at> (raw)
In-Reply-To: <56A50514.9040509@yandex.ru>
> That doesn't seem to be true. Try:
>
> (with-temp-buffer-window "test" t nil
> (insert "abc"))
>
> It shows the buffer "test" empty, and "abc" gets inserted into the
> buffer that was current before with-temp-buffer-window call.
Because of "Do not make that buffer current for running the forms in
BODY." You have to use ‘with-current-buffer’ around the ‘insert’.
> Yup. That's about temp-buffer-resize-mode. But it seems orthogonal to
> the problem I currently have.
Not entirely. I'd make the *xref* window as small as possible so it
doesn't get split. And I'd like to see it always at the same frame
position.
> Anyway, IME most lines in xref take more than half of its width (which
> is ~110 here). So rearranging them wouldn't help much.
With a maximized frame I get 200 columns here. Anyway. Don't bother
about laying out its contents. But here usually the *xref* buffer never
occupies its full _height_. That's where ‘temp-buffer-resize-mode’
would come in handy.
> The current issue is that people want *xref* to behave less like
> *Completions* (transient, disappearing soon) and more like
> *Compilation*, which stays until the user explicitly buries it or
> kills it or its window.
This should be of no importance. Help windows are also displayed via
‘with-temp-buffer-window’ and don't disappear soon. Some people keep
the help window open all the time. The IMHO important aspect is that
*Completions* uses ‘display-buffer-at-bottom’ which calls plain
‘split-window’ and thus is not limited by ‘split-height-threshold’. You
can obviously use ‘display-buffer-at-bottom’ with plain ‘display-buffer’
as well. But then ‘temp-buffer-resize-mode’ won't get called.
> I think I need to "not reuse the original window", nor xref's
> window. And reusing the original window is more preferable than
> reusing the xref's window.
That's my understanding as well.
> Can I make xref's window temporarily dedicated, and call pop-to-buffer
> from the original window?
Yes. But the one-window-per-frame user might get a new frame then.
She's not your target (because of the assumption that the original
window and the *xref* window are already there when you want to display
the other buffer). But even softly (that's all you need here) dedicated
windows sometimes behave erratically.
> So if the frame is too narrow, and there are two windows only, the
> location will be displayed in the original window? OK, that should be
> fine.
If the other window is the *xref* window and the *xref* window was
"used" later. You might have to "touch" it from time to time ;-)
>> I asked a couple of times whether this makes any sense but nobody cared.
>
> What makes sense? Having a split threshold? I think it does. Beyond
> that, I'd say window management might be too complex for a casual
> commenter to say whether it makes sense or not.
A threshold that is more than twice as large as the default value?
>> Why would she want to do that if you keep *xref* visible as long as it's
>> needed? If the *xref* window is gone, the user should never switch to
>> *xref* manually but ask you to redisplay it.
>
> They can press `q', but then switch back to it a while later. I see no
> reason to prohibit this.
Neither do I. But in a sense this is a bit like an ediff user deleting
the control panel and switching back to it later. The ideal layout may
have gone at that time.
> Do we prohibit things like that in some other buffers?
Not to my knowledge. I just wouldn't call it good user practice. For
example, switching to *Help* in an arbitrary window and doing
‘quit-window’ there is not likely producing good results. The same will
hold for ‘q’ in a window where you manually switched to *xref*. Maybe
some command to "bring back" the *xref* buffer would be more useful than
simply switching to it.
martin
next prev parent reply other threads:[~2016-01-24 18:12 UTC|newest]
Thread overview: 113+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-09 19:36 tags-loop-continue Eli Zaretskii
2016-01-09 19:59 ` tags-loop-continue Ingo Lohmar
2016-01-09 20:22 ` tags-loop-continue Dmitry Gutov
2016-01-09 20:42 ` tags-loop-continue Eli Zaretskii
2016-01-09 20:49 ` tags-loop-continue Dmitry Gutov
2016-01-09 20:52 ` tags-loop-continue Dmitry Gutov
2016-01-09 21:19 ` tags-loop-continue Dmitry Gutov
2016-01-10 3:45 ` tags-loop-continue Eli Zaretskii
2016-01-10 4:00 ` tags-loop-continue Dmitry Gutov
2016-01-10 6:29 ` tags-loop-continue Drew Adams
2016-01-10 14:35 ` tags-loop-continue Dmitry Gutov
2016-01-10 15:26 ` tags-loop-continue Ingo Lohmar
2016-01-10 16:09 ` tags-loop-continue Eli Zaretskii
2016-01-10 16:08 ` tags-loop-continue Eli Zaretskii
2016-01-10 16:18 ` tags-loop-continue Dmitry Gutov
2016-01-10 17:53 ` tags-loop-continue Drew Adams
2016-01-10 18:12 ` tags-loop-continue Dmitry Gutov
2016-01-11 7:21 ` tags-loop-continue Eric Abrahamsen
2016-01-10 15:54 ` tags-loop-continue Eli Zaretskii
2016-01-10 16:14 ` tags-loop-continue Dmitry Gutov
2016-01-10 17:08 ` tags-loop-continue Eli Zaretskii
2016-01-10 18:19 ` tags-loop-continue Dmitry Gutov
2016-01-10 19:01 ` tags-loop-continue Eli Zaretskii
2016-01-14 0:41 ` tags-loop-continue Dmitry Gutov
2016-01-14 16:00 ` tags-loop-continue Eli Zaretskii
2016-01-14 16:07 ` tags-loop-continue Dmitry Gutov
2016-01-14 17:17 ` tags-loop-continue Eli Zaretskii
2016-01-14 17:26 ` tags-loop-continue Dmitry Gutov
2016-01-14 17:39 ` tags-loop-continue Dmitry Gutov
2016-01-14 18:36 ` tags-loop-continue Eli Zaretskii
2016-01-14 18:46 ` tags-loop-continue Dmitry Gutov
2016-01-14 18:31 ` tags-loop-continue Eli Zaretskii
2016-01-14 18:44 ` tags-loop-continue Dmitry Gutov
2016-01-14 19:02 ` tags-loop-continue Eli Zaretskii
2016-01-14 19:15 ` tags-loop-continue Dmitry Gutov
2016-01-14 19:18 ` tags-loop-continue Dmitry Gutov
2016-01-14 19:41 ` tags-loop-continue Eli Zaretskii
2016-01-14 20:09 ` tags-loop-continue Dmitry Gutov
2016-01-14 20:21 ` tags-loop-continue Eli Zaretskii
2016-01-18 19:19 ` tags-loop-continue Dmitry Gutov
2016-01-20 11:19 ` tags-loop-continue Eli Zaretskii
2016-01-21 4:59 ` tags-loop-continue Dmitry Gutov
2016-01-21 17:02 ` tags-loop-continue Eli Zaretskii
2016-01-21 17:12 ` tags-loop-continue Dmitry Gutov
2016-01-21 17:47 ` tags-loop-continue Eli Zaretskii
2016-01-21 18:58 ` tags-loop-continue Dmitry Gutov
2016-01-21 19:02 ` tags-loop-continue Eli Zaretskii
2016-01-21 19:11 ` tags-loop-continue Dmitry Gutov
2016-01-21 19:56 ` tags-loop-continue Eli Zaretskii
2016-01-21 20:15 ` tags-loop-continue Dmitry Gutov
2016-01-21 20:36 ` tags-loop-continue Eli Zaretskii
2016-01-21 21:17 ` tags-loop-continue Dmitry Gutov
2016-01-21 21:26 ` tags-loop-continue Dmitry Gutov
2016-01-22 6:59 ` tags-loop-continue Eli Zaretskii
2016-01-22 10:13 ` tags-loop-continue Dmitry Gutov
2016-01-22 14:08 ` tags-loop-continue Eli Zaretskii
2016-01-22 17:51 ` tags-loop-continue John Wiegley
2016-01-22 18:35 ` tags-loop-continue Dmitry Gutov
2016-01-24 1:26 ` next-error-function integration in xref removed Dmitry Gutov
2016-01-26 17:34 ` John Wiegley
2016-01-22 1:54 ` tags-loop-continue John Wiegley
2016-01-22 2:00 ` tags-loop-continue Dmitry Gutov
2016-01-22 5:34 ` tags-loop-continue John Wiegley
2016-01-21 5:15 ` tags-loop-continue Dmitry Gutov
2016-01-21 17:07 ` tags-loop-continue Eli Zaretskii
2016-01-24 2:19 ` xref and displaying locations in appropriate window or frame Dmitry Gutov
2016-01-24 10:55 ` martin rudalics
2016-01-24 13:02 ` Dmitry Gutov
2016-01-24 14:38 ` martin rudalics
2016-01-24 14:53 ` martin rudalics
2016-01-24 17:08 ` Dmitry Gutov
2016-01-24 18:12 ` martin rudalics [this message]
2016-01-24 19:01 ` Dmitry Gutov
2016-01-25 9:50 ` martin rudalics
2016-01-25 17:04 ` Dmitry Gutov
2016-01-25 18:18 ` martin rudalics
2016-01-25 19:28 ` Ingo Lohmar
2016-01-26 10:05 ` martin rudalics
2016-01-26 23:31 ` Dmitry Gutov
2016-01-27 9:10 ` martin rudalics
2016-01-27 17:33 ` Dmitry Gutov
2016-01-27 18:08 ` martin rudalics
2016-01-27 18:35 ` Dmitry Gutov
2016-01-27 22:45 ` Juri Linkov
2016-01-27 23:13 ` Dmitry Gutov
2016-01-28 9:42 ` martin rudalics
2016-01-28 15:03 ` Drew Adams
2016-01-29 0:05 ` Juri Linkov
2016-01-29 7:27 ` martin rudalics
2016-01-29 23:36 ` Juri Linkov
2016-01-29 1:57 ` Dmitry Gutov
2016-01-29 7:27 ` martin rudalics
2016-01-29 13:59 ` Dmitry Gutov
2016-01-29 23:40 ` Juri Linkov
2016-01-25 22:39 ` Dmitry Gutov
2016-01-26 10:05 ` martin rudalics
2016-01-27 1:00 ` Dmitry Gutov
2016-01-27 9:10 ` martin rudalics
2016-01-27 18:43 ` Dmitry Gutov
2016-01-24 15:43 ` Eli Zaretskii
2016-01-24 17:27 ` Dmitry Gutov
2016-01-24 17:58 ` Eli Zaretskii
2016-01-24 18:03 ` Dmitry Gutov
2016-02-21 0:24 ` Dmitry Gutov
2016-02-21 23:49 ` tags-loop-continue Dmitry Gutov
2016-02-22 17:20 ` tags-loop-continue Eli Zaretskii
2016-01-17 23:12 ` tags-loop-continue Stefan Monnier
2016-01-18 1:37 ` tags-loop-continue Dmitry Gutov
2016-01-18 2:20 ` tags-loop-continue Stefan Monnier
2016-01-18 2:28 ` tags-loop-continue Dmitry Gutov
2016-01-18 2:48 ` tags-loop-continue Stefan Monnier
2016-01-18 2:57 ` tags-loop-continue Dmitry Gutov
2016-01-18 15:46 ` tags-loop-continue Eli Zaretskii
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=56A5140F.2040905@gmx.at \
--to=rudalics@gmx.at \
--cc=dgutov@yandex.ru \
--cc=eliz@gnu.org \
--cc=eller.helmut@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.