From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#65469: [PATCH] * etc/emacsclient.desktop: Make Emacs default application for org-protocol Date: Tue, 19 Sep 2023 16:50:42 +0300 Message-ID: <83jzsmclvx.fsf@gnu.org> References: <87v8d66r7l.fsf@localhost> <87led53q0c.fsf@thaodan.de> <87fs3bkho4.fsf@localhost> <835y47g2b2.fsf@gnu.org> <83r0mveel5.fsf@gnu.org> <87cyyfnkvf.fsf@thaodan.de> <837comevw5.fsf@gnu.org> <877comr3te.fsf@thaodan.de> <8334zae81i.fsf@gnu.org> <87o7hyo1bs.fsf@localhost> <83v8c6cpwe.fsf@gnu.org> <87a5tinvzp.fsf@localhost> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32028"; mail-complaints-to="usenet@ciao.gmane.io" Cc: bjorn.bidar@thaodan.de, stefankangas@gmail.com, 65469@debbugs.gnu.org To: Ihor Radchenko Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Sep 19 15:51:16 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1qib8G-00086X-1Q for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 19 Sep 2023 15:51:16 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qib7v-0005Ns-2W; Tue, 19 Sep 2023 09:50:55 -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 1qib7t-0005NM-KE for bug-gnu-emacs@gnu.org; Tue, 19 Sep 2023 09:50:53 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qib7t-000280-CW for bug-gnu-emacs@gnu.org; Tue, 19 Sep 2023 09:50:53 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qib81-00074q-LP for bug-gnu-emacs@gnu.org; Tue, 19 Sep 2023 09:51:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 19 Sep 2023 13:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65469 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 65469-submit@debbugs.gnu.org id=B65469.169513145827193 (code B ref 65469); Tue, 19 Sep 2023 13:51:01 +0000 Original-Received: (at 65469) by debbugs.gnu.org; 19 Sep 2023 13:50:58 +0000 Original-Received: from localhost ([127.0.0.1]:55663 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qib7x-00074X-D8 for submit@debbugs.gnu.org; Tue, 19 Sep 2023 09:50:57 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38688) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qib7u-00074J-IS for 65469@debbugs.gnu.org; Tue, 19 Sep 2023 09:50:55 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qib7g-00024x-Aj; Tue, 19 Sep 2023 09:50:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=4LycGKmxlh30iq3Pm2xdL0xtFWkeBDSIZ+KBpzJav3M=; b=SkE50B4cIoni 601CsJ5H7nxdF9O4uaDKAdgVmAOH4I01U1I+/72iImxGqBEbo7oeVseZ6eDBHDhgKhgd8/UKqFtwi CYl0D8XL4MnbZ0m82cwC3bfpoeGP/c5CEY/j74Ey0aHzTNMhdxyGXfbfCHN4bW84XlmMltoY/CUhl u9BnD4sj+gqOs/zZp5Ramamtedspr+KqrJ/ebHyAAV/3O+HYvkTcuIziQVyPQoEgVsQtYioYqcc4n x/sT28g0sgh/jSChEQ5PuW205KUwcEKe55nP9mZa4f3AKP8AB75GvJsBa2TlcwihqWz2+gDTjGAgS Zb2yoAEZqjou5saIFVhdTQ==; In-Reply-To: <87a5tinvzp.fsf@localhost> (message from Ihor Radchenko on Tue, 19 Sep 2023 13:16:58 +0000) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:270877 Archived-At: > From: Ihor Radchenko > Cc: bjorn.bidar@thaodan.de, 65469@debbugs.gnu.org, stefankangas@gmail.com > Date: Tue, 19 Sep 2023 13:16:58 +0000 > > Eli Zaretskii writes: > > > Specifically, with the following wording be accurate and clear? > > > > ** On capable systems, Emacs is now the default application for 'org-protocol'. > > Org mode provides a way to quickly capture bookmarks, notes, and links > > using 'emacsclient': > > > > emacsclient "org-protocol://store-link?url=URL&title=TITLE" > > > > Previously, users had to manually configure their desktop environment > > to open 'org-protocol' links in Emacs. On any XDG-compliant system, > > including GNU/Linux and some others, these links should now open in > > Emacs automatically, as the "emacsclient.desktop" file now arranges > > for Emacs to be the default application for the 'org-protocol' URI > > scheme. See the Org mode manual, Info node "(org) Protocols" for more > > details. > > Sounds good to me. May also add about Android (Po Lu implemented the > relevant handler in d286f6889cf). Thanks, will do. > >> Also, a number of applications, expect xdg-open executable to be > >> available on GNU/Linux systems as a generic way to open files using > >> "right" application. Including Emacs itself - see > >> `browse-url-can-use-xdg-open', for example. > > > > Is this related to the issue with org-protocol? > > Yes. For example, a browser bookmarklet like > > javascript:location.href='org-protocol://capture?' + > new URLSearchParams({ > template: 'x', url: window.location.href, > title: document.title, body: window.getSelection()}); > > will, by default, leverage xdg-open to handle org-protocol://... link > type. xdg-open consults mime-database, built using .desktop files > provided by installed applications. > > With the discussed patch, e.g. Firefox will automatically use Emacs when > clicking on the above bookmarklet. Then, strictly speaking, it is not > necessary for the GNU/Linux system to be fully XDG-compiant. It will be > enough that (1) Emacs provides .desktop file; (2) Linux has xdg-open and > its dependencies installed; (3) Firefox makes use of xdg-open. I don't understand what should the NEWS entry about org-protocol support say, in addition to what it already says, to cover these factoids. The NEWS entry is about the emacsclient.desktop file and its contribution to automatic support of org-protocol; isn't what you say above part of that automatic support?