Subject: Re: bug#76120: [PATCH] Expose the native sharing dialog (macOS)

From: Eli Zaretskii <[email-masked]>
Date: Mon, 10 Feb 2025 15:13:54 +0200

> Cc: [email-masked], Alvaro Ramirez <[email-masked]>
> Date: Mon, 10 Feb 2025 02:17:42 +0200
> From:  Björn Bidar via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <[email-masked]>
> 
> Stefan Kangas <[email-masked]> writes:
> 
> >>> Would you or anyone else be interested in implementing this for
> >>> GNU/Linux as well?  I don't think we need perfect coverage of
> >>> all
> >>> desktop environments, but it would be useful to support it on
> >>> one or more
> >>> popular ones (for example Gnome or KDE).
> >>
> >> Skills-wise, I wouldn't be the best candidate to make the
> >> Linux-related changes. I could try reaching out to Carl Lieberman,
> >> author of https://github.com/carldotac/kdeconnect.el, to see if
> >> they'd be inclined to contribute their package upstream.
> >>
> >>> This would also be a good opportunity to generalize the feature,
> >>> so that
> >>> instead of having `ns-share`, we would have a command named
> >>> `share-file`
> >>> or something like that.
> >>
> >> Without a Linux partner to help with the counter changes, I'm less
> >> likely to take on the additional scope.
> >>
> >> I could also reach out to emacs-devel if you reckon it's
> >> appropriate to scout Linux support.
> >
> > Asking Carl Lieberman might be a useful step.  Asking on emacs-devel
> > would also be useful, to see if other people have any comments.
> 
> kdeconnect.el doesn't implement any dialog to "share" a file but only
> invokes KDEconnect CLI to share a file.
> 
> >From what I know there's no direct share "Linux" (Linux in quotes
> because the definition what Linux is isn't exact) or XDG API for sharing.
> 
> KDE has the Purpose API[1] as a generic API for interacting with
> applications to e.g. provide a share API or open something in an
> application. For example KDE Connect has a provider for this API which
> allows to share with it similarly to it's CLI application.
> 
> How sharing is done in KDE can been here.[2]
> 
> GNOME doesn't have a Sharing API but there's an issue open about this
> topic.[3]

I think we should get our terminology right, because the "share"
business is replete with hype which muddies the waters.  In
particular, quite a few "sharing" options are another word with "open
with", and we already have that (see my other message up-thread).
Examples:

  . "sharing" with a printer means printing, which is the same as
    "opening" by a printer
  . "sharing" with an email program means sending as an email message,
    which is the same as "opening" by a MUA
  . "sharing" a selection of text is the same a drag-n-drop the text
    onto an application

etc., etc.  So what exactly is the "sharing" we are talking about
here?  I very much hope that it doesn't just mean show a menu whose
caption says "Share with" (which would mean it's another hype)...