where is default org mode capture template for tasks located
I was configuring some capture templates for org mode but when adding any new template to init file, the default TASK template disappeared.
(setq org-capture-templates
'(("t" "Todo" entry (file+headline "~/org/refile.org" "Tasks")
"* TODO %t %?n ")
("n" "Note" entry (file+headlin "~/org/notes.org")
"* %?nEntered on %Un %in %a")))
The issue is that when adding any other template, option default for tasks disappeared, but if I add a default task template, some of the expansions for template I like a lot, such as link to file or date of addition I've managed to emulate but no success so far.
where is default template code located?
org-mode org-capture
add a comment |
I was configuring some capture templates for org mode but when adding any new template to init file, the default TASK template disappeared.
(setq org-capture-templates
'(("t" "Todo" entry (file+headline "~/org/refile.org" "Tasks")
"* TODO %t %?n ")
("n" "Note" entry (file+headlin "~/org/notes.org")
"* %?nEntered on %Un %in %a")))
The issue is that when adding any other template, option default for tasks disappeared, but if I add a default task template, some of the expansions for template I like a lot, such as link to file or date of addition I've managed to emulate but no success so far.
where is default template code located?
org-mode org-capture
1
Using setq will overwrite anything bound to that variable. Try using push or add-to-list instead.
– Dan♦
5 hours ago
@Dan Actually that won't work - the default templates aren't stored in the variable, they're hard-coded as a fall-back that is only available when the actual value oforg-capture-templates
isnil
. Which is a bit counter-intuitive to me.
– Tyler
2 hours ago
@Tyler : weird, but then there’s a lot of weird stuff under the hood in the org mode source.
– Dan♦
1 hour ago
add a comment |
I was configuring some capture templates for org mode but when adding any new template to init file, the default TASK template disappeared.
(setq org-capture-templates
'(("t" "Todo" entry (file+headline "~/org/refile.org" "Tasks")
"* TODO %t %?n ")
("n" "Note" entry (file+headlin "~/org/notes.org")
"* %?nEntered on %Un %in %a")))
The issue is that when adding any other template, option default for tasks disappeared, but if I add a default task template, some of the expansions for template I like a lot, such as link to file or date of addition I've managed to emulate but no success so far.
where is default template code located?
org-mode org-capture
I was configuring some capture templates for org mode but when adding any new template to init file, the default TASK template disappeared.
(setq org-capture-templates
'(("t" "Todo" entry (file+headline "~/org/refile.org" "Tasks")
"* TODO %t %?n ")
("n" "Note" entry (file+headlin "~/org/notes.org")
"* %?nEntered on %Un %in %a")))
The issue is that when adding any other template, option default for tasks disappeared, but if I add a default task template, some of the expansions for template I like a lot, such as link to file or date of addition I've managed to emulate but no success so far.
where is default template code located?
org-mode org-capture
org-mode org-capture
edited 5 hours ago
asked 5 hours ago
Forge
1365
1365
1
Using setq will overwrite anything bound to that variable. Try using push or add-to-list instead.
– Dan♦
5 hours ago
@Dan Actually that won't work - the default templates aren't stored in the variable, they're hard-coded as a fall-back that is only available when the actual value oforg-capture-templates
isnil
. Which is a bit counter-intuitive to me.
– Tyler
2 hours ago
@Tyler : weird, but then there’s a lot of weird stuff under the hood in the org mode source.
– Dan♦
1 hour ago
add a comment |
1
Using setq will overwrite anything bound to that variable. Try using push or add-to-list instead.
– Dan♦
5 hours ago
@Dan Actually that won't work - the default templates aren't stored in the variable, they're hard-coded as a fall-back that is only available when the actual value oforg-capture-templates
isnil
. Which is a bit counter-intuitive to me.
– Tyler
2 hours ago
@Tyler : weird, but then there’s a lot of weird stuff under the hood in the org mode source.
– Dan♦
1 hour ago
1
1
Using setq will overwrite anything bound to that variable. Try using push or add-to-list instead.
– Dan♦
5 hours ago
Using setq will overwrite anything bound to that variable. Try using push or add-to-list instead.
– Dan♦
5 hours ago
@Dan Actually that won't work - the default templates aren't stored in the variable, they're hard-coded as a fall-back that is only available when the actual value of
org-capture-templates
is nil
. Which is a bit counter-intuitive to me.– Tyler
2 hours ago
@Dan Actually that won't work - the default templates aren't stored in the variable, they're hard-coded as a fall-back that is only available when the actual value of
org-capture-templates
is nil
. Which is a bit counter-intuitive to me.– Tyler
2 hours ago
@Tyler : weird, but then there’s a lot of weird stuff under the hood in the org mode source.
– Dan♦
1 hour ago
@Tyler : weird, but then there’s a lot of weird stuff under the hood in the org mode source.
– Dan♦
1 hour ago
add a comment |
1 Answer
1
active
oldest
votes
The default capture templates are only available if you haven't set a value fororg-capture-templates
, which means @Dan's suggestion of using add-to-list
won't work in this case. If you want to continue using the default tasks template in addition to your own templates, you need to add it explicitly. It takes a bit of digging to find it, hidden in the code of the function org-capture-select-template
:
'(("t" "Task" entry (file+headline "" "Tasks")
"* TODO %?n %un %a"))
In your case, you'll need something like the following:
(setq org-capture-templates
'(("t" "Todo" entry (file+headline "~/org/refile.org" "Tasks")
"* TODO %t %?n ")
("n" "Note" entry (file+headlin "~/org/notes.org")
"* %?nEntered on %Un %in %a")
("T" "Task" entry (file+headline "" "Tasks")
"* TODO %?n %un %a")))
Note that I used a capital T to distinguish it from your Todo entry.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "583"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2femacs.stackexchange.com%2fquestions%2f46794%2fwhere-is-default-org-mode-capture-template-for-tasks-located%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
The default capture templates are only available if you haven't set a value fororg-capture-templates
, which means @Dan's suggestion of using add-to-list
won't work in this case. If you want to continue using the default tasks template in addition to your own templates, you need to add it explicitly. It takes a bit of digging to find it, hidden in the code of the function org-capture-select-template
:
'(("t" "Task" entry (file+headline "" "Tasks")
"* TODO %?n %un %a"))
In your case, you'll need something like the following:
(setq org-capture-templates
'(("t" "Todo" entry (file+headline "~/org/refile.org" "Tasks")
"* TODO %t %?n ")
("n" "Note" entry (file+headlin "~/org/notes.org")
"* %?nEntered on %Un %in %a")
("T" "Task" entry (file+headline "" "Tasks")
"* TODO %?n %un %a")))
Note that I used a capital T to distinguish it from your Todo entry.
add a comment |
The default capture templates are only available if you haven't set a value fororg-capture-templates
, which means @Dan's suggestion of using add-to-list
won't work in this case. If you want to continue using the default tasks template in addition to your own templates, you need to add it explicitly. It takes a bit of digging to find it, hidden in the code of the function org-capture-select-template
:
'(("t" "Task" entry (file+headline "" "Tasks")
"* TODO %?n %un %a"))
In your case, you'll need something like the following:
(setq org-capture-templates
'(("t" "Todo" entry (file+headline "~/org/refile.org" "Tasks")
"* TODO %t %?n ")
("n" "Note" entry (file+headlin "~/org/notes.org")
"* %?nEntered on %Un %in %a")
("T" "Task" entry (file+headline "" "Tasks")
"* TODO %?n %un %a")))
Note that I used a capital T to distinguish it from your Todo entry.
add a comment |
The default capture templates are only available if you haven't set a value fororg-capture-templates
, which means @Dan's suggestion of using add-to-list
won't work in this case. If you want to continue using the default tasks template in addition to your own templates, you need to add it explicitly. It takes a bit of digging to find it, hidden in the code of the function org-capture-select-template
:
'(("t" "Task" entry (file+headline "" "Tasks")
"* TODO %?n %un %a"))
In your case, you'll need something like the following:
(setq org-capture-templates
'(("t" "Todo" entry (file+headline "~/org/refile.org" "Tasks")
"* TODO %t %?n ")
("n" "Note" entry (file+headlin "~/org/notes.org")
"* %?nEntered on %Un %in %a")
("T" "Task" entry (file+headline "" "Tasks")
"* TODO %?n %un %a")))
Note that I used a capital T to distinguish it from your Todo entry.
The default capture templates are only available if you haven't set a value fororg-capture-templates
, which means @Dan's suggestion of using add-to-list
won't work in this case. If you want to continue using the default tasks template in addition to your own templates, you need to add it explicitly. It takes a bit of digging to find it, hidden in the code of the function org-capture-select-template
:
'(("t" "Task" entry (file+headline "" "Tasks")
"* TODO %?n %un %a"))
In your case, you'll need something like the following:
(setq org-capture-templates
'(("t" "Todo" entry (file+headline "~/org/refile.org" "Tasks")
"* TODO %t %?n ")
("n" "Note" entry (file+headlin "~/org/notes.org")
"* %?nEntered on %Un %in %a")
("T" "Task" entry (file+headline "" "Tasks")
"* TODO %?n %un %a")))
Note that I used a capital T to distinguish it from your Todo entry.
answered 2 hours ago
Tyler
11.2k12049
11.2k12049
add a comment |
add a comment |
Thanks for contributing an answer to Emacs Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2femacs.stackexchange.com%2fquestions%2f46794%2fwhere-is-default-org-mode-capture-template-for-tasks-located%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
Using setq will overwrite anything bound to that variable. Try using push or add-to-list instead.
– Dan♦
5 hours ago
@Dan Actually that won't work - the default templates aren't stored in the variable, they're hard-coded as a fall-back that is only available when the actual value of
org-capture-templates
isnil
. Which is a bit counter-intuitive to me.– Tyler
2 hours ago
@Tyler : weird, but then there’s a lot of weird stuff under the hood in the org mode source.
– Dan♦
1 hour ago