[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Generic Elisp mechanism to declare file/URI handlers for Emacs (was: bug

From: Ihor Radchenko
Subject: Generic Elisp mechanism to declare file/URI handlers for Emacs (was: bug#65469: [PATCH] * etc/emacsclient.desktop: Make Emacs default application for org-protocol)
Date: Tue, 19 Sep 2023 11:14:23 +0000

[ moving to emacs-devel ]

Po Lu <luangruo@yahoo.com> writes:

>> I am also wondering is something similar might be done for Android build.
>> Having something like "Share with ... Emacs" might be an interesting
>> feature.
> I wrote this feature back in August, immediately upon this patch's
> installation in master.  Emacs registers itself as a URL handler for
> ``org-protocol://'' links, which are then provided to emacsclient.


Apparently, Android builds have to implement handlers in the source code
directly. This makes adding new handlers for Emacs non-trivial - one
needs to know both about .desktop file and also about Android-specific
code (and what about MacOS-specific and Windows-specific?).

Would it make sense to create a more generic mechanism to collect a list
of handlers from all the Elisp sources in Emacs and then generate
Linux/Android/etc-specific definitions automatically when Emacs is

I imagine something akin how ;;;###autoload works - Elisp libraries that
implement handling of certain file types or URI protocols declare this
fact and then Emacs automatically pick this info, generating .desktop
files and relevant parts of Andoid
(java/org/gnu/emacs/EmacsOpenActivity.java) and whatever else necessary.

Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]