From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Prince Subject: Re: Getting rid of split frame with org-capture Date: Sun, 20 Nov 2011 11:16:29 -0500 Message-ID: <878vna22kv.fsf@hermes.hocat.ca> References: <20111112155731.GA5939@shi.workgroup> <1377.1321157591@alphaville.dokosmarshall.org> <878vnkaryi.fsf@hermes.hocat.ca> <20351.1321207041@alphaville.dokosmarshall.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([140.186.70.92]:50589) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RSA4N-0006hX-2D for emacs-orgmode@gnu.org; Sun, 20 Nov 2011 11:16:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RSA4M-0003Kw-22 for emacs-orgmode@gnu.org; Sun, 20 Nov 2011 11:16:39 -0500 Received: from socrates.hocat.ca ([76.10.188.53]:35557) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RSA4L-0003Ks-ST for emacs-orgmode@gnu.org; Sun, 20 Nov 2011 11:16:38 -0500 In-Reply-To: <20351.1321207041@alphaville.dokosmarshall.org> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: nicholas.dokos@hp.com Cc: emacs-orgmode On Sun, 13 Nov 2011 12:57:21 -0500, Nick Dokos 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)))