[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
w3m-bookmark-dwim
- From: Emanuel Berg <moasen@xxxxxxxx>
- Date: Sat, 06 Jan 2018 23:16:07 +0100
- X-ml-name: emacs-w3m
- X-mail-count: 12868
(defun w3m-bookmark-dwim (url &optional title)
(interactive
(if (use-region-p)
(list w3m-current-url (buffer-substring (region-beginning) (region-end)))
(let ((url-at-point (thing-at-point 'url)))
(if url-at-point (list url-at-point)
(let ((link-url (w3m-url-valid (w3m-anchor))))
(if link-url (list link-url) ; (w3m-anchor-title) here DNC
(list w3m-current-url w3m-current-title) ))))))
(w3m-bookmark-add url title) )
--
underground experts united
http://user.it.uu.se/~embe8573