Subject: Re: bug#79158: 31.0.50; epa-dired is not tramp-aware

From: Michael Albinus <[email-masked]>
Date: Sat, 02 Aug 2025 19:08:12 +0200

Ankit Gadiya via "Bug reports for GNU Emacs, the Swiss army knife of
text editors" <[email-masked]> writes:

Hi,

> The epa-dired commands like epa-dired-do-decrypt do not work in the
> dired buffer under tramp.
>
> Steps to reproduce:
>
> 1. Open the dired buffer over tramp using
>    /ssh:user@hostname:/path/to/directory
> 2. Mark the file with the .gpg extension in the dired buffer using
>    dired-mark.
> 3. Call the M-x epa-dired-do-decrypt command.
>
> Behavior:
>
> It appears like epa-dired is passing the tramp-path verbatim to the gpg.
> I've updated the tramp-path to remove identifiers.
>
> Error while decrypting with "/opt/homebrew/bin/gpg":
>
> gpg: can't open '/ssh:user@hostname:/path/to/file.gpg': No such file
> or directory
> gpg: decrypt_message failed: No such file or directory
>
> Expected Behavior:
>
> I expected the command to be aware of Tramp paths. In case of Tramp
> files:
> 1. Write the file to a temporary local file
> 2. Decrypt it using local GPG keys.
> 3. Write the decrypted file back to the remote location with the file name
>    accepted as the input.

Alternatively, we could let gpg run on the remote host.

Best regards, Michael.