How to properly install roam protocol?

I am trying to install the roam protocol.
My goal is to use the graph to open note files.
I couldn’t follow the docs. I am running on Mac. I used the Platypus app as instructed, but then the instruction are referring to Chrome, and I am using Firefox. Can I get this to work on Firefox?

The extra instructions for Chrome are optional (strictly to remove the confirm prompt). If you have the Platypus app properly setup, it should work on Firefox too.

So I only need to use Platypus in order to export the script?
When I click on vertex in the graph it asks me if to run the script. I confirm, but nothing happens. What am I missing?

(Comment: I am using spacemacs)

Trying to revive this question - does anyone know how to make the roam protocol work?

Do you have emacsclient located at /usr/local/bin?


Then you can try running the command itself to see if there are any errors:

/usr/local/bin/emacsclient --no-wait org-protocol://...

It could be that your emacs daemon is not running.

I think you were right.
This is the error I got

/usr/local/bin/emacsclient: can't find socket; have you started the server?
To start the server in Emacs, type "M-x server-start".
/usr/local/bin/emacsclient: No socket or alternate editor.  Please use:

--server-file      (or environment variable EMACS_SERVER_FILE)
--alternate-editor (or environment variable ALTERNATE_EDITOR)

So I ran M-x server-start in emacs, and ran the command again. It opened some empty file with a weird buffer name (I tried to get the full name, but did not manage - if it is important I will try to figure it out).

You’ll also need to require org-roam-protocol in that server instance, after that you should be good to go.

you mean require org-roam-protocol in the user-config?
(I am using spacemacs).


hmmm. It erased all of the content of the file I tried to open :frowning:

I guess that there is no way to get this file back now, right?

Are you certain the file contents are erased? All it does is calls find-file on the passed file path. It does not write any contents to the file.

yes. I looked at the file in the terminal, and it has only the header, without the content…

I am trying to restore it via Dropbox now…

I couldn’t restore it, but I guess I can live without it.

Anyway, at least now it works and it opens the file in emacs.
Is there a way to also have it move to the emacs window automatically?
Kind of like the funcitonality shown in the docs?

Would the proper configuration be to add server-start to my init file?
Should there be any arguments for that?

I think adding (server-start) to your Emacs config is fine.

The way I do it is to run Emacs as a daemon from the start via emacs --daemon, and launch new frames of Emacs via emacsclient -c -a emacs

My setup starts the daemon on PC startup, so launching Emacs always feels instant.

1 Like