branch: externals/eev commit 12f4d8ff47b89ee2dd77d9b960773359dc6ab2e6 Author: Eduardo Ochs <eduardoo...@gmail.com> Commit: Eduardo Ochs <eduardoo...@gmail.com>
Renamed some functions that had bad prefixes. --- ChangeLog | 10 ++++++++++ VERSION | 4 ++-- eepitch.el | 27 ++++++++++++--------------- eev-on-windows.el | 23 +++++++++++++---------- eev-prepared.el | 25 +++++++++++++++++-------- 5 files changed, 54 insertions(+), 35 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2687a70..627b0ad 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2021-08-11 Eduardo Ochs <eduardoo...@gmail.com> + + * eev-prepared.el (octal-to-num): renamed to `ee-octal-to-num'. + + * eepitch.el (at-eepitch-target): deleted. It was a copy of + `eepitch-eval-at-target-window', but with a bad name. + (del-echo): renamed to `eepitch-del-echo'. + + * eev-on-windows.el (add-to-PATH): renamed to `ee-add-to-PATH'. + 2021-08-10 Eduardo Ochs <eduardoo...@gmail.com> * eev-tlinks.el (ee-0x0-url): new variable. diff --git a/VERSION b/VERSION index 4cd5ae8..64fed88 100644 --- a/VERSION +++ b/VERSION @@ -1,2 +1,2 @@ -Wed Aug 11 01:45:06 GMT 2021 -Tue Aug 10 22:45:06 -03 2021 +Wed Aug 11 10:44:32 GMT 2021 +Wed Aug 11 07:44:32 -03 2021 diff --git a/eepitch.el b/eepitch.el index be03d4d..1f56ed3 100644 --- a/eepitch.el +++ b/eepitch.el @@ -1,6 +1,6 @@ ;; eepitch.el - record interactions with shells as readable notes, redo tasks. -;; Copyright (C) 2012,2015,2018,2019,2020 Free Software Foundation, Inc. +;; Copyright (C) 2012,2015,2018,2019,2020,2021 Free Software Foundation, Inc. ;; ;; This file is part of GNU eev. ;; @@ -19,7 +19,7 @@ ;; ;; Author: Eduardo Ochs <eduardoo...@gmail.com> ;; Maintainer: Eduardo Ochs <eduardoo...@gmail.com> -;; Version: 20210808 +;; Version: 20210811 ;; Keywords: e-scripts ;; ;; Latest version: <http://angg.twu.net/eev-current/eepitch.el> @@ -693,30 +693,27 @@ to make it work similarly in unibyte and multibyte buffers." ;;; | (_| (_) | | | | | | | | | | ||_____| __/ (__| | | | (_) | ;;; \___\___/|_| |_| |_|_|_| |_|\__| \___|\___|_| |_|\___/ ;;; -;; What is this: I am trying to find an elegant way to deal with -;; programs that echo their input (like zsh)... This is still a bit -;; experimental! +;; Some programs, like zsh, echo their input when they are run in +;; eepitch buffers. Sometimes setting the variable +;; `comint-process-echoes' fixes this, but now always. The most +;; reliable (modern) way to run them is to use vterm, but this +;; requires compiling emacs with support for modules and installing +;; the vterm package. ;; See: (find-variable 'comint-process-echoes) ;; To do: send an e-mail to Olin Shivers about echoing and stty. -(defun at-eepitch-target (code) - (eepitch-prepare) - (save-selected-window - (select-window (eepitch-target-window)) - (eval code))) - -(defun del-echo (flag) +(defun eepitch-del-echo (flag) "A hack to help determining whether a program echoes its commands or not. An example of use:\n (eepitch-zsh) (eepitch-kill) (eepitch-zsh) cd /tmp/ - (del-echo t) + (eepitch-del-echo t) cd /tmp/ - (del-echo nil) + (eepitch-del-echo nil) cd /tmp/\n" - (at-eepitch-target `(setq comint-process-echoes ,flag)) + (eepitch-eval-at-target-window `(setq comint-process-echoes ,flag)) (message "At %s: %S" eepitch-buffer-name `(setq comint-process-echoes ,flag))) diff --git a/eev-on-windows.el b/eev-on-windows.el index b06cbf3..17d2753 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: 20190627 +;; Version: 20210811 ;; Keywords: e-scripts ;; ;; Latest version: <http://angg.twu.net/eev-current/eev-on-windows.el> @@ -30,13 +30,13 @@ ;;; Commentary: ;; -;; Experimental, undocumented, and messy. This is being used in a -;; course on LaTeX and Emacs in which the students are trying to run -;; everything on Windows and I am trying to help them even though I -;; know next to nothing about Windows. +;; Experimental, undocumented, and messy. This was used in a course on +;; LaTeX and Emacs in which the students were trying to run everything +;; on Windows and I was trying to help them even though I know next to +;; nothing about Windows. ;; «.eev-tar» (to "eev-tar") -;; «.add-to-PATH» (to "add-to-PATH") +;; «.ee-add-to-PATH» (to "ee-add-to-PATH") ;; (find-eev "eev-plinks.el" "find-urlretrieve") ;; (find-es "emacs" "package-untar") @@ -49,8 +49,11 @@ ;; «eev-tar» (to ".eev-tar") -;; Use this - with `M-e' in each line - to download a very recent -;; version of eev using only Lisp. + +;; This was a way to to download a very recent version of eev using +;; only Lisp. I used it a bit with the students, but then eev became a +;; part of ELPA and this became obsolete... and now I don't even +;; remember how reliable this code was. ;; ;; (setq eev-tar-dir "~/eev-tar/") ;; (setq eev-tar-fname "~/eev-tar/eev2.tar") @@ -80,7 +83,7 @@ -;; «add-to-PATH» (to ".add-to-PATH") +;; «ee-add-to-PATH» (to ".ee-add-to-PATH") ;; (setq mylist '(22 33 44)) ;; (add-to-list 'mylist 44) @@ -108,7 +111,7 @@ (newlist (cons dir (delete dir list)))) (ee-dospath-unsplit newlist))) -(defun add-to-PATH (dir) +(defun ee-add-to-PATH (dir) (setenv "PATH" (ee-dospath-add (getenv "PATH") dir))) diff --git a/eev-prepared.el b/eev-prepared.el index 4cec958..99a15db 100644 --- a/eev-prepared.el +++ b/eev-prepared.el @@ -1,6 +1,6 @@ ;;; eev-prepared.el -- eev modules that use temporary dirs and prepared shells. -;; Copyright (C) 2012-2019 Free Software Foundation, Inc. +;; Copyright (C) 2012-2021 Free Software Foundation, Inc. ;; ;; This file is part of GNU eev. ;; @@ -19,7 +19,7 @@ ;; ;; Author: Eduardo Ochs <eduardoo...@gmail.com> ;; Maintainer: Eduardo Ochs <eduardoo...@gmail.com> -;; Version: 20190302 +;; Version: 2021aug11 ;; Keywords: e-scripts ;; ;; Latest version: <http://angg.twu.net/eev-current/eev-prepared.el> @@ -29,10 +29,19 @@ ;; (find-eev-intro) ;;; Commentary: -;; See: (find-eev "eev-env.el") -;; (find-prepared-intro) - +;; This used to be my main way of sending chunks of code to external +;; programs, but then `eepitch' appeared and I started to use eepitch +;; for almost everything. This is still useful in some niche cases but +;; I don't even know if there are other people besides me who still +;; use this code. I still use it to 1) send commands like `cd' to +;; terminals running outside emacs, 2) send chunks of shell commands +;; to external machines, 3) save blocks of LaTeX code that are loaded +;; by some .tex files for tests, 4) send chunks of code to Tcl/Tk or +;; SmallTalk. +;; +;; See: (find-prepared-intro) +;; (find-eev "eev-env.el") @@ -95,11 +104,11 @@ interpreting \"(S E)\"-pairs as this function." (cond ((numberp s) (buffer-substring-no-properties s e)) ((stringp s) s))) -(defun octal-to-num (str) +(defun ee-octal-to-num (str) "Convert STR - a sequence of octal digits - to a number." (let ((lastv (- (string-to-char (substring str -1)) ?0)) (rest (substring str 0 -1))) - (if (string= "" rest) lastv (+ lastv (* 8 (octal-to-num rest)))))) + (if (string= "" rest) lastv (+ lastv (* 8 (ee-octal-to-num rest)))))) (defun ee-write-string (str &optional altfile fmode) "Write STR to ALTFILE, or to ee-file if ALTFILE is nil. @@ -108,7 +117,7 @@ octal digits; if it is not nil then do the equivalent of a \"chmod FMODE file\"." (let ((fname (substitute-in-file-name (or altfile ee-file)))) (write-region str nil fname) ; a standard kludge - (if fmode (set-file-modes fname (octal-to-num fmode))))) + (if fmode (set-file-modes fname (ee-octal-to-num fmode))))) (defun ee-write (s e pre post &optional altfile fmode) "Write PRE+(ee-se-to-string S E)+POST to ALTFILE, or to `ee-file'.