unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#65469: [PATCH] * etc/emacsclient.desktop: Make Emacs default application for org-protocol
@ 2023-08-23  9:30 Ihor Radchenko
  2023-08-23 22:39 ` Stefan Kangas
  0 siblings, 1 reply; 32+ messages in thread
From: Ihor Radchenko @ 2023-08-23  9:30 UTC (permalink / raw)
  To: 65469

[-- Attachment #1: Type: text/plain, Size: 997 bytes --]

Tags: patch

Hi,

Org mode provides a way to quickly capture bookmarks, notes, and links
using emacsclient:

emacsclient "org-protocol://store-link?url=URL&title=TITLE"

Also, see https://orgmode.org/manual/Protocols.html

However, this can only be done via command line by default.
Not DE integration is available and users have to write their own
.desktop files specifically to allow, for example browser bookmarklet
running Emacs + org-protocol.

Would it make sense to add x-scheme-handler/org-protocol handler to the
default Emacsclient desktop file?

In GNU Emacs 30.0.50 (build 54, x86_64-pc-linux-gnu, GTK+ Version
 3.24.38, cairo version 1.17.8) of 2023-08-22 built on localhost
Repository revision: c09d78f3c0818d7391760e84f94a442e8beb22dd
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101008
System Description: Gentoo Linux

Configured using:
 'configure --with-native-compilation
 JAVAC=/etc/java-config-2/current-system-vm/bin/javac'


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-etc-emacsclient.desktop-Make-Emacs-default-applicati.patch --]
[-- Type: text/patch, Size: 1334 bytes --]

From 77e17eb6adf744a2b9565ca6f434fd6d488e84b0 Mon Sep 17 00:00:00 2001
Message-ID: <77e17eb6adf744a2b9565ca6f434fd6d488e84b0.1692782734.git.yantar92@posteo.net>
From: Ihor Radchenko <yantar92@posteo.net>
Date: Wed, 23 Aug 2023 12:24:18 +0300
Subject: [PATCH] * etc/emacsclient.desktop: Make Emacs default application for
 org-protocol

---
 etc/emacsclient.desktop | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/etc/emacsclient.desktop b/etc/emacsclient.desktop
index a9f840c7033..4395d3b02bc 100644
--- a/etc/emacsclient.desktop
+++ b/etc/emacsclient.desktop
@@ -2,7 +2,7 @@
 Name=Emacs (Client)
 GenericName=Text Editor
 Comment=Edit text
-MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;
+MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;x-scheme-handler/org-protocol;
 Exec=sh -c "if [ -n \\"\\$*\\" ]; then exec emacsclient --alternate-editor= --display=\\"\\$DISPLAY\\" \\"\\$@\\"; else exec emacsclient --alternate-editor= --create-frame; fi" sh %F
 Icon=emacs
 Type=Application
-- 
2.41.0


[-- Attachment #3: Type: text/plain, Size: 224 bytes --]


-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* bug#65469: [PATCH] * etc/emacsclient.desktop: Make Emacs default application for org-protocol
  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
  0 siblings, 1 reply; 32+ messages in thread
From: Stefan Kangas @ 2023-08-23 22:39 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: 65469

Ihor Radchenko <yantar92@posteo.net> writes:

> Would it make sense to add x-scheme-handler/org-protocol handler to the
> default Emacsclient desktop file?

I think it makes sense, yes.  I guess not a lot of other things try to
register "org-protocol" handlers besides Emacs, and in any case this
would make some users' lives easier.  So I don't see any drawbacks.





^ permalink raw reply	[flat|nested] 32+ messages in thread

* bug#65469: [PATCH] * etc/emacsclient.desktop: Make Emacs default application for org-protocol
  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
  0 siblings, 1 reply; 32+ messages in thread
From: Stefan Kangas @ 2023-09-01 18:50 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: 65469-done

Version: 30.1

> I think it makes sense, yes.  I guess not a lot of other things try to
> register "org-protocol" handlers besides Emacs, and in any case this
> would make some users' lives easier.  So I don't see any drawbacks.

Pushed to master, thanks.





^ permalink raw reply	[flat|nested] 32+ messages in thread

* bug#65469: [PATCH] * etc/emacsclient.desktop: Make Emacs default application for org-protocol
  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
  0 siblings, 1 reply; 32+ messages in thread
From: Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-09-17 13:09 UTC (permalink / raw)
  To: 65469; +Cc: yantar92, stefankangas

Stefan Kangas <stefankangas@gmail.com> writes:

> Version: 30.1
>
>> I think it makes sense, yes.  I guess not a lot of other things try
>> to
>> register "org-protocol" handlers besides Emacs, and in any case this
>> would make some users' lives easier.  So I don't see any drawbacks.
>
> Pushed to master, thanks.

Would it make sense to apply the patch to Emacs 29.1 too? Org-protocol
is already supported and some user package extra desktop files because
of it.





^ permalink raw reply	[flat|nested] 32+ messages in thread

* bug#65469: [PATCH] * etc/emacsclient.desktop: Make Emacs default application for org-protocol
  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-18  8:30         ` Ihor Radchenko
  0 siblings, 2 replies; 32+ messages in thread
