diff options
author | mms <michal@sapka.me> | 2024-03-17 23:52:24 +0100 |
---|---|---|
committer | mms <michal@sapka.me> | 2024-03-20 15:14:22 +0100 |
commit | 6300601d60735c5db6b0219aae24e6f6fd41b2d4 (patch) | |
tree | a8c4ae8bca1df163191bfc64f7c769860389b740 /mms-misc.org | |
parent | 7357bec5640faa3ea6f598014e2ce836bdc29589 (diff) |
fix: open function
Diffstat (limited to 'mms-misc.org')
-rw-r--r-- | mms-misc.org | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/mms-misc.org b/mms-misc.org index f3f6ec1..3576b01 100644 --- a/mms-misc.org +++ b/mms-misc.org @@ -127,13 +127,15 @@ First, let's be able to run Youtube inside emacs Then, let's create linkhandler to pass the link to the correct handler. #+begin_src emacs-lisp - (defun mms-open-link-under-point () - (interactive) - (let ((url (thing-at-point 'url)))) + (defun mms-open-link-under-point () + (interactive) + (let (url) + (setq url (thing-at-point 'url)) (cond ((string-match "youtube.com" url) (yeetube-search url)) (t (eww url))) ) + ) #+end_src #+RESULTS: |