emacsd / init-bbdb.el

;;; init-bbdb.el
;; Copyright (C) Yagnesh Raghava Yakkala.

(setq bbdb-file "~/git/org/.bbdb")

(require 'bbdb)
(require 'bbdb-hooks)

(bbdb-initialize 'gnus 'message)

 ;; bbdb-offer-save 'auto
 bbdb-offer-save 1                        ;; 1 means save-without-asking

 bbdb-notice-auto-save-file t
 bbdb-expand-mail-aliases t
 bbdb-canonicalize-redundant-nets-p t
 bbdb-always-add-addresses t
 bbdb-complete-name-allow-cycling t

 bbdb-use-pop-up t                        ;; allow popups for addresses
 bbdb-electric-p t                        ;; be disposable with SPC
 bbdb-popup-target-lines  1               ;; very small
 bbdb-dwim-net-address-allow-redundancy t ;; always use full name
 bbdb-quiet-about-name-mismatches 2       ;; show name-mismatches 2 secs

 bbdb-always-add-address t                ;; add new addresses to existing...
 ;; ...contacts automatically
 bbdb-canonicalize-redundant-nets-p t     ;; =>

 bbdb-completion-type nil                 ;; complete on anything

 bbdb-complete-name-allow-cycling t       ;; cycle through matches
 ;; this only works partially

 bbbd-message-caching-enabled t           ;; be fast
 bbdb-use-alternate-names t               ;; use AKA
 bbdb-elided-display t                    ;; single-line addresses

 ;; auto-create addresses from mail
 bbdb/mail-auto-create-p 'bbdb-ignore-some-messages-hook
 bbdb-ignore-some-messages-alist  ;; don't ask about fake addresses
 '(( "From" . "no.?reply\\|DAEMON\\|daemon\\|facebookmail"))

(defun bbdb/gnus-update-selectively ()
  "Update BBDB record selectively"
      (gnus-news-group-p gnus-newsgroup-name)
      (setq bbdb/gnus-update-records-p nil)
    (setq bbdb/gnus-update-records-p 'query)

(add-hook 'gnus-summary-prepare-hook 'bbdb/gnus-update-selectively)

;;; init-bbdb.el ends here
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.