unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: martin rudalics <rudalics@gmx.at>
Cc: Michael Heerdegen <michael_heerdegen@web.de>, 32825@debbugs.gnu.org
Subject: bug#32825: 27.0.50; Deterministic window management
Date: Thu, 15 Nov 2018 23:43:59 +0200	[thread overview]
Message-ID: <875zwyuicg.fsf@mail.linkov.net> (raw)
In-Reply-To: <5BED388E.7030506@gmx.at> (martin rudalics's message of "Thu, 15 Nov 2018 10:12:46 +0100")

>> 'display-buffer-in-previous-window' searches the buffer in the
>> prev-buffers list that 'switch-to-prev-buffer' might want to skip
>> (I still doubt this need).
>
> The need to skip or the need to search?

The need to skip.  If the original window was too small
to split and display the buffer in a new window below, then
if some existing window is reused to display the temporary buffer,
it's understandable for the user why that temporary buffer is shown
in the window-local tab-bar.

At least, then the user will see in which window the same buffer
will be reappear again - in the same window that shows this buffer
in its window-local tab-bar.

>> I proposed to generalize display-buffer-in-previous-window
>> to avoid duplicating code like in debug.el that uses
>> debugger-previous-window, debugger-pre-previous-window,
>> debugger-previous-window-height because the same feature
>> is needed in other packages like edebug.el.
>>
>> The same feature is needed also for next-error to display hits
>> from different buffers in the same window.
>
> When a user can always make a new window there is indeed no problem:
> place or reuse the window below the selected window or on the bottom
> of the frame.  Both approaches are sufficiently deterministic in their
> choice of a window.

I agree.

> But as soon as a window must be reused and the selected one is at the
> bottom of the frame, it can become quite difficult to assure that a
> buffer shows up in a deterministic location.  This eventually gave
> raise to the idea of introducing 'display-buffer-in-previous-window'
> (together with the fact that a window's previous buffers then became
> easily available via 'window-prev-buffers').

The second time when the buffer is displayed again in a previous window
is deterministic.  But the first time it is non-deterministic - it's
displayed in a random window.  At least, the user can't predict the
window where it will be displayed - thus the surprise factor.
With get-mru-window instead get-lru-window the place is more
deterministic because the user usually remembers which window is mru.

>> Or better to obviate the need in all this complex special handling
>> simply by removing the get-lru-window rule in the default action,
>> thus replacing it with get-mru-window.
>
> When people work with two windows simultaneously, the mru one is
> usually the "other" window they work with, maybe showing the same
> buffer at a different location.  I think it would be a bad idea to
> punish such users by reusing the other window for showing some
> temporary buffer instead.

Right.  Neither lru nor mru should be used to steal existing windows
from users to show temporary buffers.  Only new windows should be
created below or on the bottom.

But my complaint about get-lru-window is that it prevents me from
using more than two windows.  When I create three windows or more,
then get-lru-window always selects a wrong window.  Is it possible
to change get-lru-window to get-mru-window to allow using three windows
and more on the same frame?





  reply	other threads:[~2018-11-15 21:43 UTC|newest]

Thread overview: 135+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-24 18:59 bug#32825: 27.0.50; Deterministic window management Juri Linkov
2018-09-25  7:28 ` martin rudalics
2018-09-25 12:34   ` Michael Heerdegen
2018-09-25 17:56     ` martin rudalics
2018-09-25 18:29       ` Michael Heerdegen
2018-09-26  8:50         ` martin rudalics
2018-09-26 23:23         ` Juri Linkov
2018-09-27 18:45           ` martin rudalics
2018-09-26 23:19       ` Juri Linkov
2018-09-27 11:31         ` Michael Heerdegen
2018-10-25 19:33           ` Juri Linkov
2018-10-25 20:00             ` Michael Heerdegen
2018-10-27 20:14               ` Juri Linkov
2018-10-27 20:28                 ` Michael Heerdegen
2018-10-27 20:59                   ` Juri Linkov
2018-10-27 21:21                     ` Michael Heerdegen
2018-10-27 21:34                       ` Juri Linkov
2018-10-27 22:02                         ` Michael Heerdegen
2018-10-28  9:06                           ` martin rudalics
2018-10-28 19:02                             ` Juri Linkov
2018-10-29  8:43                               ` martin rudalics
2018-10-29 22:47                                 ` Juri Linkov
2018-10-30 21:18                             ` Juri Linkov
2018-10-31  8:10                               ` martin rudalics
2018-10-31 21:10                                 ` Juri Linkov
2018-11-01  9:01                                   ` martin rudalics
2018-11-01 22:27                                     ` Juri Linkov
2018-11-02  8:43                                       ` martin rudalics
2018-11-04  0:27                                         ` Juri Linkov
2018-11-04  9:07                                           ` martin rudalics
2018-11-04 21:33                                             ` Juri Linkov
2018-11-05  9:34                                               ` martin rudalics
2018-11-05 21:49                                                 ` Juri Linkov
2018-11-06  8:46                                                   ` martin rudalics
2018-11-06 22:13                                                     ` Juri Linkov
2018-11-07  9:23                                                       ` martin rudalics
2018-11-07 21:50                                                         ` Juri Linkov
2018-11-08  8:53                                                           ` martin rudalics
2018-11-08 21:58                                                             ` Juri Linkov
2018-11-09  9:13                                                               ` martin rudalics
2018-11-09 10:17                                                                 ` Michael Heerdegen
2018-11-09 12:51                                                                   ` martin rudalics
2018-11-10 21:53                                                                     ` Juri Linkov
2018-11-11  8:53                                                                       ` martin rudalics
2018-11-11 20:13                                                                         ` Juri Linkov
2018-11-12  8:45                                                                           ` martin rudalics
2018-11-12 23:39                                                                             ` Juri Linkov
2018-11-13  0:29                                                                               ` Juri Linkov
2018-11-13  9:12                                                                                 ` martin rudalics
2018-11-13 23:29                                                                                   ` Juri Linkov
2018-11-14  8:33                                                                                     ` martin rudalics
2018-11-14 23:52                                                                                       ` Juri Linkov
2018-11-15  9:12                                                                                         ` martin rudalics
2018-11-15 21:43                                                                                           ` Juri Linkov [this message]
2018-11-16  8:53                                                                                             ` martin rudalics
2018-11-16 12:57                                                                                               ` martin rudalics
2018-11-17 22:23                                                                                               ` Juri Linkov
2018-11-18  9:24                                                                                                 ` martin rudalics
2018-11-18 23:01                                                                                                   ` Juri Linkov
2018-11-19  9:43                                                                                                     ` martin rudalics
     [not found]                                                                                                       ` <87h8gcy95d.fsf@mail.linkov.net>
2018-11-20  9:32                                                                                                         ` martin rudalics
2018-11-21  0:16                                                                                                           ` Juri Linkov
2018-11-21  8:19                                                                                                             ` martin rudalics
2018-11-21 23:54                                                                                                               ` Juri Linkov
2018-11-22  7:41                                                                                                                 ` martin rudalics
2018-11-13  9:09                                                                               ` martin rudalics
2018-11-04  9:36                                           ` martin rudalics
2018-11-04 21:35                                             ` Juri Linkov
2018-11-05  9:34                                               ` martin rudalics
2018-11-05 21:56                                                 ` Juri Linkov
2018-11-06  8:46                                                   ` martin rudalics
2018-11-06 22:08                                                     ` Juri Linkov
2018-11-07  9:23                                                       ` martin rudalics
2018-11-07 21:55                                                         ` Juri Linkov
2018-11-08  8:53                                                           ` martin rudalics
2018-11-08 22:09                                                             ` Juri Linkov
2018-11-09  9:13                                                               ` martin rudalics
2018-11-10 21:39                                                                 ` Juri Linkov
2018-11-11  8:52                                                                   ` martin rudalics
2018-11-11 20:09                                                                     ` Juri Linkov
2018-11-12  8:36                                                                       ` martin rudalics
2018-11-12 23:40                                                                         ` Juri Linkov
2018-11-13  9:09                                                                           ` martin rudalics
2018-11-13 23:44                                                                             ` Juri Linkov
2018-11-14  8:33                                                                               ` martin rudalics
2018-12-03 23:07                                         ` Juri Linkov
2018-12-04  8:32                                           ` martin rudalics
2018-12-04 22:24                                             ` Juri Linkov
2018-12-05  9:15                                               ` martin rudalics
2018-12-05 18:55                                                 ` martin rudalics
2018-12-06  0:04                                                   ` Juri Linkov
2018-12-06  9:09                                                     ` martin rudalics
2018-12-06 23:31                                                       ` Juri Linkov
2018-12-08  9:41                                                         ` martin rudalics
2018-12-08  9:41                                                     ` martin rudalics
2018-12-08 23:40                                                       ` Juri Linkov
2018-12-09  8:25                                                         ` martin rudalics
2018-12-10  0:17                                                           ` Juri Linkov
2018-12-10  1:01                                                             ` Michael Heerdegen
2018-12-11  0:07                                                               ` Juri Linkov
2018-12-11  1:08                                                                 ` Michael Heerdegen
2018-12-11  8:34                                                                   ` martin rudalics
2018-12-20 23:57                                                                     ` Juri Linkov
2018-12-21  9:15                                                                       ` martin rudalics
2018-12-22 23:45                                                                         ` Juri Linkov
2018-12-23  9:41                                                                           ` martin rudalics
2018-12-23 23:32                                                                             ` Juri Linkov
2018-12-24  8:14                                                                               ` martin rudalics
2018-12-25 21:16                                                                                 ` Juri Linkov
2018-12-26  9:41                                                                                   ` martin rudalics
2018-12-27  0:10                                                                                     ` Juri Linkov
2018-12-27  9:37                                                                                       ` martin rudalics
2018-09-27 18:44         ` martin rudalics
2018-09-27 22:47           ` Juri Linkov
2018-09-30  8:00             ` martin rudalics
2018-09-30 11:40               ` Michael Heerdegen
2018-09-30 12:22                 ` martin rudalics
2018-09-30 12:32                   ` Noam Postavsky
2018-09-30 12:43                     ` martin rudalics
2018-09-30 13:04                       ` Noam Postavsky
2018-09-30 13:38                         ` Michael Heerdegen
2018-09-30 21:26                           ` Noam Postavsky
2018-09-30 23:33                             ` Michael Heerdegen
2018-10-01  8:36                           ` martin rudalics
2018-10-01 13:18                             ` Michael Heerdegen
2018-10-01 15:07                               ` martin rudalics
2018-10-01 18:10                                 ` Michael Heerdegen
2018-10-02  7:38                                   ` martin rudalics
2018-10-02 13:24                                     ` Michael Heerdegen
2018-10-01 13:05                   ` Michael Heerdegen
2018-10-01 13:14                     ` Noam Postavsky
2018-10-01 15:06                       ` martin rudalics
2022-04-30 14:52 ` Lars Ingebrigtsen
2022-04-30 14:54   ` Lars Ingebrigtsen
2022-05-01 17:00     ` Juri Linkov

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=875zwyuicg.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=32825@debbugs.gnu.org \
    --cc=michael_heerdegen@web.de \
    --cc=rudalics@gmx.at \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).