From: Stefan Kangas @ 2023-09-17 13:16 UTC (permalink / raw)
  To: Björn Bidar, 65469; +Cc: yantar92

Björn Bidar <bjorn.bidar@thaodan.de> writes:

> Would it make sense to apply the patch to Emacs 29.1 too? Org-protocol
> is already supported and some user package extra desktop files because
> of it.

I'm not sure, since the issue is not new.  Eli, WDYT?

BTW, Ihor, could we have a NEWS item for this change please?
I forgot to ask for one before.





^ permalink raw reply	[flat|nested] 32+ messages in thread

* bug#65469: [PATCH] * etc/emacsclient.desktop: Make Emacs default application for org-protocol
  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
  1 sibling, 1 reply; 32+ messages in thread
From: Eli Zaretskii @ 2023-09-17 14:18 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: bjorn.bidar, yantar92, 65469

> Cc: yantar92@posteo.net
> From: Stefan Kangas <stefankangas@gmail.com>
> Date: Sun, 17 Sep 2023 06:16:08 -0700
> 
> Björn Bidar <bjorn.bidar@thaodan.de> writes:
> 
> > Would it make sense to apply the patch to Emacs 29.1 too? Org-protocol
> > is already supported and some user package extra desktop files because
> > of it.
> 
> I'm not sure, since the issue is not new.  Eli, WDYT?

If it's safe, I don't mind.





^ permalink raw reply	[flat|nested] 32+ messages in thread

* bug#65469: [PATCH] * etc/emacsclient.desktop: Make Emacs default application for org-protocol
  2023-09-17 14:18         ` Eli Zaretskii
@ 2023-09-17 14:31           ` Stefan Kangas
  0 siblings, 0 replies; 32+ messages in thread
From: Stefan Kangas @ 2023-09-17 14:31 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: bjorn.bidar, yantar92, 65469

fixed 65469 30.1
reopen 65469
thanks

Eli Zaretskii <eliz@gnu.org> writes:

> If it's safe, I don't mind.

I think it's safe, but I'll wait for a NEWS item from Ihor before
cherry-picking it.  The NEWS item should be for Emacs 29.2.





^ permalink raw reply	[flat|nested] 32+ messages in thread

* bug#65469: [PATCH] * etc/emacsclient.desktop: Make Emacs default application for org-protocol
  2023-09-17 13:16       ` Stefan Kangas
  2023-09-17 14:18         ` Eli Zaretskii
@ 2023-09-18  8:30         ` Ihor Radchenko
  2023-09-18 11:02           ` Stefan Kangas
  2023-09-18 11:15           ` Eli Zaretskii
  1 sibling, 2 replies; 32+ messages in thread
From: Ihor Radchenko @ 2023-09-18  8:30 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: Björn Bidar, 65469

[-- Attachment #1: Type: text/plain, Size: 171 bytes --]

Stefan Kangas <stefankangas@gmail.com> writes:

> BTW, Ihor, could we have a NEWS item for this change please?
> I forgot to ask for one before.

Sure.
See the attached.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-etc-NEWS-Document-handling-org-protocol-URI-scheme-b.patch --]
[-- Type: text/x-patch, Size: 1398 bytes --]

From 11531beda02f89517c660f0b44375d301fbf86dc Mon Sep 17 00:00:00 2001
Message-ID: <11531beda02f89517c660f0b44375d301fbf86dc.1695025691.git.yantar92@posteo.net>
From: Ihor Radchenko <yantar92@posteo.net>
Date: Mon, 18 Sep 2023 11:26:27 +0300
Subject: [PATCH] * etc/NEWS: Document handling 'org-protocol' URI scheme
 (bug#65469)

The commit implementing the new functionality is 05a7c91b91c.
---
 etc/NEWS | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/etc/NEWS b/etc/NEWS
index f9ebe312612..0d6be3ed2d9 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -55,6 +55,20 @@ ALSA on these operating systems instead.
 For native compiled Lisp functions 'describe-function' prints (after
 the signature) the automatically inferred function type as well.
 
+** Emacs is now the default application for 'org-protocol' URI scheme
+
+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 setup their Linux desktop
+environment to open 'org-protocol' links in Emacs.  Now, these links
+should be open in Emacs automatically.
+
+See "(org) Protocols for External Access" node in Org mode manual for
+more details.
+
 ---
 ** New user option 'describe-bindings-outline-rules'.
 This user option controls outline visibility in the output buffer of
-- 
2.42.0


[-- Attachment #3: Type: text/plain, Size: 225 bytes --]



-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* bug#65469: [PATCH] * etc/emacsclient.desktop: Make Emacs default application for org-protocol
  2023-09-18  8:30         ` Ihor Radchenko
