From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: Fix needed for communication with gpg-agent Date: Fri, 23 Feb 2007 14:37:33 -0500 Message-ID: <87fy8w3bsy.fsf@stupidchicken.com> References: <87irdzs6pp.fsf@stupidchicken.com> <87fy91g1pl.fsf@catnip.gol.com> <87wt2dk2rv.fsf@stupidchicken.com> <873b4yt7xx.fsf@stupidchicken.com> <87ps82ukz8.fsf@wheatstone.g10code.de> <87slcynii0.fsf@stupidchicken.com> <87ps81tfuy.fsf@wheatstone.g10code.de> <874ppc7si8.fsf@stupidchicken.com> <87slcwrfbh.fsf@wheatstone.g10code.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1172259501 25298 80.91.229.12 (23 Feb 2007 19:38:21 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 23 Feb 2007 19:38:21 +0000 (UTC) Cc: Miles Bader , Daiki Ueno , rms@gnu.org, emacs-devel@gnu.org To: Sascha Wilde Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Feb 23 20:38:14 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HKgFB-00006H-Ok for ged-emacs-devel@m.gmane.org; Fri, 23 Feb 2007 20:38:14 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HKgFB-0007dR-GG for ged-emacs-devel@m.gmane.org; Fri, 23 Feb 2007 14:38:13 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HKgEm-0007YY-Ew for emacs-devel@gnu.org; Fri, 23 Feb 2007 14:37:48 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HKgEl-0007YJ-WD for emacs-devel@gnu.org; Fri, 23 Feb 2007 14:37:48 -0500 Original-Received: from south-station-annex.mit.edu ([18.72.1.2]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HKgEl-0006Qx-BM; Fri, 23 Feb 2007 14:37:47 -0500 Original-Received: from grand-central-station.mit.edu (GRAND-CENTRAL-STATION.MIT.EDU [18.7.21.82]) by south-station-annex.mit.edu (8.13.6/8.9.2) with ESMTP id l1NJbjdW012830; Fri, 23 Feb 2007 14:37:45 -0500 (EST) Original-Received: from outgoing-legacy.mit.edu (OUTGOING-LEGACY.MIT.EDU [18.7.22.104]) by grand-central-station.mit.edu (8.13.6/8.9.2) with ESMTP id l1NJbYE9011022; Fri, 23 Feb 2007 14:37:34 -0500 (EST) Original-Received: from localhost (MAIN-TWELVE-SIXTY-THREE.MIT.EDU [18.19.5.63]) ) by outgoing-legacy.mit.edu (8.13.6/8.12.4) with ESMTP id l1NJbXwQ011686; Fri, 23 Feb 2007 14:37:33 -0500 (EST) Original-Received: from cyd by localhost with local (Exim 3.36 #1 (Debian)) id 1HKgEX-0006R7-00; Fri, 23 Feb 2007 14:37:33 -0500 In-Reply-To: <87slcwrfbh.fsf@wheatstone.g10code.de> (Werner Koch's message of "Fri\, 23 Feb 2007 17\:47\:46 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.94 (gnu/linux) X-Scanned-By: MIMEDefang 2.42 X-Spam-Score: -2.599 X-detected-kernel: Solaris 9.1 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:66700 Archived-At: Werner Koch writes: > On Fri, 23 Feb 2007 17:23, cyd@stupidchicken.com said: > >> 2. Documenting the problem in the PGG manual, and recommending using >> PGG and gpg-agent in X (for Emacs 22 anyway). > > This and for non-X one could suggest to use screen and start gpg-agent > using the option > > --keep-tty In that case, I suggest the following patch to the PGG documentation. What do people think? *** emacs/man/pgg.texi.~1.16.~ 2007-01-17 22:03:18.000000000 -0500 --- emacs/man/pgg.texi 2007-02-23 14:35:46.000000000 -0500 *************** *** 229,236 **** @node Caching passphrase @section Caching passphrase ! PGG provides a simple passphrase caching mechanism. If you want to ! arrange the interaction, set the variable @code{pgg-read-passphrase}. @defvar pgg-cache-passphrase If non-@code{nil}, store passphrases. The default value of this --- 229,279 ---- @node Caching passphrase @section Caching passphrase ! When using GnuPG (gpg) as the PGP scheme, we recommend using a program ! called @code{gpg-agent} for caching passphrases@footnote{Actually ! @code{gpg-agent} does not cache passphrases but private keys. On the ! other hand, from a user's point of view, this technical difference ! isn't visible.}. ! ! @defvar pgg-gpg-use-agent ! If non-@code{nil}, attempt to use @code{gpg-agent} whenever possible. ! The default is @code{t}. If @code{gpg-agent} is not running, or GnuPG ! is not the current PGP scheme, PGG's own passphrase-caching mechanism ! is used (see below). ! @end defvar ! ! To use @code{gpg-agent} with PGG, you must first ensure that ! @code{gpg-agent} is running. For example, if you are running in the X ! Window System, you can do this by putting the following line in your ! @file{.xsession} file: ! ! @smallexample ! eval "$(gpg-agent --daemon)" ! @end smallexample ! ! For more details on invoking @code{gpg-agent}, @xref{Invoking ! GPG-AGENT,,,gnupg,Using the GNU Privacy Guard}. ! ! Whenever you perform a PGG operation that requires a GnuPG passphrase, ! GnuPG will contact @code{gpg-agent}, which prompts you for the ! passphrase. Furthermore, @code{gpg-agent} ``caches'' the result, so ! that subsequent uses will not require you to enter the passphrase ! again. (This cache usually expires after a certain time has passed; ! you can change this using the @code{--default-cache-ttl} option when ! invoking @code{gpg-agent}.) ! ! If you are running in a X Window System environment, @code{gpg-agent} ! prompts you for a passphrase by opening a graphical window. However, ! if you are running Emacs on a text terminal, @code{gpg-agent} has ! trouble receiving input from the terminal, since it is being sent to ! Emacs. One workaround for this problem is to run @code{gpg-agent} on ! a different terminal from Emacs, with the @code{--keep-tty} option; ! this tells @code{gpg-agent} use its own terminal to prompt for ! passphrases. ! ! When @code{gpg-agent} is not being used, PGG provides its own ! passphrase caching mechanism, which is controlled by the variable ! @code{pgg-read-passphrase}: @defvar pgg-cache-passphrase If non-@code{nil}, store passphrases. The default value of this *************** *** 243,256 **** Elapsed time for expiration in seconds. @end defvar - @defvar pgg-gpg-use-agent - When using GnuPG (gpg) as PGP scheme you can use @code{gpg-agent} for - caching@footnote{Actually @code{gpg-agent} does not cache passphrases - but private keys. On the other hand, from a users point of view this - technical difference isn't visible.}. It defaults to @code{t}. - Setting this to @code{nil} is not recommended. - @end defvar - @node Default user identity @section Default user identity --- 286,291 ----