[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fix needed for communication with gpg-agent

From: Sascha Wilde
Subject: Re: Fix needed for communication with gpg-agent
Date: Wed, 21 Feb 2007 23:41:46 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.93 (gnu/linux)

Richard Stallman <address@hidden> 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.)


[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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]