@ 2023-09-18 11:02           ` Stefan Kangas
  2023-09-18 11:15           ` Eli Zaretskii
  1 sibling, 0 replies; 32+ messages in thread
From: Stefan Kangas @ 2023-09-18 11:02 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Björn Bidar, 65469

reopen 65469
close 65469 29.1
thanks

Ihor Radchenko <yantar92@posteo.net> writes:

> Stefan Kangas <stefankangas@gmail.com> writes:
>
>> BTW, Ihor, could we have a NEWS item for this change please?
>> I forgot to ask for one before.
>
> Sure.
> See the attached.

Thanks, I installed this with some light edits on emacs-29 (commit
5611274bbda).  I also cherry-picked commit 05a7c91b91c.





^ permalink raw reply	[flat|nested] 32+ messages in thread

* bug#65469: [PATCH] * etc/emacsclient.desktop: Make Emacs default application for org-protocol
  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
  1 sibling, 2 replies; 32+ messages in thread
From: Eli Zaretskii @ 2023-09-18 11:15 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: bjorn.bidar, stefankangas, 65469

> Cc: Björn Bidar <bjorn.bidar@thaodan.de>,
>  65469@debbugs.gnu.org
> From: Ihor Radchenko <yantar92@posteo.net>
> Date: Mon, 18 Sep 2023 08:30:03 +0000
> 
> +** Emacs is now the default application for 'org-protocol' URI scheme
> +
> +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 setup their Linux desktop
> +environment to open 'org-protocol' links in Emacs.  Now, these links
> +should be open in Emacs automatically.
> +
> +See "(org) Protocols for External Access" node in Org mode manual for
> +more details.

Thanks.  I needed to fix this slightly, to make it clear that this is
limited to GNU/Linux desktops.





^ permalink raw reply	[flat|nested] 32+ messages in thread

* bug#65469: [PATCH] * etc/emacsclient.desktop: Make Emacs default application for org-protocol
  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
  1 sibling, 0 replies; 32+ messages in thread
From: Stefan Kangas @ 2023-09-18 11:18 UTC (permalink / raw)
  To: Eli Zaretskii, Ihor Radchenko; +Cc: bjorn.bidar, 65469

Eli Zaretskii <eliz@gnu.org> writes:

> Thanks.  I needed to fix this slightly, to make it clear that this is
> limited to GNU/Linux desktops.

Looks great, thanks.





^ permalink raw reply	[flat|nested] 32+ messages in thread

* bug#65469: [PATCH] * etc/emacsclient.desktop: Make Emacs default application for org-protocol
  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 14:33               ` Eli Zaretskii
  1 sibling, 2 replies; 32+ messages in thread
From: Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-09-18 13:00 UTC (permalink / raw)
  To: eliz, yantar92; +Cc: 65469, stefankangas

On Monday, 18 September 2023, Eli Zaretskii wrote:
> > Cc: Björn Bidar <bjorn.bidar@thaodan.de>,
> >  65469@debbugs.gnu.org
> > From: Ihor Radchenko <yantar92@posteo.net>
> > Date: Mon, 18 Sep 2023 08:30:03 +0000
> > 
> > +** Emacs is now the default application for 'org-protocol' URI scheme
> > +
> > +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 setup their Linux desktop
> > +environment to open 'org-protocol' links in Emacs.  Now, these links
> > +should be open in Emacs automatically.
> > +
> > +See "(org) Protocols for External Access" node in Org mode manual for
> > +more details.
> 
> Thanks.  I needed to fix this slightly, to make it clear that this is
> limited to GNU/Linux desktops.
>

It applies to all operating system that use desktop environments that  comply with XDG so for example also BSD.

^ permalink raw reply	[flat|nested] 32+ messages in thread

* bug#65469: [PATCH] * etc/emacsclient.desktop: Make Emacs default application for org-protocol
  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-18 14:33               ` Eli Zaretskii
  1 sibling, 1 reply; 32+ messages in thread
From: Ihor Radchenko @ 2023-09-18 13:20 UTC (permalink / raw)
  To: Björn Bidar; +Cc: Po Lu, 65469, eliz, stefankangas

Björn Bidar <bjorn.bidar@thaodan.de> writes:

>> Thanks.  I needed to fix this slightly, to make it clear that this is
>> limited to GNU/Linux desktops.
>
> It applies to all operating system that use desktop environments that  comply with XDG so for example also BSD.

I am also wondering is something similar might be done for Android build.
Having something like "Share with ... Emacs" might be an interesting
feature.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>





^ permalink raw reply	[flat|nested] 32+ messages in thread

* bug#65469: [PATCH] * etc/emacsclient.desktop: Make Emacs default application for org-protocol
  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
  0 siblings, 0 replies; 32+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-09-18 13:32 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Björn Bidar, eliz, stefankangas, 65469

Ihor Radchenko <yantar92@posteo.net> writes:

