diff options
author | Carl Worth <cworth@cworth.org> | 2009-11-02 16:02:32 -0800 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2009-11-02 16:02:32 -0800 |
commit | ab2d904e060c6dada013f8bd731fbb4ff824b040 (patch) | |
tree | 0b41c241741c1a6fde0686f943aa2ce88481196c /notmuch.el | |
parent | d4c4318fb95ba2ed86823389cf82b11a2bcae073 (diff) |
notmuch.el: Hide thread IDs in notmuch-search mode.
One more baby step toward something that's pleasant to use.
Diffstat (limited to 'notmuch.el')
-rw-r--r-- | notmuch.el | 23 |
1 files changed, 23 insertions, 0 deletions
@@ -95,6 +95,28 @@ (re-search-forward "[a-fA-F0-9]*") (filter-buffer-substring beg (point))))) +(defun notmuch-search-markup-this-thread-id () + (beginning-of-line) + (let ((beg (point))) + (re-search-forward "[a-fA-F0-9]*") + (forward-char) + (overlay-put (make-overlay beg (point)) 'invisible 'notmuch-search))) + +(defun notmuch-search-markup-thread-ids () + (save-excursion + (beginning-of-buffer) + (while (not (eobp)) + (notmuch-search-markup-this-thread-id) + (next-line)))) + +(defun notmuch-search-hide-thread-ids () + (interactive) + (add-to-invisibility-spec 'notmuch-search)) + +(defun notmuch-search-show-thread-ids () + (interactive) + (remove-from-invisibility-spec 'notmuch-search)) + (defun notmuch-search-show-thread () (interactive) (notmuch-show (notmuch-search-find-thread-id))) @@ -164,6 +186,7 @@ (save-excursion (call-process "notmuch" nil t nil "search" query) ) + (notmuch-search-markup-thread-ids) ))) (defun notmuch () |