ebdb 已经在 elpa 了, 中文 bbdb 的用户值得尝试一下

ebdb 和 bbdb 非常类似,但它对中文的支持可以甩 bbdb 几条街, 有兴趣的同学可以试一试.

(use-package ebdb
  :ensure nil
  :config
  (require 'ebdb-mua)
  (require 'ebdb-gnus)
  (require 'ebdb-com)
  (require 'ebdb-vcard)
  (require 'ebdb-complete)
  (ebdb-complete-enable)

  (use-package pyim
    :config
    (use-package ebdb-i18n-chn)
    ;; (defun eh-ebdb-search-chinese (string)
    ;;   (if (functionp 'pyim-isearch-build-search-regexp)
    ;;       (pyim-isearch-build-search-regexp string)
    ;;     string))

    ;; (setq ebdb-search-transform-functions
    ;;       '(eh-ebdb-search-chinese))
    (cl-defmethod ebdb-field-search
        :around (field criterion)
        (or (cl-call-next-method)
            (when (stringp criterion)
              (let ((str (ebdb-string field)))
                (cl-some
                  (lambda (pinyin)
                    (string-match-p criterion pinyin))
                 (append (pyim-hanzi2pinyin str nil "" t)
                         (pyim-hanzi2pinyin str t "" t)))))))))
1 个赞

这个配置可以使用拼音来搜索和补全邮件,非常方便