From ec4f6c598cdd8c0dadd9abd7f22bc057a2216628 Mon Sep 17 00:00:00 2001 From: jao Date: Wed, 20 Jan 2021 00:23:22 +0000 Subject: w3m embark actions: w3m-current-url --- eos/jao-embark.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/eos/jao-embark.el b/eos/jao-embark.el index 2450fdf..a59e241 100644 --- a/eos/jao-embark.el +++ b/eos/jao-embark.el @@ -39,7 +39,9 @@ "A regular expression matching URLs that point to video streams") (defun jao-embark-w3m-anchor () - (when-let ((url (w3m-anchor))) (cons 'url url))) + (when (not (region-active-p)) + (when-let ((url (or (w3m-anchor) w3m-current-url))) + (cons 'url url)))) (defun jao-refine-url (url) (if (string-match-p jao-embark-video-url-rx url) -- cgit v1.2.3