branch: externals/eev commit 2ee6b8c49e8dfa51b2d5ba6369a4424a148b79c8 Author: Eduardo Ochs <eduardoo...@gmail.com> Commit: Eduardo Ochs <eduardoo...@gmail.com>
Rewrote parts of eev-on-windows.el. --- ChangeLog | 15 +++++++ VERSION | 4 +- eev-intro.el | 76 +++++++++++++++++++++++++++++--- eev-on-windows.el | 127 ++++++++++++++++++++++++++++++++---------------------- eev-pdflike.el | 6 +-- eev-plinks.el | 3 +- eev-testblocks.el | 14 +++++- 7 files changed, 179 insertions(+), 66 deletions(-) diff --git a/ChangeLog b/ChangeLog index 906d50a..345cf62 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +2021-10-09 Eduardo Ochs <eduardoo...@gmail.com> + + * eev-pdflike.el (ee-find-firefox-page): use `ee-firefox-program'. + (ee-find-googlechrome-page): use `ee-googlechrome-program'. + + * eev-intro.el (find-eev-install-intro): new section: "5.4. + `package-install-file'". + (find-eev-install-intro): new section: "5.5. `use-package'". + + * eev-on-windows.el (ee-dospath-to-unix, ee-dospath-to-dos) + (ee-dospath-split, ee-dospath-unsplit, ee-dospath-add) + (ee-add-to-PATH): deleted. + + * eev-testblocks.el (ee-insert-test-racket-mode): new function. + 2021-10-08 Eduardo Ochs <eduardoo...@gmail.com> * eev-on-windows.el (ee-download-with-eww, ee-use-eshell) diff --git a/VERSION b/VERSION index 02c9620..55381dd 100644 --- a/VERSION +++ b/VERSION @@ -1,2 +1,2 @@ -Sat Oct 9 00:20:12 GMT 2021 -Fri Oct 8 21:20:12 -03 2021 +Sun Oct 10 06:55:33 GMT 2021 +Sun Oct 10 03:55:33 -03 2021 diff --git a/eev-intro.el b/eev-intro.el index 57e5da3..9e30e4b 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: 20210927 +;; Version: 20211009 ;; Keywords: e-scripts ;; ;; Latest version: <http://angg.twu.net/eev-current/eev-intro.el> @@ -2216,11 +2216,12 @@ These are the current ways to download and install eev: 2. as an Emacs package, by downloading a file named eev-YYYYMMDD.tar from either ELPA or angg.twu.net using - links like these ones, + links like these ones - but you'll have to correct the date: http://elpa.gnu.org/packages/eev.html http://elpa.gnu.org/packages/eev-20201013.tar http://angg.twu.net/eev-current/ + http://angg.twu.net/eev-current/eev2.tar http://angg.twu.net/eev-current/eev-20201013.tar and then running `M-x package-install-file'; @@ -2368,6 +2369,47 @@ the load-path. Check which one! +5.4. `package-install-file' +--------------------------- +If installing the latest version of eev from ELPA with `M-x +list-packages' doesn't work you can download the latest version +of eev as a .tar file directly from its ELPA page - here: + + http://elpa.gnu.org/packages/eev.html + +and then run `M-x package-install-file' and give it the name of +the local copy of the .tar. See: + + (find-enode \"Package Files\" \"M-x package-install-file\") + + + + +5.5. `use-package' +------------------ +Some people use non-default package managers for Emacs, like +straight.el and use-package. I have very little experience with +them, but it SEEMS that this is a good recipe for using eev with +`use-package': + +;; From: +;; https://lists.gnu.org/archive/html/help-gnu-emacs/2021-10/msg00031.html +;; https://lists.gnu.org/archive/html/help-gnu-emacs/2021-10/msg00034.html +;; See: (find-eev-install-intro \"5.5. `use-package'\") +;; +(use-package eev + :straight (:host github :repo \"edrx/eev\") + :config (progn + ;; See: (find-eev \"eev-load.el\" \"autoloads\") + ;; http://angg.twu.net/eev-current/eev-load.el.html#autoloads + (require 'eev-load) + ;; (eev-mode 1) ; optional + ;; (eev-beginner) ; optional + )) + + + + 6. `find-eev-install-links' =========================== @@ -12056,14 +12098,34 @@ containing (executable!) source code. -7. E-mails -========== - - 7. Sequences of links ===================== (TO DO: explain the convention: from easiest to find to more -technical. Show some examples of e-mails) +technical. Explain the big example below.) + + (find-eev-quick-intro \"2. Evaluating Lisp\") + (find-eev-quick-intro \"2. Evaluating Lisp\" \"M-0 M-e\") + (find-eev-quick-intro \"4.2. `find-ekey-links' and friends\") + (eek \"M-h M-k M-e\") + (eek \"M-h M-k M-e ;; ee-eval-sexp-eol\") + (find-eek \"M-h M-k M-e ;; ee-eval-sexp-eol\") + (find-eek \"M-h M-k M-e ;; ee-eval-sexp-eol\" \"(find-efunction ')\") + (find-efunction 'ee-eval-sexp-eol) + (find-efunction 'ee-eval-sexp-eol \"3:\") + (eek \"2*<up> M-3 M-e\") + + (find-emacs-keys-intro \"6. Windows\") + (find-emacs-keys-intro \"6. Windows\" \"L|R\") + + (find-eev-intro) + (find-eev-intro \"M-5 M-0 M-j\") + (find-eev-intro \"(find-multiwindow-intro)\") + (find-multiwindow-intro) + + (find-wset \"13o_2o2o23oo33ooo\" '(find-ebuffer \"B\")) + (find-wset \"13o_2o2o23oo33ooo+\" '(find-ebuffer \"B\")) + (find-2a nil '(find-efunction 'ee-eval-sexp-eol)) + (find-2b nil '(find-efunction 'ee-eval-sexp-eol)) diff --git a/eev-on-windows.el b/eev-on-windows.el index 8fd3efa..3700615 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: 20210811 +;; Version: 20211009 ;; Keywords: e-scripts ;; ;; Latest version: <http://angg.twu.net/eev-current/eev-on-windows.el> @@ -37,9 +37,9 @@ ;; ;; https://lists.gnu.org/archive/html/help-gnu-emacs/2021-10/msg00037.html ;; -;; I can't test the settings for Windows myself - a friend of mine -;; called Daniel Almeida is helping me to test this me before the -;; workshop. +;; I can't test the settings for Windows myself, but two friends of +;; mine, Daniel Almeida and Daniel Bastos, are helping me to test this +;; before the workshop. ;; ;; This file is not loaded by default. See: ;; (find-eev "eev-load.el") @@ -50,21 +50,48 @@ ;; (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 test in: +;; and they need to run the tests in: ;; (to "directories") +;; +;; The function `(ee-use-windows)' is sort of reversible - with: +;; (ee-use-gnu-linux) +;; (ee-use-find-angg-es-local) + + +;; Setting your ~/.emacs +;; ===================== +;; If you are helping me to test this AND you know how to edit your +;; ~/.emacs then this is what you should put there: +;; +;; ;; See: (find-eevfile "eev-on-windows.el" ".emacs") +;; (require 'eev-load) +;; (require 'eev-on-windows) +;; (eev-mode 1) +;; (ee-use-windows) +;; (setenv "FIREFOXDIR" "c:/Program Files/Mozilla Firefox") +;; (setenv "GOOGLECHROMEDIR" "c:/Program Files/Google/Chrome/Application") +;; (setenv "MPVDIR" "c:/Users/danie/OneDrive/Documentos/mpv") +;; ;; Tests: (find-eev "eev-on-windows.el" "directories") +;; +;; Note that "(require 'eev-on-windows)" runs some setenvs. The +;; setenvs above, that will override the ones in eev-on-windows.el +;; with the paths that are correct in your machine, MUST come AFTER +;; the "(require 'eev-on-windows)". + ;; 2021: -;; «.ee-download-with-eww» (to "ee-download-with-eww") -;; «.ee-use-eshell» (to "ee-use-eshell") -;; «.ee-use-bullets» (to "ee-use-bullets") -;; «.ee-use-gnu-linux» (to "ee-use-gnu-linux") -;; «.ee-use-windows» (to "ee-use-windows") -;; «.directories» (to "directories") +;; «.ee-download-with-eww» (to "ee-download-with-eww") +;; «.ee-use-eshell» (to "ee-use-eshell") +;; «.ee-use-bullets» (to "ee-use-bullets") +;; «.ee-use-find-angg-es-remote» (to "ee-use-find-angg-es-remote") +;; «.ee-use-gnu-linux» (to "ee-use-gnu-linux") +;; «.ee-use-windows» (to "ee-use-windows") +;; «.directories» (to "directories") ;; ;; 2019: -;; «.eev-tar» (to "eev-tar") -;; «.ee-add-to-PATH» (to "ee-add-to-PATH") +;; «.eev-tar» (to "eev-tar") +;; «.ee-add-to-PATH» (to "ee-add-to-PATH") @@ -131,6 +158,28 @@ ) +;; «ee-use-find-angg-es-remote» (to ".ee-use-find-angg-es-remote") +;; See: (find-angg-es-links) +;; +(defun ee-use-find-angg-es-local () + (interactive) + (code-c-d "angg" "~/" :anchor :grep) + (code-c-d "es" "$ES/") + (defun find-es (stem &rest rest) + (apply 'find-anchor (ee-esfile (concat stem ".e")) rest)) + ) + +(defun ee-use-find-angg-es-remote () + (interactive) + (defun find-angg (fname &rest rest) + (apply 'find-wgeta (format "http://angg.twu.net/%s"; fname) rest)) + (defun find-es (fname &rest rest) + (apply 'find-wgeta (format "http://angg.twu.net/e/%s.e"; fname) rest)) + ) + + + + ;; «ee-use-gnu-linux» (to ".ee-use-gnu-linux") ;; «ee-use-windows» (to ".ee-use-windows") ;; @@ -142,6 +191,7 @@ (setq ee-firefox-program "firefox") (setq ee-googlechrome-program "google-chrome") (setq ee-mpv-program "mpv") + (ee-use-find-angg-es-local) ) (defun ee-use-windows () @@ -153,9 +203,11 @@ (setq ee-googlechrome-program "$GOOGLECHROMEDIR/chrome.exe") (setq ee-mpv-program "$MPVDIR/mpv.exe") (defalias 'find-pdf-page 'find-googlechrome-page) + (ee-use-find-angg-es-remote) ) + ;; «directories» (to ".directories") ;; These directories are for Daniel Almeida's machine. ;; Most people will have to configure this. @@ -220,7 +272,10 @@ ;; «eev-tar» (to ".eev-tar") ;; This is from 2019 and is now very obsolete - ;; partially because eev is in ELPA. +;; 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";) @@ -253,46 +308,14 @@ ;; (find-angg ".emacs.local.w32" "PATH") + ;; «ee-add-to-PATH» (to ".ee-add-to-PATH") -;; The last time that I used these commands to change the Windows PATH -;; was in 2019. In this message Eli Zaretskii recommended not changing -;; the PATH, and he was totally right: -;; https://lists.gnu.org/archive/html/help-gnu-emacs/2021-10/msg00052.html -;; -;; OLD TODO: Rewrite some of this using: -;; (find-efunctiondescr 'parse-colon-path) -;; (find-efunction 'parse-colon-path) -;; (find-elnode "System Environment" "Variable: path-separator") -;; (find-elnode "System Environment" "Function: parse-colon-path path") -;; -;; (setq mylist '(22 33 44)) -;; (add-to-list 'mylist 44) -;; -;; (ee-dospath-add "A;B;C" "B") -;; (ee-dospath-add "A;B;C" "c:/B") -;; -;; (let* ((a 2) (a (* 10 a)) (a (+ 3 a))) a) -;; -;; (find-elnode "Index" "* delete:") - -(defun ee-dospath-to-unix (str) - (replace-regexp-in-string "\\\\" "/" str)) -(defun ee-dospath-to-dos (str) - (replace-regexp-in-string "/" "\\\\" str)) -(defun ee-dospath-split (str) - (split-string str ";")) -(defun ee-dospath-unsplit (list) - (mapconcat 'identity list ";")) - -(defun ee-dospath-add (path dir) - (setq dir (ee-dospath-to-dos dir)) - (setq path (ee-dospath-to-dos path)) - (let* ((list (ee-dospath-split path)) - (newlist (cons dir (delete dir list)))) - (ee-dospath-unsplit newlist))) - -(defun ee-add-to-PATH (dir) - (setenv "PATH" (ee-dospath-add (getenv "PATH") dir))) +;; Until 2021 these file contained some very primitive functions - +;; that I wrote in 2019 - to add directories to the PATH. They were +;; moved to: +;; (find-es "emacs" "ee-dospath-add") + + diff --git a/eev-pdflike.el b/eev-pdflike.el index 8b2c1d5..8af840d 100644 --- a/eev-pdflike.el +++ b/eev-pdflike.el @@ -19,7 +19,7 @@ ;; ;; Author: Eduardo Ochs <eduardoo...@gmail.com> ;; Maintainer: Eduardo Ochs <eduardoo...@gmail.com> -;; Version: 20211003 +;; Version: 20211009 ;; Keywords: e-scripts ;; ;; Latest version: <http://angg.twu.net/eev-current/eev-pdflike.el> @@ -964,10 +964,10 @@ If PAGE is non-nil append a \"#page=nnn\" to the result." (concat baseurl pagestr))) (defun ee-find-firefox-page (fname &optional page) - `("firefox" ,(ee-fname-page-to-url fname page))) + `(,ee-firefox-program ,(ee-fname-page-to-url fname page))) (defun ee-find-googlechrome-page (fname &optional page) - `("google-chrome" ,(ee-fname-page-to-url fname page))) + `(,ee-googlechrome-program ,(ee-fname-page-to-url fname page))) ;; Tests: (find-firefox-page "~/Coetzee99.pdf") ;; (find-firefox-page "~/Coetzee99.pdf" 3) diff --git a/eev-plinks.el b/eev-plinks.el index 799fbb9..c0d99a6 100644 --- a/eev-plinks.el +++ b/eev-plinks.el @@ -19,7 +19,7 @@ ;; ;; Author: Eduardo Ochs <eduardoo...@gmail.com> ;; Maintainer: Eduardo Ochs <eduardoo...@gmail.com> -;; Version: 20211006 +;; Version: 20211009 ;; Keywords: e-scripts ;; ;; Latest version: <http://angg.twu.net/eev-current/eev-plinks.el> @@ -290,6 +290,7 @@ If it is something else, throw an error." ;; 2021oct08: The functions below are broken - they corrupt non-ascii files. ;; See: https://lists.gnu.org/archive/html/help-gnu-emacs/2021-10/msg00174.html +;; (find-eev "eev-on-windows.el" "ee-download-with-eww") ;; TODO: fix them. (defun ee-urlretrieve0 (url) diff --git a/eev-testblocks.el b/eev-testblocks.el index 8600e99..899157f 100644 --- a/eev-testblocks.el +++ b/eev-testblocks.el @@ -19,7 +19,7 @@ ;; ;; Author: Eduardo Ochs <eduardoo...@gmail.com> ;; Maintainer: Eduardo Ochs <eduardoo...@gmail.com> -;; Version: 20210917 +;; Version: 20211009 ;; Keywords: e-scripts ;; ;; Latest version: <http://angg.twu.net/eev-current/eev-testblocks.el> @@ -176,6 +176,18 @@ exec(open(\"%s\").read(), globals()) \"\"\" " (buffer-name)))) +(defun ee-insert-test-racket-mode () + (interactive) + (insert (format " +#| + (eepitch-racket) + (eepitch-kill) + (eepitch-racket) +(load \"%s\") + +|# +" (buffer-name)))) + (defun ee-insert-test-ruby-mode () (interactive) (insert (format "