[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] scratch/org-contacts-rebased 2f0d7e9 002/118: org-contacts: make
From: |
Stefan Monnier |
Subject: |
[elpa] scratch/org-contacts-rebased 2f0d7e9 002/118: org-contacts: make Gnus usage optional |
Date: |
Fri, 12 Nov 2021 15:36:53 -0500 (EST) |
branch: scratch/org-contacts-rebased
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 86b1741..e8c4807 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] scratch/org-contacts-rebased 1b6cff5 026/118: contrib/lisp/org-contacts.el: Fix indentation of the file, (continued)
- [elpa] scratch/org-contacts-rebased 1b6cff5 026/118: contrib/lisp/org-contacts.el: Fix indentation of the file, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased dcd8af9 028/118: Merge branch 'maint', Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 2d1ea82 046/118: contrib/lisp/org-contacts.el: Silence byte-compiler, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 7c908e4 043/118: org-contacts.el: Fix or add docstrings, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 02808bb 047/118: Let org-contacts.el has the ability which can export email-address list, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 927e7c7 035/118: org-contacts.el: Check if the database need a refresh in a dedicated function, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased e86b83d 036/118: org-contacts.el: Started to silent byte-compiler, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased c08b676 032/118: Add caching mecanism, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 543f2c5 045/118: contrib/lisp/org-contacts.el: Remove calls to cl functions, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased d7412d5 054/118: contrib/lisp/org-contacts: Fix two typos in comments, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 2f0d7e9 002/118: org-contacts: make Gnus usage optional,
Stefan Monnier <=
- [elpa] scratch/org-contacts-rebased ad7f57a 023/118: Fix error messages: don't use a dot at the end, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 5526110 018/118: Merge branch 'origin-maint', Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 68918fc 034/118: org-contacts: Fix Agenda format., Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 85b506b 031/118: contrib/lisp/org-contacts.el: Delete trailing whitespaces, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 30a76d5 038/118: org-contacts.el: Rename a function to follow emacs-lisp coding conventions, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 57a9545 041/118: contrib/lisp/org-contacts.el: Fix compiler warnings., Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased f4f5ff3 050/118: org-contacts.el (org-contacts-export-as-vcard): Don't use non-existent function `org-install-letbind', Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased f07f259 049/118: org-contacts.el, add tel property, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 7f9ad6a 059/118: contrib/lisp/org-contacts.el: Permit to unload properly `org-contacts', Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased c71bbd2 060/118: contrib/lisp/org-contacts.el (org-contacts-vcard-format): Silence byte-compiler, Stefan Monnier, 2021/11/12