all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: martin rudalics <rudalics@gmx.at>
Cc: David Hansen <david.hansen@gmx.net>, emacs-devel@gnu.org
Subject: Re: `split-window-preferred-horizontally'
Date: Fri, 06 Jun 2008 21:44:50 -0400	[thread overview]
Message-ID: <jwvy75i10of.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <4849B3D7.6090809@gmx.at> (martin rudalics's message of "Sat, 07 Jun 2008 00:01:59 +0200")

>> why was `split-window-preferred-horizontally' removed?  It did exactly
>> what I wanted.  How am i supposed to get the old behavior back? I had
>> 
>> (setq split-window-preferred-function
>> #'(lambda (window)
>> (when (>= (frame-width) 160)
>> (split-window-preferred-horizontally window))))
>> 
>> In my ~/.emacs. Right now I'm trying

> I don't quite understand why you're using `frame-width' here.  It hardly
> seems to DTRT when WINDOW is not full-width.  Can you try with

> (setq split-window-preferred-function
>       #'(lambda (window)
>           (if (>= (window-width window) 60)
>               (split-window window nil t)
> 	    (split-window window))))

>> Right now I'm trying
>> 
>> (setq split-window-preferred-function 'sensibly)
>> 
>> But it behaves pretty weird.  E.g  in a huge frame split once
>> horizontally `iswitchb-buffer-other-window' chooses the same window, as
>> does C-h k (IMHO these are bugs).

> I'm afraid the default value of `split-width-threshold' is too large for
> you.  Please try with a smaller value and tell me whether it still
> behaves weirdly.  I yet have to find a solution how "sensibly" should
> behave.  Can you suggest one?

BTW, shouldn't `sensibly' be the default?
Or even the only acceptable setting (besides setting it to
a home-cooked function)?
I mean the nil value can be simulated with

   (setq split-width-threshold most-positive-fixnum)

and the `horizontal' value can be emulated with

   (setq split-height-threshold most-positive-fixnum)

If most-positive-fixnum is too inconvenient, we could accept a nil
setting for the thresholds to mean the same as most-positive-fixnum.


        Stefan




  parent reply	other threads:[~2008-06-07  1:44 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-06 19:44 `split-window-preferred-horizontally' David Hansen
2008-06-06 22:01 ` `split-window-preferred-horizontally' martin rudalics
2008-06-06 22:36   ` `split-window-preferred-horizontally' David Hansen
2008-06-07  8:21     ` `split-window-preferred-horizontally' martin rudalics
2008-06-07 20:16       ` `split-window-preferred-horizontally' David Hansen
2008-06-08 13:07         ` `split-window-preferred-horizontally' martin rudalics
2008-06-08 17:49           ` `split-window-preferred-horizontally' David Hansen
2008-06-09 20:54             ` `split-window-preferred-horizontally' David Hansen
2008-06-10  7:54               ` `split-window-preferred-horizontally' martin rudalics
2008-06-10 14:27                 ` `split-window-preferred-horizontally' Stefan Monnier
2008-06-07  1:44   ` Stefan Monnier [this message]
2008-06-07  2:29     ` `split-window-preferred-horizontally' Juanma Barranquero
2008-06-07  8:21       ` `split-window-preferred-horizontally' martin rudalics
2008-06-07 12:46         ` `split-window-preferred-horizontally' Juanma Barranquero
2008-06-07 14:41           ` `split-window-preferred-horizontally' martin rudalics
2008-06-07  8:21     ` `split-window-preferred-horizontally' martin rudalics
2008-06-07 18:23       ` `split-window-preferred-horizontally' Stefan Monnier
2008-06-07 14:36     ` `split-window-preferred-horizontally' martin rudalics
2008-06-07 18:33       ` `split-window-preferred-horizontally' Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvy75i10of.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=david.hansen@gmx.net \
    --cc=emacs-devel@gnu.org \
    --cc=rudalics@gmx.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.