summaryrefslogtreecommitdiffhomepage
path: root/lib/net
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2022-09-23 00:59:24 +0100
committerjao <jao@gnu.org>2022-09-23 01:04:05 +0100
commit0db03a3d92fda3c0cf368826d0fe5a224ad688d0 (patch)
tree96d62b882b4cba7bc97f4c7fc7420052f6ae1d23 /lib/net
parent5a9447886f4930b93813a201bc7194fa183be54f (diff)
downloadelibs-0db03a3d92fda3c0cf368826d0fe5a224ad688d0.tar.gz
elibs-0db03a3d92fda3c0cf368826d0fe5a224ad688d0.tar.bz2
cleanups for pdf navigation
Diffstat (limited to 'lib/net')
-rw-r--r--lib/net/jao-notmuch.el84
1 files changed, 0 insertions, 84 deletions
diff --git a/lib/net/jao-notmuch.el b/lib/net/jao-notmuch.el
index d7e27b6..6dcb73e 100644
--- a/lib/net/jao-notmuch.el
+++ b/lib/net/jao-notmuch.el
@@ -270,90 +270,6 @@
(concat " " subject)))
-;;; outline mode for tree view
-
-(defun jao-notmuch-tree--msg-prefix (msg)
- (insert (propertize (if (plist-get msg :first) "> " " ") 'display " ")))
-
-(defun jao-notmuch-tree--mode-setup ()
- (setq-local outline-regexp "^> \\|^En")
- (outline-minor-mode t))
-
-(defun jao-notmuch-tree-hide-others (&optional and-show)
- (interactive)
- (outline-hide-body)
- (outline-show-entry)
- (when and-show (notmuch-tree-show-message nil)))
-
-(defsubst jao-notmuch-tree--message-open ()
- (and (buffer-live-p notmuch-tree-message-buffer)
- (get-buffer-window notmuch-tree-message-buffer)))
-
-(defsubst jao-notmuch--get-prop (prop &optional props)
- (or (and props (plist-get props prop))
- (notmuch-tree-get-prop prop)
- (notmuch-show-get-prop prop)))
-
-(defun jao-notmuch--looking-at-match-p ()
- (and (jao-notmuch--get-prop :match)
- (equal (jao-notmuch--get-prop :orig-tags)
- (jao-notmuch--get-prop :tags))))
-
-(defun jao-notmuch-tree--next (prev thread no-exit &optional ignore-new)
- (let ((line-move-ignore-invisible nil))
- (cond ((and (not ignore-new)
- (jao-notmuch--looking-at-match-p)
- (not (jao-notmuch-tree--message-open))))
- (thread
- (notmuch-tree-next-thread prev)
- (unless (or (not (notmuch-tree-get-message-properties))
- (jao-notmuch--looking-at-match-p))
- (notmuch-tree-matching-message prev (not no-exit))))
- (t (notmuch-tree-matching-message prev (not no-exit)))))
- (when (notmuch-tree-get-message-id)
- (jao-notmuch-tree-hide-others t))
- (when prev (forward-char 2)))
-
-(defvar jao-notmuch-tree--prefix-map
- (let ((m (make-keymap "Thread operations")))
- (define-key m (kbd "TAB") #'outline-cycle)
- (define-key m (kbd "t") #'outline-toggle-children)
- (define-key m (kbd "s") #'outline-show-entry)
- (define-key m (kbd "S") #'outline-show-all)
- (define-key m (kbd "h") #'outline-hide-entry)
- (define-key m (kbd "H") #'outline-hide-body)
- (define-key m (kbd "o") #'jao-notmuch-tree-hide-others)
- (define-key m (kbd "n") #'outline-hide-other)
- m))
-
-(defun jao-notmuch-tree-outline-setup (&optional prefix)
- (define-key notmuch-tree-mode-map (kbd (or prefix "T"))
- jao-notmuch-tree--prefix-map)
- (define-key notmuch-tree-mode-map (kbd "TAB") #'outline-cycle)
- (define-key notmuch-tree-mode-map (kbd "M-TAB") #'outline-cycle-buffer)
- (add-hook 'notmuch-tree-mode-hook #'jao-notmuch-tree--mode-setup)
- (advice-add 'notmuch-tree-insert-msg :before #'jao-notmuch-tree--msg-prefix))
-
-(defun jao-notmuch-tree-next (thread &optional no-exit)
- "Next message or thread in forest, taking care of thread visibility."
- (interactive "P")
- (jao-notmuch-tree--next nil thread no-exit))
-
-(defun jao-notmuch-tree-next-thread (&optional exit)
- "Next thread in forest, taking care of thread visibility."
- (interactive "P")
- (jao-notmuch-tree--next nil t exit))
-
-(defun jao-notmuch-tree-previous (thread)
- "Previous message or thread in forest, taking care of thread visibility."
- (interactive "P")
- (jao-notmuch-tree--next t thread t))
-
-(defun jao-notmuch-tree-previous-thread (&optional exit)
- "Previous thread in forest, taking care of thread visibility."
- (interactive "P")
- (jao-notmuch-tree--next t t exit))
-
;;; tree setup overall function
(defun jao-notmuch-tree--sentinel (proc)