It appears that the adb
method in tramp-adb.el
may be worth studying for inspiration.
A lighter-weight alternative to TRAMP that would still give us better integration with built-in file handlers is
(elisp) Magic File Names
(thanks to Ihor Radchenko for the suggestion). If we go down this route, note:If the specified file name matches more than one handler, the one whose match starts last in the file name gets precedence. This rule is chosen so that handlers for jobs such as uncompression are handled first, before handlers for jobs such as remote file access.
We'd need to test the behavior of interacting with filenames like
hyper://PUBLIC-KEY/foo.tar.gz
.
See
wip/file-handler
branch for progress.
You may also consider a handler that intercepts all the file names, checks
default-directory
or some keyword in Org file, and then possibly handles the file iff we are already inside/within context of a hyperdrive.
See
wip/file-handler
branch from January 2024.