uliw
September 25, 2025, 2:04pm
1
I have used org-roam and org-roam-bibtex for years, without issues, but starting yesterday, I suddenly get the below error. To the best of my knowledge, I did not change anything in the configuration (or the template).
I would be grateful for any pointers on how to dig into this.
Here is the error message:
orb-edit-note caught an error during capture: Capture template ‘r’: No node at point
Interestingly enough, the note buffer is created and populated with all the data. Furthermore, saving this buffer, and then trying to access the note from the bibtex file, fails again with the same error message.
And this is the backtrace
Debugger entered–Lisp error: (error “Capture template ‘r’: No node at point”)
error(“Capture template `%s’: %s” “r” “No node at point”)
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 “f1effa47-d457-4d54-8684-07930e186b2f” :level nil :point nil :todo nil :priority nil :scheduled nil :deadline nil :title “Long-Term History of Continental Weathering and Particle\n Transport To the Sea” :properties nil :olp nil :tags nil :aliases nil :refs nil) :info (:ref “cite:&canfield-2025-long-term”))
orb–new-note(“canfield-2025-long-term”)
orb-edit-note(“canfield-2025-long-term”)
orb-bibtex-completion-edit-note((“canfield-2025-long-term”))
bibtex-completion-edit-notes((“canfield-2025-long-term”))
org-ref-open-bibtex-notes()
funcall-interactively(org-ref-open-bibtex-notes)
hydra–call-interactively-remap-maybe(org-ref-open-bibtex-notes)
org-ref-bibtex-hydra/org-ref-open-bibtex-notes-and-exit()
funcall-interactively(org-ref-bibtex-hydra/org-ref-open-bibtex-notes-and-exit)
command-execute(org-ref-bibtex-hydra/org-ref-open-bibtex-notes-and-exit)
This is my template file
title: %^{author-or-editor-abbrev} %^{year}: %^{title}
:PROPERTIES:
:ID:
:ROAM_REFS:
:Custom_ID: %^{citekey}
:URL: %^{url}
:AUTHOR: %^{author-or-editor}
:title: %^{title}
:year: %^{year}
:END:
#+startup: latexpreview
- tags ::
- keywords ::
* Notes
:PROPERTIES:
:NOTER_DOCUMENT: %^{file}
:END:
and my config looks like this:
(use-package org-roam-bibtex
:ensure t
:diminish org-roam-bibtex-mode
:after org-roam
:config
(require 'org-ref)) ; optional: if using Org-ref v2 or v3 citation links
(setq orb-roam-ref-format 'org-ref-v3)
(setq orb-insert-interface 'helm-bibtex)
(setf org-roam-mode-sections '(orb-section-reference
orb-section-abstract
org-roam-backlinks-section
org-roam-reflinks-section))
(setq orb-preformat-keywords
'("citekey" "title" "url" "author-or-editor" "keywords" "file" "date" "year" "author-or-editor-abbrev")
orb-process-file-keyword t
orb-attached-file-extensions '("pdf"))
(setq org-roam-capture-templates
'(("r" "bibliography reference" plain
(file "~/.emacs.d/org-roam-bibtex-notes-templates.org")
:target
(file"references/${citekey}.org"))
("d" "default" plain "%?"
:target (file+head "%<%Y%m%d%H%M%S>-${slug}.org"
"#+startup: latexpreview\n keywords: \n#+title: ${title}\n"
)
:unnarrowed t))
)
akashp
September 25, 2025, 2:14pm
2
It’s because your org-roam got updated. Reverse the last patch. Bugs have not been tested properly before pushing the new id creation method to the library.
Probably the ID field is not being set. Do you know how to inverse a patch? Will update later with more info. But your problem would be solved by ignoring the new patch.
akashp
September 25, 2025, 2:20pm
3
(defun undo-2056/org-roam-capture--setup-target-location ()
"Initialize the buffer, and goto the location of the new capture.
Return the ID of the location."
(let (p new-file-p)
(pcase (org-roam-capture--get-target)
(`(file ,path)
(setq path (org-roam-capture--target-truepath path)
new-file-p (org-roam-capture--new-file-p path))
(when new-file-p (org-roam-capture--put :new-file path))
(set-buffer (org-capture-target-buffer path))
(widen)
(setq p (goto-char (point-min))))
(`(file+olp ,path ,olp)
(setq path (org-roam-capture--target-truepath path)
new-file-p (org-roam-capture--new-file-p path))
(when new-file-p (org-roam-capture--put :new-file path))
(set-buffer (org-capture-target-buffer path))
(setq p (point-min))
(let ((m (org-roam-capture-find-or-create-olp olp)))
(goto-char m))
(widen))
(`(file+head ,path ,head)
(setq path (org-roam-capture--target-truepath path)
new-file-p (org-roam-capture--new-file-p path))
(set-buffer (org-capture-target-buffer path))
(when new-file-p
(org-roam-capture--put :new-file path)
(insert (org-roam-capture--fill-template head 'ensure-newline)))
(widen)
(setq p (goto-char (point-min))))
(`(file+head+olp ,path ,head ,olp)
(setq path (org-roam-capture--target-truepath path)
new-file-p (org-roam-capture--new-file-p path))
(set-buffer (org-capture-target-buffer path))
(widen)
(when new-file-p
(org-roam-capture--put :new-file path)
(insert (org-roam-capture--fill-template head 'ensure-newline)))
(setq p (point-min))
(let ((m (org-roam-capture-find-or-create-olp olp)))
(goto-char m)))
(`(file+datetree ,path ,tree-type)
(setq path (org-roam-capture--target-truepath path))
(require 'org-datetree)
(widen)
(set-buffer (org-capture-target-buffer path))
(unless (file-exists-p path)
(org-roam-capture--put :new-file path))
(funcall
(pcase tree-type
(`week #'org-datetree-find-iso-week-create)
(`month #'org-datetree-find-month-create)
(_ #'org-datetree-find-date-create))
(calendar-gregorian-from-absolute
(cond
(org-overriding-default-time
;; Use the overriding default time.
(time-to-days org-overriding-default-time))
((org-capture-get :default-time)
(time-to-days (org-capture-get :default-time)))
((org-capture-get :time-prompt)
;; Prompt for date. Bind `org-end-time-was-given' so
;; that `org-read-date-analyze' handles the time range
;; case and returns `prompt-time' with the start value.
(let* ((org-time-was-given nil)
(org-end-time-was-given nil)
(prompt-time (org-read-date
nil t nil "Date for tree entry:")))
(org-capture-put
:default-time
(if (or org-time-was-given
(= (time-to-days prompt-time) (org-today)))
prompt-time
;; Use 00:00 when no time is given for another
;; date than today?
(apply #'encode-time 0 0
org-extend-today-until
(cl-cdddr (decode-time prompt-time)))))
(time-to-days prompt-time)))
(t
;; Current date, possibly corrected for late night
;; workers.
(org-today)))))
(setq p (point)))
(`(node ,title-or-id)
;; first try to get ID, then try to get title/alias
(let ((node (or (org-roam-node-from-id title-or-id)
(org-roam-node-from-title-or-alias title-or-id)
(user-error "No node with title or id \"%s\"" title-or-id))))
(set-buffer (org-capture-target-buffer (org-roam-node-file node)))
(goto-char (org-roam-node-point node))
(setq p (org-roam-node-point node)))))
;; Setup `org-id' for the current capture target and return it back to the
;; caller.
(save-excursion
(goto-char p)
(if-let ((id (org-entry-get p "ID")))
(setf (org-roam-node-id org-roam-capture--node) id)
(org-entry-put p "ID" (org-roam-node-id org-roam-capture--node)))
(prog1
(org-id-get)
(run-hooks 'org-roam-capture-new-node-hook)))))
(advice-add 'org-roam-capture--setup-target-location :override
#'undo-2056/org-roam-capture--setup-target-location)
Let know if this fixes your problem.
uliw
September 25, 2025, 2:35pm
4
[quote=“akashp, post:3, topic:3865”]
(defun undo-2056/org-roam-capture--setup-target-location ()
"Initialize the buffer, and goto the location of the new capture.
Return the ID of the location."
(let (p new-file-p)
(pcase (org-roam-capture--get-target)
(`(file ,path)
(setq path (org-roam-capture--target-truepath path)
new-file-p (org-roam-capture--new-file-p path))
(when new-file-p (org-roam-capture--put :new-file path))
(set-buffer (org-capture-target-buffer path))
(widen)
(setq p (goto-char (point-min))))
(`(file+olp ,path ,olp)
(setq path (org-roam-capture--target-truepath path)
new-file-p (org-roam-capture--new-file-p path))
(when new-file-p (org-roam-capture--put :new-file path))
(set-buffer (org-capture-target-buffer path))
(setq p (point-min))
(let ((m (org-roam-capture-find-or-create-olp olp)))
(goto-char m))
(widen))
(`(file+head ,path ,head)
(setq path (org-roam-capture--target-truepath path)
new-file-p (org-roam-capture--new-file-p path))
(set-buffer (org-capture-target-buffer path))
(when new-file-p
(org-roam-capture--put :new-file path)
(insert (org-roam-capture--fill-template head 'ensure-newline)))
(widen)
(setq p (goto-char (point-min))))
(`(file+head+olp ,path ,head ,olp)
(setq path (org-roam-capture--target-truepath path)
new-file-p (org-roam-capture--new-file-p path))
(set-buffer (org-capture-target-buffer path))
(widen)
(when new-file-p
(org-roam-capture--put :new-file path)
(insert (org-roam-capture--fill-template head 'ensure-newline)))
(setq p (point-min))
(let ((m (org-roam-capture-find-or-create-olp olp)))
(goto-char m)))
(`(file+datetree ,path ,tree-type)
(setq path (org-roam-capture--target-truepath path))
(require 'org-datetree)
(widen)
(set-buffer (org-capture-target-buffer path))
(unless (file-exists-p path)
(org-roam-capture--put :new-file path))
(funcall
(pcase tree-type
(`week #'org-datetree-find-iso-week-create)
(`month #'org-datetree-find-month-create)
(_ #'org-datetree-find-date-create))
(calendar-gregorian-from-absolute
(cond
(org-overriding-default-time
;; Use the overriding default time.
(time-to-days org-overriding-default-time))
((org-capture-get :default-time)
(time-to-days (org-capture-get :default-time)))
((org-capture-get :time-prompt)
;; Prompt for date. Bind `org-end-time-was-given' so
;; that `org-read-date-analyze' handles the time range
;; case and returns `prompt-time' with the start value.
(let* ((org-time-was-given nil)
(org-end-time-was-given nil)
(prompt-time (org-read-date
nil t nil "Date for tree entry:")))
(org-capture-put
:default-time
(if (or org-time-was-given
(= (time-to-days prompt-time) (org-today)))
prompt-time
;; Use 00:00 when no time is given for another
;; date than today?
(apply #'encode-time 0 0
org-extend-today-until
(cl-cdddr (decode-time prompt-time)))))
(time-to-days prompt-time)))
(t
;; Current date, possibly corrected for late night
;; workers.
(org-today)))))
(setq p (point)))
(`(node ,title-or-id)
;; first try to get ID, then try to get title/alias
(let ((node (or (org-roam-node-from-id title-or-id)
(org-roam-node-from-title-or-alias title-or-id)
(user-error "No node with title or id \"%s\"" title-or-id))))
(set-buffer (org-capture-target-buffer (org-roam-node-file node)))
(goto-char (org-roam-node-point node))
(setq p (org-roam-node-point node)))))
;; Setup `org-id' for the current capture target and return it back to the
;; caller.
(save-excursion
(goto-char p)
(if-let ((id (org-entry-get p "ID")))
(setf (org-roam-node-id org-roam-capture--node) id)
(org-entry-put p "ID" (org-roam-node-id org-roam-capture--node)))
(prog1
(org-id-get)
(run-hooks 'org-roam-capture-new-node-hook)))))
(advice-add 'org-roam-capture--setup-target-location :override
#'undo-2056/org-roam-capture--setup-target-location)
[/
uliw
September 25, 2025, 2:38pm
5
I do not know how to reverse a patch, but I added your code to my startup.
Now, the note is created, and the note buffer opens as expected. However, trying to access the note from bibtex buffer afterwards, tries to capture a new note, rather than opening the existing note.
akashp
September 25, 2025, 2:49pm
6
Restart your session before trying. Remove the old note.
uliw
September 25, 2025, 2:55pm
7
thats what I did. end the emacs process, delete note, restart emacs, capture new note, save new note, then tried to open the saved note from the bibfile, which goes back to the capture dialogue. Let me know if I missed anything
akashp
September 25, 2025, 3:26pm
8
Difficult to say whats going wrong in your system. We need to debug further - do you know how to edebug?
edebug the function orb-edit-noteand figure out what is failing. Youd find this function inside org-roam-bibtex.el
When you invoke command C-M-x (eval-defun) with a prefix argument C-u on a function definition, it instruments the definition before evaluating it.
Then use
(orb-edit-note “CITEKEY”) where citekey is the key for example "morales-2017-ricar-numer” etc -
Normally this should be the output in Messages
Edebug: orb-edit-note
Result: nil
Result: nil[2 times]Result: #<hash-table equal 4/5 0x15566184847d>[3 times]Result: “morales-2017-ricar-numer”
Result: #s(org-roam-node :file “/home/akash/roam/references/notes/morales-2017-ric…” :file-title nil :file-hash nil :file-atime nil :file-mtime nil :id “2024/03/08.04:48:03” :level nil :point 1 :todo nil :priority nil :scheduled nil :deadline nil :title “Ricardo’s numerical example versus ricardian trade…” :properties nil :olp nil :tags nil :aliases nil :refs nil)[3 times]Result: #s(org-roam-node :file “/home/akash/roam/references/notes/morales-2017-ric…” :file-title nil :file-hash nil :file-atime nil :file-mtime nil :id “2024/03/08.04:48:03” :level nil :point 1 :todo nil :priority nil :scheduled nil :deadline nil :title “Ricardo’s numerical example versus ricardian trade…” :properties nil :olp nil :tags nil :aliases nil :refs nil)
Position saved to mark ring, go back with ‘M-x org-mark-ring-goto’.Result: nil
Result: nil
Result: nil
P.S. Press SPACE BAR to go line by line, etc.
akashp
September 25, 2025, 3:29pm
9
Also show output of
(orb-note-exists-p “morales-2017-ricar-numer”)
Replace with your citekey
uliw
September 25, 2025, 4:39pm
10
ok, here is what I see in the Message buffer
Edebug: orb-edit-note
Warning: ‘if-let’ is an obsolete macro (as of 31.1); use ‘if-let*’ instead.
Entering debugger...
and this is backtrace
Debugger entered--Lisp error: (void-variable “canfield-2025-long-term”)
(orb-edit-note “canfield-2025-long-term”)
(progn (orb-edit-note “canfield-2025-long-term”))
(let ((print-level nil) (print-length nil)) (progn (orb-edit-note “canfield-2025-long-term”)))
(setq elisp--eval-defun-result (let ((print-level nil) (print-length nil)) (progn (orb-edit-note “canfield-2025-long-term”))))
elisp--eval-defun()
#<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_40>()
#<subr eval-defun>(nil)
edebug--eval-defun(#<subr eval-defun> nil)
apply(edebug--eval-defun #<subr eval-defun> nil)
eval-defun(nil)
funcall-interactively(eval-defun nil)
command-execute(eval-defun)
recursive-edit()
debug(error (void-variable “canfield-2025-long-term”) :backtrace-base eval-expression--debug)
eval-expression--debug((void-variable “canfield-2025-long-term”))
uliw
September 25, 2025, 4:40pm
11
output of (orb-note-exists-p “canfield-2025-long-term”)
Debugger entered--Lisp error: (void-variable “canfield-2025-long-term”)
(orb-note-exists-p “canfield-2025-long-term”)
(progn (orb-note-exists-p “canfield-2025-long-term”))
(let ((print-level nil) (print-length nil)) (progn (orb-note-exists-p “canfield-2025-long-term”)))
(setq elisp--eval-defun-result (let ((print-level nil) (print-length nil)) (progn (orb-note-exists-p “canfield-2025-long-term”))))
elisp--eval-defun()
#<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_40>()
#<subr eval-defun>(nil)
edebug--eval-defun(#<subr eval-defun> nil)
apply(edebug--eval-defun #<subr eval-defun> nil)
eval-defun(nil)
funcall-interactively(eval-defun nil)
command-execute(eval-defun)
recursive-edit()
debug(error (void-variable “canfield-2025-long-term”) :backtrace-base eval-expression--debug)
eval-expression--debug((void-variable “canfield-2025-long-term”))
akashp
September 25, 2025, 5:02pm
12
Because you are not using the correct quotation Notice how they are different!
Somehow copy pasting the ““ from this website breaks it !! What in the world.
Please just type it out in your session.
uliw
September 25, 2025, 5:48pm
13
good catch! OK, here we go:
(orb-edit-note "canfield-2025-long-term") yields
670 (if-let ((node (orb-note-exists-p citekey)))
results in nil
now running (orb-note-exists-p "canfield-2025-long-term") directly
which also result in nil.
For good measure, I tried this with an older note I created before the update, and there orb-edit-note works as expected
akashp
September 25, 2025, 6:00pm
14
Then we have narrowed down the problem - the citekey is not found in the database.
use this website to upload your org-roam.db found in $HOME/.emacs.d/ or elsewhere if you have set.
Then go to the “refs” table and narrow down the type to “cite” to get all the CITEKEYS
Hopefully youdn’t find your citekey there - if that is the case - we need to investigate why the entry is not pushed to the database. Give us more data - paste the file contents as is after capture and so on.
uliw
September 25, 2025, 6:17pm
15
ok, I can confirm that the citekey is indeed missing from org-roam.db
akashp
September 25, 2025, 6:25pm
16
Try pushing a bunch of synthetic random citekeys - just use capture and use the template - we are testing if after capturing a bunch of files they are pushed into the database or not. Push 3-4 different captures and test.
akashp
September 25, 2025, 6:32pm
18
result? do they appear in the database? make sure to reupload to remove old stale in the website
uliw
September 25, 2025, 6:40pm
19
they do not appear in the db
akashp
September 25, 2025, 6:42pm
20
paste one of the newly captured files please - I want to see the field