diff options
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: |