help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EWW func add url under point as bookmark


From: Alex
Subject: Re: EWW func add url under point as bookmark
Date: Tue, 19 Apr 2022 00:13:20 +0200

Emanuel Berg via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org> writes:

> Just URL and TITLE is fine otherwise it looks like they are part of
> Emacs.

>   In Emacs, the convention is that error messages start with a capital
>   letter but *do not* end with a period.

fixed, thanks

PD: nice website Emanuel



Ok, now, Im browsing in EWW, and Im in a page with many interesting
urls, I want bookmarks all urls after point.

But moving the cursor, M-x eww-bookmark-add RET <title> RET with all
urls is painfull.

I need a func!

#+begin_src elisp

;; Copyright 2022 Alex
;; under GPLv3-or-later License

(defun eww-bookmark-buffer-urls ()
  "Bookmark urls in current buffer"
  (interactive)
  (shr-next-link)
  (let ((url-str (thing-at-point 'url)))
    (eww-bookmark-add url-str url-str))
  (if (save-excursion (shr-next-link))
      (eww-bookmark-buffer-urls)))

#+end_src

Works, but sadly stop when find an url already bookmarked :/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]