Improve importing of remember templates into org-capture

Tassilo Horn had set org-remember-default-headline to `bottom', and
the importer did not handle this special case.
This commit is contained in:
Carsten Dominik 2010-06-23 08:41:14 +02:00
parent 19602fa56e
commit 85e6bb964d
1 changed files with 2 additions and 4 deletions

View File

@ -1100,7 +1100,7 @@ The template may still contain \"%?\" for cursor positioning."
(key (char-to-string (nth 1 entry)))
(template (nth 2 entry))
(file (or (nth 3 entry) org-default-notes-file))
(position (nth 4 entry))
(position (or (nth 4 entry) org-remember-default-headline))
(type 'entry)
(prepend org-reverse-note-order)
immediate target)
@ -1111,9 +1111,7 @@ The template may still contain \"%?\" for cursor positioning."
((eq position 'date-tree)
(setq target (list 'file+datetree file)
prepend nil))
(t (setq target
(list 'file+headline file
(or position org-remember-default-headline)))))
(t (setq target (list 'file+headline file position))))
(when (string-match "%!" template)
(setq template (replace-match "" t t template)