[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org-contacts f5394bc0b6 147/154: Warning user that the
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org-contacts f5394bc0b6 147/154: Warning user that the custom variable `org-contacts-files' is nil. |
Date: |
Fri, 9 Sep 2022 15:58:55 -0400 (EDT) |
branch: externals/org-contacts
commit f5394bc0b6072986ec03fe94510f4974eaa5e98c
Author: stardiviner <numbchild@gmail.com>
Commit: stardiviner <numbchild@gmail.com>
Warning user that the custom variable `org-contacts-files' is nil.
If `org-contacts-files' is nil, will revert to `org-agenda-files'.
---
org-contacts.el | 21 ++++++++++++---------
1 file changed, 12 insertions(+), 9 deletions(-)
diff --git a/org-contacts.el b/org-contacts.el
index 607cb76c0b..adcb6e7d41 100644
--- a/org-contacts.el
+++ b/org-contacts.el
@@ -217,7 +217,10 @@ A regexp matching strings of whitespace, `,' and `;'.")
(defun org-contacts-files ()
"Return list of Org files to use for contact management."
- (or org-contacts-files (org-agenda-files t 'ifmode)))
+ (if org-contacts-files
+ org-contacts-files
+ (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 ()
"Determine whether `org-contacts-db' needs to be refreshed."
@@ -247,7 +250,7 @@ buffer."
result)
(when (org-contacts-db-need-update-p)
(let ((progress-reporter
- (make-progress-reporter "Updating Org Contacts Database..." 0
(length org-contacts-files)))
+ (make-progress-reporter "Updating Org Contacts Database..." 0
(length (org-contacts-files))))
(i 0))
(dolist (file (org-contacts-files))
(if (catch 'nextfile
@@ -973,7 +976,7 @@ address."
;; Use `org-contacts-icon-property'
(let* ((link-matcher-regexp
"\\[\\[\\([^]]*\\)\\]\\(\\[\\(.*\\)\\]\\)?\\]")
- (contacts-dir (file-name-directory (car org-contacts-files)))
+ (contacts-dir (file-name-directory (car (org-contacts-files))))
(image-path
(if-let ((avatar (org-entry-get pom org-contacts-icon-property)))
(cond
@@ -1263,7 +1266,7 @@ are effectively trimmed). If nil, all zero-length
substrings are retained."
"Store the contact in `org-contacts-files' with a link."
(when (and (eq major-mode 'org-mode)
(member (buffer-file-name)
- (mapcar #'expand-file-name org-contacts-files)))
+ (mapcar #'expand-file-name (org-contacts-files))))
(if (bound-and-true-p org-id-link-to-org-use-id)
(org-id-store-link)
(let ((headline-str (substring-no-properties (org-get-heading t t t t))))
@@ -1290,7 +1293,7 @@ Each element has the form (NAME . (FILE . POSITION))."
(file (buffer-file-name))
(position (point)))
`(:name ,name :file ,file :position ,position))))))
- org-contacts-files)))
+ (org-contacts-files))))
;;;###autoload
(defun org-contacts-link-open (path)
@@ -1299,7 +1302,7 @@ Each element has the form (NAME . (FILE . POSITION))."
(cond
;; /query/ format searching
((string-match "/.*/" query)
- (let* ((f (car org-contacts-files))
+ (let* ((f (car (org-contacts-files)))
(buf (get-buffer (file-name-nondirectory f))))
(unless (buffer-live-p buf) (find-file f))
(with-current-buffer buf
@@ -1307,14 +1310,14 @@ Each element has the form (NAME . (FILE . POSITION))."
(occur (match-string 1 query)))))
;; jump to exact contact headline directly
(t
- (let* ((f (car org-contacts-files))
+ (let* ((f (car (org-contacts-files)))
(_ (find-file f))
(buf (get-buffer (file-name-nondirectory f))))
(with-current-buffer buf
(goto-char (marker-position (org-find-exact-headline-in-buffer
query))))
(display-buffer buf '(display-buffer-below-selected)))
- ;; (let* ((f (car org-contacts-files))
+ ;; (let* ((f (car (org-contacts-files)))
;; (_ (find-file f))
;; ;; FIXME:
;; (contact-entry (map-filter
@@ -1356,7 +1359,7 @@ Each element has the form (NAME . (FILE . POSITION))."
"Retrieve all org-contacts EMAIL property values."
(mapcar
(lambda (contact)
- (let* ((org-contacts-buffer (find-file-noselect (car org-contacts-files)))
+ (let* ((org-contacts-buffer (find-file-noselect (car
(org-contacts-files))))
(name (plist-get contact :name))
(position (plist-get contact :position))
(email (save-excursion
- [elpa] externals/org-contacts 3e075cdee4 123/154: Fix most of the compiler wanrings and add `Version:', (continued)
- [elpa] externals/org-contacts 3e075cdee4 123/154: Fix most of the compiler wanrings and add `Version:', ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 919511eb86 154/154: Adding org-contacts to GNU ELPA, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 2916aae933 144/154: Fix warning: Invalid face reference: quote. Invalid face attribute :inherit 'org-link, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 84436fd7bc 136/154: Fix org-contacts file narrowed not widen recovered bug., ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts e64df72db4 094/154: Rationalize `org-link-(un)escape', ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 478dfcc9b7 096/154: org-contacts.el: Add new link type "contact:", ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 2f8b3f024c 108/154: Prefer HTTPS to HTTP for links to gnu.org, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts f64d6edcd0 121/154: Update source code metadata keywords and usage description, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts bdf172eab8 129/154: Merge branch 'complete-contact', ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts dba21b4895 153/154: Decrease emacs and cl-lib version requirements., ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts f5394bc0b6 147/154: Warning user that the custom variable `org-contacts-files' is nil.,
ELPA Syncer <=
- [elpa] externals/org-contacts 3a24177c3a 070/154: un-hexify TEL links in vCard export, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 58edab6f69 134/154: Add autoload cookirs for completing functions, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 7ed94bcf72 140/154: Fix can't get-buffer when file is not opened which caused `buf` is nil., ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 05522de61d 146/154: Setting package require versions list, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts cf8ae48b37 142/154: Add if logic on function erc-nicknames-list, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts bd83216f38 079/154: contrib/lisp/org-contacts.el: Complete contacts using tags and properties, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 2e77024e89 017/154: Copyright year fixes for contrib/., ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 4170ea25f3 090/154: Deprecate `org-find-if' in favor of `cl-find-if', ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts c1a17bf632 076/154: Merge branch 'maint', ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 2de057e423 145/154: Make org-link-set-parameters <- org-add-link-type API compatible., ELPA Syncer, 2022/09/09