[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/eev 3ef1f6af7e: Added `(find-kla-test-intro)'.
From: |
ELPA Syncer |
Subject: |
[elpa] externals/eev 3ef1f6af7e: Added `(find-kla-test-intro)'. |
Date: |
Sun, 26 Jun 2022 04:57:31 -0400 (EDT) |
branch: externals/eev
commit 3ef1f6af7e9d07c0ad2e330ae161061e57fd2a87
Author: Eduardo Ochs <eduardoochs@gmail.com>
Commit: Eduardo Ochs <eduardoochs@gmail.com>
Added `(find-kla-test-intro)'.
---
ChangeLog | 10 ++++
VERSION | 4 +-
eev-audiovideo.el | 2 +-
eev-blinks.el | 2 +-
eev-hlinks.el | 4 ++
eev-intro.el | 152 ++++++++++++++++++++++++++++++++++++++++++++++++++----
eev-kla.el | 55 ++++++++++++++++++++
eev-tlinks.el | 17 +++---
eev.el | 2 +-
9 files changed, 227 insertions(+), 21 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index ae8c24eb70..01ff06408d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
+2022-06-26 Eduardo Ochs <eduardoochs@gmail.com>
+
+ * eev-kla.el (ee-kla-demo-write-file)
+ (ee-kla-demo-write-three-files, eekla2): new functions.
+
+ * eev-intro.el (find-kla-test-intro): New function.
+
2022-06-25 Eduardo Ochs <eduardoochs@gmail.com>
+ * eev-tlinks.el (ee-copy-rest00): new function.
+ (ee-copy-rest0): use `ee-copy-rest00'.
+
* eev-hlinks.el (find-here-links, ee-find-here-links): added an
"&optional arg" to the argument list, for debugging.
(ee-find-here-debug-links): new function.
diff --git a/VERSION b/VERSION
index f99a7e0568..fafc7bb4b3 100644
--- a/VERSION
+++ b/VERSION
@@ -1,2 +1,2 @@
-Sat Jun 25 23:28:34 GMT 2022
-Sat Jun 25 20:28:34 -03 2022
+Sun Jun 26 08:42:08 GMT 2022
+Sun Jun 26 05:42:08 -03 2022
diff --git a/eev-audiovideo.el b/eev-audiovideo.el
index 2dd30eb074..5e1ab3fc6e 100644
--- a/eev-audiovideo.el
+++ b/eev-audiovideo.el
@@ -24,7 +24,7 @@
;;
;; Latest version: <http://angg.twu.net/eev-current/eev-audiovideo.el>
;; htmlized: <http://angg.twu.net/eev-current/eev-audiovideo.el.html>
-;; See also: <http://angg.twu.net/eev-current/eev-readme.el.html>
+;; See also: <http://angg.twu.net/eev-current/eev-beginner.el.html>
;; <http://angg.twu.net/eev-intros/find-eev-intro.html>
;; <http://angg.twu.net/eev-intros/find-audiovideo-intro.html>
;; (find-audiovideo-intro)
diff --git a/eev-blinks.el b/eev-blinks.el
index e639f5f438..bc116196ab 100644
--- a/eev-blinks.el
+++ b/eev-blinks.el
@@ -26,7 +26,7 @@
;;
;; Latest version: <http://angg.twu.net/eev-current/eev-blinks.el>
;; htmlized: <http://angg.twu.net/eev-current/eev-blinks.el.html>
-;; See also: <http://angg.twu.net/eev-current/eev-readme.el.html>
+;; See also: <http://angg.twu.net/eev-current/eev-beginner.el.html>
;; <http://angg.twu.net/eev-intros/find-eev-intro.html>
;; (find-eev-intro)
diff --git a/eev-hlinks.el b/eev-hlinks.el
index a8fdade750..1de868316b 100644
--- a/eev-hlinks.el
+++ b/eev-hlinks.el
@@ -89,6 +89,10 @@
;;
;; (find-efunction 'ee-file-bufferp)
;; (find-efunction 'ee-find-file-links)
+;;
+;; that display information about the results that were generated and
+;; saved in the last time that the function `ee-detect-here' was
+;; called.
;; TODO
diff --git a/eev-intro.el b/eev-intro.el
index 9cec2513bf..17133b73d7 100644
--- a/eev-intro.el
+++ b/eev-intro.el
@@ -94,6 +94,7 @@
;; «.find-git-intro» (to "find-git-intro")
;; «.find-windows-beginner-intro» (to "find-windows-beginner-intro")
;; «.find-eev-exercises-intro» (to "find-eev-exercises-intro")
+;; «.find-kla-test-intro» (to "find-kla-test-intro")
;; Videos:
;; «.find-three-main-keys-intro» (to "find-three-main-keys-intro")
@@ -2751,22 +2752,23 @@ These are etcs:
These ones explain advanced features that require extra setup:
- 31. (find-prepared-intro)
- 32. (find-bounded-intro)
- 33. (find-channels-intro)
+ 31. (find-kla-test-intro)
+ 32. (find-prepared-intro)
+ 33. (find-bounded-intro)
+ 34. (find-channels-intro)
This one was used in a video:
- 34. (find-three-main-keys-intro)
+ 35. (find-three-main-keys-intro)
These ones are obsolete:
- 35. (find-emacs-intro)
- 36. (find-defun-intro)
+ 36. (find-emacs-intro)
+ 37. (find-defun-intro)
-Item 25 is an index of old video tutorials, with scripts for
-downloading local copies of them and links to important positions
-in the videos.
+For an index of the videos, run:
+
+ (find-1stclassvideos)
@@ -3215,6 +3217,13 @@ The next steps are to learn how:
(find-emacs-keys-intro \"Some other keys that create\")
+
+8. Debugging
+============
+The best way to understand the innards of `find-here-links' is to
+call it in \"debug mode\". This is explained here:
+
+ (find-eevfile \"eev-hlinks.el\" \"Debug mode\")
" pos-spec-list)))
;; (find-here-links-intro)
@@ -14396,6 +14405,131 @@ see:
+;;; _ _
+;;; | | _| | __ _
+;;; | |/ / |/ _` |
+;;; | <| | (_| |
+;;; |_|\_\_|\__,_|
+;;;
+;; «find-kla-test-intro» (to ".find-kla-test-intro")
+;; Skel: (find-intro-links "kla-test")
+;; Test: (find-kla-test-intro)
+
+(defun find-kla-test-intro (&rest pos-spec-list) (interactive)
+ (let ((ee-buffer-name "*(find-kla-test-intro)*"))
+ (apply 'find-eintro "\
+\(Re)generate: (find-kla-test-intro)
+Source code: (find-efunction 'find-kla-test-intro)
+More intros: (find-eev-quick-intro)
+ (find-eev-intro)
+ (find-eepitch-intro)
+This buffer is _temporary_ and _editable_.
+It is meant as both a tutorial and a sandbox.
+
+
+
+Pre-requisites:
+ (find-saving-links-intro)
+ (find-saving-links-intro \"2.3. The base case 3\")
+
+
+
+1. Introduction
+===============
+THIS IS AN ADVANCED FEATURE!!!
+
+The function `eekla' implements a way to create links to anchors
+that requires fewer keystrokes than the way described here,
+
+ (find-saving-links-intro)
+ (find-saving-links-intro \"2.3. The base case 3\")
+
+but to understand this new way you will need to understand all
+the pre-requisites of the \"Base case 3\" - see the link above -
+and also file-local, or dir-local, variables, that are explained
+in these pages of the Emacs manual:
+
+ (find-enode \"Specifying File Variables\")
+ or: (find-enode \"Directory Variables\")
+
+The code for `eekla', `eeklf', `eekl2' and friends is here:
+
+ (find-eev \"eev-kla.el\")
+ (find-eev \"eev-kla.el\" \"aliases\")
+
+
+
+2. Setup for a demo
+===================
+We need to create some test directories in /tmp/eev-kla-test/.
+Run this eepitch block:
+
+ (eepitch-shell)
+ (eepitch-kill)
+ (eepitch-shell)
+ rm -Rfv /tmp/eev-kla-test/
+ mkdir /tmp/eev-kla-test/
+ mkdir /tmp/eev-kla-test/dira/
+ mkdir /tmp/eev-kla-test/dirb/
+
+We need to create some files there. Take a look at the source of
+`ee-kla-demo-write-three-files' here,
+
+ (find-eev \"eev-kla.el\" \"demo\")
+
+and after understanding it, run this:
+
+ (code-c-d \"klat\" \"/tmp/eev-kla-test/\")
+ (code-c-d \"klata\" \"/tmp/eev-kla-test/dira/\")
+ (code-c-d \"klatb\" \"/tmp/eev-kla-test/dirb/\")
+ (ee-kla-demo-write-three-files)
+
+and inspect that directory with:
+
+ (find-fline \"/tmp/eev-kla-test/\")
+ (find-fline \"/tmp/eev-kla-test/dira/\")
+ (find-fline \"/tmp/eev-kla-test/dirb/\")
+ (find-fline \"/tmp/eev-kla-test/dira/foo\")
+ (find-fline \"/tmp/eev-kla-test/dirb/bar\")
+ (find-fline \"/tmp/eev-kla-test/.dir-locals.el\")
+
+
+
+3. Run some tests
+=================
+Run this 4-line sexp
+
+ (find-3a nil
+ ' (find-fline \"/tmp/eev-kla-test/dira/foo\")
+ ' (find-fline \"/tmp/eev-kla-test/dirb/bar\")
+ )
+
+to create a window setting like this:
+ _________________
+ | | |
+ | | foo |
+ | intro |_______|
+ | | |
+ | | bar |
+ |_________|_______|
+
+Go to the window showing the file \"foo\", run `M-x eekla' in
+several positions of that file - after each anchor and in the
+beginning - and understand the messages in the echo area. Then do
+the same in the window with the file \"bar\".
+
+
+\[TODO]: Explain how to test eekla2. See:
+ (find-eev \"eev-kla.el\" \"eekla2\")
+
+
+" pos-spec-list)))
+
+;; (find-kla-test-intro)
+
+
+
+
;;; _ _ _ _
;;; | |_| |__ _ __ ___ ___ _ __ ___ __ _(_)_ __ | | _____ _ _ ___
diff --git a/eev-kla.el b/eev-kla.el
index 001662a7c8..e5093d5c79 100644
--- a/eev-kla.el
+++ b/eev-kla.el
@@ -33,6 +33,8 @@
;; «.ee-preferred-c» (to "ee-preferred-c")
;; «.utils» (to "utils")
;; «.eekla» (to "eekla")
+;; «.eekla2» (to "eekla2")
+;; «.demo» (to "demo")
;; «.eeklf» (to "eeklf")
;; «.aliases» (to "aliases")
@@ -294,6 +296,15 @@ Put in the kill ring a link to the preceding anchor."
+;;; _ _ ____
+;;; ___ ___| | _| | __ _|___ \
+;;; / _ \/ _ \ |/ / |/ _` | __) |
+;;; | __/ __/ <| | (_| |/ __/
+;;; \___|\___|_|\_\_|\__,_|_____|
+;;;
+;; «eekla2» (to ".eekla2")
+;; See: (find-kla-test-intro)
+;; (find-kla-test-intro "3. Run some tests")
(defun eekla2 ()
"Insert a link \"to here\" \"there\" and a link \"to there\" \"here\".
@@ -314,6 +325,50 @@ then run `eekla' in the next window, and save the result in
(other-window -1)))
+;;; ____
+;;; | _ \ ___ _ __ ___ ___
+;;; | | | |/ _ \ '_ ` _ \ / _ \
+;;; | |_| | __/ | | | | | (_) |
+;;; |____/ \___|_| |_| |_|\___/
+;;;
+;; «demo» (to ".demo")
+;; See: (find-kla-test-intro)
+;; (find-kla-test-intro "2. Setup for a demo")
+
+(defun ee-kla-demo-write-file (fname contents)
+ "See: (find-kla-test-intro)"
+ (write-region contents nil fname))
+
+(defun ee-kla-demo-write-three-files ()
+ "See: (find-kla-test-intro)"
+ ;;
+ (ee-kla-demo-write-file "/tmp/eev-kla-test/dira/foo"
+ "This file: /tmp/eev-kla-test/dira/foo
+Index:
+# «.a1» (to \"a1\")
+# «.a2» (to \"a2\")\n
+Body:
+# «a1» (to \".a1\")\n
+# «a2» (to \".a2\")\n\n")
+ ;;
+ (ee-kla-demo-write-file "/tmp/eev-kla-test/dirb/bar"
+ "This file: /tmp/eev-kla-test/dirb/bar
+Index:
+# «.b1» (to \"b1\")
+# «.b2» (to \"b2\")\n
+Body:
+# «b1» (to \".b1\")\n
+# «b2» (to \".b2\")\n\n")
+ ;;
+ (ee-kla-demo-write-file "/tmp/eev-kla-test/.dir-locals.el"
+ ";; This file: /tmp/eev-kla-test/.dir-locals.el
+;;
+((\"dira\" . ((nil . ((ee-preferred-c . \"klata\")))))
+ (\"dirb\" . ((nil . ((ee-preferred-c . \"klatb\")))))
+ )")
+ )
+
+
;; «aliases» (to ".aliases")
;; I use these aliases:
diff --git a/eev-tlinks.el b/eev-tlinks.el
index 76f264b7ab..a74ecfb53d 100644
--- a/eev-tlinks.el
+++ b/eev-tlinks.el
@@ -19,7 +19,7 @@
;;
;; Author: Eduardo Ochs <eduardoochs@gmail.com>
;; Maintainer: Eduardo Ochs <eduardoochs@gmail.com>
-;; Version: 20220605
+;; Version: 20220625
;; Keywords: e-scripts
;;
;; Latest version: <http://angg.twu.net/eev-current/eev-tlinks.el>
@@ -215,14 +215,11 @@
"Count the number of lines in STR (which should be newline-terminated)."
(length (replace-regexp-in-string "[^\n]" "" str)))
-(defun ee-copy-rest0 (skip code)
- "Copy the rest of this buffer to the kill ring and execute CODE.
-The rest of this buffer is everything from the beginning of the next line -
-optionally moving down SKIP lines - to the end of the buffer."
- ;; (setq nlines (+ 1 (or nlines 0)))
+(defun ee-copy-rest00 (skip gotoend code)
+ "An internal function used by `ee-copy-rest0'."
(setq skip (or skip 0))
(let* ((start (save-excursion (move-beginning-of-line (+ 2 skip)) (point)))
- (end (point-max))
+ (end (eval gotoend))
(str (buffer-substring start end))
(len (ee-count-lines str))
(msg `(Copied ,len lines to the kill ring - use C-y to paste)))
@@ -231,6 +228,12 @@ optionally moving down SKIP lines - to the end of the
buffer."
(eval code)
msg))
+(defun ee-copy-rest0 (skip code)
+ "Copy the rest of this buffer to the kill ring and execute CODE.
+The rest of this buffer is everything from the beginning of the next line -
+optionally moving down SKIP lines - to the end of the buffer."
+ (ee-copy-rest00 skip '(point-max) code))
+
(defun ee-copy-rest (skip code)
"Copy the rest of this buffer to the kill ring and execute CODE.
See: (find-eev \"eev-tlinks.el\" \"ee-copy-rest\")"
diff --git a/eev.el b/eev.el
index d1a3cdb152..55c31f28f0 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: 20220605
+;; Version: 20220626
;; 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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/eev 3ef1f6af7e: Added `(find-kla-test-intro)'.,
ELPA Syncer <=