emacs-orgmode
[Top][All Lists]
Advanced

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

[Orgmode] Bug: org-capture: confusing error for invalid template format


From: Daniel Hackney
Subject: [Orgmode] Bug: org-capture: confusing error for invalid template format [7.3] [7.3]
Date: Tue, 09 Nov 2010 01:52:36 -0500

Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

     http://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org-mode mailing list.
------------------------------------------------------------------------

Setting `org-capture-templates' to something like

  '(("t" "Todo" entry (file "/tmp/yo.org") "Hi there"))

Causes `org-capture' to fail with the following error:

  Lisp error: (error "Capture template `t': The kill is not a (set of) tree(s) 
- please use <S-insertchar> to yank anyway")

Tracing through the source a bit, the problem is that
`org-kill-is-subtree-p' sees that "Hi there" is not a subtree and causes
`org-paste-subtree' to error out. Changing `org-capture-templates' to:

  '(("t" "Todo" entry (file "/tmp/yo.org") "* Hi there"))

makes it work correctly. This should fail sooner (such as when it is set
by custom) or print a more useful error message; I didn't know that the
problem was with the template string as I wasn't trying to kill
anything.

Emacs  : GNU Emacs 24.0.50.1 (i686-pc-linux-gnu, GTK+ Version 2.22.0)
 of 2010-11-08 on priscilla
Package: Org-mode version 7.3

current state:
==============
(setq
 org-export-with-LaTeX-fragments nil
 org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars)
 org-speed-command-hook '(org-speed-command-default-hook 
org-babel-speed-command-hook)
 org-export-table-header-tags '("<th scope=\"%s\">" . "</th>")
 org-export-latex-default-packages-alist '(("AUTO" "inputenc" t) ("T1" 
"fontenc" t) ("" "fixltx2e" nil)
                                           ("" "graphicx" t) ("" "longtable" 
nil) ("" "float" nil) ("" "wrapfig" nil)
                                           ("" "soul" t) ("" "t1enc" t) ("" 
"textcomp" t) ("" "marvosym" t)
                                           ("" "wasysym" t) ("" "latexsym" t) 
("" "amssymb" t) ("" "hyperref" nil)
                                           "\\tolerance=1000")
 org-export-html-inline-image-extensions '("png" "jpeg" "jpg" "gif")
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-capture-templates '(("t" "Todo" entry (file "/tmp/yo.org") "Hi there"))
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-export-blocks-postblock-hook '(org-exp-res/src-name-cleanup)
 org-agenda-prefix-format '((agenda . "  %-12:c%?-12t% s") (timeline . "  % s") 
(todo . "  %-12:c")
                            (tags . "  %-12:c") (search . "  %-12:c"))
 org-export-latex-format-toc-function 'org-export-latex-format-toc-default
 org-export-table-data-tags '("<td>" . "</td>")
 org-src-lang-modes '(("ocaml" . tuareg) ("elisp" . emacs-lisp) ("ditaa" . 
artist) ("asymptote" . asy)
                      ("dot" . fundamental) ("sqlite" . sql))
 org-export-preprocess-hook '(org-export-blocks-preprocess)
 org-tab-first-hook '(org-src-native-tab-command-maybe 
org-hide-block-toggle-maybe org-babel-hide-result-toggle-maybe)
 org-src-mode-hook '(org-src-babel-configure-edit-buffer 
org-src-mode-configure-edit-buffer)
 org-confirm-shell-link-function 'yes-or-no-p
 org-export-first-hook '(org-beamer-initialize-open-trackers)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-export-language-setup '(("en" "Author" "Date" "Table of Contents" 
"Footnotes")
                             ("ca" "Autor" "Data" "&Iacute;ndex" "Peus de 
p&agrave;gina")
                             ("cs" "Autor" "Datum" "Obsah" "Pozn\341mky pod 
carou")
                             ("da" "Ophavsmand" "Dato" "Indhold" "Fodnoter")
                             ("de" "Autor" "Datum" "Inhaltsverzeichnis" 
"Fu&szlig;noten")
                             ("eo" "A&#365;toro" "Dato" "Enhavo" "Piednotoj")
                             ("es" "Autor" "Fecha" "&Iacute;ndice" "Pies de 
p&aacute;gina")
                             ("fi" "Tekij&auml;" 
"P&auml;iv&auml;m&auml;&auml;r&auml;" "Sis&auml;llysluettelo"
                              "Alaviitteet")
                             ("fr" "Auteur" "Date" "Table des mati&egrave;res" 
"Notes de bas de page")
                             ("hu" "Szerz&otilde;" "D&aacute;tum" 
"Tartalomjegyz&eacute;k" "L&aacute;bjegyzet")
                             ("is" "H&ouml;fundur" "Dagsetning" "Efnisyfirlit" 
"Aftanm&aacute;lsgreinar")
                             ("it" "Autore" "Data" "Indice" "Note a pi&egrave; 
di pagina")
                             ("nl" "Auteur" "Datum" "Inhoudsopgave" "Voetnoten")
                             ("no" "Forfatter" "Dato" "Innhold" "Fotnoter")
                             ("nb" "Forfatter" "Dato" "Innhold" "Fotnoter")
                             ("nn" "Forfattar" "Dato" "Innhald" "Fotnotar")
                             ("pl" "Autor" "Data" "Spis tre&sacute;ci" 
"Przypis")
                             ("sv" "F&ouml;rfattare" "Datum" "Inneh&aring;ll" 
"Fotnoter"))
 org-babel-pre-tangle-hook '(save-buffer)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers 
org-cycle-show-empty-lines
                  org-optimize-window-after-visibility-change)
 org-export-preprocess-before-normalizing-links-hook 
'(org-remove-file-link-modifiers)
 org-mode-hook '((lambda nil
                  (org-add-hook (quote change-major-mode-hook) (quote 
org-show-block-all) (quote append)
                   (quote local))
                  )
                 (lambda nil
                  (org-add-hook (quote change-major-mode-hook) (quote 
org-babel-show-result-all) (quote append)
                   (quote local))
                  )
                 #[nil "\300\301\302\303\304$\207"
                   [org-add-hook change-major-mode-hook org-show-block-all 
append local] 5]
                 #[nil "\300\301\302\303\304$\207"
                   [org-add-hook change-major-mode-hook 
org-babel-show-result-all append local] 5]
                 org-babel-result-hide-spec org-babel-hide-all-hashes)
 org-ctrl-c-ctrl-c-hook '(org-babel-execute-safely-maybe 
org-babel-lob-execute-maybe org-babel-hash-at-point
                          org-babel-execute-src-block-maybe)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-export-interblocks '((lob org-babel-exp-lob-one-liners) (src 
org-babel-exp-inline-src-blocks))
 org-occur-hook '(org-first-headline-recenter)
 org-export-preprocess-before-selecting-backend-code-hook 
'(org-beamer-select-beamer-code)
 org-export-preprocess-after-include-files-hook '(org-export-blocks-preprocess)
 org-export-latex-final-hook '(org-beamer-amend-header org-beamer-fix-toc 
org-beamer-auto-fragile-frames
                               org-beamer-place-default-actions-for-lists)
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-export-blocks '((src org-babel-exp-src-blocks nil) (comment 
org-export-blocks-format-comment t)
                     (ditaa org-export-blocks-format-ditaa nil) (dot 
org-export-blocks-format-dot nil))
 )



reply via email to

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