Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix clipboard issue for macOS and Windows #66

Merged
merged 3 commits into from Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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