unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* New features in windowing
@ 2012-03-20  5:06 Leo
  2012-03-20  7:56 ` martin rudalics
  0 siblings, 1 reply; 8+ messages in thread
From: Leo @ 2012-03-20  5:06 UTC (permalink / raw)
  To: emacs-devel

Hello,

I am playing with the new features in windows (as in emacs). I found
some window-parameters aren't documented such as window-side and
window-atom.

I tried to make a speedbar-window-mode i.e. embed the speedbar buffer in
a frame unlike speedbar-frame-mode which uses a separate frame. I want
the speedbar window to stay on screen without being deleted by
delete-window and the like. Any idea whether the new features in
windowing can handle this without advising a bunch of functions? Thanks.

Thanks,
Leo




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: New features in windowing
  2012-03-20  5:06 New features in windowing Leo
@ 2012-03-20  7:56 ` martin rudalics
  2012-03-20 11:02   ` Leo
  2012-03-20 12:37   ` Stefan Monnier
  0 siblings, 2 replies; 8+ messages in thread
From: martin rudalics @ 2012-03-20  7:56 UTC (permalink / raw)
  To: Leo; +Cc: emacs-devel

 > I am playing with the new features in windows (as in emacs). I found
 > some window-parameters aren't documented such as window-side and
 > window-atom.

Hopefully they will make it into Emacs 24.2.

 > I tried to make a speedbar-window-mode i.e. embed the speedbar buffer in
 > a frame unlike speedbar-frame-mode which uses a separate frame. I want
 > the speedbar window to stay on screen without being deleted by
 > delete-window and the like.

What precisely do you mean here?  `delete-window' should, in principle,
delete its argument (unless it has a special `delete-window' parameter).

 > Any idea whether the new features in
 > windowing can handle this without advising a bunch of functions? Thanks.

The basic idea is to do what you want without any advising.  Meanwhile I
have revised the assignment of side window parameters to handle window
configuration management easier but I don't intend to incoporate these
changes in 24.1.  If you want to use them, I can send you a bundle or a
separate file.  (BTW, it would be nice if someone wrote code in order to
handle > 1 speedbar buffers simultaneously.)

martin



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: New features in windowing
  2012-03-20  7:56 ` martin rudalics
@ 2012-03-20 11:02   ` Leo
  2012-03-20 19:11     ` martin rudalics
  2012-03-20 12:37   ` Stefan Monnier
  1 sibling, 1 reply; 8+ messages in thread
From: Leo @ 2012-03-20 11:02 UTC (permalink / raw)
  To: martin rudalics; +Cc: emacs-devel

On 2012-03-20 15:56 +0800, martin rudalics wrote:
>> I am playing with the new features in windows (as in emacs). I found
>> some window-parameters aren't documented such as window-side and
>> window-atom.
>
> Hopefully they will make it into Emacs 24.2.

Do you mean those features are yet to be implemented? BTW, they were
mentioned in the elisp info file.

>> I tried to make a speedbar-window-mode i.e. embed the speedbar buffer in
>> a frame unlike speedbar-frame-mode which uses a separate frame. I want
>> the speedbar window to stay on screen without being deleted by
>> delete-window and the like.
>
> What precisely do you mean here?  `delete-window' should, in principle,
> delete its argument (unless it has a special `delete-window' parameter).

Let me use this for illustration:
          ______________________________________
         | ______  ____________________________ |
         ||      || __________________________ ||
         ||      |||                          |||
         ||      |||                          |||
         ||      |||                          |||
         ||      |||____________W4____________|||
         ||      || __________________________ ||
         ||      |||                          |||
         ||      |||                          |||
         ||      |||____________W5____________|||
         ||__W2__||_____________W3_____________ |
         |__________________W1__________________|


If I put speedbar buffer in W2, I want those window operations to think
as if W3 is the ``frame root window''. So for example, C-x 1 should not
delete W2. C-x 0 should never have W2 occupy the whole frame.

Is this currently possible?

>> Any idea whether the new features in
>> windowing can handle this without advising a bunch of functions? Thanks.
>
> The basic idea is to do what you want without any advising.  Meanwhile I
> have revised the assignment of side window parameters to handle window
> configuration management easier but I don't intend to incoporate these
> changes in 24.1.  If you want to use them, I can send you a bundle or a
> separate file.  (BTW, it would be nice if someone wrote code in order to
> handle > 1 speedbar buffers simultaneously.)
>
> martin

Unfortunately that would mean difficulty to try it out but I guess I can
wait until 24.1 is released.

Leo



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: New features in windowing
  2012-03-20  7:56 ` martin rudalics
  2012-03-20 11:02   ` Leo
@ 2012-03-20 12:37   ` Stefan Monnier
  2012-03-20 19:11     ` martin rudalics
  1 sibling, 1 reply; 8+ messages in thread
From: Stefan Monnier @ 2012-03-20 12:37 UTC (permalink / raw)
  To: martin rudalics; +Cc: Leo, emacs-devel

