org-roam / org-roam-bibtex

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

Org-roam-bibtex: problems after upgrade (ORB, Org-roam, Org) #221

Closed lazzalazza closed 2 years ago

lazzalazza commented 2 years ago

Describe the bug

After upgrading to version 20211106.1133 on Spacemacs, clicking on a cite: link doesn't lead to anything, but only returns "Position saved to mark ring, go back to 'C-c &'". If the link doesn't have notes connected to it and i try to create a new one, I sometimes get a "peculiar error". I don't know if anyone else is experiencing the same problem...

EDIT: sorry, I understood why I could not replicate the behaviour easily. ORB created notes autonomously after just trying to open a "cite:" link for the second time. This is the error I get when I try to create a new note on the first occurrence.

Debugger entered--Lisp error: (org-roam-format-resolve . "${title}") signal(org-roam-format-resolve "${title}")

f(compiled-function (md) #<bytecode -0x11bc6959cd25a165>)("${title}")

replace-regexp-in-string("\${\([^}]+\)}" #f(compiled-function (md) #<bytecode -0x11bc6959cd25a165>) "#+title: Inserra, S. - ${title}\n#+startup: content..." t t) org-roam-format-template("#+title: Inserra, S. - ${title}\n#+startup: content..." #) org-roam-capture--fill-template("#+title: Inserra, S. - ${title}\n#+startup: content..." t) org-roam-capture--setup-target-location() org-roam-capture--prepare-buffer() org-capture-set-target-location(nil) org-capture(nil "r") org-roam-capture-(:node #s(org-roam-node :file nil :file-title nil :file-hash nil :file-atime nil :file-mtime nil :id nil :level nil :point nil :todo nil :priority nil :scheduled nil :deadline "La biblioteca di federico de roberto" :title nil :properties nil :olp nil :tags nil :aliases nil :refs orb--new-note("inserra2017a") orb-edit-note("inserra2017a") orb-bibtex-completion-edit-note(("inserra2017a")) bibtex-completion-edit-notes(("inserra2017a")) org-ref-open-notes-at-point() funcall-interactively(org-ref-open-notes-at-point) hydra--call-interactively-remap-maybe(org-ref-open-notes-at-point) org-ref-citation-hydra/org-ref-open-notes-at-point-and-exit() funcall-interactively(org-ref-citation-hydra/org-ref-open-notes-at-point-and-exit) command-execute(org-ref-citation-hydra/org-ref-open-notes-at-point-and-exit)

Expected behavior The note should be opened or created if necessary.

ORB configuration

  (org-roam-bibtex-mode)
  (setq org-roam-capture-templates
        '(("d" "default" plain
           "%?"
           :if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n#+startup: content\n\n")
           :unnarrowed t)
          ("r" "bibliography reference" plain
           "%?
# Spazio per note di carattere generale\n\n* TODO Note al testo\n:PROPERTIES:\n:Custom_ID: %^{citekey}\n:NOTER_DOCUMENT: %^{file}\n:END:\n\n"
           :target
           (file+head "${citekey}.org" "#+title: ${author} - ${title}\n#+startup: content\n")
           :unnarrowed t)
          ))

  (setq orb-insert-interface 'helm-bibtex)

  (setq orb-insert-link-description 'citekey)

Environment (please complete the following information):

Screenshots If applicable, add screenshots to help explain your problem.

myshevchuk commented 2 years ago

Hi @lazzalazza. This is probably caused by recent upgrade of Org-roam or Org. Quit Spacemacs, remove Org, Org-roam and Org-roam-bibtex packages, in particular the *.elc files and reinstall. This worked for me.

lazzalazza commented 2 years ago

@myshevchuk Hi! Thank you so much, your solution worked splendidly!

myshevchuk commented 2 years ago

Great! I'm glad it's solved!