all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Po Lu <luangruo@yahoo.com>
To: Ihor Radchenko <yantar92@posteo.net>
Cc: "Björn Bidar" <bjorn.bidar@thaodan.de>,
	eliz@gnu.org, stefankangas@gmail.com, emacs-devel@gnu.org
Subject: Re: Generic Elisp mechanism to declare file/URI handlers for Emacs
Date: Tue, 19 Sep 2023 19:44:41 +0800	[thread overview]
Message-ID: <87wmwmv13q.fsf@yahoo.com> (raw)
In-Reply-To: <87sf7ao1o0.fsf@localhost> (Ihor Radchenko's message of "Tue, 19 Sep 2023 11:14:23 +0000")

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?



  reply	other threads:[~2023-09-19 11:44 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-23  9:30 bug#65469: [PATCH] * etc/emacsclient.desktop: Make Emacs default application for org-protocol Ihor Radchenko
2023-08-23 22:39 ` Stefan Kangas
2023-09-01 18:50   ` Stefan Kangas
2023-09-17 13:09     ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-17 13:16       ` Stefan Kangas
2023-09-17 14:18         ` Eli Zaretskii
2023-09-17 14:31           ` Stefan Kangas
2023-09-18  8:30         ` Ihor Radchenko
2023-09-18 11:02           ` Stefan Kangas
2023-09-18 11:15           ` Eli Zaretskii
2023-09-18 11:18             ` Stefan Kangas
2023-09-18 13:00             ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-18 13:20               ` Ihor Radchenko
2023-09-18 13:32                 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-19 11:14                   ` 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 11:44                     ` Po Lu [this message]
2023-09-19 13:06                       ` Generic Elisp mechanism to declare file/URI handlers for Emacs Ihor Radchenko
2023-09-19 13:25                         ` Po Lu
2023-09-20  9:26                           ` Ihor Radchenko
2023-09-20  9:57                             ` Po Lu
2023-09-20 11:17                               ` 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 12:23                                 ` Should Emacs declare itself as being able to open all the text/* mimetypes? Po Lu
2023-09-20 12:38                                   ` Ihor Radchenko
2023-09-19 13:46                         ` Generic Elisp mechanism to declare file/URI handlers for Emacs Eli Zaretskii
2023-09-19 13:56                           ` Ihor Radchenko
2023-09-20 11:15                             ` Eli Zaretskii
2023-09-19 16:28                     ` Generic Elisp mechanism to declare file/URI handlers for Emacs (was: bug#65469: [PATCH] * etc/emacsclient.desktop: Make Emacs default application for org-protocol) Jim Porter
2023-09-18 14:33               ` bug#65469: [PATCH] * etc/emacsclient.desktop: Make Emacs default application for org-protocol Eli Zaretskii
2023-09-18 23:04                 ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-19  2:31                   ` Eli Zaretskii
2023-09-19  7:59                     ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-19 11:06                       ` Eli Zaretskii
2023-09-19 11:21                         ` Ihor Radchenko
2023-09-19 12:24                           ` Eli Zaretskii
2023-09-19 13:16                             ` Ihor Radchenko
2023-09-19 13:50                               ` Eli Zaretskii
2023-09-19 13:58                                 ` Ihor Radchenko
2023-09-19 14:40                                   ` Eli Zaretskii
2023-09-19 21:26                                     ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-20  9:32                                     ` Ihor Radchenko
2023-09-20 13:39                                       ` Eli Zaretskii
2023-09-20 14:01                                         ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-20 15:01                                           ` Eli Zaretskii
2023-09-23 21:35                                             ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-20 22:41                                         ` Stefan Kangas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wmwmv13q.fsf@yahoo.com \
    --to=luangruo@yahoo.com \
    --cc=bjorn.bidar@thaodan.de \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=stefankangas@gmail.com \
    --cc=yantar92@posteo.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.