29 lines
854 B
EmacsLisp
29 lines
854 B
EmacsLisp
|
;; Notmuch
|
||
|
|
||
|
(when (require 'patch-helm nil 'noerror)
|
||
|
(helm-defswitcher
|
||
|
"notmuch"
|
||
|
(lambda (b)
|
||
|
(with-current-buffer b
|
||
|
(or
|
||
|
(derived-mode-p 'notmuch-hello-mode)
|
||
|
(derived-mode-p 'notmuch-search-mode)
|
||
|
(derived-mode-p 'notmuch-show-mode)
|
||
|
(derived-mode-p 'notmuch-message-mode))))
|
||
|
notmuch-hello))
|
||
|
|
||
|
(when (require 'helm-notmuch nil t)
|
||
|
;; TODO: Send PR.
|
||
|
(defun helm-notmuch-maybe-match-incomplete (pattern)
|
||
|
(if helm-notmuch-match-incomplete-words
|
||
|
(concat (mapconcat #'identity (split-string pattern) "* ") "*")
|
||
|
;; (if (string-match-p "[[:alnum:]]$" pattern)
|
||
|
;; (concat pattern "*")
|
||
|
;; pattern)
|
||
|
pattern))
|
||
|
|
||
|
(dolist (map (list notmuch-search-mode-map notmuch-hello-mode-map notmuch-show-mode-map))
|
||
|
(define-key map "s" 'helm-notmuch)))
|
||
|
|
||
|
(provide 'init-notmuch)
|