From 6300601d60735c5db6b0219aae24e6f6fd41b2d4 Mon Sep 17 00:00:00 2001 From: mms Date: Sun, 17 Mar 2024 23:52:24 +0100 Subject: fix: open function --- mms-misc.org | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'mms-misc.org') 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: -- cgit v1.2.3