Can't create new org-roam files because of issue `(wrong-number-of-arguments (2 . 2) 1)`

Preliminaries

  • Emacs: GNU Emacs 28.0.50 mingw32 of 2021-01-15
  • DOOM: v21.12.0-alpha
  • Org-Roam: 2.1.0
  • System OS: Windows11

What I do

  • The issue only occurs with the recent DOOM Version (but worked even this morning with the maybe very last iteration)
  • Calling org-roam-node-find
  • Put an unknown node-name (like test-file) and the below error occurs, but the following two examples work just fine
  • Simply creating an Org file works (like with browse-notes) WORKING
  • Creating an Org file with org-roam-dailies-goto-tomorrow WORKING
  • The following error occurs:
Debugger entered--Lisp error: (wrong-number-of-arguments (2 . 2) 1)
  string-glyph-decompose("Die-Moral-von-der")
  #f(compiled-function (--cl-nonspacing-mark-p-- s) #<bytecode -0x1f0219cc1a0d1aa8>)(#f(compiled-function (char) #<bytecode -0xed4abfd6e3eb0bb>) "Die-Moral-von-der")
  #f(compiled-function (node) "Return the slug of NODE." #<bytecode -0xfa36eea0cc373b3>)(#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 nil :title "Die-Moral-von-der" :properties nil :olp nil :tags nil :aliases nil :refs nil))
  apply(#f(compiled-function (node) "Return the slug of NODE." #<bytecode -0xfa36eea0cc373b3>) #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 nil :title "Die-Moral-von-der" :properties nil :olp nil :tags nil :aliases nil :refs nil) nil)
  org-roam-node-slug(#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 nil :title "Die-Moral-von-der" :properties nil :olp nil :tags nil :aliases nil :refs nil))
  #f(compiled-function (key default-val) #<bytecode 0x114c25a08f31c359>)("slug" nil)
  #f(compiled-function (md) #<bytecode 0x4ff1938f929f52d>)("${slug}")
  replace-regexp-in-string("\\${\\([^}]+\\)}" #f(compiled-function (md) #<bytecode 0x4ff1938f929f52d>) "${slug}.org" t t)
  org-roam-format-template("${slug}.org" #f(compiled-function (key default-val) #<bytecode 0x114c25a08f31c359>))
  org-roam-capture--fill-template("${slug}.org" t)
  org-roam-capture--target-truepath("${slug}.org")
  org-roam-capture--setup-target-location()
  org-roam-capture--prepare-buffer()
  org-capture-set-target-location(nil)
  #f(compiled-function (&optional goto keys) "Capture something.\n\\<org-capture-mode-map>\nThis will let you select a template from `org-capture-templates', and\nthen file the newly captured information.  The text is immediately\ninserted at the target location, and an indirect buffer is shown where\nyou can edit it.  Pressing `\\[org-capture-finalize]' brings you back to the previous\nstate of Emacs, so that you can continue your work.\n\nWhen called interactively with a `\\[universal-argument]' prefix argument GOTO, don't\ncapture anything, just go to the file/headline where the selected\ntemplate stores its notes.\n\nWith a `\\[universal-argument] \\[universal-argument]' prefix argument, go to the last note stored.\n\nWhen called with a `C-0' (zero) prefix, insert a template at point.\n\nWhen called with a `C-1' (one) prefix, force prompting for a date when\na datetree entry is made.\n\nELisp programs can set KEYS to a string associated with a template\nin `org-capture-templates'.  In this case, interactive selection\nwill be bypassed.\n\nIf `org-capture-use-agenda-date' is non-nil, capturing from the\nagenda will use the date at point as the default date.  Then, a\n`C-1' prefix will tell the capture process to use the HH:MM time\nof the day at point (if any) or the current HH:MM time." (interactive "P") #<bytecode 0x6f01de9c82e368e>)(nil "d")
  apply(#f(compiled-function (&optional goto keys) "Capture something.\n\\<org-capture-mode-map>\nThis will let you select a template from `org-capture-templates', and\nthen file the newly captured information.  The text is immediately\ninserted at the target location, and an indirect buffer is shown where\nyou can edit it.  Pressing `\\[org-capture-finalize]' brings you back to the previous\nstate of Emacs, so that you can continue your work.\n\nWhen called interactively with a `\\[universal-argument]' prefix argument GOTO, don't\ncapture anything, just go to the file/headline where the selected\ntemplate stores its notes.\n\nWith a `\\[universal-argument] \\[universal-argument]' prefix argument, go to the last note stored.\n\nWhen called with a `C-0' (zero) prefix, insert a template at point.\n\nWhen called with a `C-1' (one) prefix, force prompting for a date when\na datetree entry is made.\n\nELisp programs can set KEYS to a string associated with a template\nin `org-capture-templates'.  In this case, interactive selection\nwill be bypassed.\n\nIf `org-capture-use-agenda-date' is non-nil, capturing from the\nagenda will use the date at point as the default date.  Then, a\n`C-1' prefix will tell the capture process to use the HH:MM time\nof the day at point (if any) or the current HH:MM time." (interactive "P") #<bytecode 0x6f01de9c82e368e>) (nil "d"))
  (let ((+file-templates-inhibit t)) (apply fn args))
  +file-templates-inhibit-in-org-capture-a(#f(compiled-function (&optional goto keys) "Capture something.\n\\<org-capture-mode-map>\nThis will let you select a template from `org-capture-templates', and\nthen file the newly captured information.  The text is immediately\ninserted at the target location, and an indirect buffer is shown where\nyou can edit it.  Pressing `\\[org-capture-finalize]' brings you back to the previous\nstate of Emacs, so that you can continue your work.\n\nWhen called interactively with a `\\[universal-argument]' prefix argument GOTO, don't\ncapture anything, just go to the file/headline where the selected\ntemplate stores its notes.\n\nWith a `\\[universal-argument] \\[universal-argument]' prefix argument, go to the last note stored.\n\nWhen called with a `C-0' (zero) prefix, insert a template at point.\n\nWhen called with a `C-1' (one) prefix, force prompting for a date when\na datetree entry is made.\n\nELisp programs can set KEYS to a string associated with a template\nin `org-capture-templates'.  In this case, interactive selection\nwill be bypassed.\n\nIf `org-capture-use-agenda-date' is non-nil, capturing from the\nagenda will use the date at point as the default date.  Then, a\n`C-1' prefix will tell the capture process to use the HH:MM time\nof the day at point (if any) or the current HH:MM time." (interactive "P") #<bytecode 0x6f01de9c82e368e>) nil "d")
  apply(+file-templates-inhibit-in-org-capture-a #f(compiled-function (&optional goto keys) "Capture something.\n\\<org-capture-mode-map>\nThis will let you select a template from `org-capture-templates', and\nthen file the newly captured information.  The text is immediately\ninserted at the target location, and an indirect buffer is shown where\nyou can edit it.  Pressing `\\[org-capture-finalize]' brings you back to the previous\nstate of Emacs, so that you can continue your work.\n\nWhen called interactively with a `\\[universal-argument]' prefix argument GOTO, don't\ncapture anything, just go to the file/headline where the selected\ntemplate stores its notes.\n\nWith a `\\[universal-argument] \\[universal-argument]' prefix argument, go to the last note stored.\n\nWhen called with a `C-0' (zero) prefix, insert a template at point.\n\nWhen called with a `C-1' (one) prefix, force prompting for a date when\na datetree entry is made.\n\nELisp programs can set KEYS to a string associated with a template\nin `org-capture-templates'.  In this case, interactive selection\nwill be bypassed.\n\nIf `org-capture-use-agenda-date' is non-nil, capturing from the\nagenda will use the date at point as the default date.  Then, a\n`C-1' prefix will tell the capture process to use the HH:MM time\nof the day at point (if any) or the current HH:MM time." (interactive "P") #<bytecode 0x6f01de9c82e368e>) (nil "d"))
  org-capture(nil "d")
  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 nil :title "Die-Moral-von-der" :properties nil :olp nil :tags nil :aliases nil :refs nil) :templates nil :props (:finalize find-file :call-location #<marker at 235 in 2021-11-24.org>))
  org-roam-node-find()
  #<subr funcall-interactively>(org-roam-node-find)
  apply(#<subr funcall-interactively> org-roam-node-find)
  funcall-interactively(org-roam-node-find)
  #<subr call-interactively>(org-roam-node-find nil nil)
  apply(#<subr call-interactively> (org-roam-node-find nil nil))
  explain-pause--wrap-call-interactively(#<subr call-interactively> org-roam-node-find nil nil)
  apply(explain-pause--wrap-call-interactively #<subr call-interactively> (org-roam-node-find nil nil))
  call-interactively(org-roam-node-find nil nil)
  command-execute(org-roam-node-find)

I have just hit this too, and generated basically the identical stack trace. After updating via melpa.

And I presume (fix)node: fix org-roam-node-slug compatibility with Emacs 29.1 (#1982) · org-roam/org-roam@ae533fa · GitHub is the cause

1 Like

Oook, that comes not unexpected, since I didn’t change anything in my config. Hhhm.

And can confirm that if I manually undo that edit in the elpa/org-roam-20211123.1547 directory it works again for me.

1 Like

After my recent doom upgrade this morning, the issue is gone / resolved. Maybe they fixed it but I cannot tell since I didn’t check for the versioning today.
Thank you so much for your input on that one, and have a great day,
Jochen

Same thing happened to me, installing declaratively on NixOS. I “solved” it by removing org-roam from my configuration and installing it procedurally from within Emacs.

This has been fixed in master, sorry for the inconvenience.