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: Wed, 21 Feb 2007 19:14:00 -0500 Message-ID: <87wt2b82wn.fsf@stupidchicken.com> References: <87irdzs6pp.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1172103293 22229 80.91.229.12 (22 Feb 2007 00:14:53 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 22 Feb 2007 00:14:53 +0000 (UTC) Cc: Sascha Wilde , Werner Koch , Daiki Ueno , rms@gnu.org, emacs-devel@gnu.org To: storm@cua.dk (Kim F. Storm) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Feb 22 01:14:44 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 1HK1bf-0001r5-4T for ged-emacs-devel@m.gmane.org; Thu, 22 Feb 2007 01:14:43 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HK1be-0003AL-Mn for ged-emacs-devel@m.gmane.org; Wed, 21 Feb 2007 19:14:42 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HK1bU-0003AC-80 for emacs-devel@gnu.org; Wed, 21 Feb 2007 19:14:32 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HK1bT-0003A4-VG for emacs-devel@gnu.org; Wed, 21 Feb 2007 19:14:31 -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 1HK1bT-00046W-Mf; Wed, 21 Feb 2007 19:14:31 -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 l1M0EPsQ008616; Wed, 21 Feb 2007 19:14:25 -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 l1M0EBZa023557; Wed, 21 Feb 2007 19:14:11 -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 l1M0E0hf027455; Wed, 21 Feb 2007 19:14:01 -0500 (EST) Original-Received: from cyd by localhost with local (Exim 3.36 #1 (Debian)) id 1HK1ay-00028c-00; Wed, 21 Feb 2007 19:14:00 -0500 In-Reply-To: (Kim F. Storm's message of "Thu\, 22 Feb 2007 00\:15\:16 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.93 (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:66589 Archived-At: storm@cua.dk (Kim F. Storm) writes: > Currently, pgg.el uses code like this: > > (while (eq 'run (process-status process)) > (accept-process-output process 5)) > > Replacing this with the following would (in principle) prevent Emacs > from reading any input while waiting for the process to terminate. > (accept-process-output process nil nil 1)) > > > But we may also need to define SYNC_INPUT to make this work reliable ?? That accept-process-output is done after sending gpg the text that we want to encrypy/decrypt. Gpg calls pinentry *before* accepting the text. BTW, for anyone who would like to test out your ideas on this problem, here is a recipe: 1. $ killall gpg-agent; eval `gpg-agent --daemon`; 2. $ emacs 3. [Put some text in the region] 4. M-x pgg-sign-region The two behaviors of pinentry can be observed to depend on whether you are on the console or in X.