emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orgmode] Re: [PATCH] org-capture - using `file' as template


From: Johan Friis
Subject: [Orgmode] Re: [PATCH] org-capture - using `file' as template
Date: Wed, 14 Jul 2010 19:58:49 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

Hi Carsten,

I did not have time to try out capture until now, and there is still a
bug. When providing (file "...") as template `org-capture-set-plist'
still generates a default template. Using the patch from David seems to
work fine. Here is a diff against current head.

- Johan

diff --git a/lisp/org-capture.el b/lisp/org-capture.el
index f79a20b..0f3a29b 100644
--- a/lisp/org-capture.el
+++ b/lisp/org-capture.el
@@ -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 (stringp txt)) (not (string-match "\\S-" txt)))
+    (when (or (not txt) (and (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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]