Zero to Emacs and Org-roam: a step-by-step guide on Windows 10

Even though I had the first example for many month’ now and tried the second one:

  • Org-Roam just won’t start an I need to start it manually with org-roam-mode each time
  • The second one causes an error - Do I have to replace anything from example #1 or how exactly is this one implemented?

Is this the second example you are referring to?

(add-hook 'after-init-hook 'org-roam-mode)

Like this (line 15, if your app does not show a highlight).

This is, where I stand:
(use-package org-roam
:ensure t
:hook
(after-init . org-roam-mode)
:custom
(org-roam-db-location “c:/Users/JochenBurkhard/”)
(org-roam-directory “~/org/”)
:bind (:map org-roam-mode-map
((“C-c n l” . org-roam)
(“C-c n f” . org-roam-find-file)
(“C-c n l” . org-roam)
(“C-c n j” . org-roam-jump-to-index)
(“C-c n b” . org-roam-switch-to-buffer)
(“C-c n i” . org-roam-insert)
(“C-c n t” . org-roam-dailies-today)
(“C-c n y” . org-roam-dailies-yesterday)
(“C-c n w” . org-roam-dailies-tomorrow)
(“C-c n d” . org-roam-dailies-date)
(“C-c n r” . org-roam-unlinked-references)
(“C-c c” . org-roam-capture))))

And I don’t know still, why Org-Raom isn’t running after start.
I tried the example you provided with an error.
For reasons you can see in my org-roam setup, I would only switch from use-package if this can easily ben done with require 'package

I’m missing the context and your intention; I agree that if (use-package) has been working for you, there is little reason to switch to another way.

