From d79d85fe3f844cd2c15379f277a6887f02184dc9 Mon Sep 17 00:00:00 2001 From: jao Date: Thu, 1 Jul 2021 16:37:59 +0100 Subject: fixes for w3m workspace narrowing --- w3m.org | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/w3m.org b/w3m.org index d26366c..496c2ec 100644 --- a/w3m.org +++ b/w3m.org @@ -90,12 +90,12 @@ #+begin_src emacs-lisp (with-eval-after-load "consult" (defvar jao-consult-w3m-buffer-history nil) - (setq jao-consult-w3m-source + (defvar jao-consult-w3m-source (list :name "w3m buffer" :category 'w3m-buffer :hidden t :narrow (cons ?w "w3m") - :annotate (lambda (b) (get-text-property 0 'url b)) + :annotate (lambda (b) (when b (get-text-property 0 'url b))) :history 'jao-consult-w3m-buffer-history :action (lambda (b) (jao-afio--goto-www) @@ -103,12 +103,11 @@ :items (lambda () (seq-map (lambda (b) (with-current-buffer b - (propertize w3m-current-title + (propertize (or w3m-current-title "") 'buffer b 'url w3m-current-url))) (w3m-list-buffers))))) - (setq jao-consult-www-narrow ?w) - (add-to-list 'consult-buffer-sources 'jao-consult-w3m-source t)) + (jao-consult-add-buffer-source 'jao-consult-w3m-source "Web" ?w)) #+end_src * Package #+begin_src emacs-lisp -- cgit v1.2.3