From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu Newsgroups: gmane.emacs.devel Subject: Re: Generic Elisp mechanism to declare file/URI handlers for Emacs Date: Tue, 19 Sep 2023 19:44:41 +0800 Message-ID: <87wmwmv13q.fsf@yahoo.com> References: <87v8d66r7l.fsf@localhost> <87led53q0c.fsf@thaodan.de> <87fs3bkho4.fsf@localhost> <835y47g2b2.fsf@gnu.org> <874jjrk48q.fsf@localhost> <87cyyfwqs5.fsf@yahoo.com> <87sf7ao1o0.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40684"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: =?utf-8?Q?Bj=C3=B6rn?= Bidar , eliz@gnu.org, stefankangas@gmail.com, emacs-devel@gnu.org To: Ihor Radchenko Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Sep 19 13:45:48 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qiZAq-000ANC-Mn for ged-emacs-devel@m.gmane-mx.org; Tue, 19 Sep 2023 13:45:48 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qiZAL-0003hK-5U; Tue, 19 Sep 2023 07:45:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qiZA9-0003Pz-Me for emacs-devel@gnu.org; Tue, 19 Sep 2023 07:45:08 -0400 Original-Received: from sonic317-34.consmr.mail.ne1.yahoo.com ([66.163.184.45]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qiZA6-0004sL-PN for emacs-devel@gnu.org; Tue, 19 Sep 2023 07:45:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1695123895; bh=4t3GkUVU1EoU/aRGt+tDEdB6FN6NxSEWK8Tif8SUZV8=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=le9mlXARNH6AX+wmSLtCb5sPaXn1g/8XVz2hsOcAY+GeVivIzp1kfoINQwLcMzWNYR19e9q69RZB/vtk+ot5mIbKiDLTcloUvk5dQebBsR68iatChjhRfnIZZ8gGk7FlurB9SJb3UL9eOgwN7weSSf1xuqBbcw1xK/1fvCi2A3EvyUMsO0CLR0QzXhoWc8mQxnUHzC8fWqFeoQysqOuRH1dx3bQCPJa8HNI1NlzXGC81ACK0xNgeqmSo4mFKCRNb+DswCSR9BfK8uwpQ+7T+Gdyr8BluqwTBYCNrWdtrLs9eZ/uk/WXZMlFJ/vQVuCwTTbe9RSrWloKVOXwY5lEVyw== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1695123895; bh=szrMGn0doQTaSnTSBRXv6XUGnp+lslIhnCgqZ2noug3=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=Pa4lu4ROwoZPtyIAy6VpJWuE5PC/RKna9CCUzpRr2RdNTDtwIhp4uKfcTd3SjsW/URFNnnU4wFlCMyqa9pdKyyt1bfVjES1jGvGowv4wJjUgu8rcM/BfINBoeSAsz9fjRKUOlb48QSYUq+KmWhimxQG2+JIzqf/DoLw1QD3MUyiO7xPfxvAzQvisGkXEqR5M0HVtYi3tghHgsBSGgQhHd+a/qSbV7aeJKefx3p9zwm4q6mzQgixM+6kqwFU1qOVKE824UJPmPX8jjH1mPIyq1lxfC8gJ1/1rPObuQq76pylB8HXmgn1a8+JR+I835TnkNzp9r+eYBw0EeUZ4qt8J1A== X-YMail-OSG: r7Hz6ooVM1l0TAff83AxI.6saYtFcxnOQtd4RxUZWQv_8z2ipc6pa4en7B0l1zW ArP9m229sog6DE50H.da7ZaflSecGrIgTv6zV3Lgf3Av6yYK36nCwmjQK7bXYX3itjB.ZrsdsSDF FQznIF25To3JNbKK6wpt7sFZ3flEu54rcqj7iNVX56Pko8HvJY32J3zkrECWYN0MBNyZbHoQxVKp eoOOg9t2m8ldy86vTfUF7XJi6sGE_eOJp3j93JhXGflNNnEaTphgA0foE.8JR5kwQ52jMQh4Q.ZL J493pgpNsetL0cjMdpzET.pvkdNjRFSA9NzGmKzON85KKR4PMdh_GvUzOjHh67Qn3k0DVRFRBNay 89jFpHXeCxEffoux3BNz1MR2mILqMePANp3yppBy04pGy_8LVXs8cqrPXDykOOtbq4.w1eKEmXU2 p68btb16sB97PY8udDRZUPVLijaO0pw7fzC9nipIDxwhe_TqzrmR6btpcpBqWyPSMXVXB2A2FtTz b7.ufnYQhY0yrQ0cPNR0TirFBoLFG_nvebWMyzFmeJR1FENpQjhWI8Loy1fhWi_iUgyqQ0fSNEuF jaUBK5u_H9NpWcX.09_AEmvzzw4qrt5CgnTtAkquAbPqPF_J1nvS6XcFb_bSLAGliLdVPJLiLqCF biSs76oP9GQm0E0NguI4EJNWOSfWnmV4bAXLmTpAZf9lisj2gLWZexUlzDjZ_RVzLW1hBAc1G65K rPO94hCs1AoNCcqPsWg3kp42PCWiokjddgAd_TOzvpzoXvPdmifboh..oNtP9V_DkK.CT65PPxHJ TMLxPgkOcilGxtchVMK8F3qNCfwVGWQfTy3mrTLaem X-Sonic-MF: X-Sonic-ID: 8a830ff8-ed47-43f3-b9af-521694105586 Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic317.consmr.mail.ne1.yahoo.com with HTTP; Tue, 19 Sep 2023 11:44:55 +0000 Original-Received: by hermes--production-sg3-55c667b499-tw4nx (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID c1402eb3d9f4165f542e0e425b98e612; Tue, 19 Sep 2023 11:44:49 +0000 (UTC) In-Reply-To: <87sf7ao1o0.fsf@localhost> (Ihor Radchenko's message of "Tue, 19 Sep 2023 11:14:23 +0000") X-Mailer: WebService/1.1.21797 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=66.163.184.45; envelope-from=luangruo@yahoo.com; helo=sonic317-34.consmr.mail.ne1.yahoo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:310749 Archived-At: Ihor Radchenko 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: 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?