summaryrefslogtreecommitdiff
path: root/content-org
diff options
context:
space:
mode:
authormms <michal@sapka.me>2024-02-26 20:02:00 +0100
committermms <michal@sapka.me>2024-02-26 20:02:00 +0100
commit22d97916f51c049a777148205c0fd95a1aabc689 (patch)
tree2cb5d47ad1eded94d150005b84946fa9901d1a1b /content-org
parentea6a87ad7d78ec4d278fcb75cf8985ca08a3e3d0 (diff)
fix: setq->let
Diffstat (limited to 'content-org')
-rw-r--r--content-org/emacs.org14
1 files changed, 9 insertions, 5 deletions
diff --git a/content-org/emacs.org b/content-org/emacs.org
index 7a0ae51..ed8850d 100644
--- a/content-org/emacs.org
+++ b/content-org/emacs.org
@@ -1059,11 +1059,11 @@ My (current) full function in use is:
#+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)))
- )
+ (let (url (thing-at-point 'url))
+ (cond
+ ((string-match "youtube.com" url) (yeetube-search url))
+ (t (eww url)))
+ ))
#+end_src
So it will use =eww= for anything that is not a YT link, and I can expand it further whenever I want.
@@ -1075,6 +1075,10 @@ Then, just add a simple keyboard navigation, and you're done
"RET RET" '(lambda () (interactive) (mms-open-link-under-point) :wk "follow link"))
#+end_src
+*** Errata
+
+2024-02-26: Dave pointed me that using =let= inside custom method is preferable to =setq=
+
[fn:ytrss] The secret URL: =https://www.youtube.com/feeds/videos.xml?channel_id=<channel_id>=.
You can find the channel ID using different online services, as it is not as straight forward as it should be.
[fn:providers] Only if the package registers itself as a provider for =thing-at-point=.