From: ueno Date: Sat, 2 Sep 2006 20:57:54 +0000 (+0000) Subject: * epg.el (epg-gpg-home-directory): New user option. X-Git-Tag: epg-0_0_5~28 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=7b6382554d2ac9755cd949a5c2a26aad220ef579;p=elisp%2Fepg.git * epg.el (epg-gpg-home-directory): New user option. (epg-gpgsm-home-directory): New user option. --- diff --git a/ChangeLog b/ChangeLog index cdc2b4b..b10915f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,8 @@ 2006-09-02 Daiki Ueno * epg.el (epg-check-configuration): New function. + (epg-gpg-home-directory): New user option. + (epg-gpgsm-home-directory): New user option. * pgg-epg.el (pgg-epg-lookup-key): New function. diff --git a/epg.el b/epg.el index 4cf1a67..0e76139 100644 --- a/epg.el +++ b/epg.el @@ -39,6 +39,16 @@ :group 'epg :type 'string) +(defcustom epg-gpg-home-directory nil + "The directory which contains the `gpg' configuration files." + :group 'epg + :type '(choice (const :tag "Default" nil) directory)) + +(defcustom epg-gpgsm-home-directory nil + "The directory which contains the `gpgsm' configuration files." + :group 'epg + :type '(choice (const :tag "Default" nil) directory)) + (defconst epg-version-number "0.0.4") (defvar epg-user-id nil @@ -800,9 +810,13 @@ This function is for internal use only." (if (eq (epg-context-protocol context) 'CMS) epg-gpgsm-program epg-gpg-program))) - (let* ((args (append (list "--no-tty" + (let* ((home-directory (if (eq (epg-context-protocol context) 'CMS) + epg-gpgsm-home-directory + epg-gpg-home-directory)) + (args (append (list "--no-tty" "--status-fd" "1" "--yes") + (if home-directory (list "--homedir" home-directory)) (unless (eq (epg-context-protocol context) 'CMS) (list "--command-fd" "0")) (if (epg-context-armor context) '("--armor"))