From 5ffdfd97e63b2a3da5db44c193d3c269b214eb2e Mon Sep 17 00:00:00 2001 From: askdkc Date: Mon, 11 Dec 2023 17:42:25 +0900 Subject: [PATCH 1/3] Fix Clipboard issue for macOS and Windows --- org-web-tools.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org-web-tools.el b/org-web-tools.el index 3938d22..0a24b11 100644 --- a/org-web-tools.el +++ b/org-web-tools.el @@ -449,7 +449,7 @@ HTML." (defun org-web-tools--get-first-url () "Return URL in clipboard, or first URL in the `kill-ring', or nil if none." - (cl-loop for item in (append (list (gui-get-selection 'CLIPBOARD)) + (cl-loop for item in (cons (current-kill 0) kill-ring) when (and item (string-match (rx bol "http" (optional "s") "://") item)) return item)) From 6b750b35ba78cf8487f16e2ac5dab0ac37345e35 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Tue, 12 Dec 2023 18:46:54 -0600 Subject: [PATCH 2/3] Tidy: Formatting --- org-web-tools.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/org-web-tools.el b/org-web-tools.el index 0a24b11..51ae174 100644 --- a/org-web-tools.el +++ b/org-web-tools.el @@ -449,8 +449,7 @@ HTML." (defun org-web-tools--get-first-url () "Return URL in clipboard, or first URL in the `kill-ring', or nil if none." - (cl-loop for item in (cons (current-kill 0) - kill-ring) + (cl-loop for item in (cons (current-kill 0) kill-ring) when (and item (string-match (rx bol "http" (optional "s") "://") item)) return item)) From 71b34beab15dbfe42ccbbd16926320f8cdc1ed9d Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Tue, 12 Dec 2023 18:49:38 -0600 Subject: [PATCH 3/3] Docs: Update changelog --- README.org | 1 + 1 file changed, 1 insertion(+) diff --git a/README.org b/README.org index 728e21f..8f15389 100644 --- a/README.org +++ b/README.org @@ -58,6 +58,7 @@ Install [[https://github.com/magnars/dash.el][dash.el]], [[https://github.com/ta *Fixes* + Default options to Wget (see [[https://github.com/alphapapa/org-web-tools/issues/35][#35]]). ++ Finding URL in clipboard on MacOS and Windows. (See [[https://github.com/alphapapa/org-web-tools/pull/66][#66]]. Thanks to [[https://github.com/askdkc][@askdkc]].) *Internal* + Use ~plz~ HTTP library and make various related optimizations.