From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Getting rid of split frame with org-capture Date: Sun, 13 Nov 2011 15:41:53 -0500 Message-ID: <5738.1321216913@alphaville.americas.hpqcorp.net> References: Reply-To: nicholas.dokos@hp.com Return-path: Received: from eggs.gnu.org ([140.186.70.92]:44126) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RPgsR-0001fE-NE for emacs-orgmode@gnu.org; Sun, 13 Nov 2011 15:42:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RPgsQ-0004ub-G4 for emacs-orgmode@gnu.org; Sun, 13 Nov 2011 15:42:07 -0500 Received: from g6t0185.atlanta.hp.com ([15.193.32.62]:18207) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RPgsQ-0004tb-CW for emacs-orgmode@gnu.org; Sun, 13 Nov 2011 15:42:06 -0500 In-Reply-To: Message from Thomas Lockney of "Thu, 10 Nov 2011 11:08:33 PST." 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: Thomas Lockney Cc: nicholas.dokos@hp.com, emacs-orgmode@gnu.org Thomas Lockney wrote: > I'm attempting to get some code working that should create a new frame > with *just* org-capture, but when I run it, I keep getting a split > despite various attempts at running delete-other-windows. I'm running > on "GNU Emacs 24.0.90.1 (i386-apple-darwin10.8.0, NS > apple-appkit-1038.36)" so perhaps this is a 24 specific issue. Here's > the code I've currently got: > > (defadvice org-capture-finalize (after delete-capture-frame activate) > "Advise capture-finalize to close the frame if it is the capture frame" > (if (equal "capture" (frame-parameter nil 'name)) > (delete-frame))) > > (defadvice org-capture-destroy (after delete-capture-frame activate) > "Advise capture-destroy to close the frame if it is the capture frame" > (if (equal "capture" (frame-parameter nil 'name)) > (delete-frame))) > > (defun make-capture-frame () > "Create a new frame and run org-capture." > (interactive) > (make-frame '((name . "Capture") > (width . 100) > (height . 15))) > (select-frame-by-name "Capture") > (delete-other-windows) > (org-capture)) > > I've also tried this using the org-capture-mode-hook to call > delete-other-windows and I've tried placing delete-other-windows after > the call to org-capture (both of those based on solutions I've seen > posted to this list at various times). Anyone have any clues on this? > I'm stumped, but I'm also fairly inexperienced at programming emacs. > As I pointed out in my reply to Gregor, org-capture will split the frame, no matter whether you have a new one or not: you need to modify its innards to change that behavior. Aside from that, there is a problem here: you name the frame "Capture", yet you test (equal "capture" ...) - I presume that's a typo? Nick