On Thu, Jun 14 2012, Christoph Groth wrote: > Hello, > > I recently switched from remember to org's new capture facility which > seems to work fine. However, an issue I already had with remember is > still bothering me, perhaps someone knows a good solution: > > I often call org-capture from within a buffer containing some relevant > context, for example an e-mail message displayed by gnus. The emacs > window created by org-capture that allows to choose a template is > created below the two Gnus windows showing the group and the message. > My org-capture templates require entering a date. During the subsequent > date entry, the gnus windows are not visible anymore (I only see the > nascent buffer with the entry to be captured and a window showing the > emacs calendar). This is impractical, because the e-mail message often > contains the very date I would like to enter. > > How to ensure that the buffer which was active when org-capture was > executed remains visible during date entry? > > Thanks, > Christoph
I've had the same annoyance. The attached patch is *not* a real solution to the problem, as it still produces some weird windowing, and I have no idea if it will wreck other uses of capture, but it does preserve gnus windows so you can see the information you're trying to capture. It's at least a pointer in the right direction… Eric
diff --git a/lisp/org-capture.el b/lisp/org-capture.el index 0e6ab2c..e53b430 100644 --- a/lisp/org-capture.el +++ b/lisp/org-capture.el @@ -873,7 +873,7 @@ it. When it is a variable, retrieve the value. Return whatever we get." (defun org-capture-place-template () "Insert the template at the target location, and display the buffer." (org-capture-put :return-to-wconf (current-window-configuration)) - (delete-other-windows) +; (delete-other-windows) (org-switch-to-buffer-other-window (org-capture-get-indirect-buffer (org-capture-get :buffer) "CAPTURE")) (widen) @@ -1347,8 +1347,8 @@ 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*")) +; (delete-other-windows) + (org-switch-to-buffer-other-window (get-buffer-create "*Capture*")) (erase-buffer) (insert template) (goto-char (point-min))
-- GNU Emacs 24.1.50.1 (i686-pc-linux-gnu, GTK+ Version 2.24.10) of 2012-06-11 on pellet 7.8.10