[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Changing capture frame/window behavior depending on source
From: |
Josiah Schwab |
Subject: |
Re: [O] Changing capture frame/window behavior depending on source |
Date: |
Mon, 16 Dec 2013 16:56:45 -0800 |
User-agent: |
mu4e 0.9.9.5; emacs 24.3.1 |
Josiah Schwab writes:
> When I invoke the capture from my bookmark, I also want capture to be
> the only window in the frame. I can make all captures act that way by
> setting (add-hook 'org-capture-mode-hook 'delete-other-windows)
>
> But when I tried to have this part be source dependent with
>
> (defun jws/org-capture-initialize ()
> (if (jws/org-protocol-capture-p) 'delete-other-windows))
>
> (add-hook 'org-capture-mode-hook 'jws/org-capture-initialize)
>
> it still gave me a frame with two windows, for reasons I don't
> understand. I stepped through the code with edebug and confirmed that
> jws/org-protocol-capture-p was evaluating to true.
Just to follow up, in case someone searches for this thread,
(defun jws/org-capture-initialize ()
(if (jws/org-protocol-capture-p) (delete-other-windows)))
works fine. It helps to actually evaluate the function...
Josiah