Skip to content

Instantly share code, notes, and snippets.

@Spike-Leung
Last active January 9, 2025 02:38
Show Gist options
  • Save Spike-Leung/9d552ec7d9ccc75d2eec0c4a71b1929e to your computer and use it in GitHub Desktop.
Save Spike-Leung/9d552ec7d9ccc75d2eec0c4a71b1929e to your computer and use it in GitHub Desktop.
setup-org-protocol-on-window
REGEDIT4
[HKEY_CLASSES_ROOT\org-protocol]
@="URL:Org Protocol"
"URL Protocol"=""
[HKEY_CLASSES_ROOT\org-protocol\shell]
[HKEY_CLASSES_ROOT\org-protocol\shell\open]
[HKEY_CLASSES_ROOT\org-protocol\shell\open\command]
@="\"C:\\Windows\\System32\\wsl.exe\" /snap/bin/emacsclient \"%1\""
@Spike-Leung
Copy link
Author

Spike-Leung commented Jan 9, 2025

@="\"C:\Windows\System32\wsl.exe\" /snap/bin/emacsclient \"%1\""

  • "C:\Windows\System32\wsl.exe /snap/bin/emacsclient points to the path where emacsclient is located, which needs to be adjusted according to your environment.
  • \"%1\" is the parameter passed to the command.

After the configuration, you can double-click to execute it on Windows.

Additionally, you need to load org-protocol.el in Emacs. Refer to Installation for details.

@Spike-Leung
Copy link
Author

On web browser, besides bookmarklets, you can also use User Script, for example, org-protocol.user.js binds two keys to Org: store-link and Org: capture.

Thanks [xuchunyang/setup-org-protocol-on-mac(https://github.com/xuchunyang/setup-org-protocol-on-mac/tree/master)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment