From: Daniel Hackney <dan@haxney.org>
To: emacs-orgmode@gnu.org
Subject: Bug: org-capture: confusing error for invalid template format [7.3] [7.3]
Date: Tue, 09 Nov 2010 01:52:36 -0500 [thread overview]
Message-ID: <877hgnq98r.fsf@haxney.org> (raw)
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" "Índex" "Peus de pàgina")
("cs" "Autor" "Datum" "Obsah" "Pozn\341mky pod carou")
("da" "Ophavsmand" "Dato" "Indhold" "Fodnoter")
("de" "Autor" "Datum" "Inhaltsverzeichnis" "Fußnoten")
("eo" "Aŭtoro" "Dato" "Enhavo" "Piednotoj")
("es" "Autor" "Fecha" "Índice" "Pies de página")
("fi" "Tekijä" "Päivämäärä" "Sisällysluettelo"
"Alaviitteet")
("fr" "Auteur" "Date" "Table des matières" "Notes de bas de page")
("hu" "Szerzõ" "Dátum" "Tartalomjegyzék" "Lábjegyzet")
("is" "Höfundur" "Dagsetning" "Efnisyfirlit" "Aftanmálsgreinar")
("it" "Autore" "Data" "Indice" "Note a piè 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ści" "Przypis")
("sv" "Författare" "Datum" "Innehå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 other threads:[~2010-11-09 6:52 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877hgnq98r.fsf@haxney.org \
--to=dan@haxney.org \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).