all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@jurta.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: [Emacs-commit] emacs/src window.c
Date: Sun, 09 Sep 2007 02:07:34 +0300	[thread overview]
Message-ID: <87tzq4wysi.fsf@jurta.org> (raw)
In-Reply-To: <87y7fgkfvm.fsf@elegiac.orebokech.com> (Romain Francoise's message of "Sat\, 08 Sep 2007 23\:26\:53 +0200")

> Eli Zaretskii <eliz@gnu.org> writes:
>
>> Modified files:
>> 	src            : window.c
>
>> Log message:
>> 	(prefer_window_split_horizontally): New variable.
>> 	(display_buffer): Consider splitting window horizontally depending on
>> 	prefer_window_split_horizontally.
>
> Unless I'm mistaken there was no need to install this, Stefan already
> implemented this feature via `split-window-preferred-function'.

Yes, and Stefan's implementation is superior.

It allows specifying such a preference as splitting windows horizontally
when there are enough horizontal space for two side-by-side windows
(I think this should be added as a new choice to the new variable):

(setq split-window-preferred-function
      (lambda (window)
        (split-window window nil (if (> (frame-width) 160) 'horiz))))

It even allows implementing functionality I missed in Emacs for a long time!
After setting it to the following value:

(setq split-window-preferred-function
      (lambda (window)
        (if (member (buffer-name (window-buffer window))
                    '("*Help*"))
            (selected-window)
          (split-window window nil 'horiz))))

it visits source files from the *Help* buffer in the same window.

-- 
Juri Linkov
http://www.jurta.org/emacs/

  reply	other threads:[~2007-09-08 23:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1ITxdc-0002Hx-5d@cvs.savannah.gnu.org>
2007-09-08 21:26 ` [Emacs-commit] emacs/src window.c Romain Francoise
2007-09-08 23:07   ` Juri Linkov [this message]
     [not found]     ` <uejh8r0m9.fsf@gnu.org>
2007-09-09 20:06       ` Richard Stallman
2007-09-12 11:34         ` Romain Francoise
2007-09-09  7:38 Angelo Graziosi

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=87tzq4wysi.fsf@jurta.org \
    --to=juri@jurta.org \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /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.