branch: externals/eev commit d080f08a66a810810382a2355597bc07228dbdbe Author: Eduardo Ochs <eduardoo...@gmail.com> Commit: Eduardo Ochs <eduardoo...@gmail.com>
Rewrote lots of things in eev-on-windows.el. --- ChangeLog | 11 ++++++ VERSION | 4 +- eepitch.el | 2 + eev-intro.el | 6 +-- eev-on-windows.el | 107 +++++++++++++++++++++++++----------------------------- eev-tlinks.el | 16 ++++---- eev.el | 2 +- 7 files changed, 75 insertions(+), 73 deletions(-) diff --git a/ChangeLog b/ChangeLog index 54bb016..ba17822 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,11 +1,22 @@ 2021-10-16 Eduardo Ochs <eduardoo...@gmail.com> + * eev-audiovideo.el (find-eev2019video, find-eev2020video) + (find-eevnavvideo, find-eevtemplvideo, find-eevfherelvideo) + (find-eevtestblsvideo, find-eevvlinksvideo): small changes in the + comments and in the docstrings. + * eev-tlinks.el (find-eepitch-bullet-links): redefine `ee-adjust-red-stars' instead of `eewrap-eepitch'. (find-psne-links): use `ee-adjust-red-stars'. + (find-red-star-links): new name for the function + `find-eepitch-bullet-links'. The old name is now an alias. + (find-eevshortvideo-links): new function. + (ee-psne-if-needed): use `ee-adjust-red-stars'. * eepitch.el (ee-adjust-red-stars): new function. (eewrap-eepitch): use `ee-adjust-red-stars'. + (eepitch-eshell2): new function. + (eepitch-luajit): new function. 2021-10-12 Eduardo Ochs <eduardoo...@gmail.com> diff --git a/VERSION b/VERSION index 00971df..ad153f6 100644 --- a/VERSION +++ b/VERSION @@ -1,2 +1,2 @@ -Sat Oct 16 22:33:21 GMT 2021 -Sat Oct 16 19:33:21 -03 2021 +Sun Oct 17 00:18:14 GMT 2021 +Sat Oct 16 21:18:14 -03 2021 diff --git a/eepitch.el b/eepitch.el index 66b616b..0456d80 100644 --- a/eepitch.el +++ b/eepitch.el @@ -488,6 +488,7 @@ scratch." (defun eepitch-shell2 () (interactive) (eepitch '(shell "*shell 2*"))) (defun eepitch-shell3 () (interactive) (eepitch '(shell "*shell 3*"))) (defun eepitch-eshell () (interactive) (eepitch '(eshell))) +(defun eepitch-eshell2 () (interactive) (eepitch '(eshell 2))) @@ -925,6 +926,7 @@ The arguments are explained here: (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-luajit () (interactive) (eepitch-comint "luajit" "luajit")) (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-intro.el b/eev-intro.el index 3e15657..c43a5ac 100644 --- a/eev-intro.el +++ b/eev-intro.el @@ -992,8 +992,8 @@ literal ^O in a buffer by typing `C-q C-o'. It is possible to make other characters play the role of the red star, but to make that work you need to know a bit of Lisp. See: - (find-eepitch-bullet-links) - (find-eev \"eev-tlinks.el\" \"find-eepitch-bullet-links\") + (find-red-star-links) + (find-eev \"eev-tlinks.el\" \"find-red-star-links\") @@ -6537,8 +6537,6 @@ code-c-d to understand parts of this intro. See: (find-eev-quick-intro \"6.1. The main key: <F8>\") (find-eev-quick-intro \"9. Shorter hyperlinks\") (find-eev-quick-intro \"9.1. `code-c-d'\") - (find-eev-quick-intro \"9.3. Hyperlinks to PDF files\") - (find-eev-quick-intro \"9.5. Shorter hyperlinks to PDF files\") diff --git a/eev-on-windows.el b/eev-on-windows.el index 3700615..f07793f 100644 --- a/eev-on-windows.el +++ b/eev-on-windows.el @@ -19,7 +19,7 @@ ;; ;; Author: Eduardo Ochs <eduardoo...@gmail.com> ;; Maintainer: Eduardo Ochs <eduardoo...@gmail.com> -;; Version: 20211009 +;; Version: 20211016 ;; Keywords: e-scripts ;; ;; Latest version: <http://angg.twu.net/eev-current/eev-on-windows.el> @@ -50,7 +50,7 @@ ;; (delete-file "~/bin/wget.exe") ;; (ee-download-with-eww "http://angg.twu.net/2021-oficina/wget.exe" "~/bin/") ;; (ee-use-windows) -;; and they need to run the tests in: +;; and they need to run the tests in this section of this file: ;; (to "directories") ;; ;; The function `(ee-use-windows)' is sort of reversible - with: @@ -118,12 +118,11 @@ ;; «ee-use-eshell» (to ".ee-use-eshell") -;; TODO: define an `eepitch-eshell2'. ;; (defun ee-use-eshell () (interactive) (defun eepitch-shell () (interactive) (eepitch-eshell)) - (defun eepitch-shell2 () (interactive) (eepitch-eshell)) + (defun eepitch-shell2 () (interactive) (eepitch-eshell2)) ) (defun ee-use-shell () @@ -134,27 +133,17 @@ ;; «ee-use-bullets» (to ".ee-use-bullets") -;; From: (find-eepitch-bullet-links 2 "red bullets by default") +;; From: (find-red-star-links 2 "red bullets by default") ;; (defun ee-use-bullets () (interactive) (eepitch-set-glyph0 ?\u2022 ?\u2022 'eepitch-star-face) - (defun eewrap-eepitch () (interactive) - (let* ((fmt "\u2022 (eepitch-%s)\n\u2022 (eepitch-kill)\n\u2022 (eepitch-%s)") - (li (ee-this-line-extract)) - (newli (format fmt li li))) - (insert newli)) - (ee-next-line 1)) + (defun ee-adjust-red-stars (str) (replace-regexp-in-string "" "•" str)) ) (defun ee-use-red-stars () (interactive) - (defun eewrap-eepitch () (interactive) - (let* ((fmt " (eepitch-%s)\n (eepitch-kill)\n (eepitch-%s)") - (li (ee-this-line-extract)) - (newli (format fmt li li))) - (insert newli)) - (ee-next-line 1)) + (defun ee-adjust-red-stars (str) str) ) @@ -185,8 +174,10 @@ ;; (defun ee-use-gnu-linux () (interactive) + (ee-use-red-stars) (ee-use-shell) - (eshell/alias "wget" nil) + (delete-file eshell-aliases-file) + (eshell/alias "wget" "wget $*") (setq ee-wget-program "wget") (setq ee-firefox-program "firefox") (setq ee-googlechrome-program "google-chrome") @@ -196,8 +187,10 @@ (defun ee-use-windows () (interactive) - (ee-use-shell) - (eshell/alias "wget" "~/bin/wget.exe $*") + (ee-use-bullets) + (ee-use-eshell) + (delete-file eshell-aliases-file) ; workaround for a bug + (eshell/alias "wget" "~/bin/wget.exe $*") (setq ee-wget-program "~/bin/wget.exe") (setq ee-firefox-program "$FIREFOXDIR/firefox.exe") (setq ee-googlechrome-program "$GOOGLECHROMEDIR/chrome.exe") @@ -216,7 +209,8 @@ (setenv "GOOGLECHROMEDIR" "c:/Program Files/Google/Chrome/Application") (setenv "MPVDIR" "c:/Users/danie/OneDrive/Documentos/mpv") -;; Basic tests: +;; 1. Basic tests +;; ============== ;; (find-fline "~/bin/" "wget.exe") ;; (find-fline "$GOOGLECHROMEDIR/" "chrome.exe") ;; (find-fline "$FIREFOXDIR/" "firefox.exe") @@ -230,7 +224,11 @@ ;; (find-callprocess `(,ee-firefox-program "--help")) ;; (find-callprocess `(,ee-mpv-program "--help")) ;; (find-wget "http://angg.twu.net/eev-current/eev-on-windows.el") +;; (find-angg "eev-current/eev-on-windows.el") +;; (find-es "2021-oficina" "M-3-M-e") ;; +;; 2. Tests for using the browser as a PDF viewer +;; ============================================== ;; For the tests for using browsers as PDF viewers you will need to ;; understand these sections of the tutorials, and will need to run ;; some of the commands in them: @@ -244,17 +242,42 @@ ;; (find-firefox-page "~/Coetzee99.pdf" 3) ;; (find-pdf-page "~/Coetzee99.pdf" 3) ;; +;; 2.1. Test the short links to PDFs +;; --------------------------------- +;; The short links to PDFs are explained here: +;; (find-pdf-like-intro "7. Shorter hyperlinks to PDF files") +;; Test: +;; (code-pdf-page "livesofanimals" "~/Coetzee99.pdf") +;; (find-livesofanimalspage (+ -110 127) "wrong thoughts") +;; +;; Note that the links to PDFs converted to text, explained here, +;; (find-pdf-like-intro "3. Hyperlinks to PDF files") +;; (find-pdf-like-intro "3. Hyperlinks to PDF files" "pdftotext") +;; don't work on Windows yet because I haven't prepared a way to +;; install pdftotext on Windows. +;; +;; +;; 3. Test the links to videos +;; =========================== ;; The video links are explained here: ;; (find-videos-intro "2. Short links to eev video tutorials") ;; http://angg.twu.net/2021-video-links.html ;; -;; Test for the video links: +;; Basic tests for video links: ;; (delete-file (ee-expand "$S/http/angg.twu.net/eev-videos/2021-test-blocks.mp4")) ;; (brep "http://angg.twu.net/eev-videos/2021-test-blocks.mp4") -;; (find-eevvideo-links "testbls" "2021-test-blocks" "fpsF_M55W4o") +;; (delete-file (ee-expand "$S/http/angg.twu.net/eev-videos/2021-test-blocks.mp4")) ;; (find-video "$S/http/angg.twu.net/eev-videos/2021-test-blocks.mp4") ;; (find-video "$S/http/angg.twu.net/eev-videos/2021-test-blocks.mp4" "2:33") - +;; +;; Test the way to download a video that beginners usually meet first: +;; (find-eevvideo-links "testbls" "2021-test-blocks" "fpsF_M55W4o") +;; +;; Test the short links to videos: +;; (code-video "testblsvideo" "$S/http/angg.twu.net/eev-videos/2021-test-blocks.mp4") +;; (find-testblsvideo) +;; (find-testblsvideo "2:33") +;; (find-angg ".emacs.videos" "testbls") @@ -272,43 +295,11 @@ ;; «eev-tar» (to ".eev-tar") ;; This is from 2019 and is now very obsolete - ;; partially because eev is in ELPA. +;; Moved to: +;; (find-es "w32" "eev-tar-2019") ;; New version: ;; (find-eev-install-intro "5.4. `package-install-file'") ;; -;; Old notes: -;; (setq eev-tar-dir "~/eev-tar/") -;; (setq eev-tar-fname "~/eev-tar/eev2.tar") -;; (setq eev-tar-url "http://angg.twu.net/eev-current/eev2.tar") -;; (mkdir eev-tar-dir t) -;; (setq eev-tar-contents nil) -;; (setq eev-tar-contents (find-urlretrieve0 eev-tar-url)) -;; (length (setq eev-tar-contents (find-urlretrieve0 eev-tar-url))) -;; (write-region eev-tar-contents nil eev-tar-fname) -;; -;; (find-2a nil '(find-fline eev-tar-fname 1 '(tar-untar-buffer))) -;; (eek "C-x o C-x 4 0") -;; (find-2a nil '(find-fline eev-tar-dir nil '(eek "g"))) -;; -;; Add something like this to your .emacs: -;; -;; (add-to-list 'load-path "~/eev-tar/") -;; -;; Use these sexps to check if everything is alright: -;; -;; (find-epp load-path) -;; (find-estring (mapconcat 'identity load-path "\n")) -;; (locate-library "eejump") -;; (find-estring (list-load-path-shadows t)) -;; -;; See: -;; (find-eev "eev-plinks.el" "find-urlretrieve") -;; (find-es "emacs" "package-untar") -;; (find-es "emacs" "load-path") -;; (find-angg ".emacs.local.w32") -;; (find-angg ".emacs.local.w32" "PATH") - - - ;; «ee-add-to-PATH» (to ".ee-add-to-PATH") ;; Until 2021 these file contained some very primitive functions - ;; that I wrote in 2019 - to add directories to the PATH. They were diff --git a/eev-tlinks.el b/eev-tlinks.el index 8d0d1c9..b478718 100644 --- a/eev-tlinks.el +++ b/eev-tlinks.el @@ -1569,7 +1569,7 @@ netcat -l -p {tgtport} (defun ee-psne-if-needed (url) (if (file-exists-p (ee-expand (ee-url-to-fname url))) "# Local file found. No need to download it again.\n" - (ee-psne-download url))) + (ee-adjust-red-stars (ee-psne-download url)))) (defun ee-psne-download (url) (concat "\ @@ -2442,18 +2442,18 @@ This function is used by `ee-0x0-upload-region'." ;; «find-red-star-links» (to ".find-red-star-links") ;; «find-eepitch-bullet-links» (to ".find-eepitch-bullet-links") -;; Skel: (find-find-links-links-new "eepitch-bullet" "" "") -;; Test: (find-eepitch-bullet-links) +;; Skel: (find-find-links-links-new "red-star" "" "") +;; Test: (find-red-star-links) ;; -(defalias 'find-red-star-links 'find-eepitch-bullet-links) -(defun find-eepitch-bullet-links (&rest pos-spec-list) +(defalias 'find-eepitch-bullet-links 'find-red-star-links) +(defun find-red-star-links (&rest pos-spec-list) "Show code that makes eepitch use red bullets instead of red stars." (interactive) (apply 'find-elinks-elisp - `((find-eepitch-bullet-links ,@pos-spec-list) + `((find-red-star-links ,@pos-spec-list) ;; Convention: the first sexp always regenerates the buffer. - (find-efunction 'find-eepitch-bullet-links) + (find-efunction 'find-red-star-links) ;; "" ,(ee-template0 "\ ;; The code below was based on: @@ -2496,7 +2496,7 @@ This function is used by `ee-0x0-upload-region'." ;; add this block to your ~/.emacs. Note that this will make ;; bullets appear in red in other places too, like in info manuals - ;; for example here: (find-enode \"Using Region\") -;; See: (find-eepitch-bullet-links) +;; See: (find-red-star-links) ;; \(eepitch-set-glyph0 ?• ?• 'eepitch-star-face) \(defun ee-adjust-red-stars (str) (replace-regexp-in-string \"\" \"•\" str)) diff --git a/eev.el b/eev.el index 0e2f6bf..f4b2588 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: 20211011 +;; Version: 20211016 ;; 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