From mboxrd@z Thu Jan 1 00:00:00 1970 From: Leo Subject: [BUG] org splitting window weird layout Date: Thu, 09 Dec 2010 10:43:58 +0000 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from [140.186.70.92] (port=42459 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PQdyz-0000H0-Qz for emacs-orgmode@gnu.org; Thu, 09 Dec 2010 05:44:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PQdyy-0003pH-JB for emacs-orgmode@gnu.org; Thu, 09 Dec 2010 05:44:17 -0500 Received: from lo.gmane.org ([80.91.229.12]:50403) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PQdyy-0003ov-21 for emacs-orgmode@gnu.org; Thu, 09 Dec 2010 05:44:16 -0500 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PQdyw-00062M-JG for emacs-orgmode@gnu.org; Thu, 09 Dec 2010 11:44:14 +0100 Received: from cpc1-cmbg13-0-0-cust596.5-4.cable.virginmedia.com ([86.9.122.85]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 09 Dec 2010 11:44:14 +0100 Received: from sdl.web by cpc1-cmbg13-0-0-cust596.5-4.cable.virginmedia.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 09 Dec 2010 11:44:14 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hello all, Function org-fast-tag-selection may create a three-window layout like this: http://imagebin.org/127056. This is due to org-switch-to-buffer-other-window subject to split-window-sensibly and thus (org-switch-to-buffer-other-window " *Org tags*") is not guaranteed to switch to the window created by (split-window-vertically). I have temporarily fixed the problem with the patch attached (http://imagebin.org/127057). I think a proper fix may have to be in org-switch-to-buffer-other-window, i.e. add an extra argument to indicate preferring horizontal or vertical split and let bound split-width-threshold or split-height-threshold accordingly, and fix the places where it is used. diff -c /usr/local/unix/site-lisp/orgmode/org.el\~ /usr/local/unix/site-lisp/orgmode/org.el --- /usr/local/unix/site-lisp/orgmode/org.el~ Mon Dec 6 18:24:00 2010 +++ /usr/local/unix/site-lisp/orgmode/org.el Thu Dec 9 10:30:09 2010 @@ -13026,7 +13026,7 @@ (setq exit-after-next (not exit-after-next))) (setq expert nil) (delete-other-windows) - (split-window-vertically) + (set-window-buffer (split-window-vertically) " *Org tags*") (org-switch-to-buffer-other-window " *Org tags*") (org-fit-window-to-buffer))) ((or (= c ?\C-g) Diff finished. Thu Dec 9 10:30:48 2010 HTH, Leo