From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Sai Karthik Newsgroups: gmane.emacs.help Subject: Re: gpg --list-only, etc. Date: Mon, 07 Jun 2021 03:47:00 +0000 Message-ID: <7CA76043-C513-4E97-9A48-986F5BE673AE@disroot.org> References: <8D4ECE71-8388-4323-9F0D-E5A5DF9F0B87@disroot.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28237"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: Jean Louis Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jun 07 05:49:41 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lq6Gi-0007Bj-QU for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 07 Jun 2021 05:49:40 +0200 Original-Received: from localhost ([::1]:56872 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lq6Gh-0002gg-T4 for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 06 Jun 2021 23:49:39 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41418) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lq6GN-0002gC-8g for help-gnu-emacs@gnu.org; Sun, 06 Jun 2021 23:49:19 -0400 Original-Received: from knopi.disroot.org ([178.21.23.139]:60924) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lq6GI-0001Nv-VU for help-gnu-emacs@gnu.org; Sun, 06 Jun 2021 23:49:19 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 9B7BA5BDB3; Mon, 7 Jun 2021 05:49:12 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at disroot.org Original-Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HfwKcwFGJFOr; Mon, 7 Jun 2021 05:49:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1623037748; bh=w25Lswq1tZBbRsnwuoS0NTtpxAwH3B89/T6wZo3yMe8=; h=Date:From:To:CC:Subject:In-Reply-To:References; b=JGJjNecR55u4FYNvStiPCxU3l5bgr42bImv6pvxQNyP0cZwWkDH6RX5jdhbJdhDQZ F6WI6RUpzjNx3STNIuCt5nBJ2/lixW78n/2rXuJW0krsNCBtzBIi8h2CWu9CGwTZHW Ao40i4YDZPmiciWaUM46WzT7u2hpDf3JxlCih0foN3IRuuaXAEfG1FavWAs+DnCjRj ZAb8/jcxWyxpeMbDp1K+cSvSmKDxEbAl5xFWbZur8tkmj7HCDiYHFs0YcfaZcn1rD1 LSVlwdaWc1f2srM9LO+aLosPUCxBQC17oi7DVBOIGdfFs07P3+divza9vwB8L+gtPK 16mL2TxzB7l9g== In-Reply-To: Received-SPF: pass client-ip=178.21.23.139; envelope-from=kskarthik@disroot.org; helo=knopi.disroot.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:130589 Archived-At: Thank you very much for the help! I will try your code=2E Vim gpg plugin ha= s such feature to list a file's keys=2E So, I was looking in epa=2E=20 However, Having this feature in epa would be a plus!=20 On 6 June 2021 4:37:29 pm UTC, Jean Louis wrote: >* Sai Karthik [2021-06-06 18:29]: >> Hello, is there any way to list all recipients of a gpg file using >> epa? couldn't find anything useful from the manual >> (https://www=2Egnu=2Eorg/software/emacs/manual/html_mono/epa=2Ehtml) > >GnuPG: list all recipients of a message | End Point >https://www=2Eendpoint=2Ecom/blog/2013/05/24/gnupg-list-all-recipients-of= -message > >Command is: >gpg --list-only --no-default-keyring --secret-keyring /dev/null $infile > >I could not find "list-only" in epa*=2Eel libraries, it is most probably >not there=2E > >This will do, modify it as you wish, as I use `rcd-utilities=2Eel' from:= =20 > >GNU Emacs package: rcd-utilities=2Eel : >https://gnu=2Esupport/gnu-emacs/packages/rcd-utilities-el=2Ehtml > > >(defun rcd-gpg-list-only (encrypted) > "Return list of recipients for ENCRYPTED string=2E" > (if (rcd-which "gpg") > (rcd-command-output-from-input "gpg" encrypted "--list-only" "--no-= default-keyring" "--secret-keyring" "/dev/null") > (rcd-warning-message "RCD ERROR: `gpg' not found in $PATH"))) > > >(defun rcd-gpg-list-recipients () > "Return list of GPG recipients either in Dired or for region=2E > >If region is marked it will act on region, otherwise it may >handle current Dired file=2E" > (interactive) > (if (eq major-mode 'dired-mode) > (let ((file (car (dired-get-marked-files)))) > (message > (rcd-gpg-list-only > (with-temp-buffer > (insert-file-contents-literally file)=20 > (buffer-string))))) > (if (region-active-p)=20 > (message (rcd-gpg-list-only (rcd-region-string))) > (rcd-warning-message "Did not find valid encrypted region or file")= ))) > >