Daiki Ueno writes: > If your statement in <87wrh0fh4g.fsf_-_@lifelogs.com>: > > The decoding will happen late, probably in the funcall to obtain the > secret (and it will set some scoped variables to cache the data) > > is true, epg-encrypt-string is not necessarily to be optimized in that > way, I think. How about implementing your side first and profiling > before the optimization? I didn't notice that the field encryption code is already checked in. However, it does not work for me at all and looks too complicated - also it apparently does not benefit from GPG2 passphrase caching (see "(auth) GnuPG and EasyPG Assistant Configuration"). I don't want to see that the Gnus password-caching feature becomes harder and harder to use daily... Is it not feasible to stop reusing netrc pieces and employ a new format, which is more GPG friendly? Yeah, I'm reluctant to repeat the same discussion - here is a proof-of-concept implementation of searchable, partially encrypted, persistent plist store, called plstore.el. Creation: (setq store (plstore-open (expand-file-name "~/.emacs.d/auth"))) (plstore-put store "foo" '(:host "foo.example.org" :user "test") nil) (plstore-save store) ;; mark :user property as secret (plstore-put store "bar" '(:host "bar.example.org") '(:user "test")) (plstore-put store "baz" '(:host "baz.example.org") '(:user "test")) (plstore-save store) ;<= will ask passphrase via GPG Search: (setq store (plstore-open (expand-file-name "auth.el" user-emacs-directory))) (plstore-find store '(:host "foo.example.org")) (plstore-find store '(:host "bar.example.org")) ;<= will ask passphrase via GPG The file format of ~/.emacs.d/auth: --8<---------------cut here---------------start------------->8--- (("baz" :secret-user t :host "baz.example.org") ("bar" :secret-user t :host "bar.example.org") ("foo" :host "foo.example.org" :port 80)) "-----BEGIN PGP MESSAGE----- Version: GnuPG v2.0.17 (GNU/Linux) jA0EAwMCXQZhP/0Se0DUyTQcC17GCo0CdT+RfFFskWp4aNYW/aOT/qbv24M1vPfx TFi9AR7iVc6qlg+9cA3f3buYBGvp =UEHH -----END PGP MESSAGE----- " --8<---------------cut here---------------end--------------->8---