Comments (7)
By the way, you may want to consider replacing
(lambda () (denote-org-capture-with-prompts :title :keywords :subdirectory nil :template)))
with
(lambda () (let ((denote-prompts '(title keywords subdirectory template))) (denote-org-capture)))
because it is more flexible (supports signature and reordering) and denote-org-capture-with-prompts
may be removed eventually (maybe).
from denote.
I merged @jeanphilippegg changes. Thank you!
from denote.
(denote-template-prompt)
prompts for a symbol which is used to select the correct string template in denote-templates
.
I am wondering how you are able to input something in (denote-template-prompt)
. The way it is coded it is required that there is a match with some symbols in denote-templates
. Even with the standard denote
command, it requires a symbol.
from denote.
Yes, I get prompted for the choice of template in both cases (denote-template
and denote-org-capture-with-prompts
). The correct template is selected and used when I try denote-template
.
from denote.
I could reproduce this issue. Should be fixed in #303 !
from denote.
@jeanphilippegg and @protesilaos, is it possible to use the templates defined in denote-template
in 'org-capture-template`? For example, can I use resonance in the template defined above in @psmith1303's example? That is
(setq org-capture-templates
'(
("g" "General" resonance
(file denote-last-path)
(function
(lambda ()
(let ((denote-directory (file-name-as-directory (concat (denote-directory) "general"))
(denote-prompts '(template))
(denote-org-capture))))
…..
I tried this and it is still prompting for the template.
from denote.
If I understand correctly, what you want is to "not prompt for a template and use a specific one automatically". Though this was not the object of this issue, we have added some code to allow that in the latest code (or the upcoming version 3.0.0).
You will have to use the new denote-use-template
variable. (There are other variants for other file name components.)
Here is an example you can adapt to your needs:
(setq denote-templates '((resonance . "the resonance template")))
(setq org-capture-templates
'(("g" "General" plain
(file denote-last-path)
(function
(lambda ()
(let ((denote-directory (file-name-as-directory (concat (denote-directory) "general")))
(denote-prompts '(title keywords))
(denote-use-template 'resonance))
(denote-org-capture)))))))
This org-capture-template will prompt for a title and keywords and will use the resonance
template automatically (without prompting).
from denote.
Related Issues (20)
- When ~denote-org-capture-specifiers~ don't include a format specificer for a link don't call ~org-get-id-create~ HOT 5
- Suggestion a denote-keyword-append function. HOT 12
- error with denote-files-matching-regexp-prompt HOT 5
- Nested silo interferes with `denote-directory-files` (was: "dblock enhancement add a silo target") HOT 10
- denote-rename-file-title ==> Destination file xxx already exists HOT 13
- Make default file permission configurable HOT 2
- How to make heading with custom_id properties searchable? HOT 3
- Backlinks buffer links not working with nested dirs HOT 1
- `denote-create-note` silently HOT 3
- "No links found" when using `denote-find-link` in denote files inside a silo HOT 10
- When exporting all my notes to Markdown, `denote:` links point to `.org` files HOT 7
- Cannot insert links in org indirect buffer HOT 3
- Only use ASCII in file names HOT 7
- A general way to exclude files matching regexp from dblocks and maybe more (was: Exclude keywords while using dblocks) HOT 2
- Lisp error: (void-function denote-link-buttonize-buffer) HOT 1
- Feature request : adding an option to list empty or non-empty notes with denote-sort-dired HOT 1
- denote-rename-file and real-auto-save HOT 5
- Dynamic block backlinks to this-heading-only doesn't work? HOT 4
- [Feature Request] Add indicator of current silo in the prompt when running denote commands HOT 3
- Prettification of links to Denote attachments HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from denote.