About cl: getf
Let Petit Prince answer right that getf is probably the function you want to use here, but note that it can be used not only for keywords. You can use it for any objects. The list of properties is just a list of variable indicators and values, and any object can be an indicator:
(let ((plist (list 'a 'b 'c 'd)))
(getf plist 'c))
;=> D
You can even use strings as indicators:
(let* ((name "p1")
(plist (list name 1)))
(getf plist name))
;=> 1
, , , getf eq. , , :
(let ((plist (list "p1" 1)))
(getf plist "p1"))
;=> NIL
, ( , ). , .
(let ((plist '(:p1 1 :p2 2)))
(loop
for (indicator value) on plist by #'cddr
when (string-equal indicator "p1")
return value))
;=> 1
, , :
(defun getf-string-equal (plist indicator)
(loop
for (i v) on plist by
when (string-equal i indicator)
return v))
(getf-string-equal '(:p1 1 :p2 2) "p1")
;=> 1