alphapapa / alphapapa/org-web-tools
fetch link at point
- Vorherrschende Sprache
- Emacs Lisp
- Sterne
- 713
- Forks
- 32
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
i thought to add this to `org-web-tools`, in order to say, run `org-web-tools-read-url-as-org` on a link in an elfeed entry or in eww, or on also an org link:
```elisp
(defun org-web-tools--get-first-url ()
"Return (shr) URL or org link URL at point, or URL in clipboard, or first URL in the `kill-ring', or nil if none."
(or (shr-url-at-point nil) ; elfeed or eww links
(plist-get (get-text-property (point) 'htmlize-link) :uri) ; org links
(cl-loop for item in (append (list (gui-get-selection 'CLIPBOARD))
kill-ring)
when (and item (string-match (rx bol "http" (optional "s") "://") item))
return item)))
```
could poss add some others, could poss find more rigorous way of fetching them...
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Bewertung
Dieses Issue wurde noch nicht bewertet.