> Björn Bidar <bjorn.bidar@thaodan.de> writes:
>
>>> Thanks.  I needed to fix this slightly, to make it clear that this is
>>> limited to GNU/Linux desktops.
>>
>> It applies to all operating system that use desktop environments that  comply with XDG so for example also BSD.
>
> I am also wondering is something similar might be done for Android build.
> Having something like "Share with ... Emacs" might be an interesting
> feature.

I wrote this feature back in August, immediately upon this patch's
installation in master.  Emacs registers itself as a URL handler for
``org-protocol://'' links, which are then provided to emacsclient.





^ permalink raw reply	[flat|nested] 32+ messages in thread

* bug#65469: [PATCH] * etc/emacsclient.desktop: Make Emacs default application for org-protocol
  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 14:33               ` Eli Zaretskii
  2023-09-18 23:04                 ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
  1 sibling, 1 reply; 32+ messages in thread
From: Eli Zaretskii @ 2023-09-18 14:33 UTC (permalink / raw)
  To: Björn Bidar; +Cc: 65469, yantar92, stefankangas

> Cc: 65469@debbugs.gnu.org,stefankangas@gmail.com
> From: Björn Bidar <bjorn.bidar@thaodan.de>
> Date: Mon, 18 Sep 2023 13:00:52 +0000
> 
> On Monday, 18 September 2023, Eli Zaretskii wrote:
> > > Cc: Björn Bidar <bjorn.bidar@thaodan.de>,
> > >  65469@debbugs.gnu.org
> > > From: Ihor Radchenko <yantar92@posteo.net>
> > > Date: Mon, 18 Sep 2023 08:30:03 +0000
> > > 
> > > +** Emacs is now the default application for 'org-protocol' URI scheme
> > > +
> > > +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 setup their Linux desktop
> > > +environment to open 'org-protocol' links in Emacs.  Now, these links
> > > +should be open in Emacs automatically.
> > > +
> > > +See "(org) Protocols for External Access" node in Org mode manual for
> > > +more details.
> > 
> > Thanks.  I needed to fix this slightly, to make it clear that this is
> > limited to GNU/Linux desktops.
> >
> 
> It applies to all operating system that use desktop environments that  comply with XDG so for example also BSD.

Only XDG-compliant desktops? nothing else?





^ permalink raw reply	[flat|nested] 32+ messages in thread

* bug#65469: [PATCH] * etc/emacsclient.desktop: Make Emacs default application for org-protocol
  2023-09-18 14:33               ` 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
  0 siblings, 1 reply; 32+ messages in thread
From: Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-09-18 23:04 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 65469, yantar92, stefankangas

Eli Zaretskii <eliz@gnu.org> writes:

>> It applies to all operating system that use desktop environments
>> that comply with XDG so for example also BSD.
>
> Only XDG-compliant desktops? nothing else?

Well only those that handle xdg desktop files specific uri type
handlers e.g. Gnome, KDE, Xfce etc.

Not sure if there's something such as "fully XDG-compliant".

My phrasing only intended to explain that in theory any operating system
that uses xdg compliant desktop environments works with the change, not
just GNU/QT/GTK/KDE/GNOME Linux.






^ permalink raw reply	[flat|nested] 32+ messages in thread

* bug#65469: [PATCH] * etc/emacsclient.desktop: Make Emacs default application for org-protocol
  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
  0 siblings, 1 reply; 32+ messages in thread
From: Eli Zaretskii @ 2023-09-19  2:31 UTC (permalink / raw)
  To: Björn Bidar; +Cc: 65469, yantar92, stefankangas

> From: Björn Bidar <bjorn.bidar@thaodan.de>
> Cc: yantar92@posteo.net,  65469@debbugs.gnu.org, stefankangas@gmail.com
> Date: Tue, 19 Sep 2023 02:04:52 +0300
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> >> It applies to all operating system that use desktop environments
> >> that comply with XDG so for example also BSD.
> >
> > Only XDG-compliant desktops? nothing else?
> 
> Well only those that handle xdg desktop files specific uri type
> handlers e.g. Gnome, KDE, Xfce etc.
> 
> Not sure if there's something such as "fully XDG-compliant".
> 
> My phrasing only intended to explain that in theory any operating system
> that uses xdg compliant desktop environments works with the change, not
> just GNU/QT/GTK/KDE/GNOME Linux.

Thanks, but I'm looking for wording that we should put in NEWS.  How
would you categorize the systems which can support these desktop files
in words that will be understood by readers of NEWS?





^ permalink raw reply	[flat|nested] 32+ messages in thread

* bug#65469: [PATCH] * etc/emacsclient.desktop: Make Emacs default application for org-protocol
  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
  0 siblings, 1 reply; 32+ messages in thread
