Subject: bug#76120: This feature is not about "sharing", or a "native" anything.

From: Alvaro Ramirez <[email-masked]>
Date: Sat, 19 Jul 2025 15:03:57 +0100

> On 19 Jul 2025, at 14:03, Eli Zaretskii <[email-masked]> wrote:
> 
>> From: Gerd Möllmann <[email-masked]>
>> Cc: Eli Zaretskii <[email-masked]>,  Alan Third <[email-masked]>,  Robert
>> Pluim <[email-masked]>,  [email-masked],  [email-masked]
>> Date: Sat, 19 Jul 2025 14:22:23 +0200
>> 
>> Alvaro Ramirez <[email-masked]> writes:
>> 
>>> Thank you Gerd for volunteering to verify the patch and Eli for
>>> reaching out to others!
>>> 
>>> Gerd Möllmann <[email-masked]> writes:
>>> 
>>>> I can do that if you send me the latest version of the patch,
>>>> Alvaro.
>>>> The bug thread is a bit tl;dr.
>>> 
>>> Rebased and attached
>>> (0007-Add-Send-to.-context-menu-item-to-mouse.el.patch).
>>> 
>>> 1. M-x context-menu-mode (enables minor mode).
>>> 2. Right click buffer to open context menu.
>>> 3. Select "Send to..."
>>> 
>>> "Send to..." can be applied to either:
>>> 
>>> - Dired files (single or multiple files).
>>> - Current buffer (if there's an associated file).
>>> - Selected region (selected text is sent).
>> 
>> Thanks, builds, works, and is now in master.
> 
> Thanks!
> 
> Alvaro, there's a bug in send-to.el.  Here:
> 
>    (dolist (item items)
>      (with-temp-buffer
>        (unless (zerop (call-process
>                        shell-command-guess-open nil (current-buffer) t
>                        (send-to--convert-item-to-filename
>                         item)))
>          (error "%s" (string-trim (buffer-string))))))))
> 
> This passes the result of shell-command-guess-open to call-process,
> but shell-command-guess-open returns a _shell_command_, not a program
> name.  So the code should call call-process-shell-command or maybe
> process-file-shell-command.

Thanks for spotting Eli. I missed this.

It passed on macOS (wrongfully), as shell-command-guess-open returned “open”.

I’ll fix it.

> For example, on MS-Windows shell-command-guess-open returns the
> command "start", but it is not necessarily the name of a program, it
> is usually a built-in command of the Windows shell.