;;; ll-w3m-bookmark-more --- ll w3m bookmark more -*- lexical-binding: t -*- ;;; Commentary: ;;; Code: (require 'cl-lib) (cl-pushnew "." load-path :test #'string=) (cl-pushnew "~/.emacs.d/elpa/w3m-20250503.2349/" load-path :test #'string=) (require 'll) (-> 'w3m-bookmark) (-> 'll-w3m-tabs) (defun localhost () (i) (w3m-browse-url-new-tab "http://localhost")) (defun w3m-show-bookmarks () (i) (switch-to-buffer (w3m-new-tab "bookmarks")) (w3m-bookmark-view t)) (defun w3m-bookmark (url title) (interactive (if (use-region-p) (list w3m-current-url (buffer-substring-no-properties (region-beginning) (region-end))) (let ((url-at-point (thing-at-point 'url))) (if url-at-point (list url-at-point (read-string "title: ")) (let ((link-url (w3m-url-valid (w3m-anchor)))) (if link-url (list link-url (or (w3m-anchor-title) ; doesn't always work (thing-at-point 'word t))) (list w3m-current-url w3m-current-title))))))) (& url title (w3m-bookmark-add url title))) (defun w3m-edit-url-or-bookmarks () (i) (if (s= w3m-current-url "about://bookmark/") (w3m-bookmark-edit) (w3m-edit-current-url))) (<- 'll-w3m-bookmark-more) ;;; ll-w3m-bookmark-more.el ends here