emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Getting rid of split frame with org-capture


From: Tom Prince
Subject: Re: [O] Getting rid of split frame with org-capture
Date: Sun, 20 Nov 2011 11:16:29 -0500
User-agent: Notmuch/0.9 (http://notmuchmail.org) Emacs/23.3.3 (x86_64-pc-linux-gnu)

On Sun, 13 Nov 2011 12:57:21 -0500, Nick Dokos <address@hidden> 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)))



reply via email to

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