unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* pop-up-windows value to force a new window
@ 2006-09-02 20:38 Drew Adams
  2006-09-02 21:20 ` Eli Zaretskii
  2006-09-05 19:59 ` Stuart D. Herring
  0 siblings, 2 replies; 7+ messages in thread
From: Drew Adams @ 2006-09-02 20:38 UTC (permalink / raw)


I don't see a good way to force `display-buffer' and related functions to
always use another window, even when there is more than one window displayed
currently. Is there some way (besides defining `display-buffer-function' in
such a way that it does this)?

What about letting a special non-nil value of `pop-up-windows', say
`new-window', cause this to happen? That is, if `pop-up-windows' =
`new-window', then `display-buffer', `pop-to-buffer', etc. would always use
a new window; they would never reuse an existing window.

This would let Lisp code, for example, bind to that value, and be sure that
`display-buffer' etc. will always create a new window. Subsequently deleting
that window will not leave fewer windows than before the display. IOW, this
would let you use `display-buffer' to always pop up an extra window.

This should have no effect on existing code (unless there is some code that
already uses that special value).

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

* Re: pop-up-windows value to force a new window
  2006-09-02 20:38 pop-up-windows value to force a new window Drew Adams
@ 2006-09-02 21:20 ` Eli Zaretskii
  2006-09-02 21:53   ` Drew Adams
  2006-09-05 19:59 ` Stuart D. Herring
  1 sibling, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2006-09-02 21:20 UTC (permalink / raw)
  Cc: emacs-devel

> From: "Drew Adams" <drew.adams@oracle.com>
> Date: Sat, 2 Sep 2006 13:38:11 -0700
> 
> What about letting a special non-nil value of `pop-up-windows', say
> `new-window', cause this to happen?

is this really necessary so close to a pretest?

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

* RE: pop-up-windows value to force a new window
  2006-09-02 21:20 ` Eli Zaretskii
@ 2006-09-02 21:53   ` Drew Adams
  2006-09-02 22:25     ` Chong Yidong
  0 siblings, 1 reply; 7+ messages in thread
From: Drew Adams @ 2006-09-02 21:53 UTC (permalink / raw)


    > What about letting a special non-nil value of `pop-up-windows', say
    > `new-window', cause this to happen?

    is this really necessary so close to a pretest?

Sorry, do I need to prefix each feature suggestion with "for consideration
after the release", so close to a pretest? ;-)

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

* Re: pop-up-windows value to force a new window
  2006-09-02 21:53   ` Drew Adams
@ 2006-09-02 22:25     ` Chong Yidong
  2006-09-03 21:33       ` Kim F. Storm
  0 siblings, 1 reply; 7+ messages in thread
From: Chong Yidong @ 2006-09-02 22:25 UTC (permalink / raw)
  Cc: emacs-devel

"Drew Adams" <drew.adams@oracle.com> writes:

>     > What about letting a special non-nil value of `pop-up-windows', say
>     > `new-window', cause this to happen?
>
>     is this really necessary so close to a pretest?
>
> Sorry, do I need to prefix each feature suggestion with "for consideration
> after the release", so close to a pretest? ;-)

Or save them for after the release---reading and evaluating feature
suggestions involves a non-zero amount of energy that could be used to
work on the pretest.

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

* Re: pop-up-windows value to force a new window
  2006-09-02 22:25     ` Chong Yidong
@ 2006-09-03 21:33       ` Kim F. Storm
  0 siblings, 0 replies; 7+ messages in thread
From: Kim F. Storm @ 2006-09-03 21:33 UTC (permalink / raw)
  Cc: Drew Adams, emacs-devel

Chong Yidong <cyd@stupidchicken.com> writes:

> "Drew Adams" <drew.adams@oracle.com> writes:
>
>>     > What about letting a special non-nil value of `pop-up-windows', say
>>     > `new-window', cause this to happen?
>>
>>     is this really necessary so close to a pretest?
>>
>> Sorry, do I need to prefix each feature suggestion with "for consideration
>> after the release", so close to a pretest? ;-)
>
> Or save them for after the release---reading and evaluating feature
> suggestions involves a non-zero amount of energy that could be used to
> work on the pretest.

Agree!

Besides, it quite likely the suggestions will have been forgotten once we
release 22.1.

-- 
Kim F. Storm <storm@cua.dk> http://www.cua.dk

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

* Re: pop-up-windows value to force a new window
  2006-09-02 20:38 pop-up-windows value to force a new window Drew Adams
  2006-09-02 21:20 ` Eli Zaretskii
@ 2006-09-05 19:59 ` Stuart D. Herring
  2006-09-05 21:33   ` Drew Adams
  1 sibling, 1 reply; 7+ messages in thread
From: Stuart D. Herring @ 2006-09-05 19:59 UTC (permalink / raw)
  Cc: Emacs-Devel

> I don't see a good way to force `display-buffer' and related functions to
> always use another window, even when there is more than one window
> displayed
> currently. Is there some way (besides defining `display-buffer-function'
> in
> such a way that it does this)?

First, you need to define what "always use another window" means.  What if
the current frame is divided into so many windows (or is itself so small)
that no splitting can occur because of the minimum window size variables? 
What if the current frame is unsplittable (where you shouldn't split it
automatically), or worse is a minibuffer-only frame that you -can't-
split?

> This would let Lisp code, for example, bind to that value, and be sure
> that
> `display-buffer' etc. will always create a new window. Subsequently
> deleting
> that window will not leave fewer windows than before the display. IOW,
> this
> would let you use `display-buffer' to always pop up an extra window.

If you want to "not leave fewer windows", what you probably want is to
restore the window configuration.  If that's what you want, just do it:
use `current-window-configuration' and `set-window-configuration'.  (There
are a few other useful related functions which can be found with Apropos.)
 If it interests, I have written a small "temporary window configurations"
package which aims to automate that process.

Hope this helps,
Davis

-- 
This product is sold by volume, not by mass.  If it appears too dense or
too sparse, it is because mass-energy conversion has occurred during
shipping.

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

* RE: pop-up-windows value to force a new window
  2006-09-05 19:59 ` Stuart D. Herring
@ 2006-09-05 21:33   ` Drew Adams
  0 siblings, 0 replies; 7+ messages in thread
From: Drew Adams @ 2006-09-05 21:33 UTC (permalink / raw)


    > I don't see a good way to force `display-buffer' and related
    > functions to always use another window, even when there is
    > more than one window displayed currently. Is there some way
    > (besides defining `display-buffer-function'
    > in such a way that it does this)?

    First, you need to define what "always use another window"
    means.  What if
    the current frame is divided into so many windows (or is itself
    so small)
    that no splitting can occur because of the minimum window size
    variables?
    What if the current frame is unsplittable (where you shouldn't split it
    automatically), or worse is a minibuffer-only frame that you -can't-
    split?

Yes, of course. Before heading down the highway, corner cases would need to
be dealt with.

    > This would let Lisp code, for example, bind to that value, and be sure
    > that
    > `display-buffer' etc. will always create a new window. Subsequently
    > deleting
    > that window will not leave fewer windows than before the display. IOW,
    > this
    > would let you use `display-buffer' to always pop up an extra window.

    If you want to "not leave fewer windows", what you probably want is to
    restore the window configuration.  If that's what you want, just do it:
    use `current-window-configuration' and
    `set-window-configuration'.  (There
    are a few other useful related functions which can be found
    with Apropos.)
     If it interests, I have written a small "temporary window
    configurations"
    package which aims to automate that process.

I don't really recall what I was trying to do. I believe that I started with
`with-output-to-temp-buffer', and I wanted to have it always open a new
window, so deleting that window would not reduce the original config. IIRC,
I tried to use `save-window-configuration' with it, but things didn't
proceed as I wanted. I don't remember the details, and I don't have time now
to look into it.

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

end of thread, other threads:[~2006-09-05 21:33 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-02 20:38 pop-up-windows value to force a new window Drew Adams
2006-09-02 21:20 ` Eli Zaretskii
2006-09-02 21:53   ` Drew Adams
2006-09-02 22:25     ` Chong Yidong
2006-09-03 21:33       ` Kim F. Storm
2006-09-05 19:59 ` Stuart D. Herring
2006-09-05 21:33   ` Drew Adams

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