Comments (6)
First of all, thanks for this package. It works wonderfully for me :)
Glad you're liking it!
The correct way to do it is:
(setq org-roam-bibtex-template `(("r" "ref" plain (function org-roam-capture--get-point) "" :file-name "${=key=}" :head ,(concat "#+TITLE: ${=key=}: ${title}\n" "#+ROAM_KEY: ${ref}\n" "- tags ::\n" :unnarrowed t)))
Note the backquote =`= and the =,=.
You don't actually need to do that. Compare:
(setq org-roam-bibtex-template
'(("r" "ref" plain (function org-roam-capture--get-point) ""
:file-name "${=key=}"
:head "#+TITLE: ${=key=}: ${title}\n#+ROAM_KEY: ${ref}\n- tags ::\n"
:unnarrowed t)))
:head
accepts a string argument, not a sexp that returns a string argument. Your original solution works, yes, but here, you can just manually concatenate the string by joining all the parts.
from org-roam-bibtex.
Ok, I could figure it out, so instead of deleting the issue, I post the answer I found here: https://emacs.stackexchange.com/questions/38757/cannot-use-concat-within-org-capture-template
The correct way to do it is:
(setq org-roam-bibtex-template
`(("r" "ref" plain (function org-roam-capture--get-point) ""
:file-name "${=key=}"
:head ,(concat "#+TITLE: ${=key=}: ${title}\n"
"#+ROAM_KEY: ${ref}\n"
"- tags ::\n"
:unnarrowed t)))
Note the backquote =`= and the =,=.
from org-roam-bibtex.
Thanks for the tip, but I actually plan to have quite large template like:
(setq org-roam-bibtex-template
`(("r" "ref" plain (function org-roam-capture--get-point) ""
:file-name "${=key=}"
:head ,(concat "#+TITLE: ${=key=}: ${title}\n"
"#+ROAM_KEY: ${ref}\n"
"- Tags :: %?\n"
"- Author(s) :: ${author}\n"
"- Year :: ${year}\n"
"\n"
"* Notes :ignore:\n"
":PROPERTIES:\n"
":NOTER_DOCUMENT: ../pdfs/${=key=}.pdf\n"
":END:\n")
:unnarrowed t)))
Which would be quite unreadable without the concat
in my opinion.
from org-roam-bibtex.
I agree that it'd get unwieldy quite quickly. I only mentioned this because it saves a few keystrokes and saves an eval, but since it's only a setq
assignment for your config, it's a-OK. 👍
from org-roam-bibtex.
Thanks for the tip, but I actually plan to have quite large template like:
You might be interested in using a file-template as explained in #10.
from org-roam-bibtex.
Thanks for the tip, but I actually plan to have quite large template like:
You might be interested in using a file-template as explained in #10.
Thanks! I was not aware of this very nice option :).
from org-roam-bibtex.
Related Issues (20)
- Suggestion: Exported org-roam links in PDF output should point to PDF files, not org files HOT 1
- Unable to create new notes HOT 3
- API changes in citar HOT 3
- Question : how to use org-roam-bibtex HOT 1
- can not insert a new node with ivy-bibtex HOT 1
- does ivy-bibtex abandoned? then how to add a node with out insert the link? HOT 1
- Considering add a functon to add new node only? HOT 2
- No file uri printed out when used with org-cite HOT 1
- add keyword to merge date and year
- [Documentation fix] Citar integration is handled differently now HOT 2
- Support git-annex type storage of attachments HOT 3
- Bind orb-note-actions HOT 1
- org-roam V2 capture template defaults HOT 1
- One note file for all bib entries HOT 1
- Keeping bibtex citekey and org-roam handle in sync when changing one or the other HOT 2
- helm-bibtex doesn't work from everywhere when org-roam-bibtex-mode enabled HOT 1
- ORB always prompting for template capture, even if the node already exists HOT 5
- Note actions: optionally look up cite key in parent hierarchy HOT 2
- org-capure-finish did not close capture buffer, but maximized it. HOT 1
- working example of org-roam-bibtex with ciatar HOT 1
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 org-roam-bibtex.