This is the error (as expected, some syntax-related issue):
Error (use-package): Failed to parse package org-roam: use-package: :ensure wants exactly one argument
With one of your ideas I can say: Success!
The location (org-roam-db-location "c:/sqlite/org-roam.db") works now with the FULL path! NICE.
I think I have run out of the ideas.
I donât have suggestions â maybe, just maybe, you can add (add-to-list) like I do below⌠But I donât believe this is the cause of your issue; itâs the only difference I can see.
This below just works; I installed Use-package to my vanilla Emacs, and tried the following.
It takes about 45 seconds; I am not touching anything, no keyboard inputs. Emacs gets launched in my Windows, updates the Org-roam DB, and then the side panel opens automatically.
There is an error in your use-package clause here.
the (add-hook 'after-init-hook 'org-roam-mode) clause needs to be under the :init section of use-package.
Itâs functionally equivalent to what you had in your âoldâ version of your use-package configuration, so it seems like you just had a bad version of Org-roam installed.
As :hook (after-init . org-roam) works on my PC, I think itâs unlikely that the cause of your issue is Org-roam, or Use-package, or this part of your config.
Questions would be:
Did you change anything else around 1 week ago when you started experiencing the issue?
Do you have any other config that uses :hook (after-init) or (add-hook 'after-init-hook)?
Something else seems to be interfering with your after-init-hook (both variations of the syntax are equivalently calling some functions in this hook). We seem to need to go outside of this section of your config to see what this âsomethingâ is.
Practically speaking, if I were you, I would see two options: (1) live with this issue (as it is minor); (2) go vanilla Emacs to identify the cause.
I would choose option (1) in this case (in fact, I always call Org-roam manually, since I donât use it at the start of the day).
But if you have time, you could choose option (2). This would usually involve taking a backup of your config file, strip down your config to bare minimum, and then add your config back one section at a time⌠Time consuming. Some people call it âconfig bankruptâ and start all over from scratch (I donât think your situation calls for it).
Just a minor point to add: the variable exec-path must be a list of
directories where you find relevant .exe files. So⌠it should not be set to your org-roam.db file, but should be like this: (add-to-list 'exec-path âpath/to/sqlite3-dirâ).
S U C C E S S
And you dear comrade brought me there:
Yes, I do have another (add-hook 'after-init-hook 'global-company-mode) in my one and only config.org
(use-package company
:ensure t
:config
(add-hook 'after-init-hook 'global-company-mode)
(setq company-idle-delay 1)
(setq company-minimum-prefix-length 3))
âŚ
That one is above the other
#+begin_src emacs-lisp
(use-package org-roam
:ensure t
:hook
(after-init . org-roam)
:custom
(org-roam-directory â~/org/â)
âŚ
The first worked always, but org-roam wouldnât even after commenting out company
BUT: I changed the latter to:
(use-package org-roam
:ensure t :init (add-hook 'after-init-hook 'org-roam-mode)
:custom
(org-roam-directory â~/org/â)
âŚ
And Boom, it worked
Learning:
Yes, multiple after-init-hooks are allowed, if done correctly
preferably preceded with :init
So here is my Messages buffer output now (even reopened Emacs after disbled org-roam-mode:
Loading c:/Users/JochenBurkhard/iCloudDrive/iCloud~com~appsonthemove~beorg/.emacs.d/config.el (source)âŚ
[yas] Prepared just-in-time loading of snippets successfully.
Loading c:/Users/JochenBurkhard/iCloudDrive/iCloud~com~appsonthemove~beorg/.emacs.d/config.el (source)âŚdone
Loaded c:/Users/JochenBurkhard/iCloudDrive/iCloud~com~appsonthemove~beorg/.emacs.d/config.el
(org-roam) files: Î0, headlines: Î0, links: Î0, tags: Î0, titles: Î0, refs: Î0, deleted: Î0
Loading c:/Users/JochenBurkhard/iCloudDrive/iCloud~com~appsonthemove~beorg/.emacs.d/recentfâŚdone
Cleaning up the recentf listâŚdone (0 removed)
For information about GNU Emacs and the GNU system, type C-h C-a.
Package cl is deprecated
Many thanks for your guide @nobiot and mainly for the step by step guide to set up org-protocol. It was the missing part of my workflow on my windows platform. It works like a charm right now.
Just as a side note, there seems to be an alternative way to do this with Firefox that does not require editing the registry (reported via org-roam GitHub repo).
I havenât tried it myself, but itâs good to know. Pasting the comment below.
Just fyi: I managed to get links working without the need of changing the windows registry. When using Firefox, you can add a custom protocol handler in about:config :
Type about:config into your address bar, confirm the dialog
enter network.protocol-handler.expose.org-protocol in the search bar
Leave the option boolean , hit + and change the value to false
Next time you try to open an org-protocol link, Firefox will ask you what program to use
Choose emacsclientw and make this permanent (check âremember my choiceâ/âalway open withâ)
[Edit 2021-01-17: Now it looks like org-download works on my Windows! Yay. I will play with it and update the Zero guide when I know more about it] I have never been able to get org-download to work on Windows. Perhaps this is a detour, if someone knows how to do it; nevertheless, this solution works quite well on my set up and for my workflow.
Edit: I added a part where I talk about in-line display resizing without Imagemagick; itâs just a matter of setting a variable.
@nobiot a huge huge thanks! Your Ch. 9 was immensely helpful in getting Graph View working for me. Without the help of your chapter, I tried several months ago and gave up after getting past installing graphviz. Iâm on a Mac and was initially not optimistic that your chapter (with Windows in the title) could help. But, I was pleasantly surprised. You provide a good description of how the different parts fit together, what role each (org-protocol, org-roam-protocol, org-roam-server, and so on) plays. This was helpful in translating the key concepts to get it working on the Mac. I am looking forward to looking over the other chapters of your manual! Kudos to you for assembling and sharing a fantastic resource.
First of all, great work
I have the problem (WS10, nondev, new to emacs) that the icon installation in the customizing chapter didnât work, so now I just get these boxes.
I followed the instruction until that point , and i have everything for that chapter setup like in the description, except use another theme; switching to the doom theme also doesnât change that I didnât find all-the-icons via package manager at first, but installed it via inserting. i can call the functions for icon management related to the pkg, but the icons will never be shown, just squares with zeros. help would be welcome
Provide a temp directory where youâd like the fonts to be downloaded (letâs call it $tempFonts )
I was wondering whether I should have put the fonts in a different place⌠a temp directory^^ was just mentioning it for the case that you would put it into the tutorial (:
First of all, thank you very much for all this! Iâve been a long-time user of Emacs in Linux but had to switch to Windows recently. I also have a huge .bib file continuously updated by Mendeley. I followed your guide to the very end, save for the roam-server stuff, since Iâve never used graphs for note-taking: my goal is to have a handy way of annotating my PDFs in Emacs, and keeping track of it [perhaps I will move to graphs later on].
However, I have zero success with opening the PDFs whose locations are stored in the .bib file. For testing I created a .bib with a single paper stored at ~/pdfs/Brier1.pdf (and so the entry contains the line âfile = {:~/pdfs/Brier1.pdf:pdf}â). I can run âC-x C-f ~/pdfs/Brier1.pdfâ and the PDF opens in Emacs. When I press F6, the paper appears on the list with the âPDF availableâ icon. I press ENTER and the citation is created. When I click on it, many options appear; among them â2. Open pdfâ and âUser functions: Open pdf in emacsâ. The first one leads to âno pdf found for brier1950â (âbrier1950â is the citekey). The second one leads to âconcat: Wrong type argument: stringp, nilâ. Both of them display the paper info: âBrier, G. W., Verification of forecasts expressed in terms of probability, Monthly Weather Review, 78(1), 25â27 (1950). http://dx.doi.org/10.1126/science.27.693.594â. However, when I press â3. Add notesâ, a new buffer opens, with â:NOTER_DOCUMENT: ~/pdfs/Brier1.pdfâ, seemingly as it should! Would you have any guesses as to what I could be doing wrong?
On vacation with no laptop, canât verify what iâll be saying.
two suggestions.
for mendeley, see GitHub - tmalsburg/helm-bibtex: Search and manage bibliographies in Emacs.
you might need this: (setq bibtex-completion-pdf-field âFileâ)
or you might need to make this variable nil to use a standard path resolution logic. experiment with the variable. the documentation suggests that paths created by mendeley would work.
if this does not work, there is an extensive discussion and a solution here
also⌠i donât know which package you are using to open pdf documents when you do all the f6 click navigation. if it ends up calling an org-ref function, you might want to refer to this
Mendeley users should set to:
(setq org-ref-get-pdf-filename-function 'org-ref-get-mendeley-filename)