From: Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-09-19  7:59 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 65469, yantar92, stefankangas

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Björn Bidar <bjorn.bidar@thaodan.de>
>> Cc: yantar92@posteo.net, 65469@debbugs.gnu.org,
>> stefankangas@gmail.com
>> Date: Tue, 19 Sep 2023 02:04:52 +0300
>> 
>> Eli Zaretskii <eliz@gnu.org> writes:
>> 
>> >> It applies to all operating system that use desktop environments
>> >> that comply with XDG so for example also BSD.
>> >
>> > Only XDG-compliant desktops? nothing else?
>> 
>> Well only those that handle xdg desktop files specific uri type
>> handlers e.g. Gnome, KDE, Xfce etc.
>> 
>> Not sure if there's something such as "fully XDG-compliant".
>>
>> My phrasing only intended to explain that in theory any operating
>> system
>> that uses xdg compliant desktop environments works with the change,
>> not
>> just GNU/QT/GTK/KDE/GNOME Linux.
>
> Thanks, but I'm looking for wording that we should put in NEWS.  How
> would you categorize the systems which can support these desktop files
> in words that will be understood by readers of NEWS?

What about Unix and Unix-like systems excluding macOS?





^ permalink raw reply	[flat|nested] 32+ messages in thread

* bug#65469: [PATCH] * etc/emacsclient.desktop: Make Emacs default application for org-protocol
  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
  0 siblings, 1 reply; 32+ messages in thread
From: Eli Zaretskii @ 2023-09-19 11:06 UTC (permalink / raw)
  To: Björn Bidar; +Cc: 65469, yantar92, stefankangas

> From: Björn Bidar <bjorn.bidar@thaodan.de>
> Cc: yantar92@posteo.net,  65469@debbugs.gnu.org,  stefankangas@gmail.com
> Date: Tue, 19 Sep 2023 10:59:41 +0300
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> >> From: Björn Bidar <bjorn.bidar@thaodan.de>
> >> Cc: yantar92@posteo.net, 65469@debbugs.gnu.org,
> >> stefankangas@gmail.com
> >> Date: Tue, 19 Sep 2023 02:04:52 +0300
> >> 
> >> Eli Zaretskii <eliz@gnu.org> writes:
> >> 
> >> >> It applies to all operating system that use desktop environments
> >> >> that comply with XDG so for example also BSD.
> >> >
> >> > Only XDG-compliant desktops? nothing else?
> >> 
> >> Well only those that handle xdg desktop files specific uri type
> >> handlers e.g. Gnome, KDE, Xfce etc.
> >> 
> >> Not sure if there's something such as "fully XDG-compliant".
> >>
> >> My phrasing only intended to explain that in theory any operating
> >> system
> >> that uses xdg compliant desktop environments works with the change,
> >> not
> >> just GNU/QT/GTK/KDE/GNOME Linux.
> >
> > Thanks, but I'm looking for wording that we should put in NEWS.  How
> > would you categorize the systems which can support these desktop files
> > in words that will be understood by readers of NEWS?
> 
> What about Unix and Unix-like systems excluding macOS?

That sounds too general, I think.

Let me turn the table and ask you: where are those desktop files,
their format and contents described?  If there's some standard
document where they are documented, can you point me to that
document?





^ permalink raw reply	[flat|nested] 32+ messages in thread

* bug#65469: [PATCH] * etc/emacsclient.desktop: Make Emacs default application for org-protocol
  2023-09-19 11:06                       ` Eli Zaretskii
@ 2023-09-19 11:21                         ` Ihor Radchenko
  2023-09-19 12:24                           ` Eli Zaretskii
  0 siblings, 1 reply; 32+ messages in thread
From: Ihor Radchenko @ 2023-09-19 11:21 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Björn Bidar, stefankangas, 65469

Eli Zaretskii <eliz@gnu.org> writes:

>> >> >> It applies to all operating system that use desktop environments
>> >> >> that comply with XDG so for example also BSD.
>> >> >
>> >> > Only XDG-compliant desktops? nothing else?
> ...
> Let me turn the table and ask you: where are those desktop files,
> their format and contents described?  If there's some standard
> document where they are documented, can you point me to that
> document?

desktop files are defined in XDG spec. See
https://www.freedesktop.org/wiki/Specifications/ and
https://www.freedesktop.org/wiki/Specifications/desktop-entry-spec/

So, .desktop files are understood by XDG-compiant desktops and apps. Now
every desktop environment on GNU/Linux actually supports these specs.
Gnome and KDE do. Some others also do. Otherwise, one needs to install
xdg-utils or similar package manually.

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.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>





^ permalink raw reply	[flat|nested] 32+ messages in thread

* bug#65469: [PATCH] * etc/emacsclient.desktop: Make Emacs default application for org-protocol
  2023-09-19 11:21                         ` Ihor Radchenko
@ 2023-09-19 12:24                           ` Eli Zaretskii
  2023-09-19 13:16                             ` Ihor Radchenko
  0 siblings, 1 reply; 32+ messages in thread
From: Eli Zaretskii @ 2023-09-19 12:24 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: bjorn.bidar, stefankangas, 65469

