From e5f906f20b796326e50057fa4fc21599368bd347 Mon Sep 17 00:00:00 2001 From: Thomas Holst Date: Sat, 15 Mar 2014 16:22:44 +0100 Subject: [PATCH 1/2] capture: property `:table-line-pos' can be a function name, a string or a variable org-capture.el: Implement new features for capture templates * lisp/org-capture.el (org-capture-place-table-line): If the value of `:table-line-pos' is a function name, its return value is used to determine the position inside the table. Return value must be a string like "II-3". Else `:table-line-pos' is 'eval'ed. TINYCHANGE --- lisp/org-capture.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lisp/org-capture.el b/lisp/org-capture.el index e7f5e20..cf6c9e2 100644 --- a/lisp/org-capture.el +++ b/lisp/org-capture.el @@ -1149,6 +1149,9 @@ may have been stored before." ;; Check if the template is good (if (not (string-match org-table-dataline-regexp txt)) (setq txt "| %?Bad template |\n")) + (if (functionp table-line-pos) + (setq table-line-pos (funcall table-line-pos)) + (setq table-line-pos (eval table-line-pos))) (cond ((and table-line-pos (string-match "\\(I+\\)\\([-+][0-9]\\)" table-line-pos)) -- 1.7.9.5