From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan Schmitt Subject: Re: run a function during capture Date: Mon, 23 Jan 2017 15:16:51 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41224) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cVfQY-0004VB-Bv for emacs-orgmode@gnu.org; Mon, 23 Jan 2017 09:16:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cVfQV-0003ug-8u for emacs-orgmode@gnu.org; Mon, 23 Jan 2017 09:16:58 -0500 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:36258) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cVfQU-0003uC-Sw for emacs-orgmode@gnu.org; Mon, 23 Jan 2017 09:16:55 -0500 In-Reply-To: (Xebar Saram's message of "Fri, 20 Jan 2017 15:25:56 +0200") 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" To: Xebar Saram Cc: emacs-orgmode --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2017-01-20 15:25, Xebar Saram writes: > Alan: once you have your org-board and capture setting finalized , i > would be very interested to get more details on your setup and work > flow, this looks really interesting! Here is how I did it: =2D on Firefox side, I installed Org-capture for Firefox http://chadok.info/firefox-org-capture/. Alternatively, you can do it manually by following http://weblog.zamazal.org/org-mode-firefox/ (in the =E2=80=9CThe advanced way=E2=80=9D section) =2D I "(require 'org-protocol)" and have installed the "org-board" package. =2D I setup a capture template like this: #+begin_src emacs-lisp (setq as/org-board-capture-file "my-org-board.org") (setq org-capture-templates `(... ("c" "capture through org protocol" entry (file+headline ,as/org-board-capture-file "Unsorted") "* %?%:description\n:PROPERTIES:\n:URL: %:link\n:END:\n\n Added= %U") ...)) #+end_src =2D 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) I think this is it. Best, Alan =2D-=20 OpenPGP Key ID : 040D0A3B4ED2E5C7 Monthly Athmospheric CO=E2=82=82, Mauna Loa Obs. 2016-12: 404.48, 2015-12: = 401.85 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBCgAGBQJYhhBTAAoJEAQNCjtO0uXHtvEIAJLUDGBC42tcfGlscly+lrax LPoCXMg5OgM0A70M0JnhleHC1ia1Mpu+cBEeCGOWJvuKY41PPB8WlrnEHkAbso// y45zqqBfPK+3qy1agyUseKrFNs8Tc3VBobes54dMTVqZCVrFrosJ4r5FHUZT7NxJ Ru7EVlcoRm62siAyZ4wjOGfAtNFYF4Xd5K35A4k3pt7VZ0Eoburcep4I5EPvB7Sg 6Sfi9Q8DJB2ZLSRLK5iI4dYaRQ26HESCcVnuBNllg+rOOhxIKRSezdsmSIoVkojN otSrXV1oufkf3NzvN7JTL/NLTf9JXzyI30SUv5WBizsgOXrSyPjelZpE+Ucsfm0= =BurI -----END PGP SIGNATURE----- --=-=-=--