branch: externals/eev commit 3501b4b0e8bc5cd1344be6410414e7f36abba3de Author: Eduardo Ochs <eduardoo...@gmail.com> Commit: Eduardo Ochs <eduardoo...@gmail.com>
Fixed a bug in `ee-youtubedl-guess'. --- ChangeLog | 6 ++++++ VERSION | 4 ++-- eepitch.el | 3 ++- eev-eval.el | 2 ++ eev-intro.el | 13 ++++++++----- eev-tlinks.el | 18 +++++++++++++++--- eev.el | 2 +- 7 files changed, 36 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index d0d8f64..31973f1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2021-08-22 Eduardo Ochs <eduardoo...@gmail.com> + + * eev-tlinks.el (ee-youtubedl-subtitle-p): new function. + (ee-youtubedl-not-subtitles): new function. + (ee-youtubedl-guess): use `ee-youtubedl-not-subtitles'. + 2021-08-16 Eduardo Ochs <eduardoo...@gmail.com> * eev-intro.el (find-lexical-intro): added a section "5. A thread" diff --git a/VERSION b/VERSION index fa564b5..e01abfc 100644 --- a/VERSION +++ b/VERSION @@ -1,2 +1,2 @@ -Mon Aug 16 15:52:15 GMT 2021 -Mon Aug 16 12:52:15 -03 2021 +Mon Aug 23 02:03:12 GMT 2021 +Sun Aug 22 23:03:12 -03 2021 diff --git a/eepitch.el b/eepitch.el index 7f44b3d..ade5194 100644 --- a/eepitch.el +++ b/eepitch.el @@ -19,7 +19,7 @@ ;; ;; Author: Eduardo Ochs <eduardoo...@gmail.com> ;; Maintainer: Eduardo Ochs <eduardoo...@gmail.com> -;; Version: 20210816 +;; Version: 20210821 ;; Keywords: e-scripts ;; ;; Latest version: <http://angg.twu.net/eev-current/eepitch.el> @@ -850,6 +850,7 @@ This function is a prototype and will probably change." (defun eepitch-lua51 () (interactive) (eepitch-comint "lua51" "lua5.1")) (defun eepitch-lua52 () (interactive) (eepitch-comint "lua52" "lua5.2")) (defun eepitch-lua53 () (interactive) (eepitch-comint "lua53" "lua5.3")) +(defun eepitch-lua54 () (interactive) (eepitch-comint "lua54" "lua5.4")) (defun eepitch-julia () (interactive) (eepitch-comint "julia" "julia")) (defun eepitch-python2 () (interactive) (eepitch-comint "python2" "python2")) (defun eepitch-python3 () (interactive) (eepitch-comint "python3" "python3")) diff --git a/eev-eval.el b/eev-eval.el index 9f86aab..6fb858c 100644 --- a/eev-eval.el +++ b/eev-eval.el @@ -41,6 +41,8 @@ ;; (find-eev-quick-intro "2. Evaluating Lisp" "numeric prefixes") ;; (find-eev-quick-intro "2. Evaluating Lisp" "`M-0 M-e'") ;; (find-eval-intro "`M-E' (meta-shift-e)") +;; (find-lexical-intro "0. How to use this") +;; (find-lexical-intro "0. How to use this" "`M-e' _sort of_ emulates") ;; ;; Note that `M-2 M-e' and `M-3 M-e' only make sense when the sexp is ;; a hyperlink. diff --git a/eev-intro.el b/eev-intro.el index fb2726a..d3533d3 100644 --- a/eev-intro.el +++ b/eev-intro.el @@ -19,7 +19,7 @@ ;; ;; Author: Eduardo Ochs <eduardoo...@gmail.com> ;; Maintainer: Eduardo Ochs <eduardoo...@gmail.com> -;; Version: 20210816 +;; Version: 20210817 ;; Keywords: e-scripts ;; ;; Latest version: <http://angg.twu.net/eev-current/eev-intro.el> @@ -13748,9 +13748,12 @@ lexical environment.\" 5. A thread =========== -It title was: \"Lexical vs. dynamic: small examples?\". -Here is a link to the thread itself and links to the posts that I -considered best or more important: +In aug/2021 I sent an e-mail to the help-gnu-emacs mailing list +asking for help to write this tutorial; its title was \"Lexical +vs. dynamic: small examples?\". Few people sent small examples, +but some of the messages in the thread were fantastically good. +Here is a link to the thread itself, to two of my posts in it, +and to the messages that I considered \"fantastically good\"... https://lists.gnu.org/archive/html/help-gnu-emacs/2021-08/threads.html#00283 https://lists.gnu.org/archive/html/help-gnu-emacs/2021-08/msg00283.html @@ -13764,7 +13767,7 @@ considered best or more important: https://lists.gnu.org/archive/html/help-gnu-emacs/2021-08/msg00350.html https://lists.gnu.org/archive/html/help-gnu-emacs/2021-08/msg00341.html -And here are (elisp hyper)links with descriptions: +And here are (elisp hyper)links to them with descriptions: (defun ee-dynlex-url (nnnnn) (format \"https://lists.gnu.org/archive/html/help-gnu-emacs/%s/msg%s.html\" diff --git a/eev-tlinks.el b/eev-tlinks.el index c782890..c4e2577 100644 --- a/eev-tlinks.el +++ b/eev-tlinks.el @@ -19,7 +19,7 @@ ;; ;; Author: Eduardo Ochs <eduardoo...@gmail.com> ;; Maintainer: Eduardo Ochs <eduardoo...@gmail.com> -;; Version: 20210816 +;; Version: 20210822 ;; Keywords: e-scripts ;; ;; Latest version: <http://angg.twu.net/eev-current/eev-tlinks.el> @@ -93,6 +93,7 @@ (require 'eev-env) (require 'eev-wrap) ; For: (find-eev "eev-wrap.el" "ee-template0") +(require 'cl-lib) ; For `cl-remove-if' @@ -1035,9 +1036,20 @@ cd {dir} "Return all the files in DIR containing the string HASH." (file-expand-wildcards (format "%s*%s*" dir hash))) +(defun ee-youtubedl-subtitle-p (fname) + "Return true if FNAME looks like a subtitle file." + (string-match "\\.\\(srt\\|vtt\\)$" fname)) + +(defun ee-youtubedl-not-subtitles (fnames) + "Return the elements of FNAMES that don't look like subtitle files." + (cl-remove-if 'ee-youtubedl-subtitle-p fnames)) + (defun ee-youtubedl-guess (dir hash n) - "Return a component of the first file in DIR containing the string HASH." - (let ((fname (car (ee-youtubedl-guess* dir hash)))) + "Return a component of the first file in DIR containing the string HASH. +Files that look like subtitle files are ignored." + (let* ((fnames0 (ee-youtubedl-guess* dir hash)) + (fnames1 (ee-youtubedl-not-subtitles fnames0)) + (fname (car fnames1))) (if fname (nth n (ee-youtubedl-split fname))))) (defun ee-youtubedl-guess-title (dir hash) (ee-youtubedl-guess dir hash 1)) diff --git a/eev.el b/eev.el index 8b58af3..7a91629 100644 --- a/eev.el +++ b/eev.el @@ -6,7 +6,7 @@ ;; Package-Requires: ((emacs "24.4")) ;; Keywords: lisp e-scripts ;; URL: http://angg.twu.net/#eev -;; Version: 20210816 +;; Version: 20210822 ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by