[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Alfred workflow for org-capture
From: |
Alan Schmitt |
Subject: |
Re: [O] Alfred workflow for org-capture |
Date: |
Fri, 13 Sep 2013 11:19:55 +0200 |
User-agent: |
mu4e 0.9.9.5; emacs 24.3.1 |
address@hidden writes:
> Hi Alan,
>
> Alan Schmitt <address@hidden> writes:
>
> [...]
>
>> The question: is there a way to:
>> - present only the capture buffer in the new frame (right now it's split
>> with the scratch buffer)?
>> - delete the window at the end of capture?
>>
>
> How about `org-capture-after-finalize-hook'? What I can get from the
> pcumentation string it seems to be what you are looking for. You could
> try something like this:
>
> (add-hook org-capture-after-finalize-hook 'delete-frame)
>
> Just tried that, and on my machine this works.
Thanks, here is my modified version, if someone finds it useful. It
tests for the frame name (there may be a simpler way to get it, but I
could not find it) before deleting the frame.
--8<---------------cut here---------------start------------->8---
(add-hook 'org-capture-after-finalize-hook
(lambda ()
(when (equal
(cdr (assoc 'name (frame-parameters (selected-frame))))
"remember")
(delete-frame))))
--8<---------------cut here---------------end--------------->8---
Alan