Elfeed Tube - Youtube on your terms reddit / emacs ---------------------------------------------------------------------- karthink · 2022-06-12 16:06 ---------------------------------------------------------------------- alternateved · 2022-06-12 16:31 I am speechless. You've outdone yourself. ---------------------------------------------------------------------- noman_032018 · 2022-06-12 17:34 Impressive. I just might have to try it. I also hadn't seen [aio](https://github.com/karthink/elfeed-tube) before. It seems easier to use than [async.el](https://github.com/jwiegley/emacs-async). ---------------------------------------------------------------------- Extension_Try_6870 · 2022-06-12 18:26 I've just tried it and it works out of the box. Thank you very much. ---------------------------------------------------------------------- X7and7 · 2022-06-12 18:45 Time to switch :) ---------------------------------------------------------------------- nv-elisp · 2022-06-12 18:57 Cool idea for a package. I got the following byte copilations warnings when installing on Emacs 29: elfeed-tube-contrib.el:33:38: Warning: Unused lexical variable `tx' elfeed-tube-contrib.el:35:25: Warning: Unused lexical variable `captions' elfeed-tube-contrib.el:42:25: Warning: Unused lexical variable `captions' elfeed-tube-contrib.el:25:41: Warning: ‘nreverse’ called with 0 args, but requires 1 elfeed-tube-contrib.el:25:41: Warning: ‘nreverse’ called with 0 arguments, but requires 1 elfeed-tube-contrib.el:27:41: Warning: ‘url-hexify-string’ called with 0 arguments, but requires 1-2 elfeed-tube-contrib.el:14:28: Warning: Unused lexical variable `st' elfeed-tube-contrib.el:14:31: Warning: Unused lexical variable `dt' elfeed-tube-contrib.el:24:37: Warning: the function ‘->’ is not known to be defined. elfeed-tube-contrib.el:19:32: Warning: the function ‘elfeed-tube- curl-enqueue’ is not known to be defined. elfeed-tube-contrib.el:36:49: Warning: the function ‘elfeed-tube-- preprocess-captions’ is not known to be defined. elfeed-tube-mpv.el:41:11: Warning: Package vc-mtn is deprecated elfeed-tube-test.el:48:23: Warning: ‘system-name’ is an obsolete variable (as of 25.1); use (system-name) instead elfeed-tube-utils.el:41:53: Warning: Unused lexical argument `save' elfeed-tube-utils.el:207:30: Warning: attempt to inline ‘prophelp’ before it was defined elfeed-tube-utils.el:176:21: Warning: Unused lexical variable `author' elfeed-tube-utils.el:177:21: Warning: Unused lexical variable `feed' elfeed-tube-utils.el:237:14: Warning: Unused lexical variable `window' elfeed-tube-utils.el:261:10: Warning: Unused lexical variable `authors' elfeed-tube-utils.el:261:18: Warning: Unused lexical variable `feeds' elfeed-tube-utils.el:264:21: Warning: Unused lexical variable `author' elfeed-tube-utils.el:264:28: Warning: Unused lexical variable `query' elfeed-tube-utils.el:291:10: Warning: Unused lexical variable `authors' elfeed-tube-utils.el:291:18: Warning: Unused lexical variable `feeds' elfeed-tube-utils.el:293:19: Warning: Unused lexical variable `author' elfeed-tube-utils.el:293:26: Warning: Unused lexical variable `query' elfeed-tube-utils.el:207:30: Warning: the function ‘prophelp’ is not known to be defined. elfeed-tube.el:146:2: Warning: custom-declare-variable `elfeed- tube-auto-fetch-p' docstring wider than 80 characters elfeed-tube.el:324:16: Warning: variable ‘_’ not left unused elfeed-tube.el:361:25: Warning: Unused lexical variable `error' elfeed-tube.el:407:21: Warning: variable ‘_’ not left unused elfeed-tube.el:438:23: Warning: variable ‘_’ not left unused elfeed-tube.el:454:26: Warning: variable ‘_’ not left unused elfeed-tube.el:506:40: Warning: Unused lexical variable `dur' elfeed-tube.el:570:9: Warning: value returned from (format segment: %s elfeed-tube.el:564:35: Warning: Unused lexical argument `win' elfeed-tube.el:564:39: Warning: Unused lexical argument `obj' elfeed-tube.el:655:11: Warning: variable ‘_’ not left unused elfeed-tube.el:722:25: Warning: Unused lexical variable `error' elfeed-tube.el:767:17: Warning: Unused lexical variable `type' elfeed-tube.el:767:22: Warning: Unused lexical variable `time' elfeed-tube.el:914:25: Warning: reference to free variable ‘duraion’ ---------------------------------------------------------------------- nv-elisp · 2022-06-12 19:04 Instead of providing the pair of `steup` and `teardown` functions, this could be implemented as a minor mode. Then users could just add `elfeed-tube-mode` to the `elfeed-show-mode` and/or `elfeed-search- mode` hooks. ---------------------------------------------------------------------- reststrahlenbande · 2022-06-12 19:22 Are you a wizard? ---------------------------------------------------------------------- karthink · 2022-06-12 19:54 Thanks, I'm aware the byte compilation isn't clean yet. Will address these before submitting to MELPA. ---------------------------------------------------------------------- ajgrf · 2022-06-12 21:15 The introductory blog post for aio is fantastic, too. It's actually what finally allowed me to make sense of async in JavaScript and Python. ---------------------------------------------------------------------- [deleted] · 2022-06-13 06:15 [removed] ---------------------------------------------------------------------- mickeyp · 2022-06-13 07:39 That's really cool. Nice one karthink! ---------------------------------------------------------------------- karthink · 2022-06-13 08:53 This was the original idea but it didn't fit some of the intended behavior, such as also fetching video metadata when running `elfeed- update`. It would have to be a global minor-mode. I've settled on this approach for now instead. `elfeed-tube-setup` does not need to run to use the functionality in this package, you can call `elfeed-tube- fetch` manually on a per-entry basis in Elfeed. ---------------------------------------------------------------------- karthink · 2022-06-13 08:56 If I understand correctly, `async` is true multithreading for Emacs using child Emacs processes. `aio` is quite different, it's a (much) more convenient way of writing callbacks on the main event loop. It can't provide any actual async processing. ---------------------------------------------------------------------- HeiWiper · 2022-06-13 13:51 Which theme are you using ? ---------------------------------------------------------------------- karthink · 2022-06-13 14:15 It's modus-vivendi, part of the modus-themes package. ---------------------------------------------------------------------- TTRation · 2022-06-13 16:15 I already have my YouTube subscriptions in elfeed via elfeed-protocol- ttrss, can I get them to open with elfeed-tube? ---------------------------------------------------------------------- noman_032018 · 2022-06-13 16:19 That certainly seems to be how it works, yes. I think `async` was made that way because it was the most straightforward way to do it. It has some benefits (namely actual multi-core use), but I've used it more for the concurrency it provides than the parallelism. ---------------------------------------------------------------------- karthink · 2022-06-13 18:48 If I understand what `elfeed-protocol-ttrss` does correctly, elfeed- tube should work fine. All it needs is for Elfeed to be able to see the Youtube feed. However any video metadata you may save to your elfeed-db will not be synced back to tt-rss via elfeed-protocol. ---------------------------------------------------------------------- TTRation · 2022-06-13 20:13 Right, I was just confused since it threw an error and I didn't notice anything changing: Debugger entered--Lisp error: (wrong-type-argument number-or- marker-p nil) signal(wrong-type-argument (number-or-marker-p nil)) #f(compiled-function () #)() #f(compiled-function (fetched-p) #) (#f(compiled-function () #)) apply(#f(compiled-function (fetched-p) #) #f(compiled-function () #)) timer- event-handler([t 25255 38796 82214 nil #f(compiled-function (fetched-p) #) (#f(compiled-function () #)) nil 26000 nil]) ---------------------------------------------------------------------- karthink · 2022-06-14 05:18 Please raise an issue on the repo with more information if you have the time, I'd like to address this. ---------------------------------------------------------------------- Danrobi1 · 2022-06-15 02:42 Awesome! Thanks for sharing.