[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Generic Elisp mechanism to declare file/URI handlers for Emacs
From: |
Po Lu |
Subject: |
Re: Generic Elisp mechanism to declare file/URI handlers for Emacs |
Date: |
Tue, 19 Sep 2023 19:44:41 +0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Ihor Radchenko <yantar92@posteo.net> writes:
> 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?).
Introducing a handler for a new URL scheme only requires the
introduction of a single line of Java:
uri.getScheme ().equals ("your-protocol")
and one line of XML in AndroidManifest.xml:
<data android:scheme="your-protocol"/>
Much easier than introducing handlers into .desktop files, which present
potential authors with a litany of pedantic rules to be followed.
> 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
> compiled?
That's overengineering. What in Emacs, save for org-protocol, defines
such URL handlers? And are they particular to Emacs to the same extent
that org-protocol is, justifying Emacs's placement within the ``Open
With'' dialog on my phone?
- Generic Elisp mechanism to declare file/URI handlers for Emacs (was: bug#65469: [PATCH] * etc/emacsclient.desktop: Make Emacs default application for org-protocol), Ihor Radchenko, 2023/09/19
- Re: Generic Elisp mechanism to declare file/URI handlers for Emacs,
Po Lu <=
- Re: Generic Elisp mechanism to declare file/URI handlers for Emacs, Ihor Radchenko, 2023/09/19
- Re: Generic Elisp mechanism to declare file/URI handlers for Emacs, Po Lu, 2023/09/19
- Re: Generic Elisp mechanism to declare file/URI handlers for Emacs, Ihor Radchenko, 2023/09/20
- Re: Generic Elisp mechanism to declare file/URI handlers for Emacs, Po Lu, 2023/09/20
- Should Emacs declare itself as being able to open all the text/* mimetypes? (was: Generic Elisp mechanism to declare file/URI handlers for Emacs), Ihor Radchenko, 2023/09/20
- Re: Should Emacs declare itself as being able to open all the text/* mimetypes?, Po Lu, 2023/09/20
- Re: Should Emacs declare itself as being able to open all the text/* mimetypes?, Ihor Radchenko, 2023/09/20
- Re: Generic Elisp mechanism to declare file/URI handlers for Emacs, Eli Zaretskii, 2023/09/19
- Re: Generic Elisp mechanism to declare file/URI handlers for Emacs, Ihor Radchenko, 2023/09/19
- Re: Generic Elisp mechanism to declare file/URI handlers for Emacs, Eli Zaretskii, 2023/09/20