Closed bdarcus closed 1 year ago
Looks good to me, I will try it out this afternoon!
When anyway in the template we can access title, author, ...; is it then still necessary to have the citar-org-roam-note-title-template
?
Actually, I'm going to just merge this. Can always fix little bugs or oversights, but it fixes an oversight in the earlier commit, so ... ;-)
Can always fix little bugs or oversights ...
... yeah, there's a bug :-(
Should be easy to fix though.
Fixed that bug. Which raises a question @trembel:
In the main code, nil properties are included. Should they be?
I have a local fix to remove them, but not sure the implications.
I'm assuming for now it's better to include the nil properties, since my assumption is org-roam will just ignore them, while if they're omitted, it will prompt for their value.
I suppose a third option is to convert nil values to empty strings.
Fixed that bug. Which raises a question @trembel:
In the main code, nil properties are included. Should they be?
I have a local fix to remove them, but not sure the implications.
I'm assuming for now it's better to include the nil properties, since my assumption is org-roam will just ignore them, while if they're omitted, it will prompt for their value.
I suppose a third option is to convert nil values to empty strings.
I don't see exactly where you mean. If org-roam asks for them, this is fine; It means "Hey, this entry is not found in the bib, please provide it". If they are nil, and org-roam does not ask, it is also fine; You can see in the org-roam note that something is missing. What never should be, is that org-roam puts "nil" as a string into the note/db
I don't see exactly where you mean. If org-roam asks for them, this is fine; It means "Hey, this entry is not found in the bib, please provide it".
No; it means "there's no data for the entry field".
I'm talking about the info plist.
Consider the case of an entry without a title.
Should I leave that out of the capture plist, or should I do:
:citar-title nil
(now):citar-title ""
Basically, in that case we don't want org-roam to prompt for the title.
I could just test this, but I figured it might be quicker to ask.
Aside: is that plist data stored in the DB?
I could just test this, but I figured it might be quicker to ask.
Easy enough to test; I just created a note with a reference with missing data.
No errors; just nothing is printed there.
So I'll leave as is, I guess.
Add
citar-org-roam--make-info-plist
function andcitar-org-roam-template-fields
defcustom to allow configurable creation oforg-roam
info plists.@trembel followup here; here's what the results currently look like.
Not tested extensively, but does this make sense? Certainly making it configurable is, but the
org-roam
title?I may be missing some nuance on capture templates. If I can remove it again and users can still configure the note title in the capture template, that may be better?
But I don't think people will want their note titles set to the reference title.
WDYT?