summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormms <michal@sapka.me>2024-03-17 23:52:24 +0100
committermms <michal@sapka.me>2024-03-20 15:14:22 +0100
commit6300601d60735c5db6b0219aae24e6f6fd41b2d4 (patch)
treea8c4ae8bca1df163191bfc64f7c769860389b740
parent7357bec5640faa3ea6f598014e2ce836bdc29589 (diff)
fix: open function
-rw-r--r--mms-misc.org8
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: