From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gregor Zattler Subject: Re: Getting rid of split frame with org-capture Date: Sat, 12 Nov 2011 16:57:31 +0100 Message-ID: <20111112155731.GA5939@shi.workgroup> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([140.186.70.92]:34552) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RPNrO-000892-GA for emacs-orgmode@gnu.org; Sat, 12 Nov 2011 19:23:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RPNrN-0003m9-An for emacs-orgmode@gnu.org; Sat, 12 Nov 2011 19:23:46 -0500 Received: from mailout-de.gmx.net ([213.165.64.23]:54187) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1RPNrN-0003jq-09 for emacs-orgmode@gnu.org; Sat, 12 Nov 2011 19:23:45 -0500 Content-Disposition: inline In-Reply-To: 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: emacs-orgmode Hi Thomas, org-mode community, * Thomas Lockney [10. Nov. 2011]: > I'm attempting to get some code working that should create a new frame > with *just* org-capture, this is something I also tried hard to achive. > 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 played a bit with your code. I also use emacs24. I also get a split frame. I think it's org-capture which splits the frame. I want to run this with emacsclient. But when there is no graphical (X11) frame then emacsclient -e '(make-capture-frame)' does nothing, no frame pops up. > 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. me too. For my capture needs I would like to automatically open a frame for org-capture and also automatically close it when finishing the capture. This should happen regardless of other frames or the lack of other frames. Ciao, Gregor -- -... --- .-. . -.. ..--.. ...-.-