all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* split-window-preferred-function
@ 2008-03-19 21:42 martin rudalics
  2008-03-20 23:02 ` split-window-preferred-function Juri Linkov
  0 siblings, 1 reply; 45+ messages in thread
From: martin rudalics @ 2008-03-19 21:42 UTC (permalink / raw)
  To: emacs-devel

`split-window-preferred-function' appears half-baked: In
`display-buffer' its calls are preceded by things like

	  && (window_height (window) >= split_height_threshold
	  ...
	  && (window_height (window)
	      >= (2 * window_min_size_2 (XWINDOW (window), 0))))

Set to some horizontal splitting function, splitting will be wrongly
rejected when the original window is not sufficiently high and wrongly
accepted when the window is not wide enough.  Hence it seems that we
need something like `split-width-threshold' and a way to detect how
`split-window-preferred-function' is going to split the window in order
to know which of our checks should be applied.





^ permalink raw reply	[flat|nested] 45+ messages in thread
* Re: split-window-preferred-function
@ 2008-04-05 12:36 grischka
  2008-04-05 15:42 ` split-window-preferred-function martin rudalics
  0 siblings, 1 reply; 45+ messages in thread
From: grischka @ 2008-04-05 12:36 UTC (permalink / raw)
  To: emacs-devel, Stefan Monnier

> >>>> I still think this is wrong: the choice should be based on
> >>>> split-window-preferred-aspect-ratio.
> >> 
> >>> I cannot imagine how that would work.  Especially what would prevent
> >>> splitting to create windows which are too narrow?
> >> 
> >> The height and width thresholds would, of course.
>
> > Ah, ok.  I've thought split-window-preferred-aspect-ratio would obsolete
> > those two.  So now I agree with you.
>
> No, of course it can't replace them.  Also I originally thought
> aspect-ratio wouldn't be needed, we could just use (/ height-threshold
> weight-threshold), but that wouldn't work: I much prefer tall windows,
> but would prefer to use a height threshold smaller than 80.

I don't think that tuning the split-window concept will bring you 
any further. Such function is simply too low-level than that it 
could do what you want, that is to create new layout on-the-fly. 

Now you throw some options "min/max/preferred/threshold/ratio" at 
the user, then if yet it doesn't work at least can be customized 
how it doesn't.

But humans are bad in calculating inter-dependencies of dozens of 
options, while understand dependencies of geometry and content 
immediately. Whereas code knows very well about flags and states, 
but has no idea how to calculate quality in layout.

So why don't you let the user define the layout and make the code 
fill in the options. Where LAYOUT means what (class of) content 
shall be shown in what place, and OPTIONS for instance can mean 
what do do with space where the content is currently not available.

Have a look at elscreen.  Or think about html div tags, they define 
layout that only applies if there is content. 

--- grischka





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

end of thread, other threads:[~2008-04-06 20:35 UTC | newest]

Thread overview: 45+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-19 21:42 split-window-preferred-function martin rudalics
2008-03-20 23:02 ` split-window-preferred-function Juri Linkov
2008-03-21  1:47   ` split-window-preferred-function Stefan Monnier
2008-03-22  1:07     ` split-window-preferred-function Juri Linkov
2008-03-22 16:36       ` split-window-preferred-function Stefan Monnier
2008-03-23  2:16         ` split-window-preferred-function Juri Linkov
2008-03-27 23:44         ` split-window-preferred-function Juri Linkov
2008-03-28 19:50           ` split-window-preferred-function martin rudalics
2008-03-29  0:45             ` split-window-preferred-function Juri Linkov
2008-03-29  9:05               ` split-window-preferred-function martin rudalics
2008-03-29 12:30                 ` split-window-preferred-function Juri Linkov
2008-03-29 13:25                   ` split-window-preferred-function martin rudalics
2008-03-29 19:42                   ` split-window-preferred-function Stefan Monnier
2008-03-30  5:49                   ` split-window-preferred-function Richard Stallman
2008-04-02  8:53                     ` split-window-preferred-function martin rudalics
2008-04-02  9:36                       ` split-window-preferred-function Tassilo Horn
2008-04-02  9:58                         ` split-window-preferred-function martin rudalics
2008-04-02 10:30                           ` split-window-preferred-function Tassilo Horn
2008-04-02 12:13                             ` split-window-preferred-function martin rudalics
2008-04-02 12:33                               ` split-window-preferred-function Tassilo Horn
2008-04-02 22:26                         ` split-window-preferred-function David De La Harpe Golden
2008-04-02 15:18                       ` split-window-preferred-function Stefan Monnier
2008-04-02 17:00                         ` split-window-preferred-function martin rudalics
2008-04-02 22:27                       ` split-window-preferred-function Juri Linkov
2008-04-03  6:49                         ` split-window-preferred-function martin rudalics
2008-04-03 22:52                           ` split-window-preferred-function Juri Linkov
2008-04-04  6:50                             ` split-window-preferred-function martin rudalics
2008-04-03  7:02                         ` split-window-preferred-function Tassilo Horn
2008-04-03 22:54                           ` split-window-preferred-function Juri Linkov
2008-04-04 10:04                             ` split-window-preferred-function Tassilo Horn
2008-04-04 12:19                               ` split-window-preferred-function martin rudalics
2008-04-04 12:57                                 ` split-window-preferred-function Tassilo Horn
2008-04-04 13:55                               ` split-window-preferred-function Stefan Monnier
2008-04-04 17:21                                 ` split-window-preferred-function Tassilo Horn
2008-04-04 20:21                                   ` split-window-preferred-function Stefan Monnier
2008-04-04 22:14                                     ` split-window-preferred-function Tassilo Horn
2008-04-04 23:52                                       ` split-window-preferred-function Stefan Monnier
2008-03-21  9:18   ` split-window-preferred-function martin rudalics
2008-03-22  1:09     ` split-window-preferred-function Juri Linkov
  -- strict thread matches above, loose matches on Subject: below --
2008-04-05 12:36 split-window-preferred-function grischka
2008-04-05 15:42 ` split-window-preferred-function martin rudalics
2008-04-05 18:35   ` split-window-preferred-function grischka
2008-04-05 22:02     ` split-window-preferred-function martin rudalics
2008-04-06 16:45       ` split-window-preferred-function grischka
2008-04-06 20:35   ` split-window-preferred-function Juri Linkov

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.