[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: The window-pub branch
From: |
martin rudalics |
Subject: |
Re: The window-pub branch |
Date: |
Fri, 19 Nov 2010 15:44:04 +0100 |
User-agent: |
Thunderbird 2.0.0.21 (Windows/20090302) |
> Then what about
> (defun switch-to-buffer (b) (display-buffer b 'special))
This could be done.
>> `set-window-buffer' _is_ low-level. Emacs needs some mechanism to
>> bypass whatever people do in `my-display-buffer'.
>
> Saying "Emacs" you insist on the absence of architecture.
Why?
> Maybe
> you agree that direct access of application code to functions such
> as 'split-window' and 'set-window-buffer' doesn't play well with
> any attempts to wrap them into more user-friendly behavior.
I agree. Though there are occasions where an application wants to have
full control over the frame layout - gud and ediff, for example.
But why be user-friendly in the first place if users only need hooks for
calling their own functions instead ;-)
> Where a "wrapper" is a piece of code with exclusive access to the
> functionality that it wraps. There must be no way to bypass the
> wrapper except for the wrapper itself.
It would only take a few seconds before someone asked for a way to
bypass such a wrapper programmatically.
>> There's no single entry point for "hiding a buffer". The nearest
>> equivalent is probably `switch-to-prev-buffer'. But sometimes the
>> window gets deleted before and in the worst case *scratch* must be
>> recreated to show some buffer in the window.
>
> I'm not interested in the details of existing bugs. I'm only
> interested whether your new design is able to get past them.
This is not about a bug. It's about what Emacs has to do in order to
prevent crashing.
>>... It's hardly possible to tell whether a buffer
>> shown in a window was effectively put there by `display-buffer' or by
>> `set-window-buffer'.
>
> One more point for not allowing applications to mess with
> 'set-window-buffer' (and friends).
Demandons l'impossible.
> "A feature called substructure redirect allows a window manager to
> intercept any requests to map, move, resize, or change the border
> width of windows. This allows the window manager to modify these
> requests, if necessary, to ensure that they meet its window layout
> policy."
>
> Which in other words means a single hook that is sufficient for
> everything a window-manager might want to do.
Doesn't `window-configuration-change-hook' get near to that? Though it
seems to me that you want to put yourself into the window manager's seat
here.
martin
- Re: The window-pub branch, grischka, 2010/11/18
- Re: The window-pub branch, martin rudalics, 2010/11/18
- Re: The window-pub branch, grischka, 2010/11/18
- Re: The window-pub branch, martin rudalics, 2010/11/19
- Re: The window-pub branch, grischka, 2010/11/19
- Re: The window-pub branch,
martin rudalics <=
- Re: The window-pub branch, grischka, 2010/11/19
- Re: The window-pub branch, martin rudalics, 2010/11/20
- Re: The window-pub branch, grischka, 2010/11/20
- Re: The window-pub branch, martin rudalics, 2010/11/20
- Re: The window-pub branch, grischka, 2010/11/20
- Re: The window-pub branch, martin rudalics, 2010/11/21
- Re: The window-pub branch, grischka, 2010/11/21
- Re: The window-pub branch, martin rudalics, 2010/11/21
- Re: The window-pub branch, Stefan Monnier, 2010/11/21
- Re: The window-pub branch, martin rudalics, 2010/11/22