branch: externals/org-contacts
commit 612ddf45a67ee7aa71ecebb1362b4112a49b10c5
Author: stardiviner <numbch...@gmail.com>
Commit: stardiviner <numbch...@gmail.com>

    Revert "use function `(org-contacts-files)` to replace variable 
`org-contacts-files`"
    
    This reverts commit 00663f777fcc757593c7a84b4a1b2ef6925663d6.
---
 org-contacts.el | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/org-contacts.el b/org-contacts.el
index ec26106da7..f61b5f821e 100644
--- a/org-contacts.el
+++ b/org-contacts.el
@@ -233,7 +233,7 @@ A regexp matching strings of whitespace, `,' and `;'.")
   "Return list of Org files to use for contact management."
   (if org-contacts-files
       org-contacts-files
-    (message "[org-contacts] Your custom variable `org-contacts-files' is nil. 
Revert to `org-agenda-files' now.")
+    (message "[ERROR] Your custom variable `org-contacts-files' is nil. Revert 
to `org-agenda-files' now.")
     (org-agenda-files t 'ifmode)))
 
 (defun org-contacts-db-need-update-p ()
@@ -882,7 +882,7 @@ This can be property key checking."
                                           (match-string 0 avatar-value))))
                       (avatar-absolute-path (file-name-concat
                                              (or org-contacts-directory
-                                                 (expand-file-name 
(file-name-directory (car (org-contacts-files)))))
+                                                 (expand-file-name 
(file-name-directory (car org-contacts-files))))
                                              avatar-link-path))
                       ( (org-file-image-p avatar-absolute-path))
                       ( (file-exists-p avatar-absolute-path)))
@@ -940,7 +940,7 @@ This can be property key checking."
 
 (defun org-contacts--return-candidates (&optional files)
   "Return `org-contacts' candidates which parsed from FILES."
-  (if-let ((files (or files (org-contacts-files))))
+  (if-let ((files (or files org-contacts-files)))
       (org-contacts--candidates files)
     (user-error "Files does not exist: %S" files)))
 
@@ -959,7 +959,7 @@ This can be property key checking."
          ;; (display-buffer buf '(display-buffer-below-selected))
          ;; (goto-char (org-find-exact-headline-in-buffer contact-name nil t))
          (org-fold-show-context))))
-   (org-contacts-files)))
+   org-contacts-files))
 
 ;;;###autoload
 (defun org-contacts (&optional files)
@@ -967,8 +967,8 @@ This can be property key checking."
   (interactive)
   (unless org-contacts--candidates-cache
     (setq org-contacts--candidates-cache
-          (org-contacts--return-candidates (or files (org-contacts-files)))))
-  (if-let* ((files (or files (org-contacts-files)))
+          (org-contacts--return-candidates (or files org-contacts-files))))
+  (if-let* ((files (or files org-contacts-files))
             ((seq-every-p 'file-exists-p files)))
       (when-let* ((candidates org-contacts--candidates-cache)
                   (minibuffer-allow-text-properties t)

Reply via email to