bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#65469: [PATCH] * etc/emacsclient.desktop: Make Emacs default applica


From: Eli Zaretskii
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@posteo.net>
> Cc: bjorn.bidar@thaodan.de, 65469@debbugs.gnu.org, stefankangas@gmail.com
> Date: Tue, 19 Sep 2023 13:16:58 +0000
> 
> Eli Zaretskii <eliz@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?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]