aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--emacs/.emacs.d/init/ycp-gnus.el7
-rw-r--r--emacs/.emacs.d/lisp/my/my-bbdb.el7
2 files changed, 12 insertions, 2 deletions
diff --git a/emacs/.emacs.d/init/ycp-gnus.el b/emacs/.emacs.d/init/ycp-gnus.el
index bf8ffae..6eef1cd 100644
--- a/emacs/.emacs.d/init/ycp-gnus.el
+++ b/emacs/.emacs.d/init/ycp-gnus.el
@@ -183,10 +183,13 @@
(my-package bbdb
(:delay 5)
(bbdb-initialize 'gnus 'message)
- ;; Too noisy
- ;; (bbdb-mua-auto-update-init 'gnus 'message)
+ (bbdb-mua-auto-update-init 'gnus 'message)
+ (setq bbdb-message-all-addresses t)
+ (setq bbdb-mua-pop-up-window-size .15)
(setq bbdb-mail-user-agent 'gnus-user-agent)
(setq bbdb-update-records-p 'create)
+ (setq bbdb-message-clean-mail-function 'my-bbdb-clean-mail)
+ (setq bbdb-add-name nil)
(require 'my-bbdb)
(my-keybind bbdb-mode-map "C-c C-c" #'my-bbdb-done)
(setq bbdb-phone-style nil
diff --git a/emacs/.emacs.d/lisp/my/my-bbdb.el b/emacs/.emacs.d/lisp/my/my-bbdb.el
index 80661cd..f5aa420 100644
--- a/emacs/.emacs.d/lisp/my/my-bbdb.el
+++ b/emacs/.emacs.d/lisp/my/my-bbdb.el
@@ -186,5 +186,12 @@ If NAME exists in bbdb, update. Otherwise insert."
(interactive)
(bbdb ""))
+(defun my-bbdb-clean-mail (address)
+ "Cleans email address."
+ (setq address (bbdb-string-trim address))
+ (cond ((string-match "\\`\\([^@+]+\\)\\+[^@]+\\(@.*\\)\\'" address)
+ (concat (match-string 1 address) (match-string 2 address)))
+ (t address)))
+
(provide 'my-bbdb)
;;; my-bbdb.el ends here