From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: Fix needed for communication with gpg-agent Date: Sat, 24 Feb 2007 00:58:57 +0100 Message-ID: References: <87irdzs6pp.fsf@stupidchicken.com> <87r6siy5he.fsf@wheatstone.g10code.de> <87abz4cv8l.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 1172275146 23197 80.91.229.12 (23 Feb 2007 23:59:06 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 23 Feb 2007 23:59:06 +0000 (UTC) Cc: wilde@sha-bang.de, Werner Koch , ueno@unixuser.org, rms@gnu.org, emacs-devel@gnu.org To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Feb 24 00:58:59 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 1HKkJT-0000mn-JK for ged-emacs-devel@m.gmane.org; Sat, 24 Feb 2007 00:58:55 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HKkJT-0000Bh-FB for ged-emacs-devel@m.gmane.org; Fri, 23 Feb 2007 18:58:55 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HKkJI-0000Bc-E3 for emacs-devel@gnu.org; Fri, 23 Feb 2007 18:58:44 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HKkJH-0000BP-As for emacs-devel@gnu.org; Fri, 23 Feb 2007 18:58:43 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HKkJH-0000BM-5v for emacs-devel@gnu.org; Fri, 23 Feb 2007 18:58:43 -0500 Original-Received: from pfepb.post.tele.dk ([195.41.46.236]) by monty-python.gnu.org with esmtp (Exim 4.52) id 1HKkJE-00031i-M6; Fri, 23 Feb 2007 18:58:40 -0500 Original-Received: from kfs-l.imdomain.dk.cua.dk (0x503e2644.bynxx19.adsl-dhcp.tele.dk [80.62.38.68]) by pfepb.post.tele.dk (Postfix) with SMTP id 5FAD1A50033; Sat, 24 Feb 2007 00:58:12 +0100 (CET) In-Reply-To: <87abz4cv8l.fsf@stupidchicken.com> (Chong Yidong's message of "Fri\, 23 Feb 2007 18\:25\:14 -0500") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.94 (gnu/linux) X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) 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:66717 Archived-At: Chong Yidong writes: > Richard Stallman writes: > >> It should not be hard to program Emacs to turn off the signal handler >> for tty input while it calls gpg. That way, Emacs won't notice there >> is any input, and won't read any. >> >> This could be a new function made as a variant of call-process. >> >> Would this solve the problem? > > I think you're assuming that Emacs calls gpg as a synchronous process: > i.e. call gpg, turn off tty input, wait for gpg to finish, restore tty > input. The way the PGG code is currently set up, Emacs calls gpg as > an asynchronous process, and uses process-send-string to send gpg the > input text that we want to encrypt. It is still "synchronous" in the sense that we wait for the process to finish before continuing... Noone has yet explained why using accept-process-output to wait just for the pgp process and not process keyboard input while waiting is not sufficient. If we need to enable SYNC_INPUT for that to work, and we don't want to do that in general, we could make a negative "just-this-one" arg mean "wait for single process to terminate with input blocked." I.e. a call like this: (accept-process-output process nil nil -1) We would only have to do that on a terminal, as pinentry works fine on X already. Any readon that wouldn't work?? -- Kim F. Storm http://www.cua.dk