> The basic idea is to do what you want without any advising.  Meanwhile I
> have revised the assignment of side window parameters to handle window
> configuration management easier but I don't intend to incoporate these
> changes in 24.1.  If you want to use them, I can send you a bundle or a
> separate file.  (BTW, it would be nice if someone wrote code in order to
> handle > 1 speedbar buffers simultaneously.)

If at all possible, you might like to put this code somewhere like in
GNU ELPA so even though it's not part of 24.1, it can be used at least
for experiments.


        Stefan



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: New features in windowing
  2012-03-20 11:02   ` Leo
@ 2012-03-20 19:11     ` martin rudalics
  2012-03-21  0:06       ` Leo
  0 siblings, 1 reply; 8+ messages in thread
From: martin rudalics @ 2012-03-20 19:11 UTC (permalink / raw)
  To: Leo; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 2048 bytes --]

 >>> I am playing with the new features in windows (as in emacs). I found
 >>> some window-parameters aren't documented such as window-side and
 >>> window-atom.
 >> Hopefully they will make it into Emacs 24.2.
 >
 > Do you mean those features are yet to be implemented? BTW, they were
 > mentioned in the elisp info file.

The features that have to be re-implemented are the routines to set up
the windows.  Currently, you have to do that manually which works for
cases like the one you describe but I want to handle multiple side
windows on each frame.

 > Let me use this for illustration:
 >           ______________________________________
 >          | ______  ____________________________ |
 >          ||      || __________________________ ||
 >          ||      |||                          |||
 >          ||      |||                          |||
 >          ||      |||                          |||
 >          ||      |||____________W4____________|||
 >          ||      || __________________________ ||
 >          ||      |||                          |||
 >          ||      |||                          |||
 >          ||      |||____________W5____________|||
 >          ||__W2__||_____________W3_____________ |
 >          |__________________W1__________________|
 >
 >
 > If I put speedbar buffer in W2, I want those window operations to think
 > as if W3 is the ``frame root window''. So for example, C-x 1 should not
 > delete W2. C-x 0 should never have W2 occupy the whole frame.
 >
 > Is this currently possible?

That's precisely what "making W2 a left side window" would stand for.

 > Unfortunately that would mean difficulty to try it out but I guess I can
 > wait until 24.1 is released.

I attach a simple file you can load from your .emacs.  You then should
be able to create W2 via something like

(display-buffer
  "SPEEDBAR"
  '(display-buffer-in-side-window (side . left) (slot . 0)))

and tell me how it works.  The sooner I get your feedback the sooner I
will be able to adapt the concept appropriately.

martin

[-- Attachment #2: display-buffer.el --]
[-- Type: application/emacs-lisp, Size: 41720 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: New features in windowing
  2012-03-20 12:37   ` Stefan Monnier
@ 2012-03-20 19:11     ` martin rudalics
  0 siblings, 0 replies; 8+ messages in thread
From: martin rudalics @ 2012-03-20 19:11 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Leo, emacs-devel

 > If at all possible, you might like to put this code somewhere like in
 > GNU ELPA so even though it's not part of 24.1, it can be used at least
 > for experiments.

I simplified the concept mainly to make it independent from saving
parameters via window excursions.  Unfortunately, this induces many
small changes to the window split and deletion routines.  The resulting
code is hardly useful for GNU ELPA and would also require continuous
maintenance when the corresponding window.el routines change.

martin



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: New features in windowing
  2012-03-20 19:11     ` martin rudalics
@ 2012-03-21  0:06       ` Leo
  2012-03-21  0:16         ` Glenn Morris
  0 siblings, 1 reply; 8+ messages in thread
From: Leo @ 2012-03-21  0:06 UTC (permalink / raw)
  To: emacs-devel

On 2012-03-21 03:11 +0800, martin rudalics wrote:
> I attach a simple file you can load from your .emacs.  You then should
> be able to create W2 via something like
>
> (display-buffer
>  "SPEEDBAR"
>  '(display-buffer-in-side-window (side . left) (slot . 0)))
>
> and tell me how it works.  The sooner I get your feedback the sooner I
> will be able to adapt the concept appropriately.

Thanks, I played with it briefly and it seems to be what I needed. I
will test more and get back to you.

BTW, why don't we have a 'next' branch to staging code to be installed
immediately after a release.

Leo




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: New features in windowing
  2012-03-21  0:06       ` Leo
@ 2012-03-21  0:16         ` Glenn Morris
  0 siblings, 0 replies; 8+ messages in thread
From: Glenn Morris @ 2012-03-21  0:16 UTC (permalink / raw)
  To: Leo; +Cc: emacs-devel

Leo wrote:

> BTW, why don't we have a 'next' branch to staging code to be installed
> immediately after a release.

There's "pending" but AFAIK no-one uses it.

Eg http://lists.gnu.org/archive/html/emacs-devel/2011-12/msg00698.html



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-03-21  0:16 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-20  5:06 New features in windowing Leo
2012-03-20  7:56 ` martin rudalics
2012-03-20 11:02   ` Leo
2012-03-20 19:11     ` martin rudalics
2012-03-21  0:06       ` Leo
2012-03-21  0:16         ` Glenn Morris
2012-03-20 12:37   ` Stefan Monnier
2012-03-20 19:11     ` martin rudalics

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).