2

I have a list of www addresses as a list like:

- https://www.nytimes.com
- https://www.foxnews.com

and so on. I can open single elements with the command org-open-at-point which is bound to the key sequence C-c C-o. A Firefox tab will open on the correct address.

However, how could I mark a list and open all of them each on a single tab?

1

The following lisp code lets org-open-at-point open all links within the active region. It behaves like the original version if region is not active.

If you want to use the code paste it in your init file and re-start emacs.

(defun orgTZA-open-at-point-ad (oldfun &rest args)
  "Just `org-open-at-point'.
If region is active open all links in region."
  (if (use-region-p)
      (save-excursion
    (save-restriction
      (narrow-to-region (region-beginning) (region-end))
      (goto-char (point-min))
      (while (progn
           (org-next-link)
           (null org-link-search-failed))
        (apply oldfun args))))
    (apply oldfun args)))

(advice-add #'org-open-at-point :around #'orgTZA-open-at-point-ad)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.