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: Thu, 22 Feb 2007 13:09:40 +0100 Message-ID: References: <87irdzs6pp.fsf@stupidchicken.com> <87wt2b82wn.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 1172146180 4852 80.91.229.12 (22 Feb 2007 12:09:40 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 22 Feb 2007 12:09:40 +0000 (UTC) Cc: Sascha Wilde , Werner Koch , Daiki Ueno , rms@gnu.org, emacs-devel@gnu.org To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Feb 22 13:09:31 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 1HKClK-0002PU-M3 for ged-emacs-devel@m.gmane.org; Thu, 22 Feb 2007 13:09:26 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HKClK-00055A-9r for ged-emacs-devel@m.gmane.org; Thu, 22 Feb 2007 07:09:26 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HKCl2-0004zg-5c for emacs-devel@gnu.org; Thu, 22 Feb 2007 07:09:08 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HKCl1-0004zE-GX for emacs-devel@gnu.org; Thu, 22 Feb 2007 07:09:07 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HKCl1-0004z7-3I for emacs-devel@gnu.org; Thu, 22 Feb 2007 07:09:07 -0500 Original-Received: from pfepc.post.tele.dk ([195.41.46.237]) by monty-python.gnu.org with esmtp (Exim 4.52) id 1HKCky-000154-Mn; Thu, 22 Feb 2007 07:09:04 -0500 Original-Received: from kfs-l.imdomain.dk.cua.dk (0x503e2644.bynxx19.adsl-dhcp.tele.dk [80.62.38.68]) by pfepc.post.tele.dk (Postfix) with SMTP id DB4C08A002E; Thu, 22 Feb 2007 13:08:53 +0100 (CET) In-Reply-To: <87wt2b82wn.fsf@stupidchicken.com> (Chong Yidong's message of "Wed\, 21 Feb 2007 19\:14\:00 -0500") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.93 (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:66612 Archived-At: Chong Yidong writes: > 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. The code looks like this: (setq process (start-process ...)) (process-send process ...) (process-send-region process ...) (process-send-eof process) (accept-process-output process ...) If we use SYNC_INPUT, I don't see where Emacs would read any keyboard input between start-process and accept-process-output. I suppose that pinentry uses the tty in that time-frame... Would someone pls. test if it works with the change I suggested -- possibly after recompiling Emacs with CFLAGS=-DSYNC_INPUT ... -- Kim F. Storm http://www.cua.dk