Sniffen Packets

With a name like Sniffen, it's got to smell good.

Notmuch tags and helm

I spend a bunch of time in Emacs notmuch mode. Great for what it is, but so much opportunity to integrate better with Emacs. For example, it’d be nice if tags were more active:

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
(defun helm-completing-read-notmuch-tag (prompt collection test require init hist default inherit-input-method name buffer)
  "Completing read on notmuch tags, preferring those on this line"
  (let ((local-tag-list (notmuch-search-get-tags)))
    (or ; voodoo from helm-completing-read-symbols
     (helm
      :sources `(((name . "Local Tags")
                  (action . identity)
                  (candidates . ,local-tag-list))
                 ((name . "Global Tags")
                  (action . identity)
                  (candidates . ,collection)))
      :prompt prompt
      :buffer buffer
      :input init
      :history hist
      :resume 'noresume
      :default (or default ""))
     (helm-mode--keyboard-quit))))

(add-to-list 'helm-completing-read-handlers-alist '(notmuch-search-filter-by-tag . helm-completing-read-notmuch-tag))

(defun notmuch-search-filter-by-tag-at-point ()
  (interactive)
  (notmuch-search-filter-by-tag (thing-at-point 'symbol)))
(define-key notmuch-search-mode-map "T" 'notmuch-search-filter-by-tag-at-point)

emacs