org-roam / org-roam-bibtex

Org Roam integration with bibliography management software
GNU General Public License v3.0
572 stars 47 forks source link

org-roam V2 capture template defaults #261

Closed albertfgu closed 1 year ago

albertfgu commented 1 year ago

I recently upgraded all my packages and ported everything from org-roam V1 to org-roam V2. I now have everything up and running, but the way the capture template system changed is a lot less convenient than before and I'm wondering if I did something wrong or there's an easy way to improve it.

Previously, I had both the variables org-roam-capture-templates and orb-templates set. Now they are consolidated, and my updated variable looks like

   (setq org-roam-capture-templates
         '(
           ("d" "default" plain "%?" :target
             (file+head "${slug}.org"
             "#+TITLE: ${title}\n#+CREATED:  %U\n#+MODIFIED: %U\n#+ROAM_ALIAS:\n#+ROAM_TAGS:\n- related ::")
            :unnarrowed t)

          ("r" "bibliography reference" plain "%?"
           ;; "%^{author} published %^{entry-type} in %^{date}: fullcite:%\\1." ;; example template from docs but it doesn't look good
           :target
           (file+head "bibtex/${citekey}.org"
            "#+TITLE: ${title} (${author-abbrev} ${date}) \n#+ROAM_KEY: ${ref}\n#+CREATED:  %U\n#+MODIFIED: %U\n- Authors :: ${author}")
            :unnarrowed t)
          )
         )

However, now every time I create any sort of capture (e.g. a new org-roam node, or a new org-roam-bibtex note file), it always prompts me to choose between the two templates. Previously, it would choose automatically:

  1. Creating a new note from org-roam-node-find or org-roam-node-insert would use the default template (previously org-roam-capture-templates)
  2. Creating a new note from a bib (my workflow was helm-bibtex -> C-z -> F9; incidentally, is there a better way to do this?) would use the orb-templates

Is there a way to recreate this functionality? It's a lot more convenient


Beyond this, I noticed that creating any new note (even with the default template) -- or sometimes even accessing existing nodes -- is significantly slower than it used to be. When accessing a note with org-roam-node-find, I get a message "Done (re)loading bibliography." at the bottom, even when the file contains nothing related to bibtex. Similarly when creating a new note, I get that message, and there is some noticeable lag before the capture pops up. It wasn't like this with my old V1 setup. Is this supposed to happen?

myshevchuk commented 1 year ago

Hi,

  1. There is of course a way to recreate it and some work has been done toward it including on the upstream's side. But since no one really complained, it staggered. It doesn't bother me personally. I'll look at it but don't expect quick progress.

  2. I don't experience any slowdowns with opening ORB notes, although I do occasionally see messages "Done (re)loading bibliography". I'm not sure which package produces them, but definitely not ORB. Either Bibtex-completion, Org-ref, or Citar. If you could figure out which package produces them and report in a separate issue, I could look into whether this is due to the interaction with ORB/Org-roam.

I'm closing this issue as a duplicate of https://github.com/org-roam/org-roam-bibtex/issues/206.