summaryrefslogtreecommitdiff
path: root/mms-misc.org
diff options
context:
space:
mode:
authormms <michal@sapka.me>2024-02-29 23:50:42 +0100
committermms <michal@sapka.me>2024-02-29 23:51:03 +0100
commit8aeb088deb019be7791c984ff812a053641ff4a2 (patch)
treed3901ff0e06786444e26923117dcb55560361680 /mms-misc.org
parent4d25769af7239fd5f1e541b910e20fd10a3a6b46 (diff)
feat: links
Diffstat (limited to 'mms-misc.org')
-rw-r--r--mms-misc.org18
1 files changed, 11 insertions, 7 deletions
diff --git a/mms-misc.org b/mms-misc.org
index 2ec07d1..1b7b7f2 100644
--- a/mms-misc.org
+++ b/mms-misc.org
@@ -127,15 +127,19 @@ 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)
- (setq url (thing-at-point 'url))
- (cond
- ((string-match "youtube.com" url) (yeetube-search url))
- (t (eww url)))
- )
+ (defun mms-open-link-under-point ()
+ (interactive)
+ (let ((url (thing-at-point 'url))))
+ (cond
+ ((string-match "youtube.com" url) (yeetube-search url))
+ (t (eww url)))
+ )
#+end_src
+#+RESULTS:
+: mms-open-link-under-point
+
+
And I want to have as =leader - enter - enter=
#+begin_src emacs-lisp