From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?Gr=C3=A9goire?= Jadi Subject: [PATCH] Fix `org-capture-templates' type declaration Date: Sat, 24 Oct 2015 19:43:50 +0200 Message-ID: <87h9lg88mh.fsf@univ-nantes.fr> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56192) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zq2rE-00047M-8P for emacs-orgmode@gnu.org; Sat, 24 Oct 2015 13:43:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zq2rD-0003eT-36 for emacs-orgmode@gnu.org; Sat, 24 Oct 2015 13:43:56 -0400 Received: from smtptls2-lmb.cpub.univ-nantes.fr ([2001:660:7220:385:193:52:103:111]:50528 helo=smtp-tls.univ-nantes.fr) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zq2rC-0003eC-PD for emacs-orgmode@gnu.org; Sat, 24 Oct 2015 13:43:55 -0400 Received: from localhost (localhost [127.0.0.1]) by smtp-tls.univ-nantes.fr (Postfix) with ESMTP id EF514401717 for ; Sat, 24 Oct 2015 19:43:51 +0200 (CEST) Received: from smtp-tls.univ-nantes.fr ([127.0.0.1]) by localhost (smtptls2-lmb.cpub.univ-nantes.fr [127.0.0.1]) (amavisd-new, port 10024) with LMTP id RV4nLI7zYmEf for ; Sat, 24 Oct 2015 19:43:51 +0200 (CEST) Received: from localhost (unknown [IPv6:2a01:e35:8be0:900:d97:6ec6:7745:ed68]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by smtp-tls.univ-nantes.fr (Postfix) with ESMTPSA id B1668401716 for ; Sat, 24 Oct 2015 19:43:51 +0200 (CEST) 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Org Mode --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, The attached patch fix the type declaration of org-capture-templates by allowing the user to use file, variable, function and sexp as target's file to match the documentation (org) Template elements > Most target specifications contain a file name. If that file name is the > empty string, it defaults to =E2=80=98org-default-notes-file=E2=80=99. A = file can also > be given as a variable, function, or Emacs Lisp form. OK to push? --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-lisp-org-capture.el-Fix-org-capture-templates-type-d.patch Content-Transfer-Encoding: quoted-printable From=2000aa68469d51420c71f77801514c17a8464c8e2b Mon Sep 17 00:00:00 2001 From: =3D?UTF-8?q?Gr=3DC3=3DA9goire=3D20Jadi?=3D Date: Sat, 24 Oct 2015 19:27:58 +0200 Subject: [PATCH] lisp/org-capture.el: Fix `org-capture-templates' type declaration * lisp/org-capture.el(org-capture-templates): Fix `org-capture-templates' t= ype declaration to match its documentation. Allow the use of file, variable, function or Emacs Lisp form as target file= as specified by the docstring. =2D-- lisp/org-capture.el | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/lisp/org-capture.el b/lisp/org-capture.el index 58b578b..9d24a6f 100644 =2D-- a/lisp/org-capture.el +++ b/lisp/org-capture.el @@ -298,32 +298,39 @@ calendar | %:type %:date" (choice :tag "Target location" (list :tag "File" (const :format "" file) =2D (file :tag " File")) + (choice :tag " File" + file variable function sexp)) (list :tag "ID" (const :format "" id) (string :tag " ID")) (list :tag "File & Headline" (const :format "" file+headline) =2D (file :tag " File ") + (choice :tag " File " + file variable function sexp) (string :tag " Headline")) (list :tag "File & Outline path" (const :format "" file+olp) =2D (file :tag " File ") + (choice :tag " File " + file variable function sexp) (repeat :tag "Outline path" :inline t (string :tag "Headline"))) (list :tag "File & Regexp" (const :format "" file+regexp) =2D (file :tag " File ") + (choice :tag " File " + file variable function sexp) (regexp :tag " Regexp")) (list :tag "File & Date tree" (const :format "" file+datetree) =2D (file :tag " File")) + (choice :tag " File" + file variable function sexp)) (list :tag "File & Date tree, prompt for date" (const :format "" file+datetree+prompt) =2D (file :tag " File")) + (choice :tag " File" + file variable function sexp)) (list :tag "File & function" (const :format "" file+function) =2D (file :tag " File ") + (choice :tag " File " + file variable function sexp) (sexp :tag " Function")) (list :tag "Current clocking task" (const :format "" clock)) =2D-=20 1.9.1 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable =2D-=20 Gr=C3=A9goire Jadi --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJWK8NXAAoJEBNzVHcrZRiUkNEQAJsHfdCIhgU1PsGFjNBJQswD Xtk2n+KpnQAQe6uc2Ns93Ty+lP1iwvWtC4gB699p9Z5KkA5x4wEiv5Bho5Cs8Gxp x1x9qbluhpkPqRDGyU4hnB9G6YNsHFubELA7O73fmOQFHQjc5sA9B/G49UO+uL2z NMJKizgm2p9tdGHWi//PnUzsOdN7cBHRuKLMU94woDeGheznsa8hrdeS0rRPd+kj xt1uogPF1wH4DPs/FJrzd+WvnCXcCklcfoiY4qFWyomjoF73v9JNcQbqHVRCTba2 H1x+vLaVw1YNnTJW2GCSMVo0IlWVYwuDowHt58DEUWWr+sMqOjoVHujp0wr1CwLP sabRb8ZXwjnfXfiN3/ogPTaxvFXvPSk5kBexoyobA2ENjravfzDqyfQixpplOsDZ F1ZotE4c0jrojBtsbEjrpg30BmfpSIEg806sRpAhLZkHb5rV9R8RWX+TABt/CZsc nbJ6oNJsbqvb4jwAtiomSoiLj0eGpgDLH+zJOlSrhWwS0vVAkdyiEecXdBicRdCH FKNxDXSCo8XI2vWleEbQ98vKbKOMHliZ8I4S3Vum4BE3R9RIE2QKv7dpPRaHuiVf dJnhhrfQ2JUbi2E6EmpeuBHJFwo+eal4ogLkTyC0GgLLQDiBovCUwiN3h1wOXKt0 8DJa4zbqbFQv6QHVtJTY =Tvr4 -----END PGP SIGNATURE----- --==-=-=--