Skip to content

Instantly share code, notes, and snippets.

@AloisJanicek
Created November 29, 2020 22:44
Show Gist options
  • Save AloisJanicek/942b93feb7ca3683ce666c913ce56672 to your computer and use it in GitHub Desktop.
Save AloisJanicek/942b93feb7ca3683ce666c913ce56672 to your computer and use it in GitHub Desktop.
Org-protocol setup with emacs inside WSL
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:\\BIN\\org-protocol-to-wsl-helper.bat\" \"%1\""
@echo off
@REM C:\BIN\org-protocol-to-wsl-helper.bat
@REM Genie example https://github.com/arkane-systems/genie
@REM wsl.exe genie -c "/usr/bin/bash --login emacsclient" %1
@REM Default WSL distribution example
wsl.exe emacsclient %1
@Spauldo
Copy link

Spauldo commented Nov 30, 2020

REM is short for REMARK. I believe it comes from the original Dartmouth BASIC. All of the microcomputer BASICs I used back in the 80s used it for comments, and since knowledge of BASIC was fairly widespread back then it made sense for Microsoft to use it for commenting batch files.

The @ just turns off echo for that line. Since your first line is @echo off, you probably don't need it for the REM statements.

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