[Top][All Lists]

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

Re: Small patch to enable use of gpg-agent with pgg

From: Reiner Steib
Subject: Re: Small patch to enable use of gpg-agent with pgg
Date: Thu, 23 Mar 2006 13:51:24 +0100
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

On Thu, Mar 23 2006, Simon Josefsson wrote:

> To clarify: I removed it in v5-10 only.  For Emacs CVS, Sascha's patch
> work fine so it can stay (although perhaps should be removed there
> too, to simplify syncing?).

It would be very much preferable to have the same code at least in
Emacs CVS and Gnus v5-10 branch.  (-> Cc-ing Miles.)

> For Gnus CVS trunk, I don't know whether it works or not (does it
> work on the XEmacs version Gnus CVS require?).

Given that Emacs 21 and XEmacs also complain (see Katsumi's message
<news:address@hidden>), we also need a fix for the Gnus

Couldn't we let `pgg-gpg-update-agent' simply return `t' if
`make-network-process' isn't available?  (Or check for
`make-network-process' directly in `pgg-gpg-use-agent-p'?)

(defun pgg-gpg-update-agent ()
  "Try to connet to gpg-agent and send UPDATESTARTUPTTY."
  (if (fboundp 'make-network-process)
      (let* ((agent-info (getenv "GPG_AGENT_INFO")) 
             (socket (and agent-info
                          (string-match "^\\([^:]*\\)" agent-info)
                          (match-string 1 agent-info)))
             (conn (and socket
                        (make-network-process :name "gpg-agent-process"
                                              :host 'local :family 'local
                                              :service socket))))
        (when (and conn (eq (process-status conn) 'open))
          (process-send-string conn "UPDATESTARTUPTTY\n")
          (delete-process conn)
    ;; We can't check, so assume gpg-agent is up.

Bye, Reiner.
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/

reply via email to

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