From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sascha Wilde Newsgroups: gmane.emacs.devel Subject: Re: Fix needed for communication with gpg-agent Date: Wed, 21 Feb 2007 23:41:46 +0100 Message-ID: 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 1172097746 5094 80.91.229.12 (21 Feb 2007 22:42:26 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 21 Feb 2007 22:42:26 +0000 (UTC) Cc: Werner Koch , Chong Yidong , Daiki Ueno , emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Feb 21 23:42:22 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 1HK0AF-0001gs-K7 for ged-emacs-devel@m.gmane.org; Wed, 21 Feb 2007 23:42:19 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HK0AE-0002oa-VG for ged-emacs-devel@m.gmane.org; Wed, 21 Feb 2007 17:42:19 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HK0A1-0002kG-GV for emacs-devel@gnu.org; Wed, 21 Feb 2007 17:42:05 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HK0A0-0002im-Ie for emacs-devel@gnu.org; Wed, 21 Feb 2007 17:42:05 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HK0A0-0002iQ-DD for emacs-devel@gnu.org; Wed, 21 Feb 2007 17:42:04 -0500 Original-Received: from ns.km1136.keymachine.de ([62.141.58.119] helo=km1136.keymachine.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HK09y-0001M4-6n; Wed, 21 Feb 2007 17:42:02 -0500 Original-Received: from kenny.sha-bang.de (xdsle180.osnanet.de [212.95.104.180]) (authenticated bits=0) by km1136.keymachine.de (8.12.11.20060308/8.12.10) with ESMTP id l1LMflUp025267; Wed, 21 Feb 2007 23:41:47 +0100 Original-Received: from wilde by kenny.sha-bang.de with local (Kenny MUA v.0409034.42) ID 1HK09j-0006Fw-7L; Wed, 21 Feb 2007 23:41:47 +0100 In-Reply-To: (Richard Stallman's message of "Mon\, 19 Feb 2007 13\:04\:35 -0500") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.93 (gnu/linux) X-detected-kernel: Linux 2.4-2.6 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:66586 Archived-At: Richard Stallman wrote: > Roughly speaking, when Emacs is run in a console (i.e. as a curses > program), it monopolizes terminal input and output. I don't know of > any way to call the curses version of pinentry, have it temporarily > "take over" the terminal, and return control to Emacs once it's done. > > I am not sure whether that is a problem or not. Daiki-san and Sascha, > can you tell us whether this is a problem? Unfortunately, yes. A few more in depth tests[0] tests show, that emacs some how catches some of the input, which is meant to go to pinentry: The pinentry curses interface is already shown, when emacs still gets some of the key events... > Is this part implemented already? What will happen when gpg-agent > tries to run pinentry if you are using a tty? See above, the curses version of pinentry is started and shows up in the terminal, but under certain circumstances it is hard to impossible to input the passphrase. I'm not sure if this is an emacs problem or an pinentry issue, but I would tend to guess, that it would be pinentries job to make sure that it gets full control other the terminal -- I'm not sure if this is actually possible in a portable way, though. Werner, what do you think? On the other hand: the redraw problem, that some people mentioned, doesn't seem to be a serious issue to me, emacs would only need to do a full screen updated when all of the following conditions are true: - emacs runs on an non graphical console - gpg-agent is used - an cryptographic action, which might need passphrase input, was run I don't think that it would a big performance problem if we would do a redraw in this case. (And it shouldn't be hard to implement.) cheers sascha [0] I tested this when I wrote the first implementation of gpg-agent support for pgg, but obviously not thoroughly enough. -- Sascha Wilde God put me on earth to accomplish a certain number of things. Right now I am so far behind I will never die. -- Bill Waterson, Calvin and Hobbes