From 963a4477eb40881964d71a941c74d036d258e71d Mon Sep 17 00:00:00 2001 From: jao Date: Sat, 10 Jul 2021 02:24:39 +0100 Subject: wee tweaks --- lib/eos/jao-minibuffer.el | 3 ++- w3m.org | 41 +++++++++++++++++++++-------------------- 2 files changed, 23 insertions(+), 21 deletions(-) diff --git a/lib/eos/jao-minibuffer.el b/lib/eos/jao-minibuffer.el index 42b7ed6..794ffd4 100644 --- a/lib/eos/jao-minibuffer.el +++ b/lib/eos/jao-minibuffer.el @@ -103,6 +103,7 @@ (defvar-local w3m-current-title nil) (defvar-local eww-data nil) +(defvar-local jao-notmuch--tree-buffer nil) (defvar circe-chat-target nil) (setq-default mode-line-position @@ -117,8 +118,8 @@ mode-line-buffer-identification) ((derived-mode-p 'circe-channel-mode) (format "%s [%d]" (buffer-name) (length (circe-channel-nicks)))) + (jao-notmuch--tree-buffer (buffer-name jao-notmuch--tree-buffer)) ((not (null eww-data)) (plist-get eww-data :title)) - (w3m-current-title) (t "%b"))) "%]" (:propertize " %*%+ " face jao-themes-warning) diff --git a/w3m.org b/w3m.org index 6dec1aa..ef1b105 100644 --- a/w3m.org +++ b/w3m.org @@ -73,26 +73,27 @@ #+end_src * Narrowing #+begin_src emacs-lisp - (with-eval-after-load "consult" - (defvar jao-consult-w3m-buffer-history nil) - (defvar jao-consult-w3m-source - (list :name "w3m buffer" - :category 'w3m-buffer - :hidden t - :narrow (cons ?w "w3m") - :annotate (lambda (b) (when b (get-text-property 0 'url b))) - :history 'jao-consult-w3m-buffer-history - :action (lambda (b) - (jao-afio--goto-www) - (switch-to-buffer (get-text-property 0 'buffer b))) - :items (lambda () - (seq-map (lambda (b) - (with-current-buffer b - (propertize (or w3m-current-title "") - 'buffer b - 'url w3m-current-url))) - (w3m-list-buffers))))) - (jao-consult-add-buffer-source 'jao-consult-w3m-source "Web" ?w)) + (with-eval-after-load "w3m" + (with-eval-after-load "consult" + (defvar jao-consult-w3m-buffer-history nil) + (defvar jao-consult-w3m-source + (list :name "w3m buffer" + :category 'w3m-buffer + :hidden t + :narrow (cons ?w "w3m") + :annotate (lambda (b) (when b (get-text-property 0 'url b))) + :history 'jao-consult-w3m-buffer-history + :action (lambda (b) + (jao-afio--goto-www) + (switch-to-buffer (get-text-property 0 'buffer b))) + :items (lambda () + (seq-map (lambda (b) + (with-current-buffer b + (propertize (or w3m-current-title "") + 'buffer b + 'url w3m-current-url))) + (w3m-list-buffers))))) + (jao-consult-add-buffer-source 'jao-consult-w3m-source "Web" ?w))) #+end_src * Package #+begin_src emacs-lisp -- cgit v1.2.3