unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Thomas Lord <lord@emf.net>
To: martin rudalics <rudalics@gmx.at>
Cc: Juanma Barranquero <lekktu@gmail.com>,
	Chong Yidong <cyd@stupidchicken.com>,
	emacs-devel <emacs-devel@gnu.org>, Miles Bader <miles@gnu.org>
Subject: Re: window groups
Date: Sat, 31 May 2008 10:22:07 -0700	[thread overview]
Message-ID: <4841893F.6040402@emf.net> (raw)
In-Reply-To: <4841545B.50004@gmx.at>

martin rudalics wrote:
> > Where is "here"? Your local changes? Because that's at least three
> > more args than the standard split-window accepts.
>
> My local changes.  Have a look at the description that started this
> thread.
>

Aha!  That's why I couldn't find it.

I have a suggestion about the description that started this
thread but, first, to clear up a misunderstanding:

In the other message you answered one of my questions:

 >>> Returning "precisely" to former sizes is non-trivial.
 
 >> How so?

 > Because your context might have changed in between.  For example, when
 > leaving a `save-window-excursion' you don't want your frame get resized.


Context got lost in the quoting there and caused confusion.

When a temporary window or a pop-up created by splitting the root
of a frame is deleted *and* the user hasn't otherwise touched the
window configuration, *then* precise sizes should be restored.
So, if a user resizes a frame or explicitly resizes, deletes, or splits
a window it doesn't matter as much.   But if none of those things have
happened since the pop-up, the precise sizes should be restored.

That would *almost* happens automatically but not quite.

Currently, if you delete one of the windows in (say) a horizontal
stack, then by default the new space is allocated proportionally among
the remaining windows.   That won't always DTRT in the case of
pop-ups that split the root of the frame.   For example, before the
pop-up, a stack of windows may have each had an exactly equal
number of lines.   When the pop-up appears, the remaining lines
might not divide evenly among the other windows in the stack -
so they are no longer all the same size.   When the pop-up disappears,
Emacs won't always restore them to be all the same size.

That's the case I was talking about fixing and I was talking about
fixing it only in a very narrow case: that the user hasn't done anything
to change the window configuration other than triggering the pop-up
window and then dismissing the pop-up window.

So, back to the original description:

For various reasons I found the original description really difficult
to understand and believe in.   Other people have already pointed out
some ways in which it "isn't lispy".   I would add that it is pretty
complicated but only a weak rationale is given for the complexity.
It's complicated because it adds 3 parameters (that seem hard to
explain) to split-window.   It's complicated because it adds a new
primitive concept (window groups) and that concept comes with
non-intuitive restrictions (like the non-nesting of groups and the
non-existence of single-window groups).

I take your word for it that, given those new features, you can implement
something that looks a lot like certain other IDEs.   On the other hand,
these features don't obviously have many other uses besides that - they
aren't very "general," at least as far as I can tell from the description.

Here is the thing, though:

Presumably you want to use the new features you're working on and then
build higher-level application code to actually implement IDE features.
Let's just assume that all of your higher level code (actual or planned) is
just fine but ask: is there a simpler, more general substitute for the 
low-level
changes?

Stefan tells me that "window properties" are being added at this time.

Emacs already has a lot of handy "hooks" to catch significant events
as, for example, the window-configuration-change-hook

Well, how about this?   Modify split-window with just one new additional
parameter which, if that parameter is 'root, then a top-level split is 
implied.
If that parameter is nil, current behavior is implied.   No other values for
that parameter should be defined yet.

I *suspect* (and its only a suspicion) that those alone are sufficient to
accomplish everything you are trying to do with window groups, without
even very much pain (and, perhaps with some added flexibility).

No?

Not to confuse things too much but let me also suggest how, in the future,
the new split-window parameter that might be 'root could take on other
values.   Every window is conceptually part of both a horizontal and
vertical stack of windows, containing 1 or more windows.   One possibility
is that if the new split-window parameter is a window, then the pop-up
splits off the entire horizontal or vertical stack of which that window is
a part.   This is a sneaky way to "expose the window tree to lisp" as Mile's
puts it.   (Additional sneakiness would be a function that, given a window,
returns an ordered list of all windows in the same horizontal or vertical
stack.)

That would have use in IDE-style interfaces.   For example, suppose that
down the screen on the left are a series of narrow "navigation" windows
and on the right there is an edit area, an interaction area, and a debugger
area.    A "help window pop-up" could usefully be constrained to take
up space just on the right of the screen.   That would be a natural 
generalization
of using 'root and having it take up space on the whole screen.

-t





  reply	other threads:[~2008-05-31 17:22 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-28 12:22 window groups martin rudalics
2008-05-29  1:39 ` Richard M Stallman
2008-05-29  9:26   ` martin rudalics
2008-05-29 16:30     ` Stefan Monnier
2008-05-30  7:05       ` martin rudalics
2008-05-30 13:58         ` Stefan Monnier
2008-05-30 19:27           ` martin rudalics
2008-05-31  4:52             ` Stefan Monnier
2008-05-31  9:10               ` martin rudalics
2008-05-30  0:59     ` Richard M Stallman
2008-05-30  7:08       ` martin rudalics
2008-05-31  2:07         ` Richard M Stallman
2008-05-31  6:17           ` Daniel Colascione
2008-05-31  7:09             ` Miles Bader
2008-05-31  9:10           ` martin rudalics
2008-05-30  0:59     ` Richard M Stallman
2008-05-30  7:08       ` martin rudalics
2008-05-29 15:18 ` Chong Yidong
2008-05-30  7:06   ` martin rudalics
2008-05-29 16:10 ` Chong Yidong
2008-05-29 19:11   ` Miles Bader
2008-05-29 21:40     ` Chong Yidong
2008-05-29 22:33       ` Miles Bader
2008-05-29 23:53         ` Thomas Lord
2008-05-30  7:07           ` martin rudalics
2008-05-30 16:42             ` Thomas Lord
2008-05-30 16:08               ` Stefan Monnier
2008-05-31  9:10               ` martin rudalics
2008-05-31 11:52                 ` Juanma Barranquero
2008-05-31 13:36                   ` martin rudalics
2008-05-31 17:22                     ` Thomas Lord [this message]
2008-05-31 22:37                       ` martin rudalics
2008-06-02  3:49                         ` Thomas Lord
2008-06-02  9:34                           ` martin rudalics
2008-06-02 21:32                             ` Thomas Lord
2008-06-03  5:52                             ` Miles Bader
2008-06-03  9:02                               ` martin rudalics
2008-06-03  9:51                                 ` René Kyllingstad
2008-06-03 11:26                                   ` martin rudalics
2008-06-03 11:54                                     ` Stephen Berman
2008-06-03 13:21                                       ` René Kyllingstad
2008-06-08  2:39                                         ` Stefan Monnier
2008-08-18 15:37                                           ` René Kyllingstad
2008-05-30  7:07         ` martin rudalics
2008-05-30  7:07     ` martin rudalics
2008-05-30  7:07   ` 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=4841893F.6040402@emf.net \
    --to=lord@emf.net \
    --cc=cyd@stupidchicken.com \
    --cc=emacs-devel@gnu.org \
    --cc=lekktu@gmail.com \
    --cc=miles@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).