On Sun, 13 Nov 2011 12:57:21 -0500, Nick Dokos <[email protected]> wrote:
> > 1) If I don't pass -c to emacsclient, then I need to search all my
> > workspaces to find where emacs decided to put the capture frame
> > 2) If I pass do pass -c to emacsclient, then I need to close the frame
> > afterwards. And more significantly, I need to close the empty frame
> > when I use store-link instead. (I could work around this by using
> > seperate protocols for for each)
> >
>
> Sounds like a worthwhile thing to fix - patches would probably be
> welcome.
I came up with the following hack, which seems to do what I want:
(defadvice org-protocol-check-filename-for-protocol (around
tp/org-protocol-make-frame activate)
"Advice org-protocol-check-filename-for-protocol to open windows in new
frames."
(flet ((org-switch-to-buffer-other-window (&rest args) ; for org-mks
(let ((pop-up-frames t))
(apply 'switch-to-buffer-other-window args)))
(org-pop-to-buffer-same-window (&rest args) ; for org-capture
(let ((pop-up-frames t))
(apply 'switch-to-buffer-other-window args))))
(let ((display-buffer-mark-dedicated t))
ad-do-it)))