From: Emanuel Berg <moasen@zoho.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Elisp to open a line-wrapped URL
Date: Sun, 25 Feb 2018 23:40:38 +0100 [thread overview]
Message-ID: <86bmgcpuah.fsf@zoho.com> (raw)
In-Reply-To: 86woz0q1oe.fsf@zoho.com
> Probably searching can be done more
> efficiently tho, e.g. a regexp search for the
> next URL...
(require 'cl-lib)
(require 'thingatpt)
(require 'w3m)
(defun goto-next-url ()
(interactive)
(let ((max (point-max)))
(cl-dolist (url-type thing-at-point-uri-schemes)
(when (re-search-forward url-type max t)
(goto-char (match-beginning 0))
(let ((url (thing-at-point 'url)))
(when url
(w3m-goto-url url)
(cl-return) ))))))
--
underground experts united
http://user.it.uu.se/~embe8573
next prev parent reply other threads:[~2018-02-25 22:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-24 23:53 Elisp to open a line-wrapped URL ckhan
2018-02-25 15:07 ` Daniel Herzig
2018-02-25 20:01 ` Emanuel Berg
2018-02-25 22:40 ` Emanuel Berg [this message]
2018-02-25 22:43 ` Emanuel Berg
2018-02-26 5:02 ` Yuri Khan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86bmgcpuah.fsf@zoho.com \
--to=moasen@zoho.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).