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

Also… Just to be sure, I am assuming you have got the “biblio” module (under tools) installed. This is Doom specific.

Hi, since I am still unable to get this to work, I tried simply using your (@nobiot’s) config files as posted on gitlab, figuring that at least they would work and then I could rebuild my own config starting from those. I downloaded them into my .doom.d directory. However, when I tried doom sync I got WARNING Couldn't find the :nobiot deft module WARNING Couldn't find the :nobiot literate module as well as "md-roam" (error "No ':repo' specified for package 'md-roam'"). Can you advise on how to set up your (working) config on my system?

EDIT:

I don’t really recommend simply copy and paste other person’s entire config without trying to carefully understand it, because you never know what you might be missing.

For my .doom.d, look at L27-L29 of my init.el. Change them back to the standard Doom; they are my custom modules with my small patches.

Also for md-roam, take out use-package! block in here, and remove Md-roam’s specific configuration here and here (or adjust them back to Org-roam).


Do you have a strong reason why you need to use Doom by any chance?

If you don’t need Doom, my sincere suggestion is to start with a vanilla first. Once you are familiar with the way Emacs configuration works, you can choose to move to Doom. Doom is great but adds some layers, and hide them. This is convenient, but makes it difficult for you unless you know how to and where to look. The warning you got is coming from the fact that I have my own custom modules – all is in my .doom.d in the GitLab repo, and use of custom modules is all well documented in Doom’s GitHub page.

If you have a strong need for Doom, we can have another conversation separately, but you will need to read Doom’s documentation more carefully.

For vanilla, you don’t have to remove what you have done with Doom so far.

  1. Keep .doom.d folder
  2. Rename .emacs.d folder to something like .emacs.d-doom (or whatever that is not .emacs.d)
  3. Check in your home folder if you have .emacs file flying around. If you do, rename it something like .emacs.bak as a backup
  4. Launch Emacs – this should give you a fresh start with no configuration done
    Stop if you don’t see a fresh vanilla Emacs here – you already have a problem. Look for any other Emacs configuration file in your home, such as emacs.el (refer to this Emacs documentation for what to look for)
  5. Follow my guide, one step at a time; try not to copy the whole .emacs – this way you will have opportunity to learn what each step of the configuration is meant to do

OK, thanks, I’ll try it.

I have added a script that automates installation of packages that I describe in this guide up to Chapter 6 on ORB.

Let me know how you go; if you like it; how I might make it better. Thank you.

@zaeph, I will be happy to add a link to your tutorial series at the end of the installation process, if you agree, of course – at the moment, the URL points to my guide. The script can be run in Emacs itself by removing --batch option; so it should be able to launch the in-system tutorial when ready, too. Just as an idea.

Sure, no problem whatsoever. We’re still a few weeks away from that anyway, but we’ll adjust in time. Thanks for your work!

1 Like

Hi all, @ianian

Just a quick heads-up.
It has taken me some time, but I think I have managed to tame this on Windows.
I’m writing a next chapter on graphing functions around Org-roam.
Stay tuned…

  • Graphviz
  • org-roam-graph
  • Windows registry
  • org-protocol and org-roam-protocol
    both Firefox and Chrome (and Edge, with Chrome)
  • org-roam-server (bonus! See the animation below)

Just stumbled over this one after creating Roam-ref protocol on Windows. @nobiot Looking forward to the next chapter.

From the issue you describe, I suspect you are using Chrome or Edge. [EDIT. Sorry, probably not Chrome or Edge. But hopefully what I’m writing will be useful for solving your issue.] If so, what I am writing will hopefully give you a solution. Or at least a possible step towards it, because I don’t use roam-ref, but use roam-file subprotocol for the purpose of graphing – I think it is caused by the same problem in Org Mode; I will come to that in my writing.

One way to side step this issue is to use Firefox (it does not have the same problem, but there is another :wink: ).

Thanks for checking back. I am actually using Firefox. I am sure there is interesting stuff in your next write-up, even if it does not have that step towards the solution.

1 Like

Oh, that’s interesting… I’ll see if I can reproduce the same issue.

@fleimgruber

It seems to work on my PC without the “tricks” I am writing in the new chapter.
Two things worth checking:

  1. Have started Emacs Server? – e.g. M-x server-start
  2. Have loaded org-protocol and org-roam-protocol? – e.g. M-x load-library

Alternative to M-x, you can put this in your config.

