emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Leo <sdl.web@gmail.com>
To: emacs-orgmode@gnu.org
Subject: [BUG] org splitting window weird layout
Date: Thu, 09 Dec 2010 10:43:58 +0000	[thread overview]
Message-ID: <m1lj3zmdjl.fsf@cam.ac.uk> (raw)

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

             reply	other threads:[~2010-12-09 10:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-09 10:43 Leo [this message]
2011-02-12 14:41 ` [BUG] org splitting window weird layout Bastien
2011-02-12 16:59   ` Leo
2011-02-12 17:11     ` Bastien

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

  List information: https://www.orgmode.org/

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

  git send-email \
    --in-reply-to=m1lj3zmdjl.fsf@cam.ac.uk \
    --to=sdl.web@gmail.com \
    --cc=emacs-orgmode@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 public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).