> From: Ihor Radchenko <yantar92@posteo.net>
> Cc: Björn Bidar <bjorn.bidar@thaodan.de>,
>  65469@debbugs.gnu.org,
>  stefankangas@gmail.com
> Date: Tue, 19 Sep 2023 11:21:43 +0000
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > Let me turn the table and ask you: where are those desktop files,
> > their format and contents described?  If there's some standard
> > document where they are documented, can you point me to that
> > document?
> 
> desktop files are defined in XDG spec. See
> https://www.freedesktop.org/wiki/Specifications/ and
> https://www.freedesktop.org/wiki/Specifications/desktop-entry-spec/
> 
> So, .desktop files are understood by XDG-compiant desktops and apps. Now
> every desktop environment on GNU/Linux actually supports these specs.
> Gnome and KDE do. Some others also do. Otherwise, one needs to install
> xdg-utils or similar package manually.

Then why my suggestion up-thread, viz.:

>> It applies to all operating system that use desktop environments
>> that comply with XDG so for example also BSD.
>
> Only XDG-compliant desktops? nothing else?

was rejected?  The reasons given at the time were:

  Well only those that handle xdg desktop files specific uri type
  handlers e.g. Gnome, KDE, Xfce etc.

  Not sure if there's something such as "fully XDG-compliant".

  My phrasing only intended to explain that in theory any operating system
  that uses xdg compliant desktop environments works with the change, not
  just GNU/QT/GTK/KDE/GNOME Linux.

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.

> 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?





^ permalink raw reply	[flat|nested] 32+ messages in thread

* bug#65469: [PATCH] * etc/emacsclient.desktop: Make Emacs default application for org-protocol
  2023-09-19 12:24                           ` Eli Zaretskii
@ 2023-09-19 13:16                             ` Ihor Radchenko
  2023-09-19 13:50                               ` Eli Zaretskii
  0 siblings, 1 reply; 32+ messages in thread
From: Ihor Radchenko @ 2023-09-19 13:16 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: bjorn.bidar, stefankangas, 65469

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).

>> 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.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>





^ permalink raw reply	[flat|nested] 32+ messages in thread

* bug#65469: [PATCH] * etc/emacsclient.desktop: Make Emacs default application for org-protocol
  2023-09-19 13:16                             ` Ihor Radchenko
@ 2023-09-19 13:50                               ` Eli Zaretskii
  2023-09-19 13:58                                 ` Ihor Radchenko
  0 siblings, 1 reply; 32+ messages in thread
From: Eli Zaretskii @ 2023-09-19 13:50 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: bjorn.bidar, stefankangas, 65469

> 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?





^ permalink raw reply	[flat|nested] 32+ messages in thread

* bug#65469: [PATCH] * etc/emacsclient.desktop: Make Emacs default application for org-protocol
  2023-09-19 13:50                               ` Eli Zaretskii
@ 2023-09-19 13:58                                 ` Ihor Radchenko
  2023-09-19 14:40                                   ` Eli Zaretskii
  0 siblings, 1 reply; 32+ messages in thread
From: Ihor Radchenko @ 2023-09-19 13:58 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: bjorn.bidar, stefankangas, 65469

Eli Zaretskii <eliz@gnu.org> writes:

>> > Is this related to the issue with org-protocol?
>> 
>>  ...
>> 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?

I guess it depends on the level of precision you want to have in the
NEWS entry. For me, the NEWS entry sounds good enough, but I wanted to
make things more clear after Björn's comment.

(Note that it was Björn who objected the original wording)

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>





^ permalink raw reply	[flat|nested] 32+ messages in thread

* bug#65469: [PATCH] * etc/emacsclient.desktop: Make Emacs default application for org-protocol
  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
  0 siblings, 2 replies; 32+ messages in thread
From: Eli Zaretskii @ 2023-09-19 14:40 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: bjorn.bidar, stefankangas, 65469

> From: Ihor Radchenko <yantar92@posteo.net>
> Cc: bjorn.bidar@thaodan.de, 65469@debbugs.gnu.org, stefankangas@gmail.com
> Date: Tue, 19 Sep 2023 13:58:53 +0000
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> >> > Is this related to the issue with org-protocol?
> >> 
> >>  ...
> >> 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?
> 
> I guess it depends on the level of precision you want to have in the
> NEWS entry. For me, the NEWS entry sounds good enough, but I wanted to
> make things more clear after Björn's comment.

So what is imprecise in the wording I suggested a couple of messages
ago?





^ permalink raw reply	[flat|nested] 32+ messages in thread

* bug#65469: [PATCH] * etc/emacsclient.desktop: Make Emacs default application for org-protocol
  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
  1 sibling, 0 replies; 32+ messages in thread
From: Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-09-19 21:26 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 65469, Ihor Radchenko, stefankangas

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Ihor Radchenko <yantar92@posteo.net>
>> Cc: bjorn.bidar@thaodan.de, 65469@debbugs.gnu.org, stefankangas@gmail.com
>> Date: Tue, 19 Sep 2023 13:58:53 +0000
>> 
>> Eli Zaretskii <eliz@gnu.org> writes:
>> 
>> >> > Is this related to the issue with org-protocol?
>> >> 
>> >>  ...
>> >> 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?
>> 
>> I guess it depends on the level of precision you want to have in the
>> NEWS entry. For me, the NEWS entry sounds good enough, but I wanted to
>> make things more clear after Björn's comment.
>
> So what is imprecise in the wording I suggested a couple of messages
> ago?

I'm fine with the suggested wording as long as it explains that BSD or
even Hurd are also fine. My comment was only about that not
only Linux as the relevant target OS for the change.

Xdg-open is a thing on any free Unix-like system.





^ permalink raw reply	[flat|nested] 32+ messages in thread

* bug#65469: [PATCH] * etc/emacsclient.desktop: Make Emacs default application for org-protocol
  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
  1 sibling, 1 reply; 32+ messages in thread
From: Ihor Radchenko @ 2023-09-20  9:32 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: bjorn.bidar, stefankangas, 65469

Eli Zaretskii <eliz@gnu.org> writes:

>> I guess it depends on the level of precision you want to have in the
>> NEWS entry. For me, the NEWS entry sounds good enough, but I wanted to
>> make things more clear after Björn's comment.
>
> So what is imprecise in the wording I suggested a couple of messages
> ago?

    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

1. GNU/Linux by itself is not XDG-compliant. Only some desktop
   environments are.

2. System does not have to be fully XDG-compliant. It is enough that
   some apps (like Firefox) follow XDG spec and that xdg-utils is
   installed.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>





^ permalink raw reply	[flat|nested] 32+ messages in thread

* bug#65469: [PATCH] * etc/emacsclient.desktop: Make Emacs default application for org-protocol
  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 22:41                                         ` Stefan Kangas
  0 siblings, 2 replies; 32+ messages in thread
