;; -*- lexical-binding: t -*- (require 'cl-lib) (cl-pushnew "." load-path :test #'string=) (cl-pushnew (file-name-concat ".." "ll") load-path :test #'string=) (require 'll) (-> 'w3m) (defun w3m-view-this-url-new-tab () (i) (w3m-view-this-url nil t)) (defun w3m-new-tab (&optional name) (i) (or name (setf name "w3m buffer")) (let ((buf (or name "w3m buffer"))) (switch-to-buffer (w3m-copy-buffer nil buf nil t)))) (defun w3m-browse-url-new-tab (&optional url) (interactive (list (let ((uap (thing-at-point 'url))) (read-string (format "URL: [%s] " uap) nil nil uap)))) (let ((u (if (su url) url (thing-at-point 'url)))) (w3m-new-tab u) (w3m-browse-url u))) ;; test URL: ;; https://dataswamp.org/~incal (<- 'w3m-tabs)