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

From: Eli Zaretskii <[email-masked]>
Date: Wed, 19 Feb 2025 17:12:07 +0200

> From: Richard Stallman <[email-masked]>
> Cc: [email-masked]
> Date: Tue, 18 Feb 2025 19:58:00 -0500
> 
>   > It allows to send a file or a region of text to another application or
>   > a service.
> 
> The term "sharing" is very misleading for this; we use the word
> "share" for comething that people do with other people.  So we should
> not adopt Apple's terminology.

I agree that it's misleading terminology, but it isn't Apple's
terminology.  It is widely used today, primarily in smartphones, but
also on modern laptop and desktop operating systems.

> I think "system invocation dialog" is a better name for us to use.
> Is there any reason that would be misleading?

I think you have in mind invocation of programs.  However, "sharing"
does not necessarily invoke a program, it could also send stuff to
some service or communication channel.

>                 It's an addition to a feature we already have in Dired and
>   > other places whereby a file can be "opened" by some external means,
>   > like a program (e.g., to show it or do other actions with it) or a
>   > printing service (e.g., to print the text).
> 
> Does that mean it is comparable to the ! command in Dired?

For some of the actions and some types of material to "share", it is.
For others, no.  It is also system-dependent: for example, printing a
document or a buffer on GNU/Linux will usually mean invoking a program
like lpr, but on Windows Emacs just submits the text directly to the
system's printer spooling service.

> Do shell commands exist on MacOS?  Can users do with ! on MacOS the
> same things they can do with the system invocation dialog?

Yes and yes.  But some of the actions don't invoke shell commands, as
I tried to explain above.

> Perhaps the system invocation dialog has some conveniences -- for
> instance, not needing to remember shell commands or their syntax.
> Is that the case?

Yes.  Basically, when I'm asking the system to "open" some document, I
don't need to know which program is pertinent for that.  This is so
also on GNU/Linux, where at least some of these actions invoke
xdg-open, which is a shell command used to open a file or a URL with
the "preferred application" (which users can customize).

> If so, would those conveniences be convenient on GNU/Linux if they
> existed?

They already exist.  However, some of these conveniences might not
(yet) be available on all systems.

> Should we aim to implement that system invocation dialog on GNU/Linux?

We already did, see shell-command-guess-functions and the features
built around that.  We want to add the ability to invoke this platform
specific "sharing" as part of those features.