Function: secrets-item-path
secrets-item-path is a byte-compiled function defined in
secrets.el.gz.
Signature
(secrets-item-path COLLECTION ITEM)
Documentation
Return the object path of item labeled ITEM in COLLECTION.
If there are several items labeled ITEM, it is undefined which one is returned. If there is no such item, return nil.
ITEM can also be an object path, which is returned if contained in COLLECTION.
Source Code
;; Defined in /usr/src/emacs/lisp/net/secrets.el.gz
(defun secrets-item-path (collection item)
"Return the object path of item labeled ITEM in COLLECTION.
If there are several items labeled ITEM, it is undefined which
one is returned. If there is no such item, return nil.
ITEM can also be an object path, which is returned if contained in COLLECTION."
(let ((collection-path (secrets-unlock-collection collection)))
(or (and (member item (secrets-get-items collection-path)) item)
(catch 'item-found
(dolist (item-path (secrets-get-items collection-path))
(when (string-equal
item (secrets-get-item-property item-path "Label"))
(throw 'item-found item-path)))))))