Trying to install org-roam on a newly compiled emacs 26.3 with a minimal init.el under Ubuntu 18.04. Stable melpa is up and running, sqlite3 is on the load-path. When I try to install org-mode, it complains that no emacsql-sqlite3-1.0.0 can be found. Melpa doesn’t know of a emacsql-sqlite3-1.0.0, and installing emacsql-sqlite3 doesn’t satisfy the org-roam installation. Is it me, the current emacs version, or the install package?
And have since found the Troubleshooting article, and following its steps org-roam installed and showed no interest in the non-existent emacsql-sqlite3-1.0.0. My “minimal init.el” was indeed minimal, so I may play some to try to find what was the problem, or I may just move on, ego properly diminished.
Would you like to try MELPA, instead of MELPA Stable?
Thanks - with an even leaner init.el I was able to install (and the emacsql-sqlite3 is emacsql-sqlite3-20200628.250. I have no idea where the 1.0.0 came from. I’m still getting some weird results as I try to bring org-roam up. It’s initializing just fine, creating the database in my org-roam folder, and when I try to create a new file I get a “symbol function is void” error: “Capture template ‘d’: Symbol’s function definition is void: org-show-all. Please adjust ‘org-roam-capture-templates’”
Curiouser and curiouser. I’ll keep at it, short of fiddling with the org-mode code…
Thanks again.
Yes, weird, indeed. Sounds like either Org mode is not loaded before Org-roam, or Org mode needs upgrading…
Thanks so much for your help.
Org was installed by org-roam (I threw away my old configuration and started over) so I assume that it’s version is OK - here’s how org and org-roam are called:
;; configuring org-mode
(require 'org)
(global-set-key “\C-cl” 'org-store-link)
(global-set-key “\C-ca” 'org-agenda)
(global-set-key “\C-cc” 'org-capture)
(global-set-key “\C-cb” 'org-switchb)
;; configuring org-roam
(add-hook 'after-init-hook 'org-roam-mode)
(setq org-roam-directory “~/data/org-roam”)
(global-set-key (kbd “C-c n r”) #'org-roam-buffer-toggle-display)
(global-set-key (kbd “C-c n i”) #'org-roam-insert)
(global-set-key (kbd “C-c n /”) #'org-roam-find-file)
Do you happen to have an old hang-over “customize.el” or something automatically generated by Emacs customization somewhere in your HOME or .emacs.d
? This might be overriding your init
file.
This is my Ubuntu Emacs config (init.el
) in its entirety. I just upgraded packages from MELPA (on July 1st 2020). Note the custom-set-variables
part. Perhaps you have a separate file (like .emacs
directly in your HOME?) that contains custom variables with some config in it.
You can see my Org-roam is working (only sample notes).
org-roam-capture
starts without an error
Thanks again for helping so much - your question about the order of calls was a big help.
I’d tried installing back in February (before it was available on Melba) with no luck - no patience was probably more like it. This time after trying to stick it into my old init.el, I added a new user “roam” and, following the hints in the Troubleshooting article, created an ultra-minimal init.el that installed org-roam and loaded it OK. Copying that over, I added other configurations (suppressing splash, menus, scrolls, toolbars, adding org-journal and typopunct to give me “smart typography” in markdown mode.
This is what I ended up with that all seems to work. I might someday try to determine what the general rules are for structuring an init.el for org-roam - if I were a product manager that would be on the list for somebody (assuming that other people have problems installing org-roam successfully - I might be the only one). For now, everything I need to work on my writing plus org-roam seems to be working so I’ll get on with things. The following is the working init.el that I have (GNU EMACS 26.3 built two days ago on Ubuntu 18.04):
;; 20200701
(add-to-list 'load-path “~/.emacs.d/lisp”)
(add-to-list 'exec-path “/usr/bin/sqlite3”)
(add-hook 'after-init-hook 'org-roam-mode)
(setq org-roam-directory “~/data/org-roam”)
;; configure visual interface
(menu-bar-mode -1)
(tool-bar-mode -1)
(scroll-bar-mode -1)
(setq inhibit-startup-message t
inhibit-startup-echo-area-message t)
(fset 'yes-or-no-p 'y-or-n-p)
(setq confirm-nonexistent-file-or-buffer nil)
;; configuring package
(require 'package)
(add-to-list 'package-archives
'(“melpa-stable” . “https://stable.melpa.org/packages/”))
(package-initialize)
;; configuring org-mode
(add-to-list 'package-archives
'(“org” . “https://orgmode.org/elpa/”) t)
(require 'org)
(global-set-key “\C-cl” 'org-store-link)
(global-set-key “\C-ca” 'org-agenda)
(global-set-key “\C-cc” 'org-capture)
(global-set-key “\C-cb” 'org-switchb)
;; Configuring org-journal
(customize-set-variable 'org-journal-date-prefix “#+TITLE: “)
(customize-set-variable 'org-journal-file-format “%Y-%m-%d.org”)
(customize-set-variable 'org-journal-dir “~/data/davids/journal/”)
(customize-set-variable 'org-journal-date-format “%A, %d %B %Y”)
(global-set-key “\C-cnj” 'org-journal-new-entry)
;; configuring org-roam
(add-hook 'after-init-hook 'org-roam-mode)
(global-set-key (kbd “C-c n r”) #'org-roam-buffer-toggle-display)
(global-set-key (kbd “C-c n i”) #'org-roam-insert)
(global-set-key (kbd “C-c n /”) #'org-roam-find-file)
;; configure typopunct
(require 'typopunct)
(typopunct-change-language 'english t)
(add-hook 'markdown-mode-hook 'my-markdown-init)
(defun my-markdown-init ()
(require 'typopunct)
(typopunct-change-language 'english)
;; add more superscripts
(typopunct-mode 1))
(require 'iso-transl)
(iso-transl-define-keys
`((”^0” . ,(vector (decode-char 'ucs #x2070)))
("^4" . ,(vector (decode-char 'ucs #x2074)))
("^5" . ,(vector (decode-char 'ucs #x2075)))
("^6" . ,(vector (decode-char 'ucs #x2076)))
("^7" . ,(vector (decode-char 'ucs #x2077)))
("^8" . ,(vector (decode-char 'ucs #x2078)))
("^9" . ,(vector (decode-char 'ucs #x2079)))
("^+" . ,(vector (decode-char 'ucs #x207A)))
("^-" . ,(vector (decode-char 'ucs #x207B)))
("^=" . ,(vector (decode-char 'ucs #x207C)))
("^(" . ,(vector (decode-char 'ucs #x207D)))
("^)" . ,(vector (decode-char 'ucs #x207E)))
("_0" . ,(vector (decode-char 'ucs #x2080)))
("_1" . ,(vector (decode-char 'ucs #x2081)))
("_2" . ,(vector (decode-char 'ucs #x2082)))
("_3" . ,(vector (decode-char 'ucs #x2083)))
("_4" . ,(vector (decode-char 'ucs #x2084)))
(“5" . ,(vector (decode-char 'ucs #x2085)))
(“6" . ,(vector (decode-char 'ucs #x2086)))
(“7" . ,(vector (decode-char 'ucs #x2087)))
(“8" . ,(vector (decode-char 'ucs #x2088)))
(“9" . ,(vector (decode-char 'ucs #x2089)))
("+” . ,(vector (decode-char 'ucs #x208A)))
("-” . ,(vector (decode-char 'ucs #x208B)))
("=” . ,(vector (decode-char 'ucs #x208C)))
("(” . ,(vector (decode-char 'ucs #x208D)))
(")” . ,(vector (decode-char 'ucs #x208E)))))
;; more stuff
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won’t work right.
'(package-selected-packages (quote (emacsql-sqlite org-roam markdown-mode))))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won’t work right.
)
Happy that you got it all working. Congrats!
I could not help but notice that in your config:
-
(add-hook 'after-init-hook 'org-roam-mode)
appears twice
You might like to remove the one on Line 2 (which one should not really matter, I guess) to avoid confusion for future-self – keeping the one within the;; configuring org-roam
section seems to make it more human friendly -
You have the following part related to Org-mode; I don’t.
Judging from your comment that the loading sequence mattered, perhaps this part is related to the error you experienced (pure speculation based on the comparison with mine; I don’t know its intended purpose:
(add-to-list 'package-archives
'(“org” . “https://orgmode.org/elpa/”) t)
(require 'org)
You can disregard what I am saying here. The main thing is you got it working.
Cheers to that
Thanks for catching that goof - one or the other “add-hook” statement isn’t necessary, for sure.
As for the “add-to-list”, that was added by package after I installed org-mode. I added the first statement (adding melpa-stable) to an empty init.el as my starting place, then did the ‘M-x package-install’ to install org-roam. I’ll leave them both in place for now - and consider commenting the second out if things start to go haywire.
Thanks again for all your help - I’m delighted to have it working now.