Clean nil and empty string "" from result

This commit is contained in:
stardiviner 2023-07-10 19:47:58 +08:00
parent 3f62975e74
commit 7231f8b2b8

View file

@ -1363,6 +1363,7 @@ Each element has the form (NAME . (FILE . POSITION))."
(defun org-contacts-mailto-link--get-all-emails ()
"Retrieve all org-contacts EMAIL property values."
(setq org-contacts-emails-list
(mapcar
(lambda (contact)
(let* ((org-contacts-buffer (find-file-noselect (car (org-contacts-files))))
@ -1384,6 +1385,8 @@ Each element has the form (NAME . (FILE . POSITION))."
;; (cons name email)
email))
(org-contacts--all-contacts)))
;; clean nil and empty string "" from result.
(delq "" (delq nil org-contacts-emails-list)))
(defun org-contacts-mailto-link-completion (&optional _arg)
"Org mode link `mailto:' completion with org-contacts emails."