all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH] Fix `org-capture-templates' type declaration
@ 2015-10-24 17:43 Grégoire Jadi
  2015-10-25  8:40 ` Nicolas Goaziou
  0 siblings, 1 reply; 5+ messages in thread
From: Grégoire Jadi @ 2015-10-24 17:43 UTC (permalink / raw)
  To: Org Mode


[-- Attachment #1.1: Type: text/plain, Size: 440 bytes --]

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 ‘org-default-notes-file’. A file can also
> be given as a variable, function, or Emacs Lisp form.

OK to push?


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-lisp-org-capture.el-Fix-org-capture-templates-type-d.patch --]
[-- Type: text/x-diff, Size: 2398 bytes --]

From 00aa68469d51420c71f77801514c17a8464c8e2b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gr=C3=A9goire=20Jadi?= <gregoire.jadi@univ-nantes.fr>
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' type
declaration to match its documentation.

Allow the use of file, variable, function or Emacs Lisp form as target file as
specified by the docstring.
---
 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
--- 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)
-				(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)
-				(file   :tag "  File    ")
+				(choice :tag "  File    "
+					file variable function sexp)
 				(string :tag "  Headline"))
 			  (list :tag "File & Outline path"
 				(const :format "" file+olp)
-				(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)
-				(file   :tag "  File  ")
+				(choice :tag "  File  "
+					file variable function sexp)
 				(regexp :tag "  Regexp"))
 			  (list :tag "File & Date tree"
 				(const :format "" file+datetree)
-				(file :tag "  File"))
+				(choice :tag "  File"
+					file variable function sexp))
 			  (list :tag "File & Date tree, prompt for date"
 				(const :format "" file+datetree+prompt)
-				(file :tag "  File"))
+				(choice :tag "  File"
+					file variable function sexp))
 			  (list :tag "File & function"
 				(const :format "" file+function)
-				(file :tag "  File    ")
+				(choice :tag "  File    "
+					file variable function sexp)
 				(sexp :tag "  Function"))
 			  (list :tag "Current clocking task"
 				(const :format "" clock))
-- 
1.9.1


[-- Attachment #1.3: Type: text/plain, Size: 23 bytes --]


-- 
Grégoire Jadi

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-10-25 16:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-24 17:43 [PATCH] Fix `org-capture-templates' type declaration Grégoire Jadi
2015-10-25  8:40 ` Nicolas Goaziou
2015-10-25 13:34   ` Grégoire Jadi
2015-10-25 15:44     ` Nicolas Goaziou
2015-10-25 16:47       ` Grégoire Jadi

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.