Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with PROMPT in org-capture-templates #1494

Closed
raghnysh opened this issue May 6, 2016 · 4 comments
Closed

Error with PROMPT in org-capture-templates #1494

raghnysh opened this issue May 6, 2016 · 4 comments

Comments

@raghnysh
Copy link

raghnysh commented May 6, 2016

My org-capture-templates value is

(("n" "General notes" entry (file+headline "~/org/notes.org" "Notes") "* %^{DESCRIPTION}\n%a%?\nAdded: %U" :prepend t :empty-lines 1)
 ("t" "Task diary" entry (file+headline "~/org/todo.org" "Tasks") "* TODO %^{DESCRIPTION}\n%a%?\nAdded: %U" :prepend t :empty-lines 1))

With this when I do M-x org-capture, I get the "Select a capture template" buffer, but when I select 'n', I get the error

org-capture: Capture abort: (error In ‘org-capture History’ source: ‘#[0 \304\302\300\305\303$\211\205)�\306\307\310\301\203$�\301\307\230\204$�\311\305\301\306\301��"B"\202%��\312\313#"\207 [nil  org-capture-template-prompt-history::DESCRIPTION nil helm-comp-read-get-candidates nil delete  helm-fast-remove-dups delq :test equal] 10]’ 
 (void-function org-capture-template-prompt-history::DESCRIPTION))

If I remove the %^{DESCRIPTION} from the templates, org-capture works fine. Of course, if I disable helm from doing org-capture, with

(setcdr (assoc 'org-capture helm-completing-read-handlers-alist) nil)

then also org-capture works as expected.

@thierryvolpiatto
Copy link
Member

N. Raghavendra notifications@github.com writes:

My org-capture-templates value is

(("n" "General notes" entry (file+headline "/org/notes.org" "Notes") "* %^{DESCRIPTION}\n%a%?\nAdded: %U" :prepend t :empty-lines 1)
("t" "Task diary" entry (file+headline "
/org/todo.org" "Tasks") "* TODO %^{DESCRIPTION}\n%a%?\nAdded: %U" :prepend t :empty-lines 1))

With this when I do M-x org-capture', I get the "Select a capture template" buffer, but when I selectn', I get the error

org-capture: Capture abort: (error In ‘org-capture History’ source: ‘#[0 \304\302\300\305\303$\211\205)

I am not sure this have something to do with helm, this looks more a org
bug or a bad configuration of your templates (can't help you I am not an
org expert).

If you want a more helpful backtrace try to load manually the
helm-org.el file, then turn on debug-on-error and see if it have some
helm errors (if helm is involved), if so send me the backtrace.

Thanks.

Thierry

@raghnysh
Copy link
Author

raghnysh commented May 6, 2016

load manually the helm-org.el file, then turn on debug-on-error and see if it have some helm errors (if helm is involved), if so send me the backtrace.

I don't know if helm is involved in producing the error, but the backtrace does mention helm. In any case, attached is a text file containing the backtrace.

Thanks.

org-capture-backtrace.txt

@thierryvolpiatto
Copy link
Member

N. Raghavendra notifications@github.com writes:

load manually the helm-org.el file, then turn on debug-on-error and see if it have some helm errors (if helm is involved), if so send me the backtrace.

I don't know if helm is involved in producing the error, but the
backtrace does mention helm.

helm tried to prepare history, found the org history function, but this
one is void, IOW the org file is not loaded, so you need perhaps to
require something in your org config.

In any case, attached is a text file containing the backtrace.

When you send a backtrace ensure to load the .el file, here you sent the
backtrace with the .elc loaded, so the backtrace is full of bytecode.
(That's my fault I told you to load the helm-org file, but it is the
helm-mode file you have to load).

Thanks.


You are receiving this because you commented.
Reply to this email directly or view it on GitHub*

Thierry

@raghnysh
Copy link
Author

raghnysh commented May 8, 2016

Thanks for looking into the backtrace. I tried requiring org and org-capture right in the beginning of my init file, and then load helm. The problem persists even then. However since

(setcdr (assoc 'org-capture helm-completing-read-handlers-alist) nil)

allows org-capture to work as expected, I will leave it as such.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants