emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/eev 1450cfa: Added `find-angg-es-links'.


From: ELPA Syncer
Subject: [elpa] externals/eev 1450cfa: Added `find-angg-es-links'.
Date: Sat, 2 Oct 2021 03:57:10 -0400 (EDT)

branch: externals/eev
commit 1450cfa0257473a78b65c02807aa8090611ade3d
Author: Eduardo Ochs <eduardoochs@gmail.com>
Commit: Eduardo Ochs <eduardoochs@gmail.com>

    Added `find-angg-es-links'.
---
 ChangeLog     |  34 +++++++++++
 VERSION       |   4 +-
 eev-blinks.el |  47 +++++++++++----
 eev-elinks.el |  85 +++++++++++++++++++--------
 eev-intro.el  | 181 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 eev-tlinks.el |  73 ++++++++++++++++++++++-
 eev.el        |   2 +-
 7 files changed, 383 insertions(+), 43 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index abfdde0..9d241c4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,39 @@
+2021-10-02  Eduardo Ochs  <eduardoochs@gmail.com>
+
+       * eev-tlinks.el (find-angg-es-links): new function.
+
+2021-10-01  Eduardo Ochs  <eduardoochs@gmail.com>
+
+       * eev-elinks.el (ee-face-at-point): new function.
+       (ee-face-of-glyph): new function.
+       (find-eface-links): use `ee-face-at-point'.
+
+       * eev-blinks.el (ee-find-efaces-hack): new function.
+       (find-efaces): use `ee-find-efaces-hack'.
+       (find-efacedescr): use `ee-face-at-point'.
+
+2021-09-27  Eduardo Ochs  <eduardoochs@gmail.com>
+
+       * eev-intro.el (find-escripts-intro): new section: "6. Tutorials".
+
 2021-09-25  Eduardo Ochs  <eduardoochs@gmail.com>
 
+       * eejump.el, eepitch.el, eev-anchors.el, eev-audiovideo.el,
+       eev-beginner.el, eev-blinks.el, eev-bounded.el, eev-brxxx.el,
+       eev-channels.el, eev-code.el, eev-codings.el, eev-compose-hash.el,
+       eev-edit.el, eev-elinks.el, eev-env.el, eev-eval.el,
+       eev-explain.el, eev-flash.el, eev-hlinks.el, eev-hydras.el,
+       eev-intro.el, eev-load.el, eev-mode.el, eev-multiwindow.el,
+       eev-on-windows.el, eev-pdflike.el, eev-plinks.el, eev-prepared.el,
+       eev-rcirc.el, eev-readme.el, eev-template0.el, eev-testblocks.el,
+       eev-tla.el, eev-tlinks.el, eev-wrap.el: added a "-*-
+       lexical-binding: nil; -*-" to the end of the first line of each of
+       these files.
+
+       * eev-intro.el (find-eev-install-intro): in "7.2. Dynamic binding"
+       explain that I decided to make all the elisp files in eev use
+       dynamic binding for simplicity.
+
        * eev-pdflike.el (code-xxxpdf-family, find-code-xxxpdf-family)
        (ee-code-xxxpdf-family, code-xxxpdftext-family)
        (find-code-xxxpdftext-family, ee-code-xxxpdftext-family)
diff --git a/VERSION b/VERSION
index 5333998..83f5c45 100644
--- a/VERSION
+++ b/VERSION
@@ -1,2 +1,2 @@
-Sat Sep 25 23:25:45 GMT 2021
-Sat Sep 25 20:25:45 -03 2021
+Sat Oct  2 07:01:10 GMT 2021
+Sat Oct  2 04:01:10 -03 2021
diff --git a/eev-blinks.el b/eev-blinks.el
index 4095a33..9a85bdd 100644
--- a/eev-blinks.el
+++ b/eev-blinks.el
@@ -21,7 +21,7 @@
 ;;
 ;; Author:     Eduardo Ochs <eduardoochs@gmail.com>
 ;; Maintainer: Eduardo Ochs <eduardoochs@gmail.com>
-;; Version:    20210608
+;; Version:    20211002
 ;; Keywords:   e-scripts
 ;;
 ;; Latest version: <http://angg.twu.net/eev-current/eev-blinks.el>
@@ -334,8 +334,8 @@ then go to the position specified by POS-SPEC-LIST.\n
         (format "*Customize Group: %s*" (custom-unlispify-tag-name group))
         pos-spec-list))
 
-;; Tests: (find-epackages nil "\n  bdo ")
-;;        (find-epackages t   "\n  bdo ")
+;; Tests: (find-epackages nil "\n  0x0 ")
+;;        (find-epackages t   "\n  0x0 ")
 ;;
 (defun find-epackages (&optional no-fetch &rest pos-spec-list)
   "Hyperlink to the output of `list-packages'."
@@ -343,7 +343,7 @@ then go to the position specified by POS-SPEC-LIST.\n
   (apply 'find-wottb-call '(list-packages no-fetch)
         "*Packages*" pos-spec-list))
 
-;; Test: (find-epackage 'bdo)
+;; Test: (find-epackage '0x0)
 ;; Note: `M-x find-epackage' currently doesn't work well.
 ;;  See: (find-elnode "Interactive Codes" "S" "An interned symbol")
 ;;       (find-elnode "Index" "* read-no-blanks-input:")
@@ -371,9 +371,19 @@ then go to the position specified by POS-SPEC-LIST.\n
 ;; Inspect faces, colors and characters.
 ;; Most of these use `find-wottb-call'.
 ;; Tests:
-;;   (find-ecolors             " white")
-;;   (find-efaces              "default")
-;;   (find-efacedescr 'default "Foreground:")
+;;   (find-ecolors     " white")
+;;   (find-efaces       'eepitch-star-face   "abcd")
+;;   (find-efaces     "\neepitch-star-face " "abcd")
+;;   (find-efacedescr   'default "Foreground:")
+;;
+;; Key bindings:
+;;   (find-eev "eev-mode.el" "eev-mode-map-set")
+;;   (find-eev "eev-mode.el" "eev-mode-map-set" "M-h" "M-c" "find-echardescr")
+;;   (find-eev "eev-mode.el" "eev-mode-map-set" "M-h" "M-s" "find-eface-links")
+;;   (find-eev "eev-mode.el" "eev-mode-map-set" "M-h" "M-t" "find-etpat")
+;;   (find-eev "eev-mode.el" "eev-mode-map-set" "M-h"   "t" "find-etpat0")
+;;   (find-eev "eev-mode.el" "eev-mode-map-set" "M-h"   "c" 
"find-ecolor-links")
+;;     (find-enode "International Chars" "C-u C-x =" "describe-char")
 
 (defun find-echardescr (&optional pos &rest pos-spec-list)
   "Hyperlink to the result of running `describe-char' at POS."
@@ -386,16 +396,31 @@ then go to the position specified by POS-SPEC-LIST.\n
   (interactive)
   (apply 'find-wottb-call '(list-colors-display) "*Colors*" pos-spec-list))
 
+;; See:
+;;   (find-eev "eev-elinks.el" "find-eface-links")
+;;   (find-eev "eev-elinks.el" "find-eface-links" "find-efacedescr")
+;;
 (defun find-efacedescr (&optional face &rest pos-spec-list)
-  "Hyperlink to the result of running `describe-face' on FACE."
-  ;; (interactive (list (read-face-name "Describe face")))
-  (interactive (list (face-at-point)))
+  "Hyperlink to the result of running `describe-face' on FACE.
+When called interactively use `ee-face-at-point' to select the
+FACE. See the documentation for `ee-face-at-point' for the
+details of how it works."
+  (interactive (list (ee-face-at-point current-prefix-arg)))
   (apply 'find-wottb-call '(describe-face face) "*Help*" pos-spec-list))
 
 (defun find-efaces (&rest pos-spec-list)
   "Hyperlink to the result of running `list-faces-display'."
   (interactive)
-  (apply 'find-wottb-call '(list-faces-display) "*Faces*" pos-spec-list))
+  (apply 'find-wottb-call '(list-faces-display)
+        "*Faces*" (ee-find-efaces-hack pos-spec-list)))
+
+(defun ee-find-efaces-hack (pos-spec-list)
+  "An internal function used by `find-efaces'."
+  (let* ((face (car pos-spec-list))
+        (rest (cdr pos-spec-list)))
+    (if (and face (symbolp face))        ; if pos-spec-list starts with a 
symbol:
+       (cons (format "\n%s " face) rest) ; convert it to a string in the right 
way
+      pos-spec-list)))                   ; otherwise return pos-spec-list 
unchanged
 
 (defun find-etpat (&optional pos &rest pos-spec-list)
   "Hyperlink to the result of running `describe-text-properties' at point.
diff --git a/eev-elinks.el b/eev-elinks.el
index 1b81b89..feaa7b4 100644
--- a/eev-elinks.el
+++ b/eev-elinks.el
@@ -19,7 +19,7 @@
 ;;
 ;; Author:     Eduardo Ochs <eduardoochs@gmail.com>
 ;; Maintainer: Eduardo Ochs <eduardoochs@gmail.com>
-;; Version:    20210910
+;; Version:    20211002
 ;; Keywords:   e-scripts
 ;;
 ;; Latest version: <http://angg.twu.net/eev-current/eev-elinks.el>
@@ -74,7 +74,7 @@
 ;; «.find-pdflike-page-links»  (to "find-pdflike-page-links")
 ;; «.ee-hyperlink-prefix»      (to "ee-hyperlink-prefix")
 ;; «.find-eface-links»         (to "find-eface-links")
-;; «.find-color-links»         (to "find-color-links")
+;; «.find-ecolor-links»                (to "find-ecolor-links")
 ;; «.find-epackage-links»      (to "find-epackage-links")
 ;; «.ee-package-dir»           (to "ee-package-dir")
 ;; «.find-esetkey-links»       (to "find-esetkey-links")
@@ -1071,22 +1071,26 @@ See the comments in the source code."
 ;; «find-eface-links» (to ".find-eface-links")
 ;; Skel: (find-find-links-links-new "eface" "face-symbol" "")
 ;; Test: (find-eface-links 'eepitch-star-face)
-;; Moved to eev-mode.el:
-;;   (define-key eev-mode-map "\M-h\M-s" 'find-eface-links)
+;; Key binding:
+;;   (find-eev "eev-mode.el" "eev-mode-map-set")
+;;   (find-eev "eev-mode.el" "eev-mode-map-set" "M-h" "M-s" "find-eface-links")
 ;;
 (defun find-eface-links (&optional face-symbol &rest pos-spec-list)
 "Visit a temporary buffer containing hyperlinks about FACE-SYMBOL.
-When called interactively generate hyperlinks about the face at point."
-  (interactive (list (or (face-at-point) 'default)))
+When called interactively generate hyperlinks about the face at point.
+See the documentation for `ee-face-at-point' to understand what that
+means."
+  (interactive (list (ee-face-at-point current-prefix-arg)))
   (setq face-symbol (or face-symbol "{face-symbol}"))
   (apply
    'find-elinks
-   `((find-eface-links ,face-symbol ,@pos-spec-list)
+   `((find-eface-links ',face-symbol ,@pos-spec-list)
      ;; Convention: the first sexp always regenerates the buffer.
      (find-efunction 'find-eface-links)
      ""
      (find-efacedescr ',face-symbol)
-     (find-efaces ,(format "\n%S " face-symbol))
+     ;; (find-efaces ,(format "\n%S " face-symbol))
+     (find-efaces ',face-symbol)
      (find-eface ',face-symbol)
      (customize-face ',face-symbol)
      (set-face-foreground ',face-symbol ,(face-foreground face-symbol))
@@ -1099,6 +1103,35 @@ When called interactively generate hyperlinks about the 
face at point."
      )
    pos-spec-list))
 
+(defun ee-face-at-point (&optional arg)
+  "Return the face at point as a symbol; ARG determines what that means.
+When ARG is nil this returns (face-at-point); in a font-locked
+buffer this is typically something like `font-lock-comment-face'.
+When ARG is 1 and the character at point is a glyph this returns
+the face of that glyph - something like `eepitch-star-face'.
+When ARG is anything else this returns (symbol-at-point); so if
+the point is on the name of face this returns the face with that
+name.
+
+See the source code for `find-eface-links' and `find-efacedescr'
+to understand how this is used. ARG is usually
+`current-prefix-arg', so the default for it is to be nil."
+  (if (eq arg nil)
+      (or (face-at-point) 'default)
+    (if (eq arg 1)
+       (ee-face-of-glyph (char-after (point)))
+      (symbol-at-point))))
+  
+;; Tests: (ee-face-of-glyph ?)
+;;        (ee-face-of-glyph ?@)
+(defun ee-face-of-glyph (char)
+  "An internal function used by `ee-face-at-point'."
+  (let* ((display-table standard-display-table)
+         (disp-vector  (and display-table (aref display-table char)))
+         (disp-vector0 (and disp-vector   (aref disp-vector 0)))
+        (face         (and disp-vector0  (glyph-face disp-vector0))))
+    face))
+
 
 
 
@@ -1108,20 +1141,26 @@ When called interactively generate hyperlinks about the 
face at point."
 ;;; |  _| | | | | (_| |____|  __/ (_| (_) | | (_) | | |____| | | | | |   <\__ \
 ;;; |_| |_|_| |_|\__,_|     \___|\___\___/|_|\___/|_|      |_|_|_| |_|_|\_\___/
 ;;;                                                                            
  
-;; «find-color-links» (to ".find-color-links")
+;; «find-ecolor-links» (to ".find-ecolor-links")
 ;; Skel: (find-find-links-links-new "color" "initialcolor" "")
 ;; Tests: (find-ecolor-links)
 ;;        (find-ecolor-links "sienna")
-;;
-(defun find-color-links (&optional initialcolor &rest pos-spec-list)
+;;        (find-ecolor-links "#123456")
+;;        (ee-color-values   "sienna")
+;;        (ee-color-values   "#123456")
+;;        (ee-color-choose-tk)
+;;        (ee-color-choose-tk "sienna")
+;;        (ee-color-choose-tk "#123456")
+;;
+(defun find-ecolor-links (&optional initialcolor &rest pos-spec-list)
   "Visit a temporary buffer containing hyperlinks for the color INITIALCOLOR."
   (interactive)
   (setq initialcolor (or initialcolor "#123456"))
   (apply
    'find-elinks
-   `((find-color-links ,initialcolor ,@pos-spec-list)
+   `((find-ecolor-links ,initialcolor ,@pos-spec-list)
      ;; Convention: the first sexp always regenerates the buffer.
-     (find-efunction 'find-color-links)
+     (find-efunction 'find-ecolor-links)
      ""
      (find-ecolor-links (ee-color-choose-tk ,(or initialcolor "gray")))
      (find-ecolor-links ,(or initialcolor "gray"))
@@ -1139,20 +1178,16 @@ When called interactively generate hyperlinks about the 
face at point."
   (apply 'format "#%02x%02x%02x"
         (mapcar (lambda (c) (lsh c -8)) (color-values color))))
 
-;; `ee-color-choose-tk' is a VERY OLD hack that needs eetcl... see:
-;; http://angg.twu.net/eev-current/eev-langs.el.html
-;; http://angg.twu.net/eev-current/eev-langs.el
-;;   (find-sh0     "echo $EEVTMPDIR")
-;;   (find-fline        "$EEVTMPDIR")
-;;   (find-sh0 "mkdir -p $EEVTMPDIR")
-;;   (require 'eev-langs)
-;;
 (defun ee-color-choose-tk (&optional initialcolor)
   "Call Tcl/Tk to choose a color similar to INITIALCOLOR.
-This needs a temporary directory; see: (find-prepared-intro)"
-  (eetcl (format "puts [tk_chooseColor -initialcolor %s]; exit"
-                (or initialcolor "gray")))
-  (find-sh0 (format "wish %s" ee-file-tcl)))
+The original version of this function used the directory $EEVTMPDIR.
+This version uses the file /tmp/ee.tcl instead of $EEVTMPDIR/ee.tcl.
+Don't use this in multi-user machines."
+  (let ((ee-file-tcl "/tmp/ee.tcl")
+       (tclcode (format "puts [tk_chooseColor -initialcolor %s]; exit\n"
+                        (or initialcolor "gray"))))
+    (ee-write-string tclcode ee-file-tcl)
+    (find-sh0 (format "wish %s" ee-file-tcl))))
 
 
 
diff --git a/eev-intro.el b/eev-intro.el
index c24a998..622c96d 100644
--- a/eev-intro.el
+++ b/eev-intro.el
@@ -19,7 +19,7 @@
 ;;
 ;; Author:     Eduardo Ochs <eduardoochs@gmail.com>
 ;; Maintainer: Eduardo Ochs <eduardoochs@gmail.com>
-;; Version:    20210925
+;; Version:    20210927
 ;; Keywords:   e-scripts
 ;;
 ;; Latest version: <http://angg.twu.net/eev-current/eev-intro.el>
@@ -2522,10 +2522,18 @@ Dependency on dynamic binding should be avoided - see:
 
 but the main function that eev uses for template strings is
 intrinsically incompatible with lexical binding. See the comments
-in its source file:
+in its source file,
 
   (find-eev \"eev-template0.el\")
 
+and this tutorial:
+
+  (find-lexical-intro)
+
+I decided to make all the elisp files in eev use dynamic binding
+for simplicity, even though this is frowned upon.
+
+
 
 
 7.3. Autoloads
@@ -11944,6 +11952,173 @@ This can also be used to generate links to info nodes.
 
 (...)
 
+
+
+
+6. Tutorials
+============
+All the tutorials in eev follow these four principles:
+
+  1. All the examples in them are very easy to run,
+  2. The links to documentation are easy to follow,
+  3. All the \"sub-examples\" are easy to run,
+  4. The links to related documentation - including links to
+     primary sources - are easy to follow.
+
+I used to believe that all these four principles would be
+immediately obvious to everyone who had played a bit with the
+tutorials of eev, and I thought that people would realize that
+these are very good principles, that they should follow too...
+and so these people would start to apply these principles to
+their own e-scripts, and they would adapt them to other
+environments that are not Emacs-based, and these ideas would
+spread (sort of) naturally. Well, I was totally wrong - and I
+only discovered that in 2021, when I chatted with some relatively
+advanced eev users to whom those ideas were not obvious at all.
+So let me try to be explain these principles clearly - especially
+the principles 3 and 4 - and show how they can be applied to
+other contexts besides tutorials.
+
+The idea of \"making sub-examples very easy to run\" is
+especially easy to see in the elisp tutorials. In this
+introduction
+
+  (find-elisp-intro \"1. Introduction\")
+
+we have first this sexp,
+
+     (+ (* 2 3) (* 4 5))
+
+and then these ones:
+
+           2
+             3
+        (* 2 3)
+                   4
+                     5
+                (* 4 5)
+     (+ (* 2 3) (* 4 5))
+  (list (* 2 3) (* 4 5))
+
+In the first sexp people _could_ execute the subsexps (* 2 3)
+and (* 4 5) by typing `M-E' in the right places... remember:
+
+  (find-eval-intro \"2. The end of line and `M-e'\")
+  (find-eval-intro \"2. The end of line and `M-e'\" \"without moving\")
+
+...but it is much easier to see the sub-sexps, and to execute
+them, when they are in different lines. This example also serves
+to stress to beginners than number, like 4, are sexps too, and
+they can be evaluated - the result of evaluating 4 is 4.
+
+In a sequence of sub-sexps, like the one above, I usually try to
+arrange the sexps in a didactic order: to understand the result
+of (+ (* 2 3) (* 4 5)) we need to understand first the results
+of (* 2 3) and (* 4 5). Also, the best way to understand the new
+idea that appears in
+
+  (list (* 2 3) (* 4 5))
+
+is to compare it with this other sexp, that appears just before
+it and is conceptually simpler:
+
+     (+ (* 2 3) (* 4 5))
+
+I try to apply this principle - \"make sub-examples very easy to
+run\" - to tutorials for other languages, too. At this moment the
+only tutorial for another language that I have that is in a
+_reasonably_ organized form is this one,
+
+               http://angg.twu.net/e/lua-intro.e.html
+  (find-wgeta \"http://angg.twu.net/e/lua-intro.e\";)
+  (find-wgeta \"http://angg.twu.net/e/lua-intro.e\"; \"intro:for\")
+
+but parts of it were written in 2004, when these principles were
+not yet very clear to me. I am revising it, and I am also trying
+to convince some students to work together with me on tutorials
+for shell and Python, but they are not very enthusiastic (yet).
+
+The \"links to related documentation\" can also be arranged in a
+didactical order. For example, here,
+
+  (find-eev-quick-intro \"6.4. Red stars\")
+  (find-eev-quick-intro \"6.4. Red stars\" \"bullet\")
+  (find-eepitch-bullet-links)
+
+the first link points to a section of a tutorial that most people
+should have stumbled on; the second link points to technical a
+point in it that most people ignore on a first reading, and the
+third one points to something much more technical,
+containing (executable!) source code.
+
+(TO DO: mention test blocks)
+
+
+
+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)
+
+
+
+8. IRC
+======
+(TO DO: explain this:)
+
+  (find-efunction 'ee-0x0-upload-region)
+  (find-efunction 'ee-0x0-upload-region \"aliased to `u0'\")
+
+
+9. Git
+======
+Example:
+
+  (progn
+
+    ;; Links to the git repository:
+    ;; https://github.com/edrx/emacs-lua
+    ;; https://github.com/edrx/emacs-lua/blob/main/tests.e
+    ;; https://raw.githubusercontent.com/edrx/emacs-lua/main/tests.e
+
+    (setq ee-emluagit-base
+         \"https://raw.githubusercontent.com/edrx/emacs-lua/main/\";)
+    (defun find-emluagitfile (fname &rest rest)
+      (apply 'find-wget (format \"%s%s\" ee-emluagit-base fname) rest))
+    (defun find-emluagit (fname &rest rest)
+      (apply 'find-wgeta (format \"%s%s\" ee-emluagit-base fname) rest))
+
+    ;; Tests:
+    ;; (find-emluagit \"tests.e\")
+    ;; (find-emluagit \"tests.e\" \"find-angg-and-find-es\")
+    ;; (find-emluagit \"tests.e\" \"find-angg-and-find-es\" \"Tests:\")
+    ;; (find-emluagitfile \"tests.e\" \"Warning:\")
+
+    ;; Links to a local copy of the git repository:
+    ;; (find-git-links \"https://github.com/edrx/emacs-lua\"; \"emlua\")
+    ;; (setq ee-git-dir \"~/usrc/\")
+    ;;
+    ;; (find-code-c-d \"emlua\" \"~/usrc/emacs-lua/\" :anchor)
+    (code-c-d \"emlua\" \"~/usrc/emacs-lua/\" :anchor)
+    ;;
+    ;; Tests:
+    ;; (find-emlua \"\")
+    ;; (find-emlua \"tests.e\")
+    ;; (find-emlua \"tests.e\" \"find-angg-and-find-es\")
+    ;; (find-emlua \"tests.e\" \"find-angg-and-find-es\" \"Tests:\")
+    ;; (find-emluafile \"tests.e\" \"Warning:\")
+
+    ;; Compare:
+    ;; (find-emluagit \"tests.e\" \"find-angg-and-find-es\")
+    ;; (find-emlua    \"tests.e\" \"find-angg-and-find-es\")
+
+    )
+
+
 " pos-spec-list)))
 
 ;; (find-escripts-intro)
@@ -13686,7 +13861,7 @@ which means that they operate on the same `x'.
 Different calls to this function generate getters and setters
 with independent lexical environments - which means that they
 operate on independent `x's.
-This defun need to be executed in lexical binding mode.\"
+This defun needs to be executed in lexical binding mode.\"
   (let* ((x nil))
     (list (lambda () x)
           (lambda (newvalue) (setq x newvalue)))))
diff --git a/eev-tlinks.el b/eev-tlinks.el
index 03ab518..53dc932 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:    20210915
+;; Version:    20211002
 ;; Keywords:   e-scripts
 ;;
 ;; Latest version: <http://angg.twu.net/eev-current/eev-tlinks.el>
@@ -90,6 +90,7 @@
 ;; «.ee-0x0-upload-region»             (to "ee-0x0-upload-region")
 ;; «.find-0x0-links»                   (to "find-0x0-links")
 ;; «.find-eepitch-bullet-links»                (to "find-eepitch-bullet-links")
+;; «.find-angg-es-links»               (to "find-angg-es-links")
 
 
 (require 'eev-env)
@@ -2479,6 +2480,76 @@ This function is used by `ee-0x0-upload-region'."
 
 
 
+;; «find-angg-es-links»  (to ".find-angg-es-links")
+;; Skel: (find-find-links-links-new "angg-es" "" "")
+;; Test: (find-angg-es-links)
+;;
+(defun find-angg-es-links (&rest pos-spec-list)
+"Show an e-script for configuring `find-angg' and `find-es'."
+  (interactive)
+  (apply
+   'find-elinks-elisp
+   `((find-angg-es-links ,@pos-spec-list)
+     ;; Convention: the first sexp always regenerates the buffer.
+     (find-efunction 'find-angg-es-links)
+     (find-eev-quick-intro "9. Shorter hyperlinks")
+     (find-eev-quick-intro "9.1. `code-c-d'")
+     (find-eev-quick-intro "9.2. Extra arguments to `code-c-d'" "to anchors")
+     ""
+     ,(ee-template0 "\
+
+
+;; The `progn' below is how I (edrx) define `find-angg' and
+;; `find-es' in my machine to point to local files. Note that the
+;; sexps
+;;
+;;   (find-angg \"foo\" \"anchor\")
+;;   (find-es   \"foo\" \"anchor\")
+;;
+;; search for anchor \"anchor\" in the files \"~/foo\" and
+;; \"~/e/foo.e\" respectively... in 1996, when I wrote `find-es',
+;; I had several functions like it, that appended arbitrary
+;; prefixes _and suffixes_ to their first arguments. I stopped
+;; using all of them except `find-es' - that is a kind of
+;; living fossil.
+;;
+(progn
+
+  (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))
+
+)
+
+
+
+;; The `progn' below defines versions of `find-angg' and
+;; `find-es' that use `find-wget' to access the
+;; public copies of my files at angg.twu.net:
+;;
+(progn
+
+  (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))
+
+)
+
+
+
+;; Tests:
+;; (find-angg \"e/bullseye.e\")
+;; (find-angg \"e/bullseye.e\" \"2021aug16\")
+;; (find-es     \"bullseye\")
+;; (find-es     \"bullseye\"   \"2021aug16\")
+")
+     )
+   pos-spec-list))
+
+
+
 
 (provide 'eev-tlinks)
 
diff --git a/eev.el b/eev.el
index cef2e9b..4a2f67b 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: 20210925
+;; Version: 20211002
 
 ;; 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]