emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] [feature request] org-capture-window-setup to stop capture windo


From: Eric S Fraga
Subject: Re: [O] [feature request] org-capture-window-setup to stop capture window taking up whole frame
Date: Thu, 18 Jun 2015 08:57:57 +0100
User-agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/24.4 (gnu/linux)

On Wednesday, 17 Jun 2015 at 16:41, Subhan Michael Tindall wrote:
> Quickie patch, maybe I'll work it up as per comments later & submit
> but this will fix things for you (no guarantees, not widely tested)

Thanks for this.  Works okay if there is more than one window which is a
step in the right direction.  In any case, you've pointed me in the
right direction and the following seems to work fine (with very limited
testing):

--8<---------------cut here---------------start------------->8---
diff --git a/lisp/org-capture.el b/lisp/org-capture.el
index eeb05ca..ac0ed6f 100644
--- a/lisp/org-capture.el
+++ b/lisp/org-capture.el
@@ -1590,8 +1590,7 @@ The template may still contain \"%?\" for cursor 
positioning."
     (unless template (setq template "") (message "No template") (ding)
            (sit-for 1))
     (save-window-excursion
-      (delete-other-windows)
-      (org-pop-to-buffer-same-window (get-buffer-create "*Capture*"))
+      (org-switch-to-buffer-other-window (get-buffer-create "*Capture*"))
       (erase-buffer)
       (insert template)
       (goto-char (point-min))
--8<---------------cut here---------------end--------------->8---

Feedback from real emacs lisp people welcome...

thanks again,
eric

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.4.1, Org release_8.3beta-1216-gb856f6



reply via email to

[Prev in Thread] Current Thread [Next in Thread]