[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] scratch/org-contacts-rebased 5f1806a 012/118: org-contacts: fix e
From: |
Stefan Monnier |
Subject: |
[elpa] scratch/org-contacts-rebased 5f1806a 012/118: org-contacts: fix errors when Gnus or ERC are not loaded |
Date: |
Fri, 12 Nov 2021 15:36:55 -0500 (EST) |
branch: scratch/org-contacts-rebased
commit 5f1806a8d0ae631bd18f16e194af214a4fc80ad7
Author: Lomax Escarmant <lomax.e@gmail.com>
Commit: Julien Danjou <julien@danjou.info>
org-contacts: fix errors when Gnus or ERC are not loaded
Signed-off-by: Julien Danjou <julien@danjou.info>
---
org-contacts.el | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/org-contacts.el b/org-contacts.el
index f846fe2..545e90e 100644
--- a/org-contacts.el
+++ b/org-contacts.el
@@ -239,9 +239,10 @@ If both match values are nil, return all contacts."
(defun org-contacts-gnus-get-name-email ()
"Get name and email address from Gnus message."
- (gnus-with-article-headers
- (mail-extract-address-components
- (or (mail-fetch-field "From") ""))))
+ (if (gnus-alive-p)
+ (gnus-with-article-headers
+ (mail-extract-address-components
+ (or (mail-fetch-field "From") "")))))
(defun org-contacts-gnus-article-from-get-marker ()
"Return a marker for a contact based on From."
@@ -533,10 +534,11 @@ If ASK is set, ask for the email address even if there's
only one address."
(defun erc-nicknames-list ()
"Return all nicknames of all ERC buffers."
- (loop for buffer in (erc-buffer-list)
- nconc (with-current-buffer buffer
- (loop for user-entry in (mapcar 'car
(erc-get-channel-user-list))
- collect (elt user-entry 1)))))
+ (if (fboundp 'erc-buffer-list)
+ (loop for buffer in (erc-buffer-list)
+ nconc (with-current-buffer buffer
+ (loop for user-entry in (mapcar 'car
(erc-get-channel-user-list))
+ collect (elt user-entry 1))))))
(add-to-list 'org-property-set-functions-alist
`(,org-contacts-nickname-property .
org-contacts-completing-read-nickname))
- [elpa] scratch/org-contacts-rebased 7fcd20b 025/118: contrib/lisp/org-contacts.el: Docstring fixes and small code clean up, (continued)
- [elpa] scratch/org-contacts-rebased 7fcd20b 025/118: contrib/lisp/org-contacts.el: Docstring fixes and small code clean up, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased dcd313e 021/118: Tags/properties matcher: Fixed issues with todo-only matches, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 938ca34 019/118: Add missing word to org-contacts y-or-n-p question, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased c0f4677 024/118: contrib/lisp/org-contacts.el: Require 'org-agenda., Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 6b235b4 044/118: contrib/lisp/*el: Fix license information and add "This file is not part...", Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 66e23e6 008/118: org-contacts: added VCard 3.0 exporter and ADDRESS field, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased e585be0 009/118: org-contacts: added org-contacts-show-map (requires google-maps-el), Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 6c12101 010/118: org-contacts: Use `with-current-buffer' instead of `save-excursion'+`with-current-buffer'., Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 7cae69f 011/118: org-contacts: Require cl on compilation., Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased ef5cb24 016/118: Copyright year fixes for contrib/., Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 5f1806a 012/118: org-contacts: fix errors when Gnus or ERC are not loaded,
Stefan Monnier <=
- [elpa] scratch/org-contacts-rebased 531d67a 014/118: Fix Emacs 24 compatibility issue with Emacs 24, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 2b1a75a 030/118: Improve `completion-at-point' for `org-contacts.el' in mail, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 010b2ec 029/118: org-contacts.el (org-contacts-format-name): New function, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 8bf8565 027/118: Update copyright years., Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 72d2caf 022/118: add a missing require for gnus-util, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased c297cb0 020/118: Merge branch 'maint', Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased ea8cbe4 013/118: Fix copyright years for elisp files in core and contrib., Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 15f35f7 040/118: orgcontacts.el: Fix `date' being broken in `org-contacts-anniversaries'., Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 8b85530 037/118: org-contacts.el: Let the users decide if they want to use `org-contacts' to complete mail addresses, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 884d61f 042/118: Fix typo., Stefan Monnier, 2021/11/12