[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orgmode] Org-mode and emacs frames
From: |
Bastien |
Subject: |
Re: [Orgmode] Org-mode and emacs frames |
Date: |
Fri, 07 Sep 2007 14:05:28 +0200 |
User-agent: |
Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.0 (gnu/linux) |
Martin Bealby <address@hidden> writes:
> I prefer to work in a single emacs frame which is split vertically to
> give two columns. I would like org-mode to use only one of these
> columns.
I used to work in such a "vertical" environment and I then had this in
my .emacs:
--8<---------------cut here---------------start------------->8---
(defadvice switch-to-buffer-other-window (around change-split activate)
(let ((display-buffer-prefer-horizontal-split nil))
ad-do-it))
(ad-deactivate 'switch-to-buffer-other-window)
(defun my-display-buffer (buffer &optional not-this-window frame)
(if (one-window-p)
(let ((window (split-window-horizontally)))
(set-window-buffer window buffer)
window)
(let (display-buffer-function)
(display-buffer buffer not-this-window frame))))
(setq display-buffer-function 'my-display-buffer)
--8<---------------cut here---------------end--------------->8---
I'm not sure will suit all your needs but I hope this is a first step.
Regards,
--
Bastien