help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Windows splitting: prefer only 2 windows horizontal spliting.


From: Perry Smith
Subject: Re: Windows splitting: prefer only 2 windows horizontal spliting.
Date: Mon, 21 Feb 2011 08:15:46 -0600

On Feb 21, 2011, at 1:47 AM, martin rudalics wrote:

> > This is not exactly what you were asking for.  I wanted to get emacs to
> > do what it was doing before.  I followed the instructions but found
> 
> Which instructions?

The documentation for split-width-threshold, split-height-threshold, and
split-window-sensibly.  In particular, split-window sensibly says:

You can enforce this function to not split WINDOW horizontally,
by setting (or binding) the variable `split-width-threshold' to
nil.  If, in addition, you set `split-height-threshold' to zero,
chances increase that this function does split WINDOW vertically.

The last sentence prompted me to set split-height-threshold to 0
and that is probably why I constantly got smaller and smaller windows
instead of reusing a previous window.

> 
> > that it kept creating smaller and smaller windows.  So, now I leave
> > split-height-threshold alone and do this (this is inside my
> > .emacs.d/init.el file.
> >
> > (custom-set-variables
> >  ...
> > '(split-width-threshold 1600)
> > )
> >
> > which basically says "don't split windows vertically".
> 
> Actually it means "don't split windows horizontally" ;-)

Yea.  I totally don't understand the language here.  A vertically line
creating two windows is splitting it vertically in my pee sized brain.
Sorry about that.

> 
> > Setting it to nil didn't have the effect I was looking for.
> 
> What effect were you looking for?

What emacs use to do before split-window-sensibly. 

> To avoid that `display-buffer' creates smaller and smaller windows, set
> the values of either or both `split-height-threshold' and
> `split-width-threshold' to nil or to some larger value.  If this doesn't
> work for you there's a bug; so please try to tell us more precisely what
> you wanted to do and how it failed.


At the time, I concluded that it wasn't a bug in the code but just
that I misread / misunderstood the documentation.  I believe I tried
setting split-width-threshold to nil and split-height-threshold (after
trying 0), I tried leaving it alone and it still didn't go back to the
old method.  Setting split-width-threshold to some giant number
seems to take a different path through the code and gives me
the old behavior.

I can experiment more if you want me to and try and recreate
what I was setting.

pedz




reply via email to

[Prev in Thread] Current Thread [Next in Thread]