(server-start)
(require 'org-protocol)
(require 'org-roam-protocol)

Chapter 9 is published.

  1. Set org-protocol , org-roam-graph , and org-roam-server (incl. Windows registry)

I cannot change the original post any more to add this, so I’m just replying :blush:

Let me know how you go! It’s fun.

2 Likes

Thanks for the new chapter. The missing part for me was +org-protocol-check-filename-for-protocol which presumably would also solve Roam-ref protocol on Windows. The workaround for that does not work for org-roam-server so I use your patch until org-mode 9.4 is released.

1 Like

Hi in general I think what you’ve done is awesome. I almost got it to work but this is what I get when I run your installer script in Powershell:

SQLite found in c:/msys64/mingw64/bin/sqlite3.exe

Contacting host: elpa.gnu.org:443
make client process failed: Connection timed out, :name, elpa.gnu.org, :buffer, #, :host, elpaDOTgnuDOTorg, :service, 443, :nowait, nil, :tls-parameters, nil
PS C:\Users\miker>

I wonder if this isn’t due to the 1st line above which says where the sqlite3 exe file was found
which is not the version that you recommend that we download. I did download the one you recommended and unzipped it and all but your script doesn’t find it but instead finds the previously installed version. I haven’t tried to understand your script but is the “fix” as simple as changing the relevant Windows 10 environment variable to point at the newly downloaded one?

Thanks very much in advance. I’m really looking forward to using this.

If the formatting is messed up my apologies. First time on this site and there seems to be no way to preview(?)

The message indicates that Emacs failed to connect with the server at elpa.gnu.org. I suppose that it was temporarily down/unreachable, or your internet connection had some interruption; probably the former.

I suggest you try again.

The version of the sqlite3.exe should not affect this particular issue you experienced.

For the version of sqlite3.exe (a seprate topic), it looks like you should be Okay with “3.8.2 version or above”.

Regarding upgrading it, or using the unzipped file, you seem to be using mingw64. I am not familiar with it, but I suppose you could update the package with it (?). Alternatively, sure, I believe you can use the environmental variable to prioritize the path for the unzipped .exe file (I guess you need to add the new path to the beginning of PATH, not at the end). From my experience, Emacs somehow takes environmental variables. I think you need to either sign off and on again, or restart your PC for the new PATH definition to take effect.

Hi thanks very much for the response. You’re right it was just a network timeout. I’ve moved a lot further forward. A few more things to nail down and then I’ll report back. I’m nearly there I think. I could never have got this far without your guide. I despaired of ever getting it installed. Again, awesome work.

Speak soon, Mike

1 Like

A heads-up: I’m working on a new chapter on org-noter and pdf-tools on Windows 10 (64-bit only for the way I got them to work, it seems).

The biggest challenge for Windows users is to get pdf-tools working. Surprisingly to myself, I think I have managed to tame the installation process.

I estimate that it will be a few weekends for me to finish the chapter in the way I would like, but I thought some of us in the community could benefit from a quick bullet-point note to follow.

  1. Install msys2 from https://www.msys2.org/
    You can follow the instruction on the page.
    I did not perform pacman -Syu etc. (no harm doing this, but no need)

  2. Launch Emacs (normal Emacs that you have downloaded from the GNU site is fine; no need to install emacs from within msys2)

  3. Install pdf-tools. e.g. from MELPA from within Emacs

  4. Call M-x pdf-tools-install RET
    You can choose “y” or default to all the options when prompted.

    It will take some time to build (compile) necessary software files. It took me about 30 minutes. The files will appear in pdf-tools folder in your ~/.emacs.d/elpa (an .exe and a bunch of .dll files; the image below shows only a part of the folder)

    Now you should be able to open PDF files with PDF-Tools. Check that if you have a PDF file handy

  5. Add (pdf-tools-install) or (pdf-loader-install) in your config file (as per the GitHub page) – this will let PDF-Tools to be automatically used for PDF files next Emacs launch onwards

  6. Install org-noter https://github.com/weirdNox/org-noter. It works without additional configuration. But you can read some instructions on the GitHub site

Happy note taking :slight_smile:

EDIT: You will be tempted to try improving your workflow from bibliographic notes under Org-roam (and ORB) to org-noter. See this section in the ORB documentation that specifically address this very topic. I have not tried it myself, but surely I will test it out for the write-up of the new chapter. If you haven’t done so, check out the ORB documentation; the team has added a massive amount of good content there to help you work with it :slight_smile: What is this machine learning based PDF reference scraper!? Hmmm.

1 Like

To answer to this. I did not know anything about emacs, till about 3 months ago. And I went headfirst into doom. It was challenging for sure, but at the same time, vanilla would have been as well.

Doom takes a lot of fiddling about with the config out of the equation (as I say this, I spent like half a day today trying to get the perfect org-journal setup in Doom), and ultimately I found it to be easy - oh you want to add roam - here, just add the flag in init.el.

Just 1 anecdotal data point.

1 Like