(loop for x in '(a b) do (get-plist-value x))
There are two problems here.
Firstly, the symbol adoes not match the symbol :a(if you are not in the package keyword, which is very unlikely), so it can not find anything. Similarly for b.
-, , get-plist-value, , . , collect, do; , - do (format t "~&~A" (get-plist-value x)); ..
: , :a , . - , , keyword. , . , get-plist-value , - , , , :
(defun get-plist-value (x)
(getf (list :a "1" :b "2")
(intern (symbol-name x) "KEYWORD")))