diff options
author | jao <jao@gnu.org> | 2024-04-02 23:05:31 +0100 |
---|---|---|
committer | jao <jao@gnu.org> | 2024-04-02 23:06:43 +0100 |
commit | 52f94fbf928b2362a71bac66ed47189106967f7d (patch) | |
tree | d6e7755dc0a8fbf0da4125e259b8075eca929bfd | |
parent | 5660eb048b483889d10c28ff70dcdac3027a0cc4 (diff) | |
download | elibs-52f94fbf928b2362a71bac66ed47189106967f7d.tar.gz elibs-52f94fbf928b2362a71bac66ed47189106967f7d.tar.bz2 |
notmuch: better restore for window configuration back from tree
-rw-r--r-- | custom/jao-custom-notmuch.el | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/custom/jao-custom-notmuch.el b/custom/jao-custom-notmuch.el index 0cbbfaa..7683959 100644 --- a/custom/jao-custom-notmuch.el +++ b/custom/jao-custom-notmuch.el @@ -380,11 +380,8 @@ notmuch-wash-citation-lines-prefix 120 notmuch-wash-citation-lines-suffix 120 notmuch-show-text/html-blocked-images "." - jao-notmuch-header-line-format - (if jao-mode-line-in-minibuffer - "%Q [%N / %M / %T] %n / %m / %t" - "[%N / %M / %T] %n / %m / %t") - notmuch-show-header-line #'jao-notmuch-message-header-line) + notmuch-show-header-line nil ;; #'jao-notmuch-message-header-line + jao-notmuch-header-line-format "[%N / %M / %T] %n / %m / %t") :config @@ -483,17 +480,16 @@ (defun jao-notmuch-before-tree (&rest _args) (when (string= (buffer-name) "*notmuch-hello*") + (window-configuration-to-register ?G) (split-window-right 40) (other-window 1))) (defvar jao-notmuch--visits 0) (defun jao-notmuch-after-tree-quit (&optional _both) - (when (and (not (derived-mode-p 'notmuch-tree-mode 'notmuch-hello-mode)) - (save-window-excursion (other-window -1) - (derived-mode-p 'notmuch-hello-mode))) - (delete-window) - (jao-notmuch-refresh-hello (= 0 (mod (cl-incf jao-notmuch--visits) 100))))) + (when (not (derived-mode-p 'notmuch-tree-mode 'notmuch-hello-mode)) + (jump-to-register ?G)) + (jao-notmuch-refresh-hello (= 0 (mod (cl-incf jao-notmuch--visits) 50)))) (defun jao-notmuch-tree--sentinel (proc) (when (eq (process-status proc) 'exit) @@ -501,7 +497,8 @@ (save-excursion (goto-char (point-max)) (when (re-search-backward "^End of search results." nil t) - (delete-line)))))) + (delete-line)))) + (jao-notmuch-thread-info-mode))) (add-hook 'notmuch-tree-process-exit-functions #'jao-notmuch-tree--sentinel) |