unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Chong Yidong <cyd@gnu.org>
To: martin rudalics <rudalics@gmx.at>
Cc: emacs-devel@gnu.org
Subject: Re: Windows' "split status"
Date: Tue, 15 Nov 2011 13:20:03 +0800	[thread overview]
Message-ID: <87hb26gdx8.fsf@gnu.org> (raw)
In-Reply-To: <4EBFFBA5.1000309@gmx.at> (martin rudalics's message of "Sun, 13 Nov 2011 18:17:25 +0100")

martin rudalics <rudalics@gmx.at> writes:

> The problem with window parameters is that I currently do save them
> together with a window configuration and restore them when restoring
> the configuration.  Earlier, Stefan didn't want to do that and I'd
> like to revert the current behavior at any time when problems arise.
> This would mean, however, that when you have a nested window, dissolve
> it within a window excursion, and restore the initial configuration,
> the nesting would get lost.  So I'd rather be on the safe side in this
> regard.

Not a problem; if we do revert the behavior, we can bring back the
special slot and the old code.  I'd rather we try to DTRT now.

> OTOH, it's not entirely trivial to handle `window-max-children' during
> recombination.  Suppose you have a configuration like
>
>  -------------------
> |    |    | W3 | W4 |
> | W1 | W2 |---------|
> |    |    |    W5   |
>  -------------------
>
> the user has set `window-max-children' to 3 and deletes W5.  How should
> recombine_windows proceed?

If I understand your example, this corresponds to the window tree

       root (internal)
        |
   ----------
  |     |    |
  W1    W2   W6 (internal)
             |
         ---------
         |       |
        W5     --W7 (internal)
               |    |
              W3    W4

On deleting W5 with `window-max-children' of 3, the tree becomes

       root (internal)
        |
   ----------
  |     |    |
  W1    W2   W7 (internal)
             |
          ------
          |    |
         W3    W4

which is reasonable.

As for the case where `window-max-children' has been set to 2 (e.g. by
changing the option midway through an Emacs session), that can be
handled by treating it as a soft limit: Emacs will not *add* children to
an internal window past the number specified by `window-max-children'
(or the window parameter), but if an internal window winds up with
excess children for any reason, Emacs does not try to prune it or
rearrange the window tree.

Does that make sense?



  reply	other threads:[~2011-11-15  5:20 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-11 15:37 Windows' "split status" Chong Yidong
2011-11-11 18:37 ` martin rudalics
2011-11-12  0:36   ` Chong Yidong
2011-11-12 10:01     ` martin rudalics
2011-11-13  3:23       ` Chong Yidong
2011-11-13 10:49         ` martin rudalics
2011-11-13 16:10           ` Chong Yidong
2011-11-13 17:17             ` martin rudalics
2011-11-15  5:20               ` Chong Yidong [this message]
2011-11-15  7:25                 ` martin rudalics
2011-11-15  9:39                   ` Chong Yidong
2011-11-15 13:30                     ` Stefan Monnier
2011-11-15 15:15                       ` martin rudalics
2011-11-15 16:24                         ` monnier
2012-01-10 16:26                           ` martin rudalics
2011-11-23 12:36                         ` Nix
2011-11-23 14:15                           ` martin rudalics
2011-11-23 17:38                             ` Eli Zaretskii
2011-11-23 19:21                               ` martin rudalics
2011-11-23 20:14                                 ` Eli Zaretskii
2011-11-24 10:00                                   ` martin rudalics
2011-11-24 11:27                                     ` Eli Zaretskii
2011-11-25 10:24                                       ` martin rudalics
2011-11-25 11:37                                         ` Eli Zaretskii
2011-11-25 13:55                                           ` martin rudalics
2011-11-25 12:00                                         ` Nix
2011-11-25 12:07                                           ` Eli Zaretskii
2011-11-25 12:14                                             ` Nix
2011-11-25 13:55                                               ` martin rudalics
2011-11-25 13:54                                           ` martin rudalics
2011-11-15 15:15                     ` martin rudalics
2011-11-15 18:37                       ` Juri Linkov
2011-11-16  5:08                         ` Chong Yidong
2011-11-16 10:11                           ` martin rudalics
2011-11-16 13:34                           ` Stefan Monnier
2011-11-16 17:01                           ` Juri Linkov
2011-11-17 10:34                             ` martin rudalics

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=87hb26gdx8.fsf@gnu.org \
    --to=cyd@gnu.org \
    --cc=emacs-devel@gnu.org \
    --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).