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

From: Björn Bidar <[email-masked]>
Date: Tue, 11 Feb 2025 19:14:30 +0200

Eli Zaretskii <[email-masked]> writes:

>> From: Björn Bidar <[email-masked]>
>> Cc: Stefan Kangas <[email-masked]>,  [email-masked],  Eli
>>  Zaretskii <[email-masked]>
>> Date: Tue, 11 Feb 2025 00:14:22 +0200
>> 
>> Since xdg-open isn't the same as "sharing" doesn't that only circumvent
>> the policy to not add functionality that is only supported on non-free
>> platforms?
>
> After all the discussions we had about the meaning of "sharing" in
> this case, what exactly makes you say xdg-open etc. are not equivalent
> to this "sharing"? just the fact that xdg-open doesn't have an option
> called literally "share", or something else?

xdg-open doesn't provide a list but opens the file in the default
program associated by the active desktop environment or a fallback if
existing.
xdg-open is like using Emacs's mailcap support.

> IOW, would you please describe the general functionality that the
> proposed "sharing" offers and xdg-open doesn't?

Sharing offers a list of specific action available to all program
using the framework e.g.

- Share using app, opens a dialog of the app to select the target
  where the file is supposed to go and in case the user confirms the
  target the file is send of, the dialog is closed.
  The specific application isn't opened at all or only exist as this
  sharing dialog or other desktop widgets with an application window in
  the classical sense.
  
- Send file using Bluetooth. Very similar to the example above except
  that the platforms or desktop environments Bluetooth Ui's file share
  dialog opens.

These two are not possible in xdg-open at all even if it would contain a
list of specific applications to choose from.
The reason is that these dialogues are not regular applications which
accept specific types but either only available over a context-menu
using the platform API (i.e. gtk) or can called using a desktop file but
the file is hidden unless explicitly invoked.

For Bluetooth it should be possible to invoke the specific send-file
dialogues if they are available as separate applications.
For example for Bluedevul what would be 'bluedevil-sendfile'.