Skip to content

Commit

Permalink
Switch to current-kill from gui-get-selection
Browse files Browse the repository at this point in the history
  • Loading branch information
askdkc committed Dec 10, 2023
1 parent d433220 commit 8905482
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions org-web-tools.el
Original file line number Diff line number Diff line change
Expand Up @@ -449,10 +449,8 @@ 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 (if (eq system-type 'darwin)
(current-kill 0)
(gui-get-selection 'CLIPBOARD)))
kill-ring)
(cl-loop for item in (append (list (current-kill 0))
kill-ring)
when (and item (string-match (rx bol "http" (optional "s") "://") item))
return item))

Expand Down

0 comments on commit 8905482

Please sign in to comment.