From 4165aa6e0859af2bbee3c02e1aaf5a664f411b32 Mon Sep 17 00:00:00 2001 From: jao Date: Wed, 12 Jan 2022 18:29:08 +0000 Subject: whitespace --- notmuch.org | 49 ++++++++++++++++++++++++------------------------- 1 file changed, 24 insertions(+), 25 deletions(-) (limited to 'notmuch.org') diff --git a/notmuch.org b/notmuch.org index dd8d0d9..c12019a 100644 --- a/notmuch.org +++ b/notmuch.org @@ -398,9 +398,32 @@ #+end_src * tree #+begin_src emacs-lisp + (defun jao-notmuch-tree--forward (&optional prev) + (interactive) + (forward-line (if prev -1 1)) + (when prev (forward-char 2)) + (jao-notmuch-tree-scroll-or-next)) + + (defun jao-notmuch-tree--backward () + (interactive) + (jao-notmuch-tree--forward t)) + + (defun jao-notmuch--via-url () + (when (window-live-p notmuch-tree-message-window) + (with-selected-window notmuch-tree-message-window + (goto-char (point-min)) + (when (re-search-forward "^Via: http" nil t) + (thing-at-point-url-at-point))))) + + (defun jao-notmuch-browse-url (ext) + (interactive "P") + (when-let (url (or (jao-notmuch--via-url) + (car (last (jao-notmuch-message-urls))))) + (funcall (if ext browse-url-secondary-browser-function #'browse-url) + url))) + (use-package notmuch-tree :init - (setq notmuch-tree-result-format `(("date" . "%12s ") ("authors" . "%-35s") @@ -428,30 +451,6 @@ (jao-notmuch-tree-setup "T") - (defun jao-notmuch-tree--forward (&optional prev) - (interactive) - (forward-line (if prev -1 1)) - (when prev (forward-char 2)) - (jao-notmuch-tree-scroll-or-next)) - - (defun jao-notmuch-tree--backward () - (interactive) - (jao-notmuch-tree--forward t)) - - (defun jao-notmuch--via-url () - (when (window-live-p notmuch-tree-message-window) - (with-selected-window notmuch-tree-message-window - (goto-char (point-min)) - (when (re-search-forward "^Via: http" nil t) - (thing-at-point-url-at-point))))) - - (defun jao-notmuch-browse-url (ext) - (interactive "P") - (when-let (url (or (jao-notmuch--via-url) - (car (last (jao-notmuch-message-urls))))) - (funcall (if ext browse-url-secondary-browser-function #'browse-url) - url))) - :bind (:map notmuch-tree-mode-map (("b" . jao-notmuch-browse-urls) ("d" . jao-notmuch-tree-toggle-delete) -- cgit v1.2.3