From: Eli Zaretskii @ 2023-09-20 13:39 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: bjorn.bidar, stefankangas, 65469

> From: Ihor Radchenko <yantar92@posteo.net>
> Cc: bjorn.bidar@thaodan.de, 65469@debbugs.gnu.org, stefankangas@gmail.com
> Date: Wed, 20 Sep 2023 09:32:38 +0000
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> >> I guess it depends on the level of precision you want to have in the
> >> NEWS entry. For me, the NEWS entry sounds good enough, but I wanted to
> >> make things more clear after Björn's comment.
> >
> > So what is imprecise in the wording I suggested a couple of messages
> > ago?
> 
>     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
> 
> 1. GNU/Linux by itself is not XDG-compliant. Only some desktop
>    environments are.

How about this minor variation:

    Previously, users had to manually configure their desktop environment
    to open 'org-protocol' links in Emacs.  On any XDG-compliant desktop
    environment, including KDE and GNOME on GNU/Linux, and some others,
    these links should now open in Emacs automatically

> 2. System does not have to be fully XDG-compliant. It is enough that
>    some apps (like Firefox) follow XDG spec and that xdg-utils is
>    installed.

Does the above change solve this problem as well?  Or maybe try this
variant:

  ** 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 desktop
  environment, including KDE and GNOME on GNU/Linux, and some others,
  these links should now open in Emacs automatically if the application
  that opens the link follows the XDG spec and xdg-utils are installed.
  This is because 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.





^ permalink raw reply	[flat|nested] 32+ messages in thread

