[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: moving window handling into lisp
From: |
Miles Bader |
Subject: |
Re: moving window handling into lisp |
Date: |
Mon, 27 Jul 2009 23:00:53 +0900 |
martin rudalics <address@hidden> writes:
>> window-parent WINDOW => PARENT-WIN
>> set-window-children WINDOW LEFT-CHILD-WIN RIGHT-CHILD-WIN
>
> `window-parent' and `window-children' would be trivial. Providing
> `set-window-children' is hardly feasible IMHO. Who'd be responsible for
> calculating the respective sizes?
Currently split-window does, and that doesn't seem particularly
complicated.
Certainly set-window-children has to do a fair bit of sanity checking,
but it's not going to be any greater than that currently done by
split-window, and that function isn't all that complicated.
>> A brief look suggests that much of the traditional window handling
>> code (`window-list', `other-window', `split-window', `delete-window',
>> `delete-other-windows', etc) could then be moved into lisp; none of
>> that code looks very complicated or dangerous.
>
> The problem with `split-window' and `delete-window' is that you can
> easily mess up things when you create windows that don't have the right
> size. From my experience this usually makes Emacs crash pretty soon and
> we shouldn't allow Elisp code crash Emacs. OTOH doing all the necessary
> checks wrt window sizes in `set-window-children' would mean hard work.
Hmm, I dunno why it's hard -- just copy the appropriate bits from split-window.
Maybe set-window-children would end up being mostly sanity-checking
code, but that's OK -- it'll probably be smaller than split-window, and
will serve as a nice low-level interface.
> martin, whose `switch-to-buffer' is in window.el
Wait... switch-to-buffer is in C...
-Miles
--
Generous, adj. Originally this word meant noble by birth and was rightly
applied to a great multitude of persons. It now means noble by nature and is
taking a bit of a rest.
- Re: moving window handling into lisp, (continued)
- Re: moving window handling into lisp, Lennart Borgman, 2009/07/28
- Re: moving window handling into lisp, martin rudalics, 2009/07/28
- Message not available
- Re: moving window handling into lisp, martin rudalics, 2009/07/28
- Re: moving window handling into lisp, Lennart Borgman, 2009/07/28
- Re: moving window handling into lisp, martin rudalics, 2009/07/29
- Re: moving window handling into lisp, Stefan Monnier, 2009/07/28
- Re: moving window handling into lisp, Lennart Borgman, 2009/07/28
- Re: moving window handling into lisp, martin rudalics, 2009/07/29
- Re: moving window handling into lisp, Stefan Monnier, 2009/07/29
- Re: moving window handling into lisp, Miles Bader, 2009/07/31
Re: moving window handling into lisp,
Miles Bader <=