[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org-contacts 2f0d7e94dd 002/154: org-contacts: make Gnu
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org-contacts 2f0d7e94dd 002/154: org-contacts: make Gnus usage optional |
Date: |
Fri, 9 Sep 2022 15:58:22 -0400 (EDT) |
branch: externals/org-contacts
commit 2f0d7e94ddfda9cec54bc3d0471796128ecf6640
Author: Julien Danjou <julien@danjou.info>
Commit: Julien Danjou <julien@danjou.info>
org-contacts: make Gnus usage optional
Signed-off-by: Julien Danjou <julien@danjou.info>
---
org-contacts.el | 20 ++++++++++++--------
1 file changed, 12 insertions(+), 8 deletions(-)
diff --git a/org-contacts.el b/org-contacts.el
index 86b1741a6f..e8c4807a8c 100644
--- a/org-contacts.el
+++ b/org-contacts.el
@@ -37,9 +37,7 @@
;;; Code:
(eval-and-compile
- (require 'org)
- (require 'gnus)
- (require 'gnus-art))
+ (require 'org))
(defgroup org-contacts nil
"Options concerning contacts management."
@@ -253,8 +251,6 @@ If both match values are nil, return all contacts."
;; show the next heading
(org-flag-heading nil)))))))
-(define-key gnus-summary-mode-map ";" 'org-contacts-gnus-article-from-goto)
-
(defun org-contacts-anniversaries (&optional field format)
"Compute FIELD anniversary for each contact, returning FORMAT.
Default FIELD value is \"BIRTHDAY\".
@@ -323,8 +319,6 @@ This function should be called from
`gnus-article-prepare-hook'."
(link (gnus-with-article-buffer (org-store-link nil))))
(org-set-property org-contacts-last-read-mail-property link)))))))
-(add-hook 'gnus-article-prepare-hook 'org-contacts-gnus-store-last-mail)
-
(defun org-contacts-icon-as-string ()
(let ((image (org-contacts-get-icon)))
(concat
@@ -386,7 +380,17 @@ This function should be called from
`gnus-article-prepare-hook'."
(org-with-point-at marker
(org-contacts-check-mail-address (cadr
(org-contacts-gnus-get-name-email)))))))
-(add-hook 'gnus-article-prepare-hook 'org-contacts-gnus-check-mail-address)
+(defun org-contacts-gnus-insinuate ()
+ "Add some hooks for Gnus user.
+This adds `org-contacts-gnus-check-mail-address' and
+`org-contacts-gnus-store-last-mail' to
+`gnus-article-prepare-hook'. It also adds a binding on `;' in
+`gnus-summary-mode-map' to `org-contacts-gnus-article-from-goto'"
+ (require 'gnus)
+ (require 'gnus-art)
+ (define-key gnus-summary-mode-map ";" 'org-contacts-gnus-article-from-goto)
+ (add-hook 'gnus-article-prepare-hook 'org-contacts-gnus-check-mail-address)
+ (add-hook 'gnus-article-prepare-hook 'org-contacts-gnus-store-last-mail))
(defun org-contacts-view-send-email (&optional ask)
"Send email to the contact at point.
- [elpa] branch externals/org-contacts created (now 919511eb86), ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 4a36f4a598 004/154: Merge org-contacts-wl in org-contacts, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 6e66e4a769 003/154: org-contacts: added custom org-contacts-birthday-format, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 2f0d7e94dd 002/154: org-contacts: make Gnus usage optional,
ELPA Syncer <=
- [elpa] externals/org-contacts b78a119f7a 005/154: Add docstring for `wl-get-from-header-content'., ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 6c12101c8c 010/154: org-contacts: Use `with-current-buffer' instead of `save-excursion'+`with-current-buffer'., ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts ef5cb2484b 016/154: Copyright year fixes for contrib/., ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 7cae69fce6 011/154: org-contacts: Require cl on compilation., ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts f71963d38a 036/154: Merge branch 'maint', ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts c0f4677a74 024/154: contrib/lisp/org-contacts.el: Require 'org-agenda., ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 1313bd7bb0 040/154: org-contacts.el: Let the users decide if they want to use `org-contacts' to complete mail addresses, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 8e9ac123b1 034/154: Do not complete when it's not necessary, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts e516efacb6 037/154: Merge branch 'maint', ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 93f982e3ba 030/154: Merge branch 'maint', ELPA Syncer, 2022/09/09