Symbol’s function definition is void: org-roam-setup

Hi,

I’m fairly new to Emacs and Org/Org-roam so forgive me if I’m missing something silly.

I have:

  • Emacs: GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, cairo version 1.16.0)
    of 2021-03-27, modified by Debian
    - Framework: none
    - Org: Org mode version 9.4 (9.4-dist @ /usr/share/emacs/site-lisp/elpa/org-9.4/)
    - Org-roam: 2.1.0

When I try to C-c n f I get the following errors:

Error (use-package): org-roam/:config: Symbol’s function definition is void: org-roam-setup in the Warning buffer and

Autoloading file /usr/share/emacs/site-lisp/elpa/org-roam-1.2.3/org-roam.elc failed to define function org-roam-node-find in the mini buffer.

My init.el config is as follows:

;; Org-Roam basic configuration
(setq org-directory (concat (getenv "HOME") "/Emacs/org-notes/"))

(use-package org-roam
    :after org
    :init (setq org-roam-v2-ack t) ;; Acknowledge V2 upgrade
    :custom
    (org-roam-directory (file-truename org-directory))
    :config
    (org-roam-setup)
    :bind (("C-c n f" . org-roam-node-find)
           ("C-c n r" . org-roam-node-random)		    
           (:map org-mode-map
                 (("C-c n i" . org-roam-node-insert)
                  ("C-c n o" . org-id-get-create)
                  ("C-c n t" . org-roam-tag-add)
                  ("C-c n a" . org-roam-alias-add)
                  ("C-c n l" . org-roam-buffer-toggle)))))

Any thoughts of how I can get this to work?

Thanks

It seems that your Emacs is still trying to load version 1.2.3 (?).

The newest stable version 2.2.0 was just released yesterday. You might like to upgrade installation, making sure you have only the latest version in your system — you can safely delete the whole directory and re-install the newest version via the normal package-list-packages or package-install.

As for the initial config and “org-roam-setup”, I suggest to review this part of README. It should be org-roam-db-autosync-mode and you no longer need (setq org-roam-v2-ack t)

Wait. Is this what you obtain from Debian package manager (apt install etc?). If so you may need to remove it via apt remove or something to make the Debian package manager consistent, perhaps. I am more of a Windows user dipping my toe into Linux. I’d assume you would know what to do.

yes, indeed you are right. the Debian package was causing confusions. I removed it and also substituted (org-roam-setup) as you suggested and all works now. many thanks. hope it helps others as I was going nuts.

Probably a lesson for Debian purists like me that always try to rely on existing packages. Where things evolve quickly like in the Emacs world and where Emacs has its own package management system, probably not sensible to install all those Debian Emacs packages in the repositories

1 Like