* bug#65469: [PATCH] * etc/emacsclient.desktop: Make Emacs default application for org-protocol
  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-20 22:41                                         ` Stefan Kangas
  1 sibling, 1 reply; 32+ messages in thread
From: Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-09-20 14:01 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 65469, Ihor Radchenko, stefankangas

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Ihor Radchenko <yantar92@posteo.net>
>> Cc: bjorn.bidar@thaodan.de, 65469@debbugs.gnu.org,
>> stefankangas@gmail.com
>> Date: Wed, 20 Sep 2023 09:32:38 +0000
>> 
>> Eli Zaretskii <eliz@gnu.org> writes:
>> 
>> >> I guess it depends on the level of precision you want to have in
>> >> the
>> >> NEWS entry. For me, the NEWS entry sounds good enough, but I
>> >> wanted to
>> >> make things more clear after Björn's comment.
>> >
>> > So what is imprecise in the wording I suggested a couple of
>> > messages
>> > ago?
>> 
>>     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
>> 
>> 1. GNU/Linux by itself is not XDG-compliant. Only some desktop
>>    environments are.
>
> How about this minor variation:
>
>     Previously, users had to manually configure their desktop
> environment
>     to open 'org-protocol' links in Emacs.  On any XDG-compliant
> desktop
>     environment, including KDE and GNOME on GNU/Linux, and some
> others,
>     these links should now open in Emacs automatically
>
>> 2. System does not have to be fully XDG-compliant. It is enough that
>>    some apps (like Firefox) follow XDG spec and that xdg-utils is
>>    installed.
>
> Does the above change solve this problem as well?  Or maybe try this
> variant:
>
>   ** 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 desktop
>   environment, including KDE and GNOME on GNU/Linux, and some others,
>   these links should now open in Emacs automatically if the application
>   that opens the link follows the XDG spec and xdg-utils are installed.
>   This is because 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.

Why the focus on Linux? For example, you can install KDE on BSD and have
the same benefit of the change as on Linux.





^ permalink raw reply	[flat|nested] 32+ messages in thread

* bug#65469: [PATCH] * etc/emacsclient.desktop: Make Emacs default application for org-protocol
  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
  0 siblings, 1 reply; 32+ messages in thread
From: Eli Zaretskii @ 2023-09-20 15:01 UTC (permalink / raw)
  To: Björn Bidar; +Cc: 65469, yantar92, stefankangas

> From: Björn Bidar <bjorn.bidar@thaodan.de>
> Cc: Ihor Radchenko <yantar92@posteo.net>,  65469@debbugs.gnu.org,
>   stefankangas@gmail.com
> Date: Wed, 20 Sep 2023 17:01:27 +0300
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> >   ** 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 desktop
> >   environment, including KDE and GNOME on GNU/Linux, and some others,
> >   these links should now open in Emacs automatically if the application
> >   that opens the link follows the XDG spec and xdg-utils are installed.
> >   This is because 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.
> 
> Why the focus on Linux?

Not focus, but preference.  It's because GNU/Linux is our main target
system and its users are our main audience.

> For example, you can install KDE on BSD and have the same benefit of
> the change as on Linux.

The above text says "and some others", and it also says "any
XDG-compliant desktop environment".  Why is this not enough?  We don't
have to promote *BSD systems.





^ permalink raw reply	[flat|nested] 32+ messages in thread

* bug#65469: [PATCH] * etc/emacsclient.desktop: Make Emacs default application for org-protocol
  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 22:41                                         ` Stefan Kangas
  1 sibling, 0 replies; 32+ messages in thread
From: Stefan Kangas @ 2023-09-20 22:41 UTC (permalink / raw)
  To: Eli Zaretskii, Ihor Radchenko; +Cc: bjorn.bidar, 65469

Eli Zaretskii <eliz@gnu.org> writes:

>   ** 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 desktop
>   environment, including KDE and GNOME on GNU/Linux, and some others,

Perhaps simpler:

    environment, such as KDE and GNOME on GNU/Linux,

But my understanding is that KDE and GNOME desktop environments are XDG
compliant on all supported platforms.  Is that correct?  If it is,
perhaps it could be even simpler:

    environment, such as KDE and GNOME,

(I'd mention GNOME first due to its historical connection to GNU, but
that's probably a nitpick in this context.)

>   these links should now open in Emacs automatically if the application
>   that opens the link follows the XDG spec and xdg-utils are installed.
>   This is because 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.

Other than that, LGTM.





^ permalink raw reply	[flat|nested] 32+ messages in thread

* bug#65469: [PATCH] * etc/emacsclient.desktop: Make Emacs default application for org-protocol
  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
  0 siblings, 0 replies; 32+ messages in thread
From: Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-09-23 21:35 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 65469, yantar92, stefankangas

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Björn Bidar <bjorn.bidar@thaodan.de>
>> Cc: Ihor Radchenko <yantar92@posteo.net>,  65469@debbugs.gnu.org,
>>   stefankangas@gmail.com
>> Date: Wed, 20 Sep 2023 17:01:27 +0300
>> 
>> Eli Zaretskii <eliz@gnu.org> writes:
>> 
>> >   ** 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 desktop
>> >   environment, including KDE and GNOME on GNU/Linux, and some others,
>> >   these links should now open in Emacs automatically if the application
>> >   that opens the link follows the XDG spec and xdg-utils are installed.
>> >   This is because 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.
>> 
>> Why the focus on Linux?
>
> Not focus, but preference.  It's because GNU/Linux is our main target
> system and its users are our main audience.
>
>> For example, you can install KDE on BSD and have the same benefit of
>> the change as on Linux.
>
> The above text says "and some others", and it also says "any
> XDG-compliant desktop environment".  Why is this not enough?  We don't
> have to promote *BSD systems.
And some others wasn't clear to me because of the long sentence and
because mentioning KDE and GNOME on Linux while them being on Linux or
elsewhere doesn't make an impact on their XDG support.

Writing: "On any XDG-compliant desktop environment, including KDE and GNOME, and some others,
these links should now open in Emacs automatically if the application
that opens the link follows the XDG spec is installed. xdg-utils is
recommended to be installed but is not always a requirement."

(XDG-utils provides a shell-script that wraps around various desktop
environments "open/mime-handler" applications but only some programs use
it e.g. Chromium/Chrome).

To mention the target operating system for the feature I would write
this:
"XDG-compliant desktop environments are usually found on various
Unix-like systems use as Linux".

To be honest the discussion on this is taking quite long, I was only
concerned that simply mentioning only Linux was technically incorrect.





^ permalink raw reply	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2023-09-23 21:35 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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-18 14:33               ` 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

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).