summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--w3m.org9
1 files 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