On 2017-01-23 13:56, Nick Dokos <ndo...@gmail.com> writes:

> Alan Schmitt <alan.schm...@polytechnique.org> writes:
>
>> ...
>> - I added a hook to org-capture-after-finalize-hook
>                                   ^^^^^
>>   #+begin_src emacs-lisp
>>   (defun as/do-org-board-dl-hook ()
>>     (when (equal (buffer-name) (concat "CAPTURE-" as/org-board-capture-file))
>>       (org-board-archive)))
>>
>>   (add-hook 'org-capture-before-finalize-hook 'as/do-org-board-dl-hook)
>                            ^^^^^^
>>   #+end_src
>>
>> (Note: I mistakenly said that the "prepare" hook worked, but that would
>                                      ^^^^^^^
>> download the file even when cancelling, which was wrong)
>
> Make up your mind, will you? :-)

As you can guess, I was testing as I was editing the message. As always,
the code is the truth™.

For the record, here is what I discovered:
- the prepare hook is run even when cancelling
- the before hook is run with the buffer widened, but the point is still
in the same position as when confirming pointer
- when the after hook is run, I did not get access to the captured data
(I may have done it wrong, but since the before hook worked, I did not
look further)

Best,

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7
Monthly Athmospheric CO₂, Mauna Loa Obs. 2016-12: 404.48, 2015-12: 401.85

Attachment: signature.asc
Description: PGP signature

Reply via email to