Open wxknxxzj opened 4 years ago
Does the same thing happen withorg-roam-graph
I got an email from this issue but the comment is not appearing here.
If the org-roam-graph
is also not working, the problem is probably something to do with your org-protocol
setup.
Related issues: https://github.com/org-roam/org-roam-server/issues/35 https://github.com/org-roam/org-roam-server/issues/39
I assumed, but now realize I may be wrong, that you're using wsl (Windows Subsystem for Linux). If not, I don't know how to help. Otherwise, just keep reading.
If you followed the instruction here, you can fix this with the following.
org-protocol-wsl.sh
containing:
#!/bin/bash
orgroampath="~/org/zettelkasten"
orgroamdir=basename ${orgroampath}
killall emacsclient
file=echo $1 | sed -n "s/.*${orgroamdir}%2F\(.*$\)/\1/p"
fullpath="${orgroampath}/${file}"
echo "raw : $1" echo "path: $fullpath"
nohup emacsclient $fullpath &
- Change orgroampath to the value of `org-roam-directory` you set in emacs. Be careful to *not* add the trailing slash.
- Open regedit on windows, find the key at `HKEY_CLASSES_ROOT\org-protocol\shell\open\command`.
Change its value to `cmd /c start /min wsl ~/path/to/the/script/.org-protocol-wsl.sh %1`. Replace the path (the path is a linux path to your script).
- This is assuming you followed the link at the top and already had this key filled with `C:\Windows\System32\wsl.exe emacsclient "%1"`
You're done ! That should work.
If it doesn't work, make sure the server is running (`M-x start-server`).
It isn't that smooth on my configuration honestly. I'm not sure if it's because of my configuration or if it's just wsl.
At least it works, but hopefully it will fixed in a more proper way.
If meet a similar problem and then come here, you can also look at the related issue which has solved mine.
When I click on the node on the browser, emac prompt file does not exist, and my file is not in this position, how to solve this problem?