* Trouble with capture template and prompt
@ 2016-09-06 10:20 Bart Bunting
0 siblings, 0 replies; 8+ messages in thread
From: Bart Bunting @ 2016-09-06 10:20 UTC (permalink / raw)
To: emacs-orgmode
Hi,
I have the following capture template defined in the customize
interface.
It used to work ok but now gives a cryptic (well at least to me) error:
I've narrowed down the bit that is breaking to the title prompt
definition.
Can anyone point out what I'm doing wrong.
I'm running org-mode from master compiled this morning.
This is not a new problem it's been around for a while I just haven't
tried to chase it down.
Here is the custom definition:
INS DEL Choice: Value Menu Template entry:
Keys : t
Description : todo
Capture Type : Value Menu Org entry
Target location: Value Menu File:
Filename : Value Menu Literal: ~/.org/refile.org
Template : Value Menu String: * TODO %^{Todo}
%u
%a
%?
Plist:
[ ] Key: :prepend t
[ ] Key: :immediate-finish t
[ ] Key: :jump-to-captured t
[ ] Key: :empty-lines 1
[ ] Key: :empty-lines-before 1
[ ] Key: :empty-lines-after 1
[X] Key: :clock-in t
[ ] Key: :clock-keep t
[X] Key: :clock-resume t
[ ] Key: :unnarrowed t
[ ] Key: :table-line-pos t
[ ] Key: :kill-buffer t
INS
The error that is shown in the messages buffer is:
Template key:
Capture abort: (error Key sequence C-c ! starts with non-prefix key C-c)
Any help would be appreciated.
Kind regards
Bart
--
Bart Bunting
^ permalink raw reply [flat|nested] 8+ messages in thread
* Trouble with capture template and prompt
@ 2016-09-12 13:32 Bart Bunting
2016-09-12 23:17 ` Adam Porter
0 siblings, 1 reply; 8+ messages in thread
From: Bart Bunting @ 2016-09-12 13:32 UTC (permalink / raw)
To: emacs-orgmode
Hi,
Tried to send this to the list a few days back but don't think it made
it.
Sorry if it is duplicated.
-----
Hi,
I have the following capture template defined in the customize
interface.
It used to work ok but now gives a cryptic (well at least to me) error:
I think I've narrowed down the part that is breaking to the title prompt
definition.
Can anyone point out what I'm doing wrong.
I'm running org-mode from master compiled this morning.
This is not a new problem it's been around for a while I just haven't
tried to chase it down.
Here is the custom definition:
INS DEL Choice: Value Menu Template entry:
Keys : t
Description : todo
Capture Type : Value Menu Org entry
Target location: Value Menu File:
Filename : Value Menu Literal: ~/.org/refile.org
Template : Value Menu String: * TODO %^{Todo}
%u
%a
%?
Plist:
[ ] Key: :prepend t
[ ] Key: :immediate-finish t
[ ] Key: :jump-to-captured t
[ ] Key: :empty-lines 1
[ ] Key: :empty-lines-before 1
[ ] Key: :empty-lines-after 1
[X] Key: :clock-in t
[ ] Key: :clock-keep t
[X] Key: :clock-resume t
[ ] Key: :unnarrowed t
[ ] Key: :table-line-pos t
[ ] Key: :kill-buffer t
INS
The error that is shown in the messages buffer is:
Template key:
Capture abort: (error Key sequence C-c ! starts with non-prefix key C-c)
Any help would be appreciated.
Kind regards
Bart
Kind regards
Bart
--
Bart Bunting
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Trouble with capture template and prompt
2016-09-12 13:32 Trouble with capture template and prompt Bart Bunting
@ 2016-09-12 23:17 ` Adam Porter
2016-09-13 20:00 ` Bart Bunting
0 siblings, 1 reply; 8+ messages in thread
From: Adam Porter @ 2016-09-12 23:17 UTC (permalink / raw)
To: emacs-orgmode
Bart Bunting <bart@bunting.net.au> writes:
> The error that is shown in the messages buffer is:
>
> Template key:
> Capture abort: (error Key sequence C-c ! starts with non-prefix key C-c)
I think this means that you have tried to specify the capture template
key incorrectly. It would be helpful if you could show us the elisp
code that defines the template rather than the customize-option screen.
:) e.g.:
#+BEGIN_SRC elisp
'(("a" "Appointment" entry
(file+datetree+prompt
(concat org-directory "/calendar.org")
"Calendar")
"* %^{Description} %T %^G\n\n%U %?" :clock-in t :clock-resume t)
("t" "Task" entry
(file "")
"* TODO %^{Description} %^G\n\n%U %?" :clock-in t :clock-resume t))
#+END_SRC
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Trouble with capture template and prompt
2016-09-12 23:17 ` Adam Porter
@ 2016-09-13 20:00 ` Bart Bunting
2016-09-14 4:47 ` Adam Porter
0 siblings, 1 reply; 8+ messages in thread
From: Bart Bunting @ 2016-09-13 20:00 UTC (permalink / raw)
To: Adam Porter, emacs-orgmode
Adam,
Here it is from .customize.
Several of the entries I do not use but thought I should include the
entire variable.
'(org-capture-templates
(quote
(("t" "todo" entry
(file "~/.org/refile.org")
"* TODO %^{Todo}
%u
%a
%?" :clock-in t :clock-resume t)
("r" "respond" entry
(file "~/.org/refile.org")
"* NEXT Respond to %:from on %:subject
SCHEDULED: %t
%U
%a
" :immediate-finish t :clock-in t :clock-resume t)
("n" "note" entry
(file "~/.org/refile.org")
"* %? :NOTE:
%U
%a
" :clock-in t :clock-resume t)
("j" "Journal" entry
(file+datetree "~/.org/diary.org")
"* %?
%U
" :clock-in t :clock-resume t)
("w" "org-protocol" entry
(file "~/.org/refile.org")
"* TODO Review %c
%U
" :immediate-finish t)
("m" "Meeting" entry
(file "~/.org/refile.org")
"* MEETING with %? :MEETING:
%U" :clock-in t :clock-resume t)
("p" "password" entry
(file "~/filing/p/passwords.gpg")
"* %^{Title}
%^{USERNAME}p %^{PASSWORD}p")
("P" "Phone call" entry
(file "~/.org/refile.org")
"* PHONE %? :PHONE:
%U" :clock-in t :clock-resume t)
("h" "Habit" entry
(file "~/.org/refile.org")
"* NEXT %?
%U
%a
SCHEDULED: %(format-time-string \"<%Y-%m-%d %a .+1d/3d>\")
:PROPERTIES:
:STYLE: habit
:REPEAT_TO_STATE: NEXT
:END:
"))))
Kind regards
Adam Porter <adam@alphapapa.net> writes:
> Bart Bunting <bart@bunting.net.au> writes:
>
>> The error that is shown in the messages buffer is:
>>
>> Template key:
>> Capture abort: (error Key sequence C-c ! starts with non-prefix key C-c)
>
> I think this means that you have tried to specify the capture template
> key incorrectly. It would be helpful if you could show us the elisp
> code that defines the template rather than the customize-option screen.
> :) e.g.:
>
> #+BEGIN_SRC elisp
> '(("a" "Appointment" entry
> (file+datetree+prompt
> (concat org-directory "/calendar.org")
> "Calendar")
> "* %^{Description} %T %^G\n\n%U %?" :clock-in t :clock-resume t)
> ("t" "Task" entry
> (file "")
> "* TODO %^{Description} %^G\n\n%U %?" :clock-in t :clock-resume t))
> #+END_SRC
>
>
Bart
--
Bart Bunting
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Trouble with capture template and prompt
2016-09-13 20:00 ` Bart Bunting
@ 2016-09-14 4:47 ` Adam Porter
2016-09-14 12:17 ` Bart Bunting
0 siblings, 1 reply; 8+ messages in thread
From: Adam Porter @ 2016-09-14 4:47 UTC (permalink / raw)
To: emacs-orgmode
Bart Bunting <bart@bunting.net.au> writes:
> Several of the entries I do not use but thought I should include the
> entire variable.
Hi Bart,
Well, that looks okay to me. Going back to the original error message
you provided, isn't C-c ! bound to insert an inactive org timestamp by
default? It's strange that it would be involved here.
I think that whatever is the problem, it's not in the capture templates,
but somewhere else in your Org config. But I would suggest, as a first
step, trying to reduce the problematic capture template to the bare
minimum, item by item, to see if you can make it work without the error.
If you can, whatever you remove that's causing it should point you
toward the problem.
One other thing, you said that that code is from .customize. Is there
anything related to the capture templates in your other config files?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Trouble with capture template and prompt
2016-09-14 4:47 ` Adam Porter
@ 2016-09-14 12:17 ` Bart Bunting
2016-09-14 13:48 ` Nick Dokos
2016-09-15 16:57 ` Adam Porter
0 siblings, 2 replies; 8+ messages in thread
From: Bart Bunting @ 2016-09-14 12:17 UTC (permalink / raw)
To: Adam Porter, emacs-orgmode
Adam,
I sort of had already narrowed it down but am unsure of how to debug
further.
Removing %^{Todo} from the template and everything works.
Of course the thing that doesn't work is that org no longer prompts me
for the title of the task to create which makes me sad :).
Any suggestions on how to dig into this further?
Here is the output when debug-on-error is set to t:
Debugger entered--Lisp error: (error "Capture abort: (error Key sequence C-c ! starts with non-prefix key C-c)")
signal(error ("Capture abort: (error Key sequence C-c ! starts with non-prefix key C-c)"))
error("Capture abort: %s" (error "Key sequence C-c ! starts with non-prefix key C-c"))
org-capture(nil)
#<subr funcall-interactively>(org-capture nil)
apply(#<subr funcall-interactively> org-capture nil)
ad-Advice-funcall-interactively(#<subr funcall-interactively> org-capture nil)
apply(ad-Advice-funcall-interactively #<subr funcall-interactively> (org-capture nil))
funcall-interactively(org-capture nil)
#<subr call-interactively>(org-capture nil nil)
ad-Advice-call-interactively(#<subr call-interactively> org-capture nil nil)
apply(ad-Advice-call-interactively #<subr call-interactively> (org-capture nil nil))
call-interactively(org-capture nil nil)
command-execute(org-capture)
I have some other bits of org config in my main config file but not sure
that they would cause breakage like this.
The other thing is that I use emacspeak which is probably the advice
calls shown in the debug above. Hard for me to test without it though
as then I can't use emacs.
Could try ripping out almost all of the org config and see if that
helps.
I could also try an earlier version of emacspeak in case the error is
being caused by the advice in some strange way.
Kind regards
Bart
Adam Porter <adam@alphapapa.net> writes:
> Bart Bunting <bart@bunting.net.au> writes:
>
>> Several of the entries I do not use but thought I should include the
>> entire variable.
>
> Hi Bart,
>
> Well, that looks okay to me. Going back to the original error message
> you provided, isn't C-c ! bound to insert an inactive org timestamp by
> default? It's strange that it would be involved here.
>
> I think that whatever is the problem, it's not in the capture templates,
> but somewhere else in your Org config. But I would suggest, as a first
> step, trying to reduce the problematic capture template to the bare
> minimum, item by item, to see if you can make it work without the error.
> If you can, whatever you remove that's causing it should point you
> toward the problem.
>
> One other thing, you said that that code is from .customize. Is there
> anything related to the capture templates in your other config files?
>
>
Bart
--
Bart Bunting
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Trouble with capture template and prompt
2016-09-14 12:17 ` Bart Bunting
@ 2016-09-14 13:48 ` Nick Dokos
2016-09-15 16:57 ` Adam Porter
1 sibling, 0 replies; 8+ messages in thread
From: Nick Dokos @ 2016-09-14 13:48 UTC (permalink / raw)
To: emacs-orgmode
Bart Bunting <bart@bunting.net.au> writes:
> Adam,
>
> I sort of had already narrowed it down but am unsure of how to debug
> further.
>
> Removing %^{Todo} from the template and everything works.
>
> Of course the thing that doesn't work is that org no longer prompts me
> for the title of the task to create which makes me sad :).
>
> Any suggestions on how to dig into this further?
>
> Here is the output when debug-on-error is set to t:
>
> Debugger entered--Lisp error: (error "Capture abort: (error Key sequence C-c ! starts with non-prefix key C-c)")
> signal(error ("Capture abort: (error Key sequence C-c ! starts with non-prefix key C-c)"))
> error("Capture abort: %s" (error "Key sequence C-c ! starts with non-prefix key C-c"))
> org-capture(nil)
> #<subr funcall-interactively>(org-capture nil)
> apply(#<subr funcall-interactively> org-capture nil)
> ad-Advice-funcall-interactively(#<subr funcall-interactively> org-capture nil)
> apply(ad-Advice-funcall-interactively #<subr funcall-interactively> (org-capture nil))
> funcall-interactively(org-capture nil)
> #<subr call-interactively>(org-capture nil nil)
> ad-Advice-call-interactively(#<subr call-interactively> org-capture nil nil)
> apply(ad-Advice-call-interactively #<subr call-interactively> (org-capture nil nil))
> call-interactively(org-capture nil nil)
> command-execute(org-capture)
>
See if you can get a backtrace with uncompiled code: it is much more informative.
See
(info "(org) Feedback")
in particular the section "How to create a useful backtrace".
> I have some other bits of org config in my main config file but not sure
> that they would cause breakage like this.
>
> The other thing is that I use emacspeak which is probably the advice
> calls shown in the debug above. Hard for me to test without it though
> as then I can't use emacs.
>
> Could try ripping out almost all of the org config and see if that
> helps.
>
> I could also try an earlier version of emacspeak in case the error is
> being caused by the advice in some strange way.
>
--
Nick
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Trouble with capture template and prompt
2016-09-14 12:17 ` Bart Bunting
2016-09-14 13:48 ` Nick Dokos
@ 2016-09-15 16:57 ` Adam Porter
1 sibling, 0 replies; 8+ messages in thread
From: Adam Porter @ 2016-09-15 16:57 UTC (permalink / raw)
To: emacs-orgmode
Bart Bunting <bart@bunting.net.au> writes:
Hi Bart,
> I sort of had already narrowed it down but am unsure of how to debug
> further.
>
> Removing %^{Todo} from the template and everything works.
Just a shot in the dark, which shouldn't make any difference, but try
this template, which works for me:
#+BEGIN_SRC elisp
("t" "Task" entry
(file "")
"* TODO %^{Description} %^G
%U %?" :clock-in t :clock-resume t)
#+END_SRC
You might also try replacing %^{Todo} with %^{Description}, just for fun.
> Any suggestions on how to dig into this further?
That backtrace doesn't seem helpful to me either. Maybe Nick's advice
will help here. :)
> I have some other bits of org config in my main config file but not sure
> that they would cause breakage like this.
Hard to say without testing. If nothing else works, try using the
bug-hunter package from MELPA to bisect your config, keeping the
template unchanged (i.e. you could eval the template manually when
testing). If there is something in your config causing it, this should
narrow it down for you.
> The other thing is that I use emacspeak which is probably the advice
> calls shown in the debug above. Hard for me to test without it though
> as then I can't use emacs.
That definitely makes it much more challenging. I'm sorry I can't be
much help here, as I know nothing about emacspeak.
> I could also try an earlier version of emacspeak in case the error is
> being caused by the advice in some strange way.
If it's not too time-consuming, that'd be a good idea too.
Also, sorry if you already mentioned this, but you might try using a
newer version of Org if possible.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2016-09-15 16:58 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-12 13:32 Trouble with capture template and prompt Bart Bunting
2016-09-12 23:17 ` Adam Porter
2016-09-13 20:00 ` Bart Bunting
2016-09-14 4:47 ` Adam Porter
2016-09-14 12:17 ` Bart Bunting
2016-09-14 13:48 ` Nick Dokos
2016-09-15 16:57 ` Adam Porter
-- strict thread matches above, loose matches on Subject: below --
2016-09-06 10:20 Bart Bunting
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).