]> git.eshelyaron.com Git - emacs.git/commit
Split out the attribute retrieval form auth-source-pass-get
authorKeith Amidon <camalot@picnicpark.org>
Tue, 30 Apr 2019 14:52:14 +0000 (07:52 -0700)
committerDamien Cassou <damien@cassou.me>
Mon, 24 Jun 2019 07:15:40 +0000 (09:15 +0200)
commit57e763a0a057621daac2761084556df38f7f2373
tree78b40640685c7144cf96fa3505c5fdd45fdfd025
parent94c9eb81b8b265380345c36c0a481d9022435d89
Split out the attribute retrieval form auth-source-pass-get

Eliminate the need to repeatedly retrieve and parse the data for the
entry.  This is generally a good thing since it eliminates repetitions
of the same crypto and parsing operations.  It is especially valuable
when protecting an entry with a yubikey with touch required for crypto
operations as it eliminates the need to touch the yubikey sensor for
each attribute retrieved.

* lisp/auth-source-pass.el (auth-source-pass-get): Extract some code to
`auth-source-pass--get-attr'.
(auth-source-pass--get-attr): New function to get a field value from a
parsed entry.
(auth-source-pass--build-result): Make use of
`auth-source-pass--get-attr` to avoid repeated parsing.
lisp/auth-source-pass.el