emacs-orgmode
[Top][All Lists]
Advanced

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

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


From: Thomas Lockney
Subject: [O] Getting rid of split frame with org-capture
Date: Thu, 10 Nov 2011 11:08:33 -0800

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.

-- 
http://about.me/tlockney



reply via email to

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