Skip to content

Commit

Permalink
Merge: Fix clipboard access on Mac/Windows
Browse files Browse the repository at this point in the history
Closes <#66>.
  • Loading branch information
alphapapa committed Dec 13, 2023
2 parents 624e7b4 + 71b34be commit ebeb297
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.org
Expand Up @@ -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.
Expand Down
3 changes: 1 addition & 2 deletions org-web-tools.el
Expand Up @@ -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 (append (list (gui-get-selection 'CLIPBOARD))
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))

Expand Down

0 comments on commit ebeb297

Please sign in to comment.