summaryrefslogtreecommitdiff
path: root/modules/org-contacts-config.el
blob: 489d7a33330f8b518464537590e85d306ad2646b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
;;; org-contacts-config.el --- Org Contacts Customizations -*- lexical-binding: t; -*-

;;; Commentary:
;;

;;; Code:

(use-package org-contacts
  :after (org org-contrib mu4e)
  :defer 1
  :bind ("C-z C" . org-contacts) ; starts contacts search
  :config
  (setq org-contacts-files (cons contacts-file '()))

  (add-to-list 'org-capture-templates
			   '("c" "Contact" entry (file+headline contacts-file "Contacts")
				 "*%?\n:PROPERTIES:\n:ADDRESS: \n:PHONE: \n:EMAIL: \n:BIRTHDAY: \n:NOTES: \n:END:" :prepend t))


  (setq mu4e-contacts-file contacts-file)

  (add-to-list 'mu4e-headers-actions
			   '("add contact" . mu4e-action-add-org-contact))
  (add-to-list 'mu4e-view-actions
			   '("add contact" . mu4e-action-add-org-contact))
  (add-to-list 'mu4e-view-actions
			   '("download attachments" . cj/mu4e-view-save-attachments)))

(provide 'org-contacts-config)
;;; org-contacts-config.el ends here.