GNU bug report logs - #65469
[PATCH] * etc/emacsclient.desktop: Make Emacs default application for org-protocol

Previous Next

Package: emacs;

Reported by: Ihor Radchenko <yantar92 <at> posteo.net>

Date: Wed, 23 Aug 2023 09:31:02 UTC

Severity: normal

Tags: patch

Fixed in version 29.2

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Ihor Radchenko <yantar92 <at> posteo.net>
Cc: bjorn.bidar <at> thaodan.de, stefankangas <at> gmail.com, 65469 <at> debbugs.gnu.org
Subject: bug#65469: [PATCH] * etc/emacsclient.desktop: Make Emacs default application for org-protocol
Date: Tue, 19 Sep 2023 16:50:42 +0300
> From: Ihor Radchenko <yantar92 <at> posteo.net>
> Cc: bjorn.bidar <at> thaodan.de, 65469 <at> debbugs.gnu.org, stefankangas <at> gmail.com
> Date: Tue, 19 Sep 2023 13:16:58 +0000
> 
> Eli Zaretskii <eliz <at> gnu.org> 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?




This bug report was last modified 1 year and 243 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.