summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Dominik <carsten.dominik@gmail.com>2010-07-14 11:03:27 +0200
committerCarsten Dominik <carsten.dominik@gmail.com>2010-07-14 11:03:27 +0200
commitbca27d9215d987517de1aab26d2712bab03329ba (patch)
tree7ce7ccb103945c1f962124bf520fc3cfb8dcf7ec
parenta39e5ef2294b157852b7f349460a9af448a6cd2c (diff)
downloadorg-mode-bca27d9215d987517de1aab26d2712bab03329ba.tar.gz
Capture: Fix the case of using a template file
* lisp/org-capture.el (org-capture-set-plist): Make sure txt is a string before calling `string-match'. (org-capture-templates): Fix customization type. Modified from a patch proposal by Johan Friis. TINYCHANGE
-rw-r--r--lisp/org-capture.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/org-capture.el b/lisp/org-capture.el
index 2cb6876..f79a20b 100644
--- a/lisp/org-capture.el
+++ b/lisp/org-capture.el
@@ -285,7 +285,7 @@ calendar | %:type %:date"
(choice :tag "Template"
(string)
(list :tag "File"
- (const :format "" file-contents)
+ (const :format "" file)
(file :tag "Template file"))
(list :tag "Function"
(const :format "" function)
@@ -981,7 +981,7 @@ Point will remain at the first line after the inserted text."
(org-capture-put :key (car entry) :description (nth 1 entry)
:target (nth 3 entry))
(let ((txt (nth 4 entry)) (type (or (nth 2 entry) 'entry)))
- (when (or (not txt) (not (string-match "\\S-" txt)))
+ (when (or (not (stringp txt)) (not (string-match "\\S-" txt)))
;; The template may be empty or omitted for special types.
;; Here we insert the default templates for such cases.
(cond