The following example calls ‘mailcap-viewer-passes-test’ four times. For the first, second and third call the VIEWER-INFO does not contain a test; for the third the test is nil. The results show that the first and second call correctly return t; the third with (test . nil) correctly returns nil and adds (nil nil) to the cache; the fourth, then, incorrectly returns nil. #+HEADER: :results table #+begin_src emacs-lisp (let (mailcap-viewer-test-cache (viewer-infos (list (list (cons 'viewer "viewer-w/o-test")) (list (cons 'viewer "viewer-w/o-test")) (list (cons 'viewer "viewer-w/-test-nil") (cons 'test nil)) (list (cons 'viewer "viewer-w/o-test"))))) (cl-list* (list "Index" "Viewer" "Passes Test" "Cache after Call") 'hline (cl-loop for i = 1 then (1+ i) for vi in viewer-infos collect (list (format "%i." i) (alist-get 'viewer vi) (mailcap-viewer-passes-test vi nil) mailcap-viewer-test-cache)))) #+end_src #+RESULTS: | Index | Viewer | Passes Test | Cache after Call | |-------+--------------------+-------------+------------------| | 1. | viewer-w/o-test | t | nil | | 2. | viewer-w/o-test | t | nil | | 3. | viewer-w/-test-nil | nil | ((nil nil)) | | 4. | viewer-w/o-test | nil | ((nil nil)) | -- Felix Dietrich