Well, my intention is: To get org-roam even starting.
Right now, it even freezes Emacs altogether (with the original config I have posted above.
Any advice? I’m stuck now, since I rely heavily on it for my work…
Emacs starts up nicely, but if I call ´org-roam´ or ´org-roam-mode´ Emacs immediately freezes.

Oh, I see.
Are you on Windows?
When Emacs “hangs” there is no error, but Emacs does not come back for your input, correct?
And (use-package) was working until, well, today (recently).

This is probably the same performance problem for Windows reported and recently fixed (today).

.

Try upgrading Org-roam.

If you are using MELPA, I believe it is already reflected in the database.

Windows, yes.
Correct.

  • Well, status is like this: org.roam-version shows 1.1.1^M for a reason!?!
  • Update to the most recent version is done
  • Org-Roam still won’t start with emacs
  • Emacs starts up reasonably fast
  • Running org-roam-mode does what it should do and fast as well

But still there are 3 questions open:

  1. Why org-roam won’t come up at start time
  2. Why version is not shown correctly (like 1.2.2 or something and finally
  3. Why a custom location won’t work

Any idea how I should proceed?

It’s probably best to ask these questions in Slack, or create a new post in the category of Toubleshooting in the forum, rather than this thread – I am guessing it would be only me responding to you if we continue here. I don’t have all the expertise to answer all your questions.

  1. I don’t know what this means. Do you mean something like "It used to work with (use-package) and hook: after-init-hook . org-roam-mode", and it does not work in the same way any more? But you can manage to start it somehow? I think for people to help you, it would be good if you provided more description of what you intend to do, and your step-by-step process description, and how you now manage to start Org-roam, compared to your expected behavior so that people can reproduce your problem…

  2. No idea. It seems to me that somehow your Emacs thinks it is still 1.1.1. Maybe close and relaunch Emacs?

  3. Variable org-roam-db-location seems to expect a full path; I think it means that you need to also provide the name of the file (org-roam.db, or something). Try that and see if that works. I don’t use it so I can be mistaken here.

I just want to make sure org-roam starts with Emacs. And yes, it worked before with the given parameters.
Since, say 1 week it doesn’t and I think, you guys should be capable of answering, no?

“You guys”? I am one of the users who use Org-roam, just like you. So… I think “you guys” should include you. I haven’t got the same set up like you have with Use-Package, so I haven’t got the same problem; I cannot answer your queries from my experience. My lunch time is over now, so I will need to go back to work.

If you would like feedback / ideas / help from other users (like you and me), I suggest that you ask for help in a different post, or Slack. It’s around the globe, so someone might be in a time zone where they have some capacity to help you. I cannot at the moment. But at least you can start your daily tool. That’s a plus :+1:

Sorry, didn’t want to be rude. Thought you are one of the developers.
Thanks for all your kindness and efforts.
Have a great day. :thinking::ok_hand:

No issue; didn’t feel you were being rude. I am waiting for my dinner in a restaurant. I have an idea that might (might not) work for your case. I’ll come back with a beer :beer: in my hand a little later.

As far as I know the user configuration is fine. If all else fails, you can delete the elpa folder in your user Emacs directory to make sure you’re on the latest version. Emacs will try to pull down all the packages you are using again.

(Or use @nobiot’s installation script)

Back from dinner. The beer is being cooled in the freezer (I have 10 minutes to wait :expressionless:).

Here is my guess. A wild guess. Correct me if my assumptions are incorrect.
It is very possible that I will wildly missing the mark, but let me give a shot.

  1. When you launch Emacs, currently, you can see this in the minibuffer/echo area at the bottom.

  2. The problem is that you used to see, in addition, that the side panel that show backlinks (“org-roam buffer”) automatically appeared, but since 1 week or so ago, you don’t see it automatically appear. Now you have to manually call M-x org-roam to make it appear. Like this in the image below (the “side panel” I am talking about is in the right side of my Emacs, with the buffer name “*org-roam*”.

Do I understand your issue correctly?

If so… you can try the following:
Where you have this config…

;; Part of your current config
:hook
(after-init . org-roam-mode)

change it to this:

:hook
(after-init . org-roam)

In other words, change org-roam-mode to org-roam.
Save the change, quit and restart Emacs.
You may need to wait for a few seconds for the side panel to appear automatically (it works in my Emacs).

Just letting you know I have uploaded a new chapter on PDF-Tools (including how to install it on Windows), Org-noter, and ORB. Thank you.

1 Like

Awesome digging as always. Thank you very much.
Let me break it down:

  1. Your assumption is right, but at a different occasion:
    a) Not on starting up, but after I call M-x org-roam I see exactly the combination of your screenshots (Modline + side panel) :smirk:
    b) Manifesting, org-roam isn’t up after start
  2. The side panel never appears automatically and I always need(ed) to call it
    Yes, you clearly see my point.
    Changing the config to (after-init . org-roam) unfortunately didn’t change anything
  • If you say “your Emacs”, are you talking about Windows?
  • Since my issue is not a deal-breaker for me, I will of course dig around more
  • I appreciate greatly your outstanding support but won’t no longer bother you with that
  • If you come across something, of course I’m all ears, though :wink:

Have a wonderful day,
Jochen

1 Like

No need to drag you along too long, so you don’t have to come back to me :wink:
Jut one more thing…

Do you see any (error) message after start up? (via C-h e, or view-echo-area-messages)?
What is the error when you changed the config to (add-hook 'after-init-hook 'org-roam-mode)?
This might give you more clues…

Nope, no errors at all from start-up:
Building straight…done
Building org-plus-contrib…done
Loading c:/Users/JochenBurkhard/iCloudDrive/iCloud~com~appsonthemove~beorg/.emacs.d/config.el (source)…
Unicode Fonts - Mapping Unicode Blocks in fontset-default … done
Unicode Fonts - Mapping Overrides in fontset-default … done
Unicode Fonts - Mapping Unicode Blocks in fontset-startup … done
Unicode Fonts - Mapping Overrides in fontset-startup … done
Unicode Fonts - Mapping Unicode Blocks in fontset-standard … done
Unicode Fonts - Mapping Overrides in fontset-standard … done
[yas] Prepared just-in-time loading of snippets successfully.
Building company-org-roam…
Building company-org-roam → Building company…done
Building company-org-roam → Building dash…done
Building company-org-roam → Building org-roam…
Building company-org-roam → Building org-roam → Building f…
Building company-org-roam → Building org-roam → Building f → Building s…done
Building company-org-roam → Building org-roam → Building f…done
Building company-org-roam → Building org-roam → Building org…done
Building company-org-roam → Building org-roam → Building emacsql…done
Building company-org-roam → Building org-roam → Building emacsql-sqlite…done
Building company-org-roam → Building org-roam…done
Building company-org-roam…done
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
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

BUT:

  • If I change my config according to your suggestion
  • We have to follow the right syntax (which I’m no expert at all)
  • “Old”:
    (use-package org-roam
    :ensure t
    :hook
    (after-init . org-roam)
    :custom
    (org-roam-directory “~/org/”)
    :bind (:map org-roam-mode-map
    ((“C-c n l” . org-roam)
    (“C-c n f” . org-roam-find-file)
    (“C-c n l” . org-roam)
    (“C-c n j” . org-roam-jump-to-index)
    (“C-c n b” . org-roam-switch-to-buffer)
    (“C-c n i” . org-roam-insert)
    (“C-c n t” . org-roam-dailies-today)
    (“C-c n y” . org-roam-dailies-yesterday)
    (“C-c n w” . org-roam-dailies-tomorrow)
    (“C-c n d” . org-roam-dailies-date)
    (“C-c n r” . org-roam-unlinked-references)
    (“C-c c” . org-roam-capture))))
  • New:
    (use-package org-roam
    :ensure t
    (add-hook 'after-init-hook 'org-roam-mode)
    :custom
    (org-roam-directory “~/org/”)
    :bind (:map org-roam-mode-map
    ((“C-c n l” . org-roam)
    (“C-c n f” . org-roam-find-file)
    (“C-c n l” . org-roam)
    (“C-c n j” . org-roam-jump-to-index)
    (“C-c n b” . org-roam-switch-to-buffer)
    (“C-c n i” . org-roam-insert)
    (“C-c n t” . org-roam-dailies-today)
    (“C-c n y” . org-roam-dailies-yesterday)
    (“C-c n w” . org-roam-dailies-tomorrow)
    (“C-c n d” . org-roam-dailies-date)
    (“C-c n r” . org-roam-unlinked-references)
    (“C-c c” . org-roam-capture))))