Warning: this is an htmlized version!
The original is here, and
the conversion rules are here.
\;; This file:
;;   http://angg.twu.net/elisp/test.el.html
;;   http://angg.twu.net/elisp/test.el
;;           (find-angg "elisp/test.el")
;; Author: Eduardo Ochs <eduardoochs@gmail.com>
;;
;; (defun e () (interactive) (find-angg "elisp/test.el"))

;; «.klapt»				(to "klapt")
;; «.find-slyprocess»			(to "find-slyprocess")
;; «.find-codecdlike-links»		(to "find-codecdlike-links")
;; «.erich-ruff-2021aug07»		(to "erich-ruff-2021aug07")
;; «.ee-compilation-buffer»		(to "ee-compilation-buffer")
;; «.find-record-eev-video-links»	(to "find-record-eev-video-links")



;; <find-mkdir-links>
;; Skel: (find-find-links-links-new "mkdir" "dir" "")
;; Test: (find-mkdir-links "2024.1-GA")
;;
(defun find-mkdir-links (&optional dir &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for mkdir."
  (interactive)
  (setq dir (or dir "{dir}"))
  (apply
   'find-elinks
   `((find-mkdir-links ,dir ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-mkdir-links)
     ""
     ,(ee-template0 "\
# (kill-new \"dir\")
# (find-TH \"Makefile\" \"dirs\")

* (eepitch-eshell)
* (eepitch-kill)
* (eepitch-eshell)
mkdir ~/{dir}
mkdir /scp:edrx@linode:~/slow_html/{dir}
mkdir /scp:edrx@linode:~/public_html/{dir}

# (find-anggfile \"{dir}\")
# (find-linsfile \"{dir}\")
# (find-linpfile \"{dir}\")
")
     )
   pos-spec-list))


(defun ee-eval-last-sexp-55 ()
  (find-2a nil '(find-ebuffer "*stdout*"))
  (prin1 
   (let ((standard-output (get-buffer "*stdout*")))
     (ee-eval (read (ee-last-sexp))))))

(print "Hi")




https://lean-lang.org/lean4/doc/whatIsLean.html
https://lean-lang.org/lean4/doc/monads/laws.lean.html

(find-angg ".emacs" "ee-rstdoc-:leanmeta")

;; Skel: (find-rstdoc-links :lean4doc)

;; <ee-rstdoc-:lean4doc>
;; Skel: (find-rstdoc-links :lean4doc)
(setq ee-rstdoc-:lean4
      '(:base      "whatIsLean"
        :base-web  "https://lean-lang.org/lean4/doc/"
        :base-html "https://lean-lang.org/lean4/doc/"
      ;;:base-html "file:///BASE-HTML/"
        :base-rst  "/home/edrx/bigsrc/lean4/doc/"
        :rst       ".md"
        :res       ("#.*$" "\\?.*$" ".html$" ".lean$" ".md$" "^file://"
                    "^https://lean-lang.org/lean4/doc/"
                    "^/home/edrx/bigsrc/lean4/doc/")
        :kill      ldk
	))

;; (find-code-rstdoc :lean4)
        (code-rstdoc :lean4)






;; (find-find-links-links-new "show2-use" "fname" "")


;; (find-eev "eev-strange-functions.el" "hprog")
;; (find-eev "eev-strange-functions.el" "codecd")
;; (find-angg ".emacs.templates" "find-etv-links")

(setq ee-hprog-for-sf
 '(:or
   (:if (ee-sf-1stclassvideo-p)     (find-sf-elinks-elisp))
   (:if (ee-sf-codecd-p)            (find-sf-elinks-elisp))
   (:if (ee-sf-pdf-p)               (find-sf-elinks-elisp))
   (:if (ee-sf-findstemlinks-p)     (find-sf-elinks-elisp))
   ;;
   (:if t (error "Sexp does not start with a strange function! Try `M-1 M-h M-s'"))
   ))

(defun ee-sf-findstemlinks-stem (f)
  (if (and (fboundp (ee-intern    "find-%s-links" f))
	   (fboundp (ee-intern "ee-find-%s-links" f)))
      (ee-intern "ee-find-%s-links" f)))

(defun ee-sf-findstemlinks-p ()
  (pcase ee-sf-sexp
    ((and `(,f . ,rest)
	  (let eeff (ee-sf-findstemlinks-stem f))
	  (guard (fboundp eeff)))
     (setq ee-sf-result `(,eeff . ,rest)))))

;; (ee-sf-findstemlinks-stem 'etv)
;; (ee-sf-findstemlinks-stem 'foo)
;; (etv)
;; (show2-use)



(find-etv-links)






;; (find-eev "eev-elinks.el" "find-emodeline-links")


;; Test: (find-emodeline)
(defun find-emodeline ()
  (interactive)
  (let* ((modeline (format-mode-line mode-line-format))
	 (modelinenp (ee-no-properties modeline))
	 (header1 "# Generated by: (find-emodeline)")
	 (header2 "# See: (find-emodeline-links)")
	 (header3 "#      (find-efunction 'find-emodeline)")
	 (header4 "#      (find-efunction 'find-eregionpp)")
         (ee-buffer-name (or ee-buffer-name "*find-emodeline*")))
    (find-estring (format "%s\n%s\n%s\n%s\n\n%s\n%s\n"
			  header1 header2 header3 header4
			  modeline modelinenp))))




(find-eppma '

(gv-define-expander alist-get
  (lambda (do key alist &optional default remove testfn)
    (macroexp-let2 macroexp-copyable-p k key
      (gv-letplace (getter setter) alist
        (macroexp-let2 nil p (if (member testfn '(nil 'eq #'eq))
                                 `(assq ,k ,getter)
                               `(assoc ,k ,getter ,testfn))
          (funcall do (if (null default) `(cdr ,p)
                        `(if ,p (cdr ,p) ,default))
                   (lambda (v)
                     (macroexp-let2 nil v v
                       (let ((set-exp
                              `(if ,p (setcdr ,p ,v)
                                 ,(funcall setter
                                           `(cons (setq ,p (cons ,k ,v))
                                                  ,getter)))))
                         `(progn
                            ,(cond
                             ((null remove) set-exp)
                             ((or (eql v default)
                                  (and (eq (car-safe v) 'quote)
                                       (eq (car-safe default) 'quote)
                                       (eql (cadr v) (cadr default))))
                              `(if ,p ,(funcall setter `(delq ,p ,getter))))
                             (t
                              `(cond
                                ((not (eql ,default ,v)) ,set-exp)
                                (,p ,(funcall setter
                                              `(delq ,p ,getter))))))
                            ,v))))))))))

)


(function-get 'alist-get 'gv-expander)


try: (format-mode-line mode-line-format)


(seq-filter 'identity '(a b nil c d nil e))


  (pcase ee-sf-sexp
    ((and `(,f ,time . ,rest)
	  (let stem (ee-sf-1stclassvideo-stem f))
	  (guard (stringp stem)))


  (,a a))


(ydsearch "UgmRNgyCmNY")

(ee-youtubedl-hash-around-point)

# (find-ydbfile "")




# (find-ydbgrep "grep --color=auto -nH --null -e ZjiQQlgkBVM db.lua dbu.lua")



;; Skel: (find-rstdoc-links :leanref)


;; <ee-insert-test-markdown-mode>
;;
(defun ee-insert-test-markdown-mode ()
  (interactive)
  (insert (ee-adjust-red-stars (format "
<!--
* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)

-->


" (buffer-name)))))

;; Test:
;; (ee-insert-test-markdown-mode)






https://thunderseethe.dev/posts/bet-on-cbpv/ ***
https://lobste.rs/s/mpcoj1/i_m_betting_on_call_by_push_value




;; (find-kla-intro "8. `cl-loop'")
;; (find-eloadhistory-links)
;; (find-efunction 'find-eloadhistory-for)

(defun ee-load-history-eev-entries ()
  (cl-loop for entry in load-history
           for fullfname = (car entry)
           for fname = (file-name-nondirectory fullfname)
           if (string-match "^ee" fname)
	   collect entry))

(defun ee-load-history-sort-entries (entries)
  (let ((f (lambda (a b) (string< (car a) (car b)))))
    (sort entries f)))

(defun ee-load-history-sort-defuns (entry)
  (let ((defuns (cl-loop for line in entry
			 if (and (listp line) (eq (car line) 'defun))
			 collect (cdr line))))
    (sort defuns 'ee-symbol<)))

(defun find-eloadhistory-defuns (fname)
  (let* ((entry  (assoc fname load-history))
	 (defuns (ee-load-history-sort-defuns entry)))
    (find-eppp defuns)))

(defun find-eloadhistory-defunss ()
  (let* ((f (lambda (fname) (format "(find-eloadhistory-defuns \"%s\")\n" fname)))
	 (entries0 (ee-load-history-eev-entries))
	 (entries1 (ee-load-history-sort-entries entries0))
	 (fnames  (mapcar 'car entries1))
	 (lines (mapcar f fnames))
	 (body (apply 'concat lines)))
    (find-estring-elisp body)))
    
;; (find-eloadhistory-defuns "/home/edrx/eev-current/eepitch.el")
;; (find-eloadhistory-defunss)






;; (find-eloadhistory-links)
;; (find-efunction 'ee-eloadhistory-fors)




(string-match "^ee" "eev-foo")



;; (find-es "emacs" "lookup-key")
;; (find-es "emacs" "dash")
;; (find-dashnode "Sublist selection" "-filter")



;; (find-eev "eev-helpful.el" "find-hkeymap-links")



;; (find-evariable 'emacs-lisp-mode-map)
;; (find-eaproposf "helpful.*keymap")
;;               (helpful--format-keymap emacs-lisp-mode-map)
;; (find-estring (helpful--format-keymap emacs-lisp-mode-map))


;; (find-egrep "grep --color=auto -nH --null -e lisp-data-mode progmodes/*.el")
;; (find-hfunction 'lisp-data-mode)
;; (find-eaproposf "lisp-data-mode")
;; (find-eaproposv "-map$")

;; (find-hfunction 'lisp-data-mode)




(defun ee-active-minor-modes ()
  (cl-loop for mm in minor-mode-map-alist
           for mmname = (car mm)
           if (symbol-value mmname)
           collect mmname))






(find-eaproposf "^read-")
(find-eaproposf "locus")


(find-efunction 'read-key)
(find-efunction 'read-key-sequence)
(find-efunction 'read-key-sequence-vector)


(format-kbd-macro (read-key))



# (find-efunction 'help--binding-locus)
# (help--binding-locus [up] nil)
# (help--binding-locus (kbd "M-h M-h") nil)








# (find-hvariable 'emacs-lisp-mode-map)

(ee-keymap-lookup emacs-lisp-mode-map "C-c C-b")
(ee-keymap-lookup "foo" "C-c C-b")



  (let* ((mm0 minor-mode-map-alist)
	 (mm1 (mapcar 'car mm0))
	 (mm2 (--filter (symbol-value it) mm1))
	 )
    mm2)

(find-kla-intro "8. `cl-loop'")





(ee-keymap-lookup-1 eev-mode-map "M-h")
(ee-keymap-lookup-1 eev-mode-map "M-h M-h")
(ee-keymap-lookup-1 eev-mode-map "M-h M-h M-h")
(ee-keymap-lookup-1  my-mode-map "<f7>")

(commandp (keymap-lookup eev-mode-map "M-h"))
(commandp (keymap-lookup eev-mode-map "M-h M-h"))
(commandp (keymap-lookup eev-mode-map "M-h M-h M-h"))
(commandp (keymap-lookup  my-mode-map "<f7>"))


(let* ((mm0 minor-mode-map-alist)
       (mm1 (mapcar 'car mm0))
       (mm2 (--filter (symbol-value it) mm1))
       )
  mm2)




          (--filter (= 0 (% it 2)) '(1 2 3 4))
              ⇒ (2 4)



(require 'dash)

(let* ((lh-eevs (--filter (string-match "eev" (car it)) load-history))
       (a (nth 7 lh-eevs))
       (b (cdr a))
       (c (--filter (and (consp it) (eq (car it) 'defun)) b))
       )
  ;; (find-epp lh-eevs)
  (setq A a)
  ;; (find-epp a)
  (find-epp c)
  )


(find-epp A)
(find-epp (cdr A))
(find-epp (cdr A))


(let* ((input '(1 2 3 4 5 6 7 8 9 10))
      )
  (--filter (< 5 it) input))








;; <find-importlib-links>
;; Skel: (find-find-links-links-new "importlib" "pkg distr" "pkg_")
;; Test: (find-importlib-links)
;;
(defun find-importlib-links (&optional pkg distr &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for importlib."
  (interactive)
  (setq pkg (or pkg "{pkg}"))
  (setq distr (or distr "{distr}"))
  (let* ((pkg_ "{pkg_}"))
    (apply
     'find-elinks
     `((find-importlib-links ,pkg ,distr ,@pos-spec-list)
       ;; Convention: the first sexp always regenerates the buffer.
       (find-efunction 'find-importlib-links)
       ""
       ,(ee-template0 "\
")
       )
     pos-spec-list)))





# (find-pillowdoc "reference/ImageDraw")
# (find-pillowdocr "reference/ImageDraw")
# (find-pillowdocw "reference/ImageDraw")







(funcall 'format "(%s %s)" 2 3)




(find-eppcolors
 (cl-loop for i in (ee-seqn 0 100 50)
	  collect (ct-make-hsluv 10 i 50)))


(cl-loop for x from 100 to 200 by 10 collect x)
(cl-loop for x from 200 downto 100 by 10 collect x)


(cl-loop for x from 100 to 200
	 collect x)

for VAR from EXPR1 to EXPR2 by EXPR3



(defvar ee-npm-dir "/tmp/npm/")

;; <find-npm-links>
;; Skel:  (find-find-links-links-new "npm" "pkg" "")
;; Tests: (find-npm-links)
;;        (find-npm-links "ohm-js")
;;
(defun find-npm-links (&optional pkg &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for npm."
  (interactive)
  (setq pkg (or pkg "{pkg}"))
  (apply
   'find-elinks
   `((find-npm-links ,pkg ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-npm-links)
     (set ee-npm-dir ee-npm-dir)
     ""
     ,(ee-template0 "\
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
** (find-sh-at-dir \"{ee-npm-dir}\" \"find node_modules | sort\")
mkdir -p {ee-npm-dir}
cd       {ee-npm-dir}
npm uninstall {pkg}
npm   install {pkg}
npm ls
npm      view {pkg}

** (cd {(ee-S (ee-expand ee-npm-dir))})
* (eepitch-nodejs)
* (eepitch-kill)
* (eepitch-nodejs)
require.resolve('{pkg}');
require        ('{pkg}');
")
     )
   pos-spec-list))







(find-eapropos "code-1stclassvideo")
(find-eaproposf "1stclassvideo")
(find-eaproposf "keymap")


(find-epp ee-1stclassvideos-info)




# (find-efunction 'ee-1stclassvideos-dlsubs)







1stclassvideo

# (find-efunctiondescr 'find-code-xxx-links)
# (find-efunction 'find-code-xxx-links)


;; Test: (find-code-xxx-links "1stclassvideo" "c" "")
;; See: (find-eev "eev-videolinks.el" "code-lsubs")


;; Skel: (find-code-xxx-links "1stclassvideo" "c" "")
              
(defun      code-1stclassvideo (c)
  (eval (ee-read      (ee-code-1stclassvideo c))))
(defun find-code-1stclassvideo (c)
  (find-estring-elisp (ee-code-1stclassvideo c)))
(defun   ee-code-1stclassvideo (c)
  (ee-template0 "\
;; (find-code-1stclassvideo \"C\" \"FNAME\")
;;      (code-1stclassvideo \"C\" \"FNAME\")
"))


(defun ee-1stclassvideo-defuns (c)



(find-eev "eev-videolinks.el" "code-lsubs")
(find-eev "eev-videolinks.el" "find-eev2021video")
# (find-efunction 'ee-sf-1stclassvideo-links)




;; (find-1stclassvideo-links "2022tikz")

;; Play:  (find-2022tikzvideo "00:00")
;; HSubs: (find-2022tikzhsubs "00:01")
;; LSubs: (find-2022tikzlsubs "00:01")
;; Index: (find-1stclassvideo-index "2022tikz")
;; Info:  (find-1stclassvideo-links "2022tikz")
;;        (find-1stclassvideo-def   "2022tikz")

;; (find-eev "eev-kl-here.el" "hprog")
;; (find-efunction 'klapt)
;; (find-efunction 'ee-kl-sexp-at-eol-p)
;; (find-eev "eev-plinks.el" "find-efunctionlgrep")
;; (find-eev "eev-plinks.el" "find-efunctionlgrep" "rx")
;; (find-es "emacs" "string-match")
;; (find-es "emacs" "match-string")
;; (find-es "emacs" "replace-regexp-in-string")
;; (find-es "emacs" "rx")
;; (find-es "emacs" "pcase")
;; (find-es "emacs" "pcase-quickref")
;; (find-angg "elisp/pcase-tests.el")


(setq ee-sf-1stclassvideo-functions
      '(find-1stclassvideo-def
	find-1stclassvideo-index
	find-1stclassvideo-links))

(setq ee-sf-1stclassvideo-re
      (rx bos "find-" (group (+ any))
	  (or "video" "hsubs" "lsubs") eos))

(defun ee-sf-1stclassvideo-stem (f)
  (and (symbolp f)
       (string-match ee-sf-1stclassvideo-re (symbol-name f))
       (match-string 1 (symbol-name f))))

(defun ee-sf-1stclassvideo-p ()
  (pcase ee-sf-sexp
    ((and `(,f ,time . ,rest)
	  (let stem (ee-sf-1stclassvideo-stem f))
	  (guard (stringp stem)))
     (setq ee-sf-result `(ee-sf-1stclassvideo-links ,stem ,time . ,rest)))
    ((and `(,f)
	  (let stem (ee-sf-1stclassvideo-stem f))
	  (guard (stringp stem)))
     (setq ee-sf-result `(ee-sf-1stclassvideo-links ,stem)))
    ((and `(,f ,stem . ,rest)
	  (guard (member f ee-sf-1stclassvideo-functions)))
     (setq ee-sf-result `(ee-sf-1stclassvideo-links ,stem . ,rest)))))

;; Tests:
;; (setq ee-sf-sexp '(find-eev2021video "2:34" "foo" "bar"))
;; (setq ee-sf-sexp '(find-eev2021video "2:34"))
;; (setq ee-sf-sexp '(find-eev2021video))
;; (setq ee-sf-sexp '(find-1stclassvideo-links "eev2021" "2:34" "foo" "bar"))
;; (setq ee-sf-sexp '(find-1stclassvideo-links "eev2021"))
;; (ee-sf-1stclassvideo-p)


;; Tests:
;; (ee-1stclass-headp 'find-eev2021video)
;; (ee-1stclass-headp 'find-eev2021vide)
;; (ee-1stclass-headp "foo")


;; (setq ee-sf-sexp ' (find-eev2021video "2:34" "foo" "bar")

(defun ee-sf-1stclassvideo-links (stem &optional time &rest rest)
  (let* ((body (ee-find-1stclassvideo-links stem)))
  `("foo"
    "bar"
    ,(ee-template0 "
{body}

;; Play:  (find-{stem}video \"{time}\")
;; HSubs: (find-{stem}hsubs \"{time}\")
;; LSubs: (find-{stem}lsubs \"{time}\")
;; Index: (find-1stclassvideo-index \"{stem}\")
;; Info:  (find-1stclassvideo-links \"{stem}\")
;;        (find-1stclassvideo-def   \"{stem}\")

;; (find-{stem}video \"{time}\")
")
    )))

eev2021
2:34
foo
bar













ee-hlang-sexp2
(eval ee-hlang-sexp2)



  (or sexp (progn  (read (ee-last-sexp)))))





(ee-sf-1stclassvideo-links)


;; Similar to:
;;   (find-efunction 'ee-detect-here)
(defun ee-detect-sf ()
  (ee-hlang-run ee-hprog-for-sf))

(defun ee-get-sf ()
  (ee-detect-sf)
  (eval ee-hlang-sexp2))





  (setq ee-sf-stem nil)


      (let ((headname (symbol-name head))
	      (m (string-match


  (let ((headstr (symbol-name 

(find-angg "elisp/pcase-tests.el")









(describe-font "6x13")
(describe-font "foo")

(ee-describe-font "6x13")
(ee-describe-font "foo")




;; (find-efunction 'ee-telegachat-bufferp)
;; (find-efunction 'ee-find-telegachat-links)

;; Skel: (find-let*-macro-links "telegachat" "bufname msgn" "chat username atusername atusernamen title id idn")
(defmacro ee-let*-macro-telegachat (&optional bufname msgn &rest code)
  "An internal function used by `find-telegachat-links'."
  `(let* ((bufname     (or ,bufname (buffer-name)))
          (msgn        (or ,msgn (ee-telega-msgn)))
          (chat        (with-current-buffer bufname telega-chatbuf--chat))
          (username    (telega-chat-username chat))
          (atusername  (if username (format "@%s" username)))
          (atusernamen (format "%s#%s" atusername msgn))
          (title       (plist-get chat :title))
          (id          (plist-get chat :id))
          (idn         (format "%s#%s" id msgn)))
     ,@code))


      (find-telegachat ,idn)
      (find-telegachat ,idn ,title)
      (find-telegachatm ,idn)










;; (find-eev "eev-wrap.el" "find-eewraptest-links")


;; Test: (find-eewrap-links)
;; (find-efunction 'find-eewrap-links)

;; (find-eewrap-links "U" "require" "stem")

;; (find-estring ";; (eek \"<down> <<eewrap-require>>\")\nfoo\n")
(defun  eewrap-require () (interactive)


;; (find-eaproposf "eewrap")

(find-eewrap-links "<none>" "audiovideo" "stem fname")



;; Test: (find-estring ";; (eek \"<down> <<eewrap-audiovideo>>\")\nA B C\n")




(find-efunction 'eewrap-anchor)
(find-eewrap-links "A" "anchor" "prefix anchor")

(find-efunction 'eewrap-audiovideo)
(find-efunction 'eewrap-class)
(find-efunction 'eewrap-code-c-d)

(find-efunction 'eewrap-debian)
(find-eewrap-links "D" "debian" "stem")

(find-efunction 'eewrap-eejump)
(find-efunction 'eewrap-eepitch)
(find-efunction 'eewrap-eewrap)
(find-efunction 'eewrap-escript-block)
(find-efunction 'eewrap-find-fline)
(find-efunction 'eewrap-latex)
(find-efunction 'eewrap-man)
(find-efunction 'eewrap-mypsection)
(find-efunction 'eewrap-pdflike)
(find-efunction 'eewrap-pdflike-link)
(find-efunction 'eewrap-require)
(find-efunction 'eewrap-rm/mkdir/cd)
(find-efunction 'eewrap-screenshot)
(find-efunction 'eewrap-sh)
(find-efunction 'eewrap-sh0)
(find-efunction 'eewrap-two-eepitches)
(find-efunction 'eewrap-vldi-list-line)
(find-efunction 'eewrap-zsh)

Documentar:
(find-eev "eev-edit.el" "eewrap-vldi-list-line")



  (find-eaproposf "eewrap")






;; (find-efunction 'eewrap-vldi-list-line)








Path.addLUAtopath()
require "ELpeg1"    -- (find-angg "LUA/ELpeg1.lua")


Path.addLUAtopath()
require "ELpeg1"    -- (find-angg "LUA/ELpeg1.lua")



;; Skel: (find-rstdoc-links :J)


;; (find-efunction 'ee-copy-rest)



;;-- (ee-copy-rest '(0 ";;--snip--") '(find-fline "/tmp/.emacs"))
;; See: (find-kl-here-intro)
;;      (find-eev "eev-kl-here.el")
(require 'eev-kl-here)
;;--snip--


(+ 1 2)
--snip--





--snip--





Hi Michael,

thanks, I was able to narrow down the problem a bit...






(let ((default-process-coding-system '(iso-latin-1-dos . iso-latin-1-dos)))
  (find-wget "http://anggtwu.net/LUA/Dang1.lua")
  )

(let ((default-process-coding-system '(utf-8-unix . utf-8-unix)))
  (find-wget "http://anggtwu.net/LUA/Dang1.lua")
  )


(find-angg "elisp/find-wget-jan-2024.el")




(defun find-eaproposv (regexp &rest rest)
  "Go to a temporary buffer listing all variables whose names match REGEXP."
  (apply 'find-elinks-elisp
	 `(,(ee-template0 "\
;; (find-eaproposv {(ee-S regexp)})
;; (find-eaproposf {(ee-S regexp)})
;; (find-eapropos  {(ee-S regexp)})
")
	   ,(ee-eaproposf0 regexp 'boundp "(find-evardescr '%s)\n"))
	 rest))



;; (find-eppp    (ee-telegachat-msg0 "@emacs_telega#43594"))
;; (find-estring (ee-telegachat-msgc "@emacs_telega#43594"))

;; (find-eevfile "eev-kl-here.el")


;; Skel: (find-find-links-links-new "luainit" "dir" "")


# (find-efunctiondescr 'find-efunction-links)
# (find-efunction 'find-efunction-links)
# (find-efunction 'ee-find-efunction-links)
     ,@(ee-find-efunction-links f)



(find-estring-elisp (ee-eloadhistory-find-flines))


# (find-efunction 'find-eeshortdefs)

(find-eloadhistory-flines "eev-load")

(defun find-eloadhistory-flines (&rest rest)


(find-eppp (assoc "/home/edrx/bigsrc/emacs30/lisp/international/kinsoku.elc" load-history))
(find-eloadhistory-for "/home/edrx/bigsrc/emacs30/lisp/international/kinsoku.elc")


(find-eevfile "eev-elinks.el" "(defun ee-eloadhistory-find-flines")




     (find-fline (symbol-file ',f 'defun))
     (find-epp (assoc (symbol-file ',f 'defun) load-history))
     (find-epp (assoc ,(symbol-file f 'defun) load-history))
     (find-eppp (mapcar 'car load-history))
     (find-estring (mapconcat 'identity (mapcar 'car load-history) "\n"))





(mapconcat (lambda (v) (format "(%s ,%s)" v v))
           (ee-split "a b c d")
           "\n          ")




# (find-yttranscript-links "eev2023repls" "IDBQo_YYfA8")
# (find-editeevsubtitles-links-1 "eev2023repls")
# (find-blogme3-legendas-links "eev2023repls" "emacsconf2023-repls" "IDBQo_YYfA8")


(find-es "emacs" "cond")






;; <find-MM-aula-defs-links>
;; Skel: (find-find-links-links-new "MM-aula-defs" "stem MM tlalong tla" "yys mm")
;; Test: (find-MM-aula-defs-links)
;;
(defun find-MM-aula-defs-links (&optional stem MM tlalong tla &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for MM-aula-defs."
  (interactive)
  (setq stem (or stem "{stem}"))
  (setq MM (or MM "{MM}"))
  (setq tlalong (or tlalong "{tlalong}"))
  (setq tla (or tla "{tla}"))
  (let* ((yys "{yys}")
         (mm (downcase MM)))
    (apply
     'find-elinks
     `((find-MM-aula-defs-links ,stem ,MM ,tlalong ,tla ,@pos-spec-list)
       ;; Convention: the first sexp always regenerates the buffer.
       (find-efunction 'find-MM-aula-defs-links)
       ""
       ,(ee-template0 "\
# (kill-new \"  LATEX/{stem}-defs.tex\\n\")
# (find-blogme3 \"anggmake.lua\" \"anggtranslate\")
# (find-blogme3 \"anggmake.lua\" \"anggtranslate\" \"LATEX/{stem}\")
# ^ Add to the makefile

;; ({tlalong}a \"title\")
(code-etex-tla \"{tla}d\"        \"{stem}-defs\")
(code-etex-tla \"{tlalong}defs\" \"{stem}-defs\")
;; ^ add to: (find-angg \".emacs\" \"{mm}-2023-2\")

% <defs-{tlalong}defs>
\\input {stem}-defs.tex % (find-LATEX \"{stem}-defs.tex\")
;; ^ add to: (find-LATEX \"{stem}.tex\" \"defs-maxima\")

# (ee-copy-rest 3 '(find-LATEX \"{stem}-defs.tex\"))
")
       ;; (find-angg         "LATEX/2023-2-MM-template-defs.tex")
       ,(ee-template0-file "~/LATEX/2023-2-MM-template-defs.tex"
			   "⟦\\([!-~]+\\)⟧")
       )
     pos-spec-list)))





;; «klapt»  (to ".klapt")
;; (find-angg "elisp/klapt.el")


;; Skel: (find-find-links-links-new "qdraw" "fs xr yr" "")






;; (ee-kl-sexp-at-eol :sexp '(+ 1 2))

(find-es "emacs" "defmacro-let*")

;; Skel: (find-find-links-links-new "blogme3-utf8" "stem" "")

;; <find-blogme3-utf8-links>
;; Skel: (find-find-links-links-new "blogme3-utf8" "stem" "")
;; Test: (find-blogme3-utf8-links)
;;
(defun find-blogme3-utf8-links (&optional stem &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for blogme3-utf8."
  (interactive)
  (setq stem (or stem "{stem}"))
  (apply
   'find-elinks
   `((find-blogme3-utf8-links ,stem ,@pos-spec-list)
     (find-blogme3-links ,stem ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-blogme3-utf8-links)
     (find-efunction 'find-blogme3-links)
     ""
     (kill-new ,stem)
     (find-blogme3 "anggmake.lua" "blogmestems")
     (find-TH ,stem)
     (ee-copy-rest 1 '(find-TH ,stem))
     ;;
     ,(ee-template0 "
\[INCLUDE TH/speedbar.blogme]
\[SETFAVICON dednat4/dednat4-icon.png]
\[SETFAVICON IMAGES/forthsun.png]
\[# 
\(defun c () (interactive) (find-blogme3-sh0-if \"{stem}\"))
\(defun u () (interactive) (find-blogme-upload-links \"{stem}\"))
;;     http://anggtwu.net/{stem}.html
;; file:///home/edrx/TH/L/{stem}.html
#]
\[lua:
  require \"defs-2022\"    -- (find-blogme3 \"defs-2022.lua\")
  short_:add [[
  ]]
]
\[SETHEADSTYLE [LUCIDA]]
\[htmlize8 [J (Title)]\n
]
\[#
 # Local Variables:
 # coding: utf-8-unix
 # modes: (fundamental-mode blogme-mode)
 # End:
#]"))
   pos-spec-list))





;; (find-angg ".emacs" ".emacs.hydras")
;; (find-eev "eev-hydras.el" "ee-edit-index-hydra")


(find-defhydra-links)


;; Skel: (find-find-links-links-new "rsynccamera" "localdir yyyy mm dd" "")









# (find-gd3docrgrep "grep --color=auto -nH --null -e _init $(cat .files.rst)")
# (find-gd3docrgrep "grep --color=auto -nH --null -e drawing $(cat .files.rst)")


# (find-godotref-links "{class}" "{method}")
# (find-godotref-links "expression" "parse")






https://docs.godotengine.org/en/3.5/getting_started/first_2d_game/index.html#prerequisites
# (find-gd3doc "getting_started/first_2d_game/index#prerequisites")
# (find-gd3docw "getting_started/first_2d_game/index#prerequisites")
# (find-gd3docr "getting_started/first_2d_game/index#prerequisites")
# (find-gd3doc  "classes/class_animationnode")
# (find-gd3docr "classes/class_animationnode")
# (find-gd3docw "classes/class_animationnode")


;; (find-extra-file-links "~/bigsrc/godot-docs/_build/html/classes/class_animationnode.html" "{c}")


file:///home/edrx/bigsrc/godot-docs/_build/html/about/faq.html#how-can-i-extend-godot

# (find-gd3doc "about/faq#how-can-i-extend-godot")




;; (find-find-links-links-new "mbe" "ch page str" "nch")

# (find-mbe01page 35 "1.8.11 Taylor and Laurent Series Expansions with taylor")
# (find-mbe01text 35 "1.8.11 Taylor and Laurent Series Expansions with taylor")
       (find-books "__comp/__comp.el" "maxima-by-example")
       (find-angg ".emacs.papers" "maxima-by-example")








;; (find-eev "eev-blinks.el" "find-eww")

;; (find-angg ".emacs.templates" "code-etv")
;; (find-angg ".emacs.templates" "code-etv2")


(defun find-scor (cmd)
  (interactive (list "grep angg"))
  (find-estring (buffer-substring (point) (mark)))
  (call-process-region nil nil "grep angg" t))


  (let* ((bigstr (buffer-substring (point) (mark))))
    (find-estring bigstr)
    (let ((current-prefix-arg 1))
      (shell-command-on-region (point-min) (point-max) cmd))))


(find-es "emacs" "shell-command-on-region")

# (find-efunctiondescr 'call-process-region)

# (find-efunction 'find-callprocessregion)


(defun foo ()
  (interactive)
  (find-estring (find-callprocessregion "grep angg" (ee-region))))

    (buffer-substring (point) (mark)))))

(defun ee-cpr (cmd) (find-estring (find-callprocessregion cmd (ee-region))))
(defun grim () (interactive) (ee-cpr '("grep" "(%i")))




a (%i10) foo
a (%o10) foo

(defun foo () (interactive) (call-process-region nil nil "grep angg"))
(defun foo () (interactive) (call-process-region nil nil "grep angg" t))


START END PROGRAM &optional DELETE BUFFER DISPLAY
&rest ARGS)









(defun C-u-clang-format-shell-command-on-region ()
  (interactive)
  (let ((args (list (region-beginning) (region-end)
		    "clang-format" ; was: string
		    t              ; current-prefix-arg
		    t              ; current-prefix-arg
		    shell-command-default-error-buffer
		    t
		    (region-noncontiguous-p))))
    (apply 'shell-command-on-region args)))

(global-set-key (kbd "C-c f") 'C-u-clang-format-shell-command-on-region)






;;       (find-sh0 "~/LUA/Deps1.lua -runcps 'Caepro4 ELpeg-cme1'")










(defvar ee-subs-c        "{ee-subs-c}")
(defvar ee-subs-hash     "{ee-subs-hash}")
(defvar ee-subs-mp4stem  "{ee-subs-mp4stem}")
(defvar ee-subs-pagestem "{ee-subs-pagestem}")
(defvar ee-subs-length   "{ee-subs-length}")
(defvar ee-subs-short    "{ee-subs-short}")

(setq ee-subs-c        "{ee-subs-c}")
(setq ee-subs-hash     "{ee-subs-hash}")
(setq ee-subs-mp4stem  "{ee-subs-mp4stem}")
(setq ee-subs-pagestem "{ee-subs-pagestem}")
(setq ee-subs-length   "{ee-subs-length}")
(setq ee-subs-short    "{ee-subs-short}")

(defun ee-subs-setqs-1 (c)
  (setq ee-subs-c        c)
  (setq ee-subs-hash     (ee-1stclassvideos-hash c))
  (setq ee-subs-mp4stem  (ee-1stclassvideos-mp4stem c))
  (setq ee-subs-length   (ee-1stclassvideos-field c :length)))


;; <find-subs-links>
;; Skel: (find-find-links-links-new "subs" "c" "")
;; Test: (find-subs-links)
;;       (find-subs-links "eev2021")
;;       (find-subs-links "eev20219")
;;
(defun find-subs-links (&optional c &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for subs."
  (interactive)
  (setq c (or c "{c}"))
  (apply
   'find-elinks-elisp
   `((find-subs-links ,c ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-subs-links)
     ""
     ,(ee-subs-setqs-links c)
     ""
     ,(if (assoc c ee-1stclassvideos-info)
	  (ee-subs-setqs-1stclass-links c)
	(ee-template0 ";; Not first class: \"{c}\""))
     )
   pos-spec-list))

;; <find-subs-lua-links>
;; Skel: (find-find-links-links-new "subs-lua" "" "")
;; Test: (find-subs-lua-links)
;;
(defun find-subs-lua-links (&rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for subs-lua."
  (interactive)
  (apply
   'find-elinks
   `((find-subs-lua-links ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-subs-lua-links)
     (find-efunction 'ee-subs-lua-header-links)
     (find-efunction 'ee-subs-lua-code-links)
     (find-subs-lua-links ,ee-subs-c)
     ""
     ,(ee-template0 "\
")
     ,(ee-subs-lua-header-links)
     ,(ee-subs-lua-code-links)
     )
   pos-spec-list))



;; Test:
;; (find-estring (ee-subs-lua-header-links))
(defun ee-subs-lua-header-links ()
  (ee-template0 "\
-- This file:
--   http://anggtwu.net/SUBTITLES/{ee-subs-mp4stem}.lua.html
--   http://anggtwu.net/SUBTITLES/{ee-subs-mp4stem}.lua
--          (find-angg \"SUBTITLES/{ee-subs-mp4stem}.lua\")
-- Author: Eduardo Ochs <eduardoochs@gmail.com>
--
-- (defun l () (interactive) (find-angg \"SUBTITLES/{ee-subs-mp4stem}.lua\"))
-- (defun b () (interactive) (find-TH             \"{ee-subs-mp4stem}\"))
-- (defun p () (interactive) (find-TH             \"{ee-subs-pagestem}\"))
-- (defun R () (interactive) (ee-recompile-SUBTITLES-0))
-- (defun r () (interactive) (ee-recompile-SUBTITLES-3))
-- (defun r () (interactive) (ee-recompile-SUBTITLES-1))
--  (define-key eev-mode-map (kbd \"M-r\") 'r)
--
-- Skel: (find-subs-links \"{ee-subs-c}\")
-- Old:  (find-editeevsubtitles-links-1 \"{ee-subs-c}\")
--       (find-efunction 'find-editeevsubtitles-links-1)
-- Yttr: (find-yttranscript-links       \"{ee-subs-c}\" \"{ee-subs-hash}\")
-- Info: (find-1stclassvideo-links      \"{ee-subs-c}\")
-- Play: (find-{ee-subs-c}video \"0:00\")
--
-- I use the code below to generate the subtitles in .vtt.
--
"))

;; Test:
;; (find-estring (ee-subs-lua-code-links))
(defun ee-subs-lua-code-links ()
  (ee-template0 "\
--[[
-- (find-angg \"LUA/Subtitles.lua\")

** Run the .lua and tell it to
** write the .vtt - by default in /tmp/
*
* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)
dofile \"{ee-subs-mp4stem}.lua\"
sts = Subtitles.fromsexps(subs_bigstr):addtime(\"{ee-subs-length}\")
-- sts.lang = \"pt-BR\"
= sts
outfname = \"$S/http/anggtwu.net/eev-videos/{ee-subs-mp4stem}.vtt\"
outfname =                           \"/tmp/{ee-subs-mp4stem}.vtt\"
out = sts:vtt()..\"\\n\\n\"
ee_writefile(outfname, out)
-- (find-fline                       \"/tmp/{ee-subs-mp4stem}.vtt\")

** Test the .vtt
** (find-{ee-subs-c}video \"0:00\")

** Select /tmp/ or ee-eevvideosdir
** (find-eevvideosfile \"\")
** (find-eevvideosfile \"\"   \"{ee-subs-mp4stem}.mp4\")
** (find-eevvideossh0 \"cp -v {ee-subs-mp4stem}.mp4 /tmp/\")
** (code-video \"{ee-subs-c}video\"                           \"/tmp/{ee-subs-mp4stem}.mp4\")
** (code-video \"{ee-subs-c}video\" \"$S/http/anggtwu.net/eev-videos/{ee-subs-mp4stem}.mp4\")
** (find-{ee-subs-c}video \"0:00\")

** Upload the {ee-subs-mp4stem}.vtt
** to http://anggtwu.net/eev-videos/
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd /tmp/
scp    {ee-subs-mp4stem}.vtt $LINP/eev-videos/
scp    {ee-subs-mp4stem}.vtt $LINS/eev-videos/
Scp-np {ee-subs-mp4stem}.vtt $TWUP/eev-videos/
Scp-np {ee-subs-mp4stem}.vtt $TWUS/eev-videos/

** Upload the subtitles to youtube
** http://www.youtube.com/watch?v={ee-subs-hash}

** Check that the \"psne subtitles\" thing works
** (find-1stclassvideo-links \"{ee-subs-c}\")

--]]

--[[
* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)
dofile \"{ee-subs-mp4stem}.lua\"
for li in subs_bigstr:gmatch(\"([^\\n]+)\") do
  local time,text = li:match('^.-\"(.-)\".-\"(.*)\"%)$')
  text = text:gsub(\"\\\\(.)\", \"%1\")
  if time then print(\"  \"..time..\"  \"..text) end
end

--]]


subs_bigstr = [==[
\(find-{ee-subs-c}video \"00:00\" \" \")
]==]

unrevised_bigstr = [==[
\(find-{ee-subs-c}video \"00:00\" \" \")
]==]

-- Local Variables:
-- coding:  utf-8-unix
-- End:"))


;; Test:
;; (find-estring (ee-subs-blogme3-links))
(defun ee-subs-blogme3-links ()
  (ee-template0 "\
[INCLUDE TH/speedbar.blogme]
[SETFAVICON dednat4/dednat4-icon.png]
[SETFAVICON IMAGES/forthsun.png]
[# 
(defun c () (interactive) (find-blogme3-sh0-if \"{ee-subs-mp4stem}\"))
(defun u () (interactive) (find-blogme-upload-links \"{ee-subs-mp4stem}\"))
(defun u () (interactive) (find-blogme3-st-up-links \"{ee-subs-mp4stem}\"))
(defun l () (interactive) (find-angg \"SUBTITLES/{ee-subs-mp4stem}.lua\"))
(defun b () (interactive) (find-TH \"{ee-subs-mp4stem}\"))
(defun p () (interactive) (find-TH \"{ee-subs-pagestem}\"))
;;     http://anggtwu.net/{ee-subs-pagestem}.html
;;     http://anggtwu.net/{ee-subs-mp4stem}.html
;; file:///home/edrx/TH/L/{ee-subs-mp4stem}.html
;;
;; (find-blogme3-legendas-links \"{ee-subs-c}\" \"{ee-subs-mp4stem}\" \"{ee-subs-hash}\")
#]
[lua:
  require \"defs-2022\"    -- (find-blogme3 \"defs-2022.lua\")
  load_caepro4()         -- (find-blogme3 \"defs-2022.lua\" \"load_caepro2\")
  short_:add [[
    caepro      => (find-TH \"2023-caepro\")
    caepro      ->           2023-caepro.html

                      (find-1stclassvideo-links \"{ee-subs-c}\")
    {ee-subs-c}-page   -> http://anggtwu.net/{ee-subs-pagestem}.html
    {ee-subs-c}-mp4    -> http://anggtwu.net/eev-videos/{ee-subs-mp4stem}.mp4
    {ee-subs-c}-lua    => (find-angg    \"SUBTITLES/{ee-subs-mp4stem}.lua\" \"legendas\")
    {ee-subs-c}-leg    => (find-TH                \"{ee-subs-mp4stem}\")
    {ee-subs-c}-pdf    -> http://anggtwu.net/LATEX/2023-caepro.pdf
    {ee-subs-c}-video  -> https://www.youtube.com/watch?v={ee-subs-hash}
    {ee-subs-c}-index  => (find-1stclassvideoindex \"{ee-subs-c}\")

  ]]
]
[SETHEADSTYLE [LUCIDA]]
[htmlize8 [J \"Isso muda alguma coisa?\" (Sobre as reclamações do CAEPRO)]

[P The main page about this video is [_ {ee-subs-c}-page here].
[BR] Its index is [_ {ee-subs-c}-index here].
[BR] Its subtitles in Lua are [_ {ee-subs-c}-lua here].
[BR] The rest of this page contains a conversion of the subtitles in Lua
[BR] to a slightly more readable format.
]

[NARROW
[PLEFT
  [FIG [__ {ee-subs-c}-video]
          IMAGES/{ee-subs-mp4stem}-small.png]
]
]

[br]

[P
[lua:
-- (find-angg \"SUBTITLES/{ee-subs-mp4stem}.lua\")
-- (find-angg \"LUA/Subtitles.lua\" \"Subtitles\")
-- (find-TH \"2021aulas-por-telegram\" \"legendas\" \"ipairs\")
-- (find-fline \"~/SUBTITLES/{ee-subs-mp4stem}.lua\")
ee_dofile      \"~/SUBTITLES/{ee-subs-mp4stem}.lua\"
-- (find-fline \"~/LUA/Subtitles2.lua\")
ee_dofile      \"~/LUA/Subtitles2.lua\"

Subtitle.hash = \"{ee-subs-hash}\"
sls = SubtitleLines.from(subs_bigstr)
return sls:blogme()

]
]


]
[#
 # Local Variables:
 # coding: utf-8-unix
 # modes: (fundamental-mode blogme-mode)
 # End:
#]"))






;; (find-estring (ee-find-luademo-scp-1 "LUA/foo"))


;; (find-find-links-links-new "expands" "fstem var words")











;; Skel: (find-expands-links "find-luademo-scp" "fname" "LUA/foo LUA/bar")
;; Tests: (find-estring (ee-find-luademo-scp1 "LUA/foo"))
;;        (find-estring (ee-find-luademo-scps "LUA/foo LUA/bar"))
;;
(defun ee-find-luademo-scp1 (fname)
  (ee-expand "\
scp     {fname}      $LINP/{fname}
scp     {fname}.html $LINP/{fname}.html\n"))

(defun ee-find-luademo-scps (bigstr)
  (mapconcat 'ee-find-luademo-scp-1 (ee-split bigstr)))



;; (find-books "__analysis/__analysis.el" "leithold" "6,18-71")





# https://mail.google.com/mail/u/0/#inbox/KtbxLrjVjnGXBssLpnZKBXnSRTHhJjgxtg

;; (find-find-links-links-new "semestre-emacs" "yy s MM yyo so" "mm")
;; Skel: (find-find-links-links-new "semestre-MM-quadros" "yy s MM yyo so" "mm")


(defun lua-goto-error () (interactive)
  (let (str fname linenum)
    (setq str (buffer-substring (ee-search-backward "\n")
				(ee-search-forward "\n")))
    (string-match "line \\([0-9]+\\) \\[file `\\(.*\\)'\\]" str)
    (setq fname (match-string 2 str))
    (setq linenum (read (match-string 1 str)))
    (find-fline fname linenum)))


;; (find-efunction 'ee-find-psne-core)
;; (find-es "squeak" "install-2023")


;; (find-find-links-links-new "squeak-install" "url" "localurl localdir fname0 stemv stemvv")

;; https://files.squeak.org/6.0/Squeak6.0-22104-64bit/Squeak6.0-22104-64bit-202206021410-Linux-x64.tar.gz

;; <find-squeak-install-links>
;; Skel: (find-find-links-links-new "squeak-install" "url" "localurl localdir fname0 stemv stemvv")
;; Test: (find-squeak-install-links)
;;       https://files.squeak.org/6.0/Squeak6.0-22104-64bit/Squeak6.0-22104-64bit-202206021410-Linux-x64.tar.gz
;;
(defvar ee-squeak-tgz-url
  "https://files.squeak.org/6.0/Squeak6.0-22104-64bit/Squeak6.0-22104-64bit-202206021410-Linux-x64.tar.gz"
  "Used by `find-squeak-install-links'.")

(defun find-squeak-install-links (&optional url &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for squeak-install."
  ;; (interactive (browse-url-interactive-arg "URL: "))
  (interactive)
  (setq url (or url ee-squeak-tgz-url))
  (let* ((localurl (ee-url-to-fname0 url))
         (localdir (file-name-directory localurl))
         (fname0   (file-name-nondirectory localurl))
         (stemv    (substring fname0 0 9))
         (stemvv   (substring fname0 0 15)))
    (apply
     'find-elinks
     `((find-squeak-install-links ,url ,@pos-spec-list)
       ;; Convention: the first sexp always regenerates the buffer.
       (find-efunction 'find-squeak-install-links)
       ""
       ,(ee-template0 "\

# https://squeak.org/downloads/
# {url}

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd ~/SQUEAK/
tar -tvzf {localurl}
# rm -Rv ~/SQUEAK/{stemv}*
mkdir -p ~/SQUEAK/{stemvv}/
tar -C   ~/SQUEAK/{stemvv}/ \\
    --strip-components=1 \\
    -xvzf {localurl}

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd  ~/SQUEAK/{stemvv}/
./squeak.sh

# Copy this to your .bashrc or .zshrc:
# From: (find-angg \".zshrc\" \"mysqueak\")
function mysqueak () { cd ~/SQUEAK/{stemvv}/ && ./squeak.sh & }

# Test:
mysqueak

# (code-c-d \"squeakshared\" \"~/SQUEAK/{stemvv}/shared/\")
# (find-squeaksharedfile \"\")
# (find-squeaksharedsh \"strings release-notes/6.0\")
# (find-squeaksharedsh \"find * | sort\")

# (find-angg \".zshrc\" \"mysqueak\")
# (find-books \"__comp/__comp.el\" \"squeak-by-example\")

")
       )
     pos-spec-list)))




;; <find-ajuda-jpgs-links>
;; Skel: (find-find-links-links-new "ajuda-jpgs" "stem" "")
;; Test: (find-ajuda-jpgs-links)
;;       (find-ajuda-jpgs-links "2023-jan-05_WhatsApp_SetMat")
;;
(defun find-ajuda-jpgs-links (&optional stem &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for ajuda-jpgs."
  (interactive)
  (setq stem (or stem "{stem}"))
  (apply
   'find-elinks
   `((find-ajuda-jpgs-links ,stem ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-ajuda-jpgs-links)
     ""
     ,(ee-template0 "\
% (find-jpgstopdf-links \"~/LATEX/2022-comissao/\" \"{stem}\")


% (ajup 99)
% (find-ajuda-jpgs-links \"{stem}\")
% (find-pdf-page \"~/LATEX/2022-comissao/{stem}.pdf\")
\\includecom {<}pages=-,nup=3x2, frame, pagecommand={<}{>}, scale=0.8{>}
                         {<}{stem}{>}
")
     )
   pos-spec-list))





(define-skeleton cf-sql-table
    "Prepare the SQL table for Central Files database design."
  nil
  "
-- ------------------------------------------
-- ------------ Table " (setq table (skeleton-read "Table name: ")) "
-- ------------------------------------------
DROP SEQUENCE " table "_id_seq;

CREATE TABLE " table " (
" table "_id SERIAL NOT NULL PRIMARY KEY,
" table "_uuid UUID NOT NULL DEFAULT gen_random_uuid() UNIQUE,
" table "_datecreated TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,
" table "_datemodified TIMESTAMP,
" table "_usercreated TEXT NOT NULL DEFAULT current_user,
" table "_usermodified TEXT NOT NULL DEFAULT current_user,
" table "_name TEXT,
" table "_title TEXT,
" table "_description TEXT,
" table "_ TEXT
);
GRANT ALL ON " table " TO PUBLIC;
DROP VIEW " table "_combo;
CREATE OR REPLACE VIEW " table "_combo AS
SELECT " table "_id AS id,
" table "_name AS TEXT
FROM " table ";
GRANT SELECT ON " table "_combo TO PUBLIC;
COMMENT ON TABLE " table " IS '" (capitalize table) "';
COMMENT ON COLUMN " table "." table "_id IS 'ID';
COMMENT ON COLUMN " table "." table "_uuid IS 'UUID';
COMMENT ON COLUMN " table "." table "_datecreated IS 'Date created';
COMMENT ON COLUMN " table "." table "_datemodified IS 'Date modified';
COMMENT ON COLUMN " table "." table "_usercreated IS 'User created';
COMMENT ON COLUMN " table "." table "_usermodified IS 'User modified';
COMMENT ON COLUMN " table "." table "_name IS 'Name';
COMMENT ON COLUMN " table "." table "_description IS 'Description';
COMMENT ON COLUMN " table "." table "_IS '';

CREATE UNIQUE INDEX " table "_index ON " table " ( " table "_name );

-- INSERT INTO " table " (" table "_name) VALUES ('');
-- INSERT INTO meta_tables VALUES ('" table "', 'hide', '1');

-- Triggers
-- For Date Modified
CREATE TRIGGER " table "_moddatetime
BEFORE UPDATE ON " table "
FOR EACH ROW
EXECUTE PROCEDURE moddatetime(" table "_datemodified);

-- For User Modified
CREATE TRIGGER insert_username_" table "
BEFORE INSERT OR UPDATE ON " table "
FOR EACH ROW
EXECUTE PROCEDURE insert_username(" table "_usermodified);

")


(cl-loop as s = "cab"
	 for re in '("^a." "b$")
	 for i from 0
	 if (string-match-p re s)
	 return i)






(setq rcd-people-sqlite-database "/tmp/my-test.sqlite")

;; Provide connection handle, as there could be multiple accesses,
;; each handle is entry to database in its own

(defvar rcd-people-sqlite-db nil
  "Database handle for RCD People Management.")

;; Connect to database

(defun rcd-people-sqlite-connect ()
  "Connect to RCD People Management by using SQLite."
  (setq rcd-people-sqlite-db
	(sqlite-open
	 rcd-people-sqlite-database)))

;; Test: (rcd-people-sqlite-connect)
;; ➜ #<sqlite db=0x561e49445cc0 name=/home/data1/protected/my-test.sqlite>

;; Some helper functions

(setq rcd-sqlite-logging nil)

(defun rcd-sqlite-select-p (sql)
  "Return TRUE if SQL starts with \"SELECT\"."
  (string-match (rx line-start (zero-or-more blank) "SELECT") sql))

(defun rcd-sqlite (sql db &rest parameters)
  "Sends SQL queries to SQLIte database and return results.
db is database handle."
  (prog1
      (condition-case err
          (cond ((rcd-sqlite-select-p sql) (apply 'sqlite-select db sql parameters))
                (t (apply 'sqlite-execute db sql parameters)))
        (error err
               (message "Signal error: %s" err)
               ))
    (when rcd-sqlite-logging
      (funcall rcd-sqlite-message-function "%s"
               (replace-regexp-in-string  (rx (one-or-more (or "\n" (any whitespace)))) " " (string-trim sql))))))

(defvar rcd-sqlite-message-function 'rcd-message
  "The RCD SQLite message function, like the function `message-box'.")

;; Create first table of information

(rcd-sqlite "CREATE TABLE books (
            books_id INTEGER NOT NULL PRIMARY KEY,
            books_datecreated TEXT NOT NULL DEFAULT (datetime()),
            books_name TEXT NOT NULL,
            books_author TEXT,
            books_location TEXT) STRICT"
            rcd-people-sqlite-db)

(rcd-sqlite "CREATE TABLE books (
            books_id INTEGER NOT NULL PRIMARY KEY,
            books_datecreated TEXT NOT NULL DEFAULT (datetime()),
            books_name TEXT NOT NULL,
            books_author TEXT,
            books_location TEXT)"
            rcd-people-sqlite-db)

;; What is inside of table?

;; Test:
;; (rcd-sqlite "SELECT * FROM books" rcd-people-sqlite-db)
;; ➜ nil

;; Create insert function

(defun new-book ()
  (let* ((name (read-string "Book name: "))
         (location (read-string "Location: "))
         (author (read-string "Author: ")))
    (rcd-sqlite "INSERT INTO books
                             (books_name, books_author, books_location)
                      VALUES (?, ?, ?)"
                rcd-people-sqlite-db (list name author location))))

;; Test: (new-book)
;; -> 1

;; What is inside of table?

;; (rcd-sqlite "SELECT * FROM books" rcd-people-sqlite-db)
;; ➜ ((1 "2023-01-08 21:27:49" "My book ABC" "Joe Doe" "On the shelf"))

;; Delete entry

;; (rcd-sqlite "DELETE FROM books WHERE books_name = 'My book ABC'" rcd-people-sqlite-db)
;; ➜ 1

;; What is inside of table?

;; (rcd-sqlite "SELECT * FROM books" rcd-people-sqlite-db)
;; ➜ nil

(fboundp nil)
	 


(defvar ee-tap-kind   nil)
(defvar ee-tap-result nil)
(defvar ee-tap-string nil)

(defun ee-tap (kind)
  (let ((result (thing-at-point kind)))
    (if (stringp result)
	(ee-no-properties result)
      result)))


(defun ee-detect-here ()
  "To understand this, run `find-here-links' with a prefix argument.
This is the standard high-level way to call `ee-hlang-run'."
  (ee-hlang-run ee-hlang-main-program))




<bpalmer> I'd use loop or cl-loop, myself: (loop for kind in '(uuid
          email symbol) as tap = (thing-at-point kind) if tap
          return (cons kind tap))







;; Tests:
;; (ee-button-sexp-text nil        nil)
;; (ee-button-sexp-text nil      "foo")
;; (ee-button-sexp-text '(+ 1 2)   nil)
;; (ee-button-sexp-text '(+ 1 2) "foo")
;;
(defun ee-button-sexp-text (sexp text)
  (if sexp
      (if text
	  "ok"				; if      sexp  and      text
	(setq text (ee-S sexp)))	; if      sexp  and (not text)
    (if text
	(setq sexp (read text))		; if (not sexp) and      text
      (setq sexp nil text " ")))	; if (not sexp) and (not text)
  (list sexp text))

;; See: (find-kla-intro "9. `cl-defun'")
;;
(cl-defun ee-makebutton
    (&key sexp text help-echo)
  (let ((st (ee-button-sexp-text sexp text)))
    (setq sexp (car st))
    (setq text (cadr st)))
  (let ((callback `(lambda (_) ,sexp)))
    (buttonize text callback nil help-echo)))

;; Tests:
;; (find-eemakebutton :sexp '(message "foo") :text "Foo")
;; (find-eemakebutton :sexp '(find-efunctiondescr 'car))
;; (find-eemakebutton :sexp '(find-efunctiondescr 'car) :help-echo "HELP")
;;
(defun find-eemakebutton (&rest rest)
  (find-estring (apply 'ee-makebutton rest)))

(defun ee-B (sexp)
  (ee-H (ee-makebutton :sexp sexp)))

;; The sexp below is commented out with a "'".
;; To test it go to its last line and type `M-e'. 
;; 
' (find-elinks
   `((foo)
     (bar)
     (find-efunctiondescr 'car)
     ,(ee-H "plic")
     ,(ee-H (ee-makebutton :sexp '(+ 1 2)))
     ,(ee-H (ee-makebutton :sexp '(find-efunctiondescr 'car)))
     ""
     (find-efunctiondescr 'car)
     ,(ee-B '(find-efunctiondescr 'car))
     ))




(find-estring (ee-makebutton :sexp '(message "foo") :text "Foo"))
(find-estring (ee-makebutton :sexp '(find-efunctiondescr 'car)))
(find-estring (ee-makebutton :sexp '(find-efunctiondescr 'car) :help-echo "HELP"))



  
;; (find-efunctiondescr 'buttonize)


(setq a "a" b "b")
  (list sexp text))

(ee-makebutton)
(ee-makebutton :foo)
(ee-makebutton :sexp 0 :text 1)










;; Test: (ee-buffers-with-major-mode 'sly-mrepl-mode)
;;
(defun ee-buffers-with-major-mode (majormode)
  (cl-loop for b in (buffer-list)
	   if (eq (with-current-buffer b major-mode) majormode)
	   collect b))

(defun ee-geiserprocess-buffer ()
  (car (ee-buffers-with-major-mode 'geiser-repl-mode)))

(defun find-geiserprocess-reuse ()
  (if (ee-geiserprocess-buffer)
      (find-ebuffer (ee-geiserprocess-buffer) :end)
    (error "No geiser-repl-mode buffer")))

(defun find-geiserprocess-create ()
  (if (ee-geiserprocess-buffer)
      (error "Error: a geiser-repl-mode buffer exists")
    (save-window-excursion (geiser 'racket))
    (find-ebuffer (ee-geiserprocess-buffer) :end)))


(find-geiserprocess-reuse)
(find-geiserprocess-create)

(find-ebuffer nil)



;; «find-slyprocess»  (to ".find-slyprocess")




pla --video-margin-ratio-bottom=0.15 --sub-font-size=35


(find-efunction 'Info-goto-node-web)
(find-blogme3 "sandwiches-defs.lua" "code_c_m_bs")
(find-epackages 'eev)
(find-epackages 'editorconfig)
(find-epp nlines-and-names)


(find-2a
  ' (find-eatprocess-pa "lua5.1")
  ' (find-eatprocess-pa "lua5.1" 2))


(eepitch '(find-eatprocess-pa "lua5.1" 2))

Need help with: go to (point-max) and simulate that the user type BLAH RET





(defun find-eatprocess-n (name)
  (find-eatprocess00 (format "eat: %s" name) (list name)))


(defun find-eatprocess0 (&optional name program-and-args)
  (cond ((and name program-and-args)
	 (find-eatprocess00 name (ee-split program-and-args)))
	(name
	 (find-eatprocess00 name (format 

   ((not name)
	 (find-eatprocess00
	  (format "eat: %s" (ee-unsplit program-and-args))))
	(not program-and-args
 (name program-and-args)


  (setq name (or name (format "eat: %s" (ee-unsplit program-and-args))))
  (setq program-and-args (or program-and-args name))
  (find-eatprocess00 name (ee-split program-and-args)))



(defun ee-unsplit (list) (if (listp list) (mapconcat 'identity list " ") list))


(find-eatprocess0 "eat: lua5.1" '("lua5.1"))





                  `("sh" "-c" ,program)))


	(process 

(defun eat-exec (buffer name command startfile switches)
  "Start up a process in BUFFER for Eat mode."
  (with-current-buffer buffer
    (unless (eq major-mode #'eat-mode)
      (eat-mode))
    (pop-to-buffer-same-window buffer)
    (unless eat--process
      (eat-exec buffer "eat" "/usr/bin/env" nil
                `("sh" "-c" ,program)))
    buffer)))









;; This is a simplified version of:
;; (find-efunction 'ee-goto-position)
;; http://angg.twu.net/eev-current/eev-blinks.el.html#ee-goto-position
(defun ee-goto-position-mini (&optional str &rest strs)
  (when str
    (goto-char (point-min))
    (search-forward str)
    (dolist (s strs)
      (search-forward s))))

;; This is a simplified version of:
;; (find-efunction 'find-dbsw-call)
;; http://angg.twu.net/eev-current/eev-blinks.el.html#find-dbsw
(defun find-dbsw-call-mini (sexp &rest pos-spec-list)
  (let ((display-buffer-overriding-action '(display-buffer-same-window)))
    (eval sexp))
  (apply 'ee-goto-position-mini pos-spec-list))

(find-dbsw-call-mini '(customize-group 'editing)     "Parent")
(find-dbsw-call-mini '(describe-function 'next-line) "line-move-visual")
(find-dbsw-call-mini '(list-input-methods)           "TeX")
(find-dbsw-call-mini '(describe-input-method 'TeX)   "\\bullet")

;; (find-eev "eev-blinks.el" "find-wottb")

# (find-customizegroup 'editing)
# (find-customizegroup 'editing "Parent")

(defun find-einputmethods-mini (&rest pos-spec-list)
  (interactive)
  (apply 'find-dbsw-call-mini '(list-input-methods)
	 pos-spec-list))

(find-einputmethods-mini "TeX")





(ee-goto-position-mini "Aut")
(ee-goto-position-mini "Aut" "fun")

(find-blogme3file "anggdefs.lua")






;; (find-tikz1-links 2 "2. Download the manual")
;; Tests: (find-editeevsubtitles-links-1 "2022yttranscript")



;; (ee-kl-prefixp "foo" "foobar")
;; (ee-kl-prefixp "foo" "plicbar")

https://www.youtube.com/watch?v=dokL0U7fIPI



https://www.youtube.com/watch?v=Gr86qigx1_g

;; (find-eev "eev-rstdoc.el" "basic-ops" "(defun ee-rstdoc-stem")

;; The original is here:
;; (find-eev "eev-kla.el" "ee-kl-expand")
;; Hacked version:
;;
(defun ee-kl-expand (fname)
  (ee-kl-transform (ee-expand fname)))

(defun ee-kl-transform (fname)
  (cl-loop for (regexp repl) in ee-kl-transforms
	   do (setq fname (replace-regexp-in-string regexp repl fname)))
  fname)

(setq ee-kl-transforms
      '(("/.local/straight/build-28.1/"
	 "/.local/straight/repos/")))


;; Test:
;; (ee-kl-expand "a/.local/straight/build-28.1/b")
;; (ee-kl-expand "a/.local/straight/repos/b")



gods of ragnak

(nth 2 '(a b c d))


(find-eppp (ee-kl-good-cds (ee-expand "~/eev-current/eev-kla.el")))
(find-eppp (ee-kl-good-cds (ee-expand ee-orgdir)))


(find-anggfile ".emacs" "(defun ee-remove-prefix")







;; Based on: (find-angg "LUA/tikz1.el" "tib")
;;
(defun ee-wrap-region (pre post)
  (interactive)
  (call-interactively 'kill-region)
  (insert pre)
  (call-interactively 'yank)
  (insert post))

(defun foos () (interactive) 
  (ee-wrap-region "\n\\ssk\n{\n\n\\footnotesize\n" "\n}\n"))

(defun scrs () (interactive) 
  (ee-wrap-region "\n\\ssk\n{\n\n\\scriptsize\n" "\n}\n"))





;; <find-tikz1-exercises-links>


;; (find-eev "eev-blinks.el" "find-eregionpp")

(defun ee-save-region-in-a (b e)
  (interactive "r")
  (setq a (buffer-substring b e)))

;; a
;; (setq b (ee-string-intervals a))
;; (ee-string-intervals-omit b '(fontified))

;; (inspect-expression-b   '(b))


(defun ee-string-intervals-omit (intervals0 props-to-omit)
  (cl-loop for (string . pairs0) in intervals0
	   for pairs1 = (cl-loop for (a b) in pairs0
				 unless (memq a props-to-omit)
				 collect (list a b))
	   collect (cons string pairs1)))

(defun ee-eregionpp-preprocess (intervals0 arg)
  "Redefine this if you want ways to omit certain properties."
  (if (not arg)
      intervals0
    (ee-string-intervals-omit
     intervals0
     '(fontified help-echo mouse-face))))






  (cl-loop for (b e props) in (object-intervals str)
	   for s = (substring-no-properties str b e)
	   for pairs = (cl-loop for (x y) on props by 'cddr
				collect (list x y))
	   collect (cons s (ee-sort-pairs pairs))))


(defun ee-eregionpp-preprocess (intervals0 arg)
  "Redefine this if you want ways to omit certain properties."
  (if (not arg)
      intervals0
    (cl-loop for (str . pairs0) in intervals0
             for pairs1 = (cl-loop for (a b) in pairs0
                                   unless (memq a ee-omit)
                                   collect (list a b))
             collect (cons str pairs1))))





(let ((be4 '(10 20 30 40)))
  (cl-destructuring-bind
      (bo bi ei eo) be4
    (list bi ei)))



(defun rcd-button-insert (button-text action-function &optional how-many revert-key revert-value)
  "Insert button BUTTON-TEXT with ACTION-FUNCTION.
Optional number HOW-MANY adds superscript digits to BUTTON-TEXT."
  (let* ((revert-key (or revert-key "revert-key"))
	 (revert-key (intern revert-key))
	 (revert-value (or revert-value button-text)))
    (insert-text-button button-text
			'action
			action-function
			'follow-link t
			revert-key revert-value)
    (when how-many
      (insert (rcd-superscript-digits how-many)))))




;; (ee-sort-pairs '((a b) (g h) (c d) (e f) (aa bb)))
;; (ee-delete-pairs '((a b) (g h) (c d) (e f) (aa bb)) '(a c))
;; (ee-properties-to-pairs '(a b g h c d e f aa bb))
	 

;; (find-efunction 'find-eregionpp)
;; (kill-new "a[[http://b/][c]]d")
;; (find-fline "/tmp/foo.org")
;; (setq foostr (with-current-buffer "foo.org" (buffer-string)))
;; (find-epp foostr)
;; (find-epp (ee-string-intervals foostr))

(defun ee-delete-pairs (pairs cars)
  (cl-loop for (a b) in pairs
	   unless (memq a cars)
	   collect (list a b)))


;; Test: create a file /tmp/foo.org containing "a[[http://b/][c]]d",
;; then run:
;;
(setq foostr (with-current-buffer "foo.org" (buffer-string)))
(setq oi (object-intervals foostr))
(setq dheads '(font-lock-multiline keymap))
(setq dheads '(face font-lock-multiline fontified help-echo htmlize-link keymap mouse-face))
(setq sis (ee-string-intervals foostr dheads))
(find-epp sis)


;; (find-eppp oi)
;; (find-epp (ee-string-intervals foostr))
;; (ee-delete-pairs '((a b) (c d) (e f) (g h)) '(a e))
;; (member 4 '(3 5 7))
;; (member 4 '(3 5 4 7))

(ee-string-intervals (buffer-substring "foo.org")




;; Tests: (find-telegachat "@emacs_telega")
;;        (find-telegachat "875557521")
;;        (find-telegachat 875557521 "Vagner Rener")
;; Tests: (find-telegachat-links "◀[telega.el@emacs_telega]")
;;        (find-telegachat-links "◀{Vagner Rener}")


(telega-chat-username tcchat)

(setq tcbuf  "◀[telega.el@emacs_telega]")
(setq tcbuf  "◀{Vagner Rener}")
(setq tcchat (with-current-buffer tcbuf telega-chatbuf--chat))
(find-eppp tcchat)
(plist-get tcchat :chat_id)
(plist-get tcchat :title)
(plist-get tcchat :id)
(plist-get chat-or-msg :chat_id)
(telega-tme-internal-link-to tcchat)





;; <find-telegachat-links>
;; Skel: (find-find-links-links-new "telegachat" "bufname" "chat username")
;; Test: (find-telegachat-links)
;;
(defun find-telegachat-links (&optional bufname &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for telegachat."
  (interactive (list (buffer-name)))
  (setq bufname (or bufname "{bufname}"))
  (let* ((username "{username}"))
    (apply
     'find-elinks
     `((find-telegachat-links ,bufname ,@pos-spec-list)
       ;; Convention: the first sexp always regenerates the buffer.
       (find-efunction 'find-telegachat-links)
       ""
       (find-ebuffer ,bufname)
       (find-telegachat ,atname)
       ""
       ,(ee-template0 "\
")
       )
     pos-spec-list)))



  (let* ((atname (replace-regexp-in-string "^[^@]*\\(@.*\\)\\]$" "\\1" bufname)))
    (apply
     'find-elinks
     `((find-telegachat-links ,bufname ,@pos-spec-list)
       ;; Convention: the first sexp always regenerates the buffer.
       (find-efunction 'find-telegachat-links)
       ""
       (find-ebuffer ,bufname)
       (find-telegachat ,atname)
       ""
       ,(ee-template0 "\
")
       )
     pos-spec-list)))


;; (replace-regexp-in-string "^[^@]*\\(@.*\\)\\]$" "\\1" "◀[telega.el@emacs_telega]")


# (find-telegachat "Vagner Rener")

(telega-tme-open-tg "tg:telega:@emacs_telega")

(find-dbsw-call '(telega-tme-open-tg "tg:telega:@emacs_telega"))








(defun foo-lines ()
  (setq foo-lines
	(ee-links-to-string
	 (list (nth 5 (ee-pdflike-page-links))
               (nth 6 (ee-pdflike-page-links))))))

(defun foo-send ()
  (interactive)
  (foo-lines)
  (eek "M-o")
  (insert foo-lines)
  (eek "M-o"))


(let ((lines (foo)))


;; (find-es "emacs" "bury-buffer")

(defun ee-burys ()
  (let* ((initial (current-buffer))
	 (buffers))
    (while (progn 
	     (push (current-buffer) buffers)
	     (bury-buffer)
	     (not (eq (current-buffer) initial))))
    buffers))










https://m.youtube.com/watch?v=1kLZjNGu_Fs

https://lula.com.br/brasil-da-esperanca-integra-do-pronunciamento-de-lula/

(ee-btn0 '(bla "tit" '(find-fline "poo")))

(ee-btn-splitsexpstr "bla\"foo\"pli\"blep")

(defun ee-btn-splitsexpstr (str)
  (or (string-match "^\\([^\"]*\"\\)\\([^\"]*\\)\\(\".*\\)$" str)
      (error "doesn't match"))
  (list (match-string 1 str)
	(match-string 2 str)
	(match-string 3 str)))

(string-match REGEXP STRING &optional START INHIBIT-MODIFY)


(defun ee-btn0 (outersexp)
  (let* ((title  (cadr outersexp))
	 (link   (cadr (caddr outersexp)))
	 (outersexpstr (ee-S outersexp))
	 (l-m-r  (ee-btn-splitsexpstr outersexpstr))
	 (left   (nth 0 l-m-r))
	 (middle (nth 1 l-m-r))
	 (right  (nth 1 l-m-r))
	 )
    (list title link left middle right)))



    (&key bigsexp
	  (linksexp (nth 2 bigsexp))
	  (fname (ee-kl-fname)))
    



(cl-loop for p in '((1 . 10) (2 . 20))
	 as h = (car p)
         as tl = (cdr p)
         if (> h 1)
            collect tl)



  (car (sort (ee-kla-all-eds-for fname)) 'string>))




  (ee-code-c-d-filter-2 fname 'ed))

(defun ee-kla-best-ed-for (fname)
  (let ((all-eds (ee-code-c-d-filter-2 fname 'ed)))
    (best-ed (car (sort all-eds 'string>)))

(defun ee-kla-best-cs-for (fname)
  (let* ((all-eds (ee-code-c-d-filter-2 fname 'ed))
         (best-ed (car (sort all-eds 'string>)))
	 (cs nil)
	 (f `(lambda () (if (string= ed ,best-ed) (setq cs (cons c cs))))))
    (ee-code-c-d-filter-2 
	 


(ee-code-c-d-filter-2 "~/eev-current/anim/" 'ed)
(sort (ee-code-c-d-filter-2 "~/eev-current/anim/" 'ed) 'string>)





https://downloads.haskell.org/ghc/latest/docs/users_guide/ghci.html#the-effect-of-load-on-what-is-in-scope

# (find-ghcugdoc "ghci#the-effect-of-load-on-what-is-in-scope")


ghci.html#the-effect-of-load-on-what-is-in-scope


;; Test: (find-code-xxx-links "etv" "" "")




(defun find-wset-A () (if (one-window-p) (split-window-horizontally)))
(defun find-2A (b) (find-wset "Ao_O" b))
;; Test: (find-2A '(eek "<down>"))

;; (find-fline "/usr/share/doc/python-sympy-doc/html/")


;; (find-es "emacs" "cl-destructuring-bind")
;; (find-maximamsg "37675653 202207 1")

(defun ee-kl-parents (fname)
  (setq fname (ee-expand fname))
  (let ((parents (list fname)))
    (while (file-parent-directory fname)
      (setq fname (file-parent-directory fname))
      (setq parents (cons fname parents)))
    parents))

(ee-kl-parents "~/eev-current/anim/foo")



(file-parent-directory "/")



;; (ee-sub1 '(20 30 40) 'car)
;; (ee-sub1 '(20 30 40) '(nth 1 it))
;; (ee-sub '('(20 30 40)))
;; (ee-sub '('(20 30 40) car))
;; (ee-sub '('((2 20 200) 30 40) car))
;; (ee-sub '('((2 20 200) 30 40) car (nth 2 it)))
;; (ee-sub '('(20 30 40) (nth 1 it)))

(defun ee-sub1 (it f)
  (if (symbolp f)
      (funcall f it)
    (eval f)))

(defun ee-sub (itfs)
  (let* ((it (eval (car itfs)))
	 (fs (cdr itfs)))
    (while fs
      (setq it (ee-sub1 it (car fs)))
      (setq fs (cdr fs)))
    it))


;; (defun edt () (interactive) (eval-defun nil) (find-wconfig-wget-links))

(defun ee-find-1stclassvideo-defun (c mp4stem hash)
  (ee-template0 "\
;; <find-{c}video>
;; Info: (find-1stclassvideo-links \"{c}\")
;; Play: (find-{c}video \"0:00\")
\(defun find-{c}video (&optional time &rest rest)
  \"Play one of the first-class videos of eev starting at TIME.
For more info on this particular video, run:
  (find-1stclassvideo-links \\\"{c}\\\")\"
  (interactive)
  (find-eev-video \"{mp4stem}\" \"{hash}\" time))
"))

(defun ee-find-1stclassvideo-defun (c mp4stem hash)
  (ee-template0 "\
;; <find-{c}video>
;; Info: (find-1stclassvideo-links \"{c}\")
;; Play: (find-{c}video \"0:00\")
\(defun find-{c}video (&optional time &rest rest)
  \"Play one of the first-class videos of eev starting at TIME.
For more info on this particular video, run:
  (find-1stclassvideo-links \\\"{c}\\\")\"
  (interactive)
  (find-1stclassvideo-video \"{c}\" time))
"))

(defun foo-c (c)
  (let* ((mp4stem (ee-1stclassvideos-mp4stem c))
         (hash    (ee-1stclassvideos-hash    c)))
    (ee-find-1stclassvideo-defun c mp4stem hash)))

(foo-c "eev2021")

(find-estring-elisp
 (mapconcat
  (lambda (entry) (foo-c (car entry)))
  ee-1stclassvideos-info
  "\n"))



    



;; See: (find-eepitch-intro "3.3. `eepitch-preprocess-line'")
(defun eepitch-preprocess-line (line)
  (replace-regexp-in-string (eepitch-pl-re) "" line))

;; See: (find-elnode "Creating Buffer-Local")
;;      (find-elnode "Creating Buffer-Local" "defvar-local")
;;      (find-hvariable 'eepitch-pl-re)
(defvar-local eepitch-pl-re nil)
(defvar       eepitch-pl-re-mail-reader-mode "^  ")

(defun eepitch-pl-re ()
  (or eepitch-pl-re
      (and (eq major-mode 'hlavaty-mail-reader-mode)
           eepitch-pl-re-mail-reader-mode)
      ""))



;; Basic variants of `eepitch-preprocess-line'.
;; See: (find-eepitch-intro "3.3. `eepitch-preprocess-line'")
(setq  eepitch-preprocess-regexp "^#: ")
(defun eepitch-preprocess-line-0 (line) line)
(defun eepitch-preprocess-line-1 (line)
  (replace-regexp-in-string eepitch-preprocess-regexp "" line))

;; Change `eepitch-preprocess-line'.
;; (find-eev "eepitch.el" "eepitch-this-line")
;; (find-eev "eepitch.el" "eepitch-this-line" "defun eepitch-preprocess-line")
;; Default when not experimenting with new features: same regexp everywhere.
(defun eepitch-preprocess-line (line)
  (eepitch-preprocess-line-1 line))

;; Tests: (eepitch-pl-get-line)
;;        (eepitch-pl-flash 0 2)
;;        (eepitch-pl-flash 2 10)
;;        (eepitch-pl-flash-re "^;; ?")
;;        (eepitch-pl-flash-re  ";; ?")
;;        (eepitch-pl-flash-re (rx alpha))
;;        (eepitch-pl-flash-re (rx digit))
;;
(defun eepitch-pl-flash (offset1 offset2 &optional face duration)
  "`ee-flash' the part of current line between OFFSET1 and OFFSET2."
  (ee-flash (+ (ee-bol) offset1)
            (+ (ee-bol) offset2)
	    face duration))

(defun eepitch-pl-get-line ()
  (buffer-substring-no-properties (ee-bol) (ee-eol)))

(defun eepitch-pl-flash-re (re &optional subexp face duration)
  (let* ((line (eepitch-pl-get-line)))
    (when (string-match re line)
      (eepitch-pl-flash
       (match-beginning (or subexp 0))
       (match-end       (or subexp 0))
       face duration))))






;; (find-find-links-links-new "newpdfviewer" "short binary" "")






(defun find-svgbuffers (bufname svgobject &rest pos-spec-list)
  (find-3a
   nil
   `(find-epp ',svgobject ,@pos-spec-list)
   `(find-svgbuffer "*svg*" ',svgobject)))






(with-output-to-string (insert "a") (insert "b"))


(with-temp-buffer
  (xml-print
   (svg 0 0 100 100 (svg-circle 50 50 20)))
  (write-file "/tmp/a.svg"))






;; (find-find-links-links-new "newbrowser" "shrt longname binary" "")





;; See: (find-eev "eev-blinks.el" "find-wottb")


(find-dbsw-call '(osm-goto -22.5013 -41.9259 15))

`M-x helpful-function RET helpful-function
(find-dbsw-call '(helpful-function 'helpful-function))
(find-dbsw-call '(helpful-function 'helpful-function) "Show help" "also")


# (find-elpafile "helpful-20220220.2308/helpful-autoloads.el")






;; (find-osm -22.5014 -41.9259 15 "Casa")
;; (find-osm 41.008467 28.980258 18 "Hagia Sophia")
;; (find-osm 43.773083 11.256222 17 "Il Duomo")

;; (find-osm 59.0488 -3.3417 17 "Skara Brae")

(find-eapropos "escape")
(find-eapropos "shell")


;; (find-osm 43.773 11.256 17 "Duomo")









;; (find-eev "eev-tlinks.el" "find-extra-file-links")
;; (setq fname (or fname (ee-dired-to-fname) "{fname}"))



;; Test: (find-estring (ee-kls-sexp "eev" "F" "ST\nR"))
;;       (ee-kls-region)
;;
(defun ee-kls-sexp (c fname string)
  (format "(find-%sfile \"%s\" %s)"
	  c (ee-kl-fname c fname) (ee-S string)))

(defun ee-kls-region ()
  (if (use-region-p) (buffer-substring-no-properties (point) (mark))))

(defun eekls (start end)
  (interactive "r")
  (let ((c (or ee-preferred-c (error "`ee-preferred-c' is nil here!")))
	(fname buffer-file-name)
	(string (if (use-region-p)
		    (buffer-substring-no-properties start end)
		  (error "Region is not active!"))))
    (ee-kl-kill (ee-kls-sexp c fname string))))


(defun eekls ()
  (interactive)
  (let ((c (or ee-preferred-c (error "`ee-preferred-c' is nil here!")))
	(fname buffer-file-name)
	(string (ee-kls-region)))
    (unless string (error "Region is not active!"))
    (ee-kl-kill (ee-kls-sexp c fname string))
    (deactivate-mark)))





;; (find-code-eev{<}mod{>}video \"{mod}\" \"{c}\" \"{stem}\" \"{hash}\")
;;      (code-eev{<}mod{>}video \"{mod}\" \"{c}\" \"{stem}\" \"{hash}\")
;;                (find-{c}video \"0:00\")
;;
;; See: (find-video-links-intro \"7. `find-eev-video'\" \"`find-eevlocal-video'\")
;;      (find-video-links-intro \"7. `find-eev-video'\" \"`find-eevlinks-video'\")
;;
(defun find-{c}video (&optional time &rest comments)
  (interactive)
  (find-eev{mod}-video \"{stem}\" \"{hash}\" time))



;; (find-eev "eev-videolinks.el" "code-eevvideo")
;; (find-eev "eev-audiovideo.el" "find-youtube-video")
;; (find-eapropos "find-code")
;; (find-eapropos "^code-")
;; (find-code-xxx-links "youtubevideo" "c hash" "")




;; (find-youtubedl-links "/tmp/" "Punch and Judy" "K6LmZ0A1s9U" nil "{stem}" 2 "on y")
;; (find-youtubedl-links "/tmp/" "Punch and Judy" "K6LmZ0A1s9U" nil "punch" 2 "on y")
;; (find-efunction 'find-youtubedl-links)

(find-youtube-video "K6LmZ0A1s9U")

(defun find-youtube-video (youtubeid &optional time &rest rest)
  (eval (ee-find-youtube-video youtubeid time)))






.de
.en-GB
.es-ES
.pt-BR

.part

.json
.live_chat
.mkv
.mp4
.vtt
.webm
.srv1




(defun ee-on-sexp-at-eol (code)
  "Locate the sexp at eol and evaluate CODE with several variables set."
  (interactive)
  (let (pos0 pos1 pos2 pos3 pos4 sexpstr headstr)
    (save-excursion
      (save-restriction
	(narrow-to-region (setq pos0 (ee-bol))
			  (setq pos4 (ee-eol)))
	(goto-char pos4)
	(setq pos1 (ee-backward-sexp))
	(forward-char 1)
	(setq pos2 (point))
	(setq pos3 (ee-forward-sexp))
	(setq sexpstr (buffer-substring-no-properties pos1 pos4))
	(setq headstr (buffer-substring-no-properties pos2 pos3))
	(eval code)))))

(defun find-epppr (o) (find-2a nil '(find-eppp o)))

(defun foo () (interactive) (ee-on-sexp-at-eol '(find-epppr (list headstr sexpstr))))


message "%s %s" headstr sexpstr)))


# (find-efunctiondescr 'unwind-protect)
# (find-efunction 'unwind-protect)
# (find-elnode "Index" "* unwind-protect:")


# (find-efunctiondescr 'narrow-to-region)
# (find-efunction 'narrow-to-region)
# (find-enode "Command Index" "* narrow-to-region:")
# (find-elnode "Index" "* narrow-to-region:")




(setq ee-file-extension-re "^\\(.*\\)\\(\\.[A-Za-z0-9_]+\\)$")

(defun ee-delete-file-extensions-in (fname list)
  (while (and (string-match ee-file-extension-re fname)
              (member (match-string 2 fname) list))
    (setq fname (match-string 1 fname)))
  fname)

;; (find-efunctiondescr 'file-name-extension)
;; (find-efunctiondescr 'file-name-sans-extension)
;; Test: (ee-delete-file-extensions-in "foo.a.bb.ccc.d" '(".ccc" ".d" ".a"))
;;
(defun ee-delete-file-extensions-in (fname list)
  (while (member (file-name-extension fname 'period) list)
    (setq fname (file-name-sans-extension fname)))
  fname)





;; (find-node "(elisp)Clickable Text")

(defun tmp/insert-link (text command)
  (let ((beg 0)
        (end (- (length text) 1))
        (map (make-sparse-keymap)))
    (define-key map [mouse-2] command)
    (add-text-properties
     beg end `(face link mouse-face highlight keymap ,map) text)
    (insert text)))

(defun tmp/a ()
  (interactive)
  (tmp/insert-link
   "greetings"
   '(lambda ()
      (interactive)
      (message "hello from our button"))))


(defun tmp/insert-link (text command)
  (let ((beg 0)
        (end (length text))
        (map (make-sparse-keymap)))
    (define-key map [mouse-2] command)
    (add-text-properties
     beg end `(face link mouse-face highlight keymap ,map) text)
    (insert text)))

(tmp/insert-link "foo" (lambda () (interactive) (message "bar")))foo

(defun tmp/insert-link (text command)
  (let ((beg 0)
        (end (length text))
        (map (make-sparse-keymap)))
    (define-key map [mouse-2] command)
    (add-text-properties
     beg end `(face link mouse-face highlight keymap ,map rear-nonsticky t) text)
    (insert text)))

;; See: (find-elnode "Sticky Properties")
;;      (find-efunctiondescr 'propertize)
;; Test: (tmp/insert-link "foo" '(message "bar"))
;; foo 
;;
(defun tmp/insert-link (text sexp)
  (let ((beg 0)
        (end (length text))
        (map (make-sparse-keymap)))
    (define-key map [mouse-2] `(lambda () (interactive) ,sexp))
    (insert "\n;; "
            (propertize text
			;; 'face 'link
			'face 'custom-button
			'mouse-face 'highlight
			'keymap map
			'rear-nonsticky t))))



(tmp/a)greetings




(defvar my/protected-buffers nil
  "Buffers that should not be immediately killed by `my/kill-this-buffer'.")

(defun my/protect-buffer (buffer)
  (interactive "b")
  (add-to-list 'my/protected-buffers (get-buffer buffer)))

(defun my/unprotect-buffer (buffer)
  (interactive "b")
  (setq my/protected-buffers (remq (get-buffer buffer) my/protected-buffers)))

(defun my/unprotect-this-buffer ()
  (interactive)
  (my/unprotect-buffer (current-buffer)))

(defun my/protected-buffer-p (buffer)
  (member buffer my/protected-buffers))

(defun my/protected-modified-buffer-p (buffer)
  (and (buffer-modified-p) (my/protected-buffer-p buffer)))

(defun my/kill-this-buffer ()
  "Like `kill-this-buffer' but prompts on protected buffers when modified
(see `my/protected-buffers')."
  (interactive)
  (when (or (not (my/protected-modified-buffer-p (current-buffer)))
            (yes-or-no-p "Protected buffer; kill anyway?"))
    (kill-this-buffer)))

(add-hook 'kill-buffer-hook 'my/unprotect-this-buffer)




(defun ee-keymapp (symbol)
  (and (boundp symbol) (keymapp (symbol-value symbol))))

(defun ee-keymap-symbols ()
  (apropos-internal "map$" 'ee-keymapp))

(defun ee-symbolname< (symbol1 symbol2)
  (string< (symbol-name symbol1) (symbol-name symbol2)))

(defun ee-sort-symbols (list)
  (sort list 'ee-symbolname<))

# (find-eminormodes-links)
# (find-efunction 'find-eminormodes-links)

# (find-elongkey-links "<menu-bar> <file> <open-file>")


# (find-elnode "Minor Modes")
# (find-eppp minor-mode-list)
# (find-eppp (ee-sort-symbols minor-mode-list))
# (find-eppp local-minor-modes)
# (find-eppp global-minor-modes)


(accessible-keymaps keymap)
(find-eppp (accessible-keymaps global-map))


;; <find-ekeymap-links>
;; Skel: (find-find-links-links-new "ekeymap" "symbol" "")
;; Test: (find-ekeymap-links)
;;       (find-ekeymap-links 'button-map)
;;
(defun find-ekeymap-links (&optional symbol &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for ekeymap."
  (interactive)
  (setq symbol (or symbol "{symbol}"))
  (apply
   'find-elinks
   `((find-ekeymap-links ,symbol ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-ekeymap-links)
     ""
     (find-eminormodes-links)
     (find-elnode "Keymaps")
     (find-elnode "Scanning Keymaps" "describe-bindings")
     (describe-bindings)
     ;;
     (find-evariable ',symbol)
     (find-evariabledescr ',symbol)
     (find-ekeymapdescr ,symbol)
     ;; (and (boundp ',symbol) (keymapp (symbol-value ',symbol)))
     ;; (ee-keymapp ',symbol)
     ""
     (require 'dash)
     (find-eppp (ee-keymap-symbols))
     (find-elinks (--map `(find-ekeymapdescr ,it) (ee-keymap-symbols)))
     ,(ee-template0 "\
")
     )
   pos-spec-list))



(defun ee-1stclassvideos-add (entry)
  (setq ee-1stclassvideos-info
     (ee-areplace ee-1stclassvideos-info (car entry) (cdr entry))))

(find-eppp (ee-1stclassvideos-add '("foo" :title "bar")))
(find-eppp (ee-1stclassvideos-add '("foo" :title "plic")))



(defun foo ()
  (interactive)
  (eek "C-a 12*<right> C-x 1 C-x 3 M-o <<find-1stclassvideo-links>> RET
        42*<down> C-SPC M-> M-w
        M-o C-a <down> C-y
       "))


;;                          (mapcar 'car ee-1stclassvideos-info)
;; (completing-read "Foo: " (mapcar 'car ee-1stclassvideos-info))
;; (find-efunctiondescr 'completing-read)
;;
;; (find-eev "eev-videolinks.el" "ee-1stclassvideos-info")
;; (find-efunction 'ee-1stclassvideo-around-point-ask)
;; (find-efunction 'find-1stclassvideo-links)
;; (find-elnode "Index" "* completing-read:")



;; (find-efunction 'find-1stclassvideo-links)
;; (find-efunction 'ee-1stclassvideo-around-point-ask)





;; Skel: (find-find-links-links-new "eminormodes" "" "")


;; (find-eev "eev-blinks.el" "find-epp")

;; https://en.wikipedia.org/wiki/Granny_Weatherwax



;; <find-find-ssr-links>
;; Skel: (find-find-links-links-new "find-ssr" "a b c" "prefix")
;; Test: (find-find-ssr-links)
;;
(defun find-find-ssr-links (&optional a b c &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for find-ssr."
  (interactive)
  (setq a (or a "{a}"))
  (setq b (or b "{b}"))
  (setq c (or c "{c}"))
  (let* ((prefix "c2m202"))
    (apply
     'find-elinks
     `((find-find-ssr-links ,a ,b ,c ,@pos-spec-list)
       ;; Convention: the first sexp always regenerates the buffer.
       (find-efunction 'find-find-ssr-links)
       ""
       ,(ee-template0 "\
% (find-ssr-links     \"{a}\" \"{b}\")
% (code-eevvideo      \"{a}\" \"{b}\")
% (code-eevlinksvideo \"{a}\" \"{b}\")
% (find-{a}video \"0:00\")

% (find-ssr-links     \"{b}\" \"{a}\")
% (code-eevvideo      \"{b}\" \"{a}\")
% (code-eevlinksvideo \"{b}\" \"{a}\")
% (find-{b}video \"0:00\")

% (find-ssr-links     \"{prefix}{a}\" \"{b}\")
% (code-eevvideo      \"{prefix}{a}\" \"{b}\")
% (code-eevlinksvideo \"{prefix}{a}\" \"{b}\")
% (find-{prefix}{a}video \"0:00\")

% (find-ssr-links     \"{prefix}{b}\" \"{a}\")
% (code-eevvideo      \"{prefix}{b}\" \"{a}\")
% (code-eevlinksvideo \"{prefix}{b}\" \"{a}\")
% (find-{prefix}{b}video \"0:00\")

")
       )
     pos-spec-list)))






;; Skel: (find-find-links-links-new "modeline" "" "")







;; (find-es "emacs" "dash")
;; https://github.com/magnars/dash.el
;; https://github.com/magnars/dash.el#functions


;; «find-codecdlike-links»  (to ".find-codecdlike-links")
;; Skel: (find-find-links-links-new "codecdlike" "cd suffix vars0" "")
;; Test: (find-codecdlike-links "CD" "SUFFIX" "c stem &optional youtubeid")
;;
(defun find-codecdlike-links (cd suffix vars0 &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for codecdlike."
  (interactive)
  (apply
   'find-elinks-elisp
   `((find-codecdlike-links ,cd ,suffix ,vars0 ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-codecdlike-links)
     ""
     ,(ee-codecdlike-links0 cd suffix vars0)
     )
   pos-spec-list))

(defun ee-codecdlike-links0 (cd suffix vars0)
  (require 'dash)
  (let* (;; (cd      "CD")
	 ;; (suffix  "SUFFIX")
	 ;; (vars0   "c stem &optional youtubeid")
	 (vars0s  (ee-split vars0))
	 (vars1s  (--remove (string= "&optional" it) vars0s))
	 (qvars1s (--map (format "\"{%s}\"" it) vars1s))
	 (setqss  (--map (format "  (setq %s (or %s \"{%s}\"))\n" it it it) vars1s))
	 (setqs   (mapconcat 'identity setqss))
	 (qvars1  (mapconcat 'identity qvars1s " "))
	 (vars1   (mapconcat 'identity vars1s " "))
	 (subtemplate0 (ee-template0 "\
;; (find-code-{cd}{suffix} {qvars1})
;;      (code-{cd}{suffix} {qvars1})
;;                (find-{cd}{suffix} \"0:00\")
;;
;; See:

(defun find-{cd}{suffix} ({vars0} &rest rest)
  (interactive)
  (find-{cd}{suffix}-links {qvars1}))
"))
	 (subtemplate1 (replace-regexp-in-string "\"" "\\\\\"" subtemplate0))
	 (subtemplate2 (ee-template0 "\
(defun      code-{cd}{suffix} ({vars0})
  (eval (ee-read (ee-code-{cd}{suffix} vars1))))
(defun find-code-{cd}{suffix} (&optional {vars0} &rest rest)
{setqs}\
  (find-estring-elisp (apply 'ee-code-{cd}{suffix} {vars1} rest)))
(defun   ee-code-{cd}{suffix} ({vars1})
  (ee-template0 \"\\
{subtemplate1}\
\"))"))
       )
    subtemplate2))


  (find-2a nil '(find-estring-elisp subtemplate2)))




(let* ((cd      "CD")
       (suffix  "SUFFIX")
       (vars0   "c stem &optional youtubeid")
       (vars0s  (ee-split vars0))
       (vars1s  (--remove (string= "&optional" it) vars0s))
       (qvars1s (--map (format "\"{%s}\"" it) vars1s))
       (setqss  (--map (format "  (setq %s (or %s \"{%s}\"))\n" it it it) vars1s))
       (setqs   (mapconcat 'identity setqss))
       (qvars1  (mapconcat 'identity qvars1s " "))
       (vars1   (mapconcat 'identity vars1s " "))
       (subtemplate0 (ee-template0 "\
;; (find-code-{cd}{suffix} {qvars1})
;;      (code-{cd}{suffix} {qvars1})
;;                (find-{cd}{suffix} \"0:00\")
;;
;; See:

(defun find-{cd}{suffix} ({vars0} &rest rest)
  (interactive)
  (find-{cd}{suffix}-links {qvars1}))
"))
       (subtemplate1 (replace-regexp-in-string "\"" "\\\\\"" subtemplate0))
       (subtemplate2 (ee-template0 "\
(defun      code-{cd}{suffix} ({vars0})
  (eval (ee-read (ee-code-{cd}{suffix} vars1))))
(defun find-code-{cd}{suffix} (&optional {vars0} &rest rest)
{setqs}\
  (find-estring-elisp (apply 'ee-code-{cd}{suffix} {vars1} rest)))
(defun   ee-code-{cd}{suffix} ({vars1})
  (ee-template0 \"\\
{subtemplate1}\
\"))"))

       )

  (find-2a nil '(find-estring-elisp subtemplate2)))








       (subtemplate2 (ee-template0 "\
(defun      code-{cd}{suffix} ({vars0})
  (eval (ee-read (ee-code-{cd}{suffix} vars1))))
(defun find-code-{cd}{suffix} (&optional {vars0} &rest rest)
{setqs}\
  (find-estring-elisp (apply 'ee-code-{cd}{suffix} {vars1} rest)))
(defun   ee-code-{cd}{suffix} ({vars1})
  (ee-template0 \"\\
{subtemplate1}\
\"))"))

  (find-2a nil '(find-estring subtemplate2)))



  subtemplate1)










  setqs)


(defun ee-codecdlike-links0 (cd suffix vars0 vars1 setqs

(defun      code-eevvideo (c stem &optional youtubeid)
  (eval (ee-read (ee-code-eevvideo c stem youtubeid))))
(defun find-code-eevvideo (&optional c stem youtubeid &rest rest)
  (setq c (or c "{c}"))
  (setq stem (or stem "{stem}"))
  (setq youtubeid (or youtubeid "{youtubeid}"))
  (find-estring-elisp (apply 'ee-code-eevvideo c stem youtubeid rest)))
(defun   ee-code-eevvideo (c stem youtubeid)
  (ee-template0 "\
;; (find-code-eevvideo \"{c}\" \"{stem}\" \"{youtubeid}\")
;;      (code-eevvideo \"{c}\" \"{stem}\" \"{youtubeid}\")
;;                (find-{c}video \"0:00\")
;;
;; See: (find-audiovideo-intro \"7.1. `code-eevvideo'\")

(defun find-{c}video (&optional time &rest rest)
  (interactive)
  (find-eevvideo-links \"{c}\" \"{stem}\" \"{youtubeid}\" time))
"))






;; (find-efunction 'find-mpv-video)
;; (find-efunction 'find-vlc-video)
;; (find-efunction 'find-eevvideo-links)
;; (find-angg ".emacs.templates" "eev-videos-data" "eevnov2021a")


;; find-eev-video: play a video either from
;; <http://angg.twu.net/eev-videos/> or from youtube, depending on the
;; chosen back-end. The back-ends ate 

(defun find-eevyoutube-video (stem hash &optional time &rest comments)
  (find-youtube-video hash time))




(defun compose-and-write ( tla TLA fname )
  "receive tla TLA and fname from
   parsing function"
  (interactive)
  ;; define all the substrings
  (let* (
         (ia "(interactive)\n")
         (posa  "(&rest pos-spec-list")
         (posb  "pos-spec-list")
         (posc ",@pos-spec-list)))")
         (apply  "(apply 'find-pdf-txt")
         (fwset "(find-wset \"F_\"")
         (xgans "\"" )
         ;; compose the 'tlas' with ee-template0
         (alla (ee-template0 "\n(defun {tla}x {posa} )\n {ia} {apply} {fname} {posb} ))\n"))
         (allb (ee-template0 "\n(defun {TLA}  {posa} )\n {ia} {fwset} {xgans}{TLA}{xgans} `({tla}x {posc}\n"))
         )
    ;; go down, insert 'tlas' and a final seperating line
    (goto-char (line-end-position))
    (insert "\n")
    (insert alla)
    (insert allb)
    (insert "\n;; ")
    (cl-loop for i from 1 to 80 do (insert "-"))
    (insert "\n\n")
    )
  )



(compose-and-write "AAA" "BBB" "CCC")


Hi Erich,

in older versions of eev I experimented with many different ways
of writing templates...

Below is my translation of your compose-and-write to my current
favorite style. One of the things that I like most in it is that
I can put tests in comments, like in the ";; Test:" line.


;; Test: (find-estring-elisp (compose-allab "<tla>" "<TLA>" "<fname>"))
;;
(defun compose-allab (tla TLA fname)
  (ee-template0 "
(defun {tla}x (&rest pos-spec-list)
 (interactive)
 (apply 'find-pdf-txt {fname} pos-spec-list))

(defun {TLA}  (&rest pos-spec-list)
 (interactive)
 (find-wset \"F_\" \"{TLA}\" `({tla}x ,@pos-spec-list)))

;; --------------------------------------------------------------------------------
"))

(defun compose-and-write (tla TLA fname)
  (insert (compose-allab tla TLA fname)))


Your trick with the split-string in your write-tlas is really
nice! I would factor your write-tlas in this way to make it
easier to test and to modify:


(defun write-tlas0 (strx)
  (let* ((tlax (nth 1 (split-string strx)))
         (tla  (replace-regexp-in-string "'" "" tlax))
         (TLA (concat (capitalize tla) "x"))
         (fnamex (nth 2 (split-string strx )))
         (fname  (replace-regexp-in-string ")" "" fnamex))
         )
    (compose-allab tla TLA fname)))

(defun write-tlas ()
  (interactive)
  (let* ((line (buffer-substring-no-properties (ee-bol) (ee-eol)))
	 (allab (write-tlas0 strx)))
    (insert allab)))


What do you think of this?
  Cheers, E. =)


P.S.: I will give a workshop tomorrow and I'm quite tired, so I
won't wrote more ideas now...



;; (find-eev "eev-wrap.el" "ee-this-line-wrapn")



;; Tests:
;; 1) Run the defun below with `M-e'.
;;    Then try this test:
;;      (ee-template0-test "Aa" "Bb")
;;    It will returns this:
;;      "<Aa AaAa Bb BbBb>"
;; 2) Run the defun below in lexical binding mode with `M-1 M-1 M-e'.
;;    Then try this test:
;;      (ee-template0-test "Aa" "Bb")
;;    You will get this error:
;;      "format: Symbol’s value as variable is void: a"
;;
(defun ee-template0-test (a b)
  (let* ((aa (concat a a))
         (bb (concat b b)))
    (ee-template0 "<{a} {aa} {b} {bb}>")))


That's a very good approach!

I would rewrite as two functions: one that just receives tla,
TLA, and fname, and uses ee-template0 to produce a big string
from them, and a second one that processes the current line,
obtains tla, TLA, and fname, calls the first function, and
inserts the string that the first one produces. I'll send you
some examples later. Ah, btw, I started to rewrite your code with
ee-template0, but I didn't finish because I found something more
urgent - below.

Did you try to use ee-template0? Did you fail? I just wrote an
explanation - much better than the previous one - for why it
needs dynamic binding... it is here:

(find-wgeta-elisp "http://angg.twu.net/eev-current/eev-template0.el" "lexical-binding")

More later! =),
  Eduardo



Also here:

http://angg.twu.net/eev-current/eev-template0.el.html#lexical-binding






;; «.code-eevvideo-youtube»		(to "code-eevvideo-youtube")

;; «code-eevvideo-youtube»  (to ".code-eevvideo-youtube")
;; (find-code-eevvideo-youtube "vlinks" "2021-video-links" "xQqWufQgzVY")
;;      (code-eevvideo-youtube "vlinks" "2021-video-links" "xQqWufQgzVY")
;;                     (ee-find-vlinksvideo "1:23" "Comment")
;;                     (ee-find-vlinksvideo "1:23")
;;                     (ee-find-vlinksvideo)
;;                        (find-vlinksvideo)
;;
(defun      code-eevvideo-youtube (c stem &optional youtubeid)
  (eval (ee-read (ee-code-eevvideo-youtube c stem youtubeid))))
(defun find-code-eevvideo-youtube (&optional c stem youtubeid &rest rest)
  (setq c (or c "{c}"))
  (setq stem (or stem "{stem}"))
  (setq youtubeid (or youtubeid "{youtubeid}"))
  (find-estring-elisp (apply 'ee-code-eevvideo-youtube c stem youtubeid rest)))
(defun   ee-code-eevvideo-youtube (c stem youtubeid)
  (ee-template0 "\
;; (find-code-eevvideo-youtube \"{c}\" \"{stem}\" \"{youtubeid}\")
;;      (code-eevvideo-youtube \"{c}\" \"{stem}\" \"{youtubeid}\")
;;
;; (ee-find-{c}video \"1:23\" \"Comment\")
;; (ee-find-{c}video \"1:23\")
;; (ee-find-{c}video)
;;    (find-{c}video \"1:23\")

(defun ee-find-{c}video (&optional time &rest rest)
  (ee-find-video-youtube \"{youtubeid}\" time))

(defun find-{c}video (&optional time &rest rest)
  (eval (ee-find-{c}video time)))
"))




	 






;; (eek "<up> M-e 2*<down> M-3 M-e C-g")
;; (find-esubstitutecommandkeys eev-mode-help)





Hi Erich,

Can we move the discussion of you problem to the mailing list?

I think that the best way to solve your problem is to use frames
with user-chosen titles, and to extend find-wset to make it also
handle frames... then it will be very easy to define functions
that select a frame with a certain title, or create a frame with
that title if needed, and display the right files and buffers in
it. The code below is _almost_ what we need to implement that,
but the last two `find-wset's don't work as expected - I need
something stronger than `select-frame-set-input-focus', but what?

Can you check if everything below makes sense to you?
  Cheers,
    Eduardo...


;; (find-elnode "Creating Frames")
;; (find-elgrep "grep --color=auto -nH --null -e make-frame *.el */*.el")
;; (find-elnode "Parameter Access")
;; (find-elnode "Frame Titles")
;; (find-elnode "Raising and Lowering")
;;
;; (make-frame '((title . "Foo")))
;; (make-frame '((title . "Bar")))
;;                                    (frame-list)
;;                             (nth 0 (frame-list))
;;           (frame-parameter  (nth 0 (frame-list)) 'title)
;;           (frame-parameter  (nth 1 (frame-list)) 'title)
;; (find-epp (frame-parameters (nth 0 (frame-list))))
;; (find-epp (frame-parameters (nth 1 (frame-list))))

;; (find-clnode "Loop Facility")
;; (find-clnode "Loop Examples")
;; (find-clnode "Other Clauses" "if CONDITION CLAUSE")

(defun ee-frames-with-title (title)
   (cl-loop for fr in (frame-list)
            if (equal title (frame-parameter fr 'title))
	    collect fr))

(defun ee-frame-with-title (title)
  (car (ee-frames-with-title title)))

;; (make-frame '((title . "Foo")))
;; (ee-frames-with-title "Foo")
;;  (ee-frame-with-title "Foo")
;; (ee-frames-with-title "SpXlY")
;;  (ee-frame-with-title "SpXlY")

;; (find-elnode "Input Focus")
;; (find-elnode "Input Focus" "Function: select-frame-set-input-focus")
;; (ee-use-frame "Foo")
;; (ee-use-frame "Bar")
;;
(defun ee-use-frame (title)
  (let ((fr (ee-frame-with-title title)))
    (if fr
	(select-frame-set-input-focus fr)
      (let ((newf (make-frame `((title . ,title)))))
	(select-frame-set-input-focus newfr)))))

;; (find-multiwindow-intro)
;; (find-multiwindow-intro "2. `find-wset'")
;; (find-multiwindow-intro "8. Adding support for new characters in `find-wset'")
;; (find-efunction 'find-wset-o)

(defun find-wset-F () (ee-use-frame (car sexps)) (setq sexps (cdr sexps)))

;; (find-wset "13o_"     '(find-ebuffer "Fff"))
;; (find-wset "F_" "Foo" '(find-ebuffer "Fff"))
;; (find-wset "F_" "Bar" '(find-ebuffer "Bbb"))







;; «find-rcirc-buffer-2a» (to ".find-rcirc-buffer-2a")
;; Test: (find-rcirc-buffer-2a "irc.freenode.net" "#eev" nil "#libreboot")
(defun find-rcirc-buffer-2a
  (server ichannels &optional achannels channel &rest pos-spec-list)
  (ee-rcirc-connect-or-join server ichannels achannels channel)
  (find-2a
   nil
   `(find-rcirc-buffer0 server channel ,@pos-spec-list)))

;; «find-rcirc-buffer-3a» (to ".find-rcirc-buffer-3a")
;; Test: (find-rcirc-buffer-3a "irc.freenode.net" "#eev" nil "#libreboot")
(defun find-rcirc-buffer-3a
  (server ichannels achannels channel &rest pos-spec-list)
  (ee-rcirc-connect-or-join server ichannels achannels channel)
  (find-3a
   nil
   '(find-rcirc-buffer0 server nil)
   `(find-rcirc-buffer0 server channel ,@pos-spec-list)))






(defun find-rcirc-buffer1
  (server channel &optional ichannels achannels &rest pos-spec-list)
  (ee-rcirc-connect-or-join server channel ichannels achannels)
  (apply 'find-rcirc-buffer0 server channel pos-spec-list))

(defun find-rcirc-buffer
  (server ichannels &optional achannels channel &rest pos-spec-list)
  (ee-rcirc-connect       server (ee-split ichannels))
  (ee-rcirc-join-channels server (ee-split (or achannels ichannels)))
  (ee-rcirc-join-channel  server channel)
  (apply 'find-rcirc-buffer0 server channel pos-spec-list))





(defun find-4a (a b c d) (find-wset "13_o2_o2_o_+o" a b c d))

(find-4a nil ' (find-ebuffer "*irc.libera.chat*")
             ' (find-ebuffer "#emacs@irc.libera.chat")
             ' (find-ebuffer "DBG")
               )








;; <ee-insert-test-racket-mode>
;;
(defun ee-insert-test-racket-mode ()
  (interactive)
  (insert (format "
#|
* (eepitch-racket)
* (eepitch-kill)
* (eepitch-racket)
(load \"%s\")

|#
" (buffer-name))))





;; (find-eev "eev-plinks.el" "find-urlretrieve")

(defun ee-urlretrieve-header1 ()
  "Return the first line of `ee-urlretrieve-headers'."
  (replace-regexp-in-string "\n[^z-a]*" "" ee-urlretrieve-headers))

(defun find-wget00 (url)
  (let ((contents (ee-urlretrieve0 url)))
    (ee-urlretrieve-assert-ok)
    contents))


https://0x0.st/-gGa.bin
(find-wget-elisp "https://0x0.st/-gGa.bin")

(find-wget "hp://www.lua.org/start.html")





(ee-urlretrieve-header1)


(defun ee-very-primitive-wget (url fname)
  (let* ((contents (ee-urlretrieve0 url))
	 (ok (string-match "^HTTP/1.1 200 OK" ee-urlretrieve-headers))
	 (nbytes (string-bytes contents)))
    (if (not ok)
	(error "Download failed!")
      (ee-write-string contents fname)
      (format "Wrote %d bytes" nbytes))))


;; (find-eev "eev-plinks.el" "find-urlretrieve")


(defun ee-very-primitive-wget0 (url fname)
  "Try to download the contents of URL into FNAME.
If that works return the number of bytes written.
If that fails return nil or throw an error.
This is a quick hack."
  (let* ((contents (ee-urlretrieve0 url))
	 (ok (string-match "^HTTP/1.1 200 OK" ee-urlretrieve-headers)))
    (when ok
      (write-region contents nil (ee-expand fname))
      (string-bytes contents))))

;; Aqui o resultado deve ser 449024:
(ee-very-primitive-wget0
 "http://angg.twu.net/2021.1-projeto/wget.exe"
 "~/bin/wget.exe")



(defun ee-very-primitive-wget (url fname)



      (format "Wrote %d bytes" nbytes))))



https://en.wikipedia.org/wiki/Home_directory
https://en.wikipedia.org/wiki/Working_directory
https://en.wikipedia.org/wiki/PATH_(variable)

cd ~/

 (eepitch-shell)
 (eepitch-kill)
 (eepitch-shell)
echo %HOMEPATH%
cd
cd bin
dir



(mkdir "~/bin/" t)



(ee-very-primitive-wget
 "http://angg.twu.net/2021.1-projeto/foo"
 "~/bin/wget.exe")


(find-callprocess "wget --help")
(find-callprocess "~/bin/wget.exe --help")


(url "http://angg.twu.net/2021.1-projeto/wget.exe")
	 (fname "/tmp/wget.exe")
	 

nbytes

ee-urlretrieve-headers

(string-match "^HTTP/1.1 200 OK" ee-urlretrieve-headers)


"HTTP/1.1 200 OK
Date: Tue, 05 Oct 2021 23:12:19 GMT
Server: Apache/2.4.38 (Debian) OpenSSL/1.1.1d
Last-Modified: Tue, 05 Oct 2021 03:16:28 GMT
ETag: \"6da00-5cd92749d1142\"
Accept-Ranges: bytes
Content-Length: 449024
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: application/x-msdos-program"




Hi Tomas,

I've tried to implement something like what you are proposing. It
seems that the right tool for that, at least for the simplest
cases, is `url-retrieve-synchronously'. It is documented here:

  (find-node "(url)Retrieving URLs")
  (find-node "(url)Retrieving URLs" "url-retrieve-synchronously")
  (find-node "(url)Dealing with HTTP documents")

Straight.el uses `url-retrieve-synchronously' here:

  https://github.com/raxod502/straight.el#getting-started

Try this:

  (find-ebuffer
   (url-retrieve-synchronously
    "https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el"
    'silent 'inhibit-cookies)
   "\n\n")

The "\n\n" will put the point after the response headers.

I thought that it would be trivial to write a "fake wget" for
eshell using `url-retrieve-synchronously'. The part of adding a
new builting seems to be easy, see:

  (find-node "(eshell)Built-ins" "eshell/ls")
  (find-eshellfile "")
  (find-eshellgrep "grep --color=auto -nH --null -e eshell/ *.el")

but I couldn't get the error checking right, and at some point I
stopped trying. Then I saw this thread,

  https://lists.gnu.org/archive/html/emacs-devel/2021-03/threads.html#01359

and it convinced me that using a real wget would be the right
thing to do.

I have some code for playing with url-retrieve here, if you'd
like to try:

                     http://angg.twu.net/elisp/url-retrieve-test.el
                     http://angg.twu.net/elisp/url-retrieve-test.el.html
  (find-wgeta-elisp "http://angg.twu.net/elisp/url-retrieve-test.el")

  Cheers,
    Eduardo Ochs
    http://angg.twu.net/#eev







In the beginning I thought that writing the 
I tried to use `url-retrieve-synchronously' to build a kind
of "fake wget"


# https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el


(defun 0x0-upload (start end &optional server)
  "Upload current buffer to `0x0-url' from START to END.
If START and END are not specified, upload entire buffer.
SERVICE must be a member of `0x0-services'."
  (interactive "r")
  (setq server (or server '0x0))
  (let* ((file-name "upload.txt")
         (bounds (0x0--make-bounds start end))
         (size (0x0--bounds-size bounds))
         (resp (0x0--send server file-name bounds)))
    (0x0--handle-resp server size resp)))

;; Error:
;; 0x0--make-curl-args: Symbol’s function definition is void: nil

https://0x0.st/-gj7.bin
https://0x0.st/-gj5.bin

(use-package eev
  :straight (:host github :repo "edrx/eev")
  :config (progn
            (require 'eev-load)
	    ;; See: (find-eev "eev-load.el" "autoloads")
            ;; (eev-mode 1)     ; optional
            ;; (eev-beginner)   ; optional
            )
  )

  ;; See: (find-eev "eev-load.el" "autoloads")




;; <ee-insert-test-fennel-mode>
;;


  (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:")

    )




* (ee-lua-set-init-file nil)
* (ee-lua-set-init-file t)




;; (find-youtubedl-links "/sda5/videos/" nil "bm1tWj5y0Cc" nil "{stem}")
;; (find-fline "/sda5/videos/" "bm1tWj5y0Cc")
;; (ee-youtubedl-guess "/sda5/videos/" "bm1tWj5y0Cc" 0)
;; (ee-youtubedl-guess "/sda5/videos/" "bm1tWj5y0Cc" 1)
;; (ee-youtubedl-guess "/sda5/videos/" "bm1tWj5y0Cc" 2)
;; (find-efunction 'ee-youtubedl-guess)

;; (find-efunctiondescr 'cl-remove)
;; (find-efunction 'cl-remove)
;; (find-node "(cl)Function Index" "* cl-remove")


(ee-youtubedl-subtitle-p "foo.mp4")
(ee-youtubedl-subtitle-p "foo.vtt")

(ee-youtubedl-not-subtitles '("foo.mp4" "foo.vtt" "foo.mkv" "foo.srt"))


(string-match "\\.vtt$" "foo.vtt")
(string-match "\\.vtt$" "foo.mp4")
(string-match "\\.\\(srt\\|vtt\\)$" "foo.srt")
(string-match "\\.\\(srt\\|vtt\\)$" "foo.vtt")
(string-match "\\.\\(srt\\|vtt\\)$" "foo.mp4")
(string-match "\\.\\(srt|vtt\\)$" "foo.mp4")






;; «erich-ruff-2021aug07»  (to ".erich-ruff-2021aug07")
;; (find-fline "~/LOGS/2021aug07.eev")

;; (find-code-tla     "jacspin" "/tmp/jacobi-ueber_die_lehre_des_spinoza-er.pdf")
        (code-tla     "jacspin" "/tmp/jacobi-ueber_die_lehre_des_spinoza-er.pdf")
;; (find-code-tla-pdf "jacspin" "/tmp/jacobi-ueber_die_lehre_des_spinoza-er.pdf")
        (code-tla-pdf "jacspin" "/tmp/jacobi-ueber_die_lehre_des_spinoza-er.pdf")

(defun jacspint (&rest pos-spec-list)
  (interactive)
  (apply 'find-pdf-txt "/tmp/jacobi-ueber_die_lehre_des_spinoza-er.pdf" pos-spec-list))

;; The suffix "ta" means ".txt/anchor".
;; The suffix "tp" means ".txt/page", where
;;   "go to page" means "...by counting formfeeds". 
;;
;; See: (find-efunction 'ee-goto-position)
;;      (find-efunction 'ee-goto-anchor)
;;      (find-efunction 'ee-goto-position-page)

(defun jacspinta (&rest pos-spec-list)
  (interactive)
  (find-pdf-txt "/tmp/jacobi-ueber_die_lehre_des_spinoza-er.pdf")
  (apply 'ee-goto-anchor pos-spec-list))

(defun jacspintp (&rest pos-spec-list)
  (interactive)
  (find-pdf-txt "/tmp/jacobi-ueber_die_lehre_des_spinoza-er.pdf")
  (apply 'ee-goto-position-page pos-spec-list))

;; Tests:
;; (jacspinp 14)
;; (jacspint  "transzendentalen Einheit")
;; (jacspinta "transzendentalen Einheit")
;; (jacspintp 1)
;; (jacspintp 3)
;;   ^ this one doesn't work because the .txt doesn't have formfeeds





;; (find-eev "eepitch.el" "eepitch-vterm")
;; (find-es "emacs" "vterm-prog")







https://www.youtube.com/watch?v=t3nHmZRg_sE





;; (find-efunction 'find-wget)
;; (find-eev "eev-plinks.el" "find-wget")
;; (find-eev "eev-plinks.el" "find-callprocess")
;; (find-eev "eev-blinks.el" "find-eoutput")
;; (find-eev "eev-blinks.el" "find-ebuffer")
;; (find-es "wget" "wget-O-")
;; (find-efunctiondescr 'call-process "exit status")

(defun find-wgetap (prefixurl fname &rest pos-spec-list)
  "Like `find-wgeta', but uses (concat PREFIXURL FNAME) as its url."
  (apply 'find-wgeta (concat prefixurl fname) pos-spec-list))

(defun find-wgetangg (fname &rest pos-spec-list)
  (apply 'find-wgetap "http://angg.twu.net/" fname pos-spec-list))

(defun find-wgetes (stem &rest pos-spec-list)
  (apply 'find-wgeta (format "http://angg.twu.net/e/%s.e" stem) pos-spec-list))

;; (find-wget "http://angg.twu.net/e/foo.e")
;; (find-wget "http://angg.twu.net/e/agda.e")
;; (find-wget  "http://angg.twu.net/e/agda.e" "agda-mode")
;; (find-wgeta "http://angg.twu.net/e/agda.e" "agda-mode")
;; (find-wgetes "agda" "agda-mode")
;; (find-wgetes "agda")
;; (find-wgetangg ".emacs")
;; (find-wgetangg ".emacs" "seen")





(defhydra hydra-eev-index-edit (:color green :hint nil)
  "
_q_:quit    ^^^^                                    _0_: delthiswindow
 werty:  _u_:prev    _i_:insert  _o_:second window  _p_:prev
asdfgh:  _j_:next    _k_:kill    _l_:eval
         ^ ^         _,_:adj<-   _._:adj->
Standard usage: _k__o__p__l__i__0_q
Use `_,_'s and `_._'s between the `_i_' and the `_0_' to adjust the `(to ...)'.\n"
  ;;
  ;; Left column: movement by anchors
  ("u" (re-search-backward (ee-tag-re)))
  ("j" (re-search-forward  (ee-tag-re)))
  ;; Kill/Otherwindow/Prev/evaL/Insert/adj<-/adj->/delthiswindow:
  ("k" (eek "C-a C-SPC <down> C-w"))
  ("o" (eek "C-x 1 C-x 3 C-x o"))
  ("p" (re-search-backward (ee-tag-re)))
  ("l" (eek "M-e"))
  ("i" (eek "C-a <down> C-y <up>"))
  ("," (eev-index-replace "\t(to "   "(to "))
  ("." (eev-index-replace   "(to " "\t(to "))
  ("0" (eek "C-x 0"))
  ;; Other keys:
  ("<down>" (eek "<down>"))
  ("<up>"   (eek "<up>"))
  ("1"      (eek "C-x 1"))
  ("2"      (eek "M-2 M-e"))
  ("<"      (eek "M-<"))
  ("M-<"    (eek "M-<"))
  ("q"      nil))

(defalias 'ei 'hydra-eev-index-edit/body)





https://0x0.st/-4HM.el

(defun my-defhydra (name docstring defs1 defs2)
  `(defhydra ,name (:color blue) ,docstring ,@defs1 ,@defs2))

(setq my-defhydra-defs2
  '(("a" my-app-hydra/body "applications")
    ("z" my-app-hydra/body "applications")
    ("C" contrapunctus-mc-hydra/body "multiple cursors")
    ("d" dired-jump "dired-jump")
    ("D" (cp-insert-timestamp t) "date")
    ("E" toggle-debug-on-error "tdoe")
    ("h" my-help-hydra/body "Help")))

;; Pretty-print the defhydra:
(find-epp (my-defhydra 'NAME "DOCSTRING"
  '(("O" cp-org/body "org")
    ("p" contrapunctus-programming-hydra-dispatch-language "programming")
    ("0" delete-window "delete this" :color red)
    ("1" delete-other-windows "delete others" :color red)
    ("2" split-window-below "split below" :color red)
    ("3" split-window-right "split right" :color red))
  my-defhydra-defs2))

;; Eval the defhydra:
(eval (my-defhydra 'NAME "DOCSTRING"
  '(("O" cp-org/body "org")
    ("p" contrapunctus-programming-hydra-dispatch-language "programming")
    ("0" delete-window "delete this" :color red)
    ("1" delete-other-windows "delete others" :color red)
    ("2" split-window-below "split below" :color red)
    ("3" split-window-right "split right" :color red))
  my-defhydra-defs2))







(defun     find-okular-page (fname &optional page &rest rest)
  (find-bgprocess (ee-find-okular-page fname page)))
(defvar ee-find-okular-page-options '())
(defun  ee-find-okular-page (fname &optional page &rest rest)
  `("okular"
    ,@ee-find-okular-page-options
    ,fname
    ,@(if page `("-p" ,(format "%s" page)))
    ))

;; (find-code-pdfbackend "okular-page")
        (code-pdfbackend "okular-page")

;; Tests: (find-okular-page "~/Coetzee99.pdf")
;;        (find-okular-page "~/Coetzee99.pdf" 3)

;; Run the `defalias' below if you want to make
;; `find-pdf-page' use `find-librewolf-page'.
;; See: (find-eev "eev-pdflike.el" "change-default-viewer")
;;
(defalias 'find-pdf-page 'find-okular-page)


# (find-man "okular")

(find-newbrowser-links "librewolf" "librewolf" "lw")

https://www.youtube.com/watch?v=L1BPjHILuM8



# Qutebrowser config with emacs key bindings:
# https://gist.github.com/jumper047/ee821f789cd336b1105309f3ebf44f70







;; `find-pdf-txt' is similar to `find-pdf-text' 


;; (find-eev "eev-plinks.el" "find-callprocess")

;; Test:






;; (find-es "emacs" "buttons")

(setq  ee-btn nil)
(defun ee-btn-get-and-set () (interactive)
  (setq ee-btn (button-at (point))))




;; (find-efunctiondescr 'button-describe)
;; (find-efunction      'button-describe)

;;               (find-efunctiondescr 'button-at "button.e")
;; (find-2a nil '(find-efunctiondescr 'button-at "button.e"))
;; (eek "C-x o <<rename-buffer>> *Help2* RET C-x o")
;; (eek "C-x o <<ee-btn-get-and-set>> C-x o")

;;                      ee-btn
;;       (marker-buffer ee-btn)
;;     (marker-position ee-btn)
;; (integer-or-marker-p ee-btn)

;; (button-describe ee-btn)
;; (find-elnode "Markers")




;; <find-ebutton-links>
;; Skel: (find-find-links-links-new "ebutton" "btn" "")
;;
(defun find-ebutton-links (&optional btn &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for ebutton."
  (interactive)
  (setq btn (or btn "{btn}"))
  (apply
   'find-elinks
   `((find-ebutton-links ,btn ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-ebutton-links)
     ""
     ,(ee-template0 "\
")
     )
   pos-spec-list))



Converting backslash sequences to (non-ascii) characters

Hi Erich,

I won't be able to approve posts with big attachments until I
recover my moderator password for the eev mailing list, so this
is a public answer to your e-mail that was intended to be public
but that I only received in private... you said that you were
trying to generate links to a PDF using this,

  http://angg.twu.net/eev-intros/find-pdf-like-intro.html#10
  (find-pdf-like-intro "10. Generating a pair with the page number")

but you were getting sexps like these

  # (find-leo9page 1 "Th\351orie de la Science")
  # (find-leo9text 1 "Th\351orie de la Science")
  # (find-leo9page (+ 0 1) "Th\351orie de la Science")
  # (find-leo9text (+ 0 1) "Th\351orie de la Science")

instead of:

  # (find-leo9page 1 "Théorie de la Science")
  # (find-leo9text 1 "Théorie de la Science")
  # (find-leo9page (+ 0 1) "Théorie de la Science")
  # (find-leo9text (+ 0 1) "Théorie de la Science")



I thought a bit about making `M-h M-p' convert some of its
backslash sequences to the corresponding characters and realized
that it wouldn't be easy to find a robust way to do that...

...so here is a workaround. If you mark a region and then run
`M-x bsl', the `bsl' will convert the right (???) backslash
sequences in that region to the corresponding characters. This
code is something that I can test and maintain easily, and I will
be able to reuse its structure in other things that to do.

Hope it helps! =)
  Cheers,
    Eduardo



--snip--snip-- Here is the code: --snip--snip--








;; (find-efunctiondescr 'replace-regexp-in-string)
;; (find-efunction 'replace-regexp-in-string)
;; (find-elnode "Index" "* replace-regexp-in-string:")

;; (find-es "emacs" "rx")
;; (find-elnode "Char Classes" "[:xdigit:]")
;; (find-elnode "General Escape Syntax" "\\uXXXX")


;; (find-eev "eev-compose-hash.el" "group-n")
;; (find-efunctiondescr 'cl-map)
;; (find-efunction      'cl-map)

;; (find-node "(cl)Top")
;; (find-node "(cl)Top")
;; (find-node "(cl)Mapping over Sequences")
;; (find-clnode "Mapping over Sequences")






;; 1. See:
;; (find-elnode "Comment Tips")
;; (find-elisp-intro "10. Backquote")
;; (find-enode "Comment Commands" "M-;")

;; 2. Use something like this to test your code:
;; Tests:
;;                 (ee-find-mupdf-page "/tmp/foo.pdf"  )
;;                 (ee-find-mupdf-page "/tmp/foo.pdf" 5)
;; (find-bgprocess (ee-find-mupdf-page "/tmp/foo.pdf"  ))
;; (find-bgprocess (ee-find-mupdf-page "/tmp/foo.pdf" 5))

;; 3. Turn your comments into real comments, and use
;; <tab> and M-; (in emacs-liso-mode) to align your code:
;;
(defvar ee-find-mupdf-page-options '())
(defun  ee-find-mupdf-page (fname &optional page &rest rest)
  `("mupdf"
    ,@()				; -> nil
    ,fname				; -> xx.pdf
    ,@(if page
	  ;; if there is a page number
	  ;; calc the given page-nr
	  `(,(format " %s" (+ -2 12)))  ; -> 10
	)
    ))







(defun erpdf ( key page )
  (interactive)
  "check if a path is given: look at slash"
  (if  (string-equal key (car (assoc key z)))
      (progn
        (message (format "found hash-key: %s  page: %s "  key page ))
        (setq fname  (cdr (assoc key z)))    ; fname = 2nd part of alist-pair
        (message (format "file exists, has hash: %s " fname ))
        (setq exist "yes")
        )
    ;; ELSE:  there is no entry in the hash
    (progn
      (message (format "NO key in hash: %s" key ))
      (if (string-match "/" key)
          (progn
            (message "no hask key but file ->found slash")
            ;; check if file exists
            (if (file-exists-p key)
                (progn                  ; yes file is found
                  ;; (setq fname key)
                  (setq fname key)
                  (setq exist "yes")
                  (message (format "file exists: %s " key ))
                  )
              (progn
                ;; and the file does NOT exit
                (message (format "file DOES NOT exist: %s" key ))
                (setq fname key)
                (setq exist "no")
                )
              )
            )
        (progn
          (setq exist "no"
                fname nil)
          (message (format "key has  NO slash: %s" key ))
          )
        )  ; EOF match /
      ;; (message (format "NO key in hash: %s" key ))
      )    ; EOF hash-key PROG
    ;; (message (format "NO key in hash: %s" key ))  ; ELSE part of 1st IF
    )      ; EOF 1st IF
  (if (string-equal "yes" exist)
      (shell-command (format "/usr/bin/evince -i %d %s" page fname ))
    (message (format "Sorry: %s" fname))
    )
  ;; (message (format "pdf ?: %s %s" exist fname))
  )




(define-key Buffer-menu-mode-map "." 'hydra-buffer-menu/body)



;; From:
;; https://github.com/dsedivec/dot-emacs-d/blob/master/lisp/window-hydra.el#L43-L50

;;;###autoload (autoload 'window-hydra/body "window-hydra" nil t)
(defhydra window-hydra (:hint nil)
  "
^^^^switch or MOVE^^^^   _o_ther window         _1_ one window      winner:
^^^^    window    ^^^^   s_w_ap windows         _2_ split window    _←_ undo
     ^^_j_/_J_^^         _b_alance windows      _0_ delete window   _→_ redo
 _h_/_H_     _l_/_L_     _\\_ transpose frame
     ^^_k_/_K_^^         CCW _[_ _]_ CW rotate frame                _q_uit
  "
  ("j" (windmove-up))
  ("h" (windmove-left))
  ("l" (windmove-right))
  ("k" (windmove-down))
  ("J" (aw-swap-window (windmove-find-other-window 'up)))
  ("H" (aw-swap-window (windmove-find-other-window 'left)))
  ("L" (aw-swap-window (windmove-find-other-window 'right)))
  ("K" (aw-swap-window (windmove-find-other-window 'down)))
  ("1" delete-other-windows)
  ("2" split-window-below)
  ("b" balance-windows)
  ("o" ace-window)
  ("\\" transpose-frame)
  ("[" rotate-frame-anticlockwise)
  ("]" rotate-frame-clockwise)
  ("w" ace-swap-window)
  ("<left>" winner-undo)
  ("0" delete-window)
  ("<right>" winner-redo)
  ("q" nil))

;; (provide 'window-hydra)
;;; window-hydra.el ends here

































 k			;; hydra-manage-eev-index/ei-kill
 ;; move-beginning-of-line
 ;; set-mark-command
 ;; next-line
 ;; kill-region
 p			;; hydra-manage-eev-index/ei-prev
 e			;; hydra-manage-eev-index/ei-M-e
 ;; ee-eval-sexp-eol
 <down>			;; hydra-manage-eev-index/next-line
 y			;; hydra-manage-eev-index/ei-yank
 ;; move-beginning-of-line
 ;; yank
 <up>			;; hydra-manage-eev-index/previous-line
 e			;; hydra-manage-eev-index/ei-M-e
 ;; ee-eval-sexp-eol
 q			;; hydra-manage-eev-index/nil
 C-h l			;; view-lossage
 k			;; hydra-manage-eev-index/ei-kill
 ;; move-beginning-of-line
 ;; set-mark-command
 ;; next-line
 ;; kill-region
 p			;; hydra-manage-eev-index/ei-prev
 e			;; hydra-manage-eev-index/ei-M-e
 ;; ee-eval-sexp-eol
 <down>			;; hydra-manage-eev-index/next-line
 y			;; hydra-manage-eev-index/ei-yank
 ;; move-beginning-of-line
 ;; yank
 <up>			;; hydra-manage-eev-index/previous-line
 e			;; hydra-manage-eev-index/ei-M-e
 ;; ee-eval-sexp-eol
 q			;; hydra-manage-eev-index/nil
 C-h l			;; view-lossage






;; «ee-compilation-buffer»  (to ".ee-compilation-buffer")
;; (find-angg ".emacs" "ee-compilation-buffer")
;; (find-es    "emacs" "condition-case")
;; (find-es    "emacs" "compilation")
;; (defun d0  () (interactive) (find-ebuffer "2020-2-C2-somas-2.pdf"))

(defun kcb () (interactive) (ee-kill-buffer ee-compilation-buffer))
(defun cbe () (interactive) (find-ebuffer ee-compilation-buffer :end))
(defun Cv  () (interactive) (kcb) (C) (v) (g))
(defun eed () (interactive) (find-wset "132_o_o_o" '(e) '(cbe) '(d0)))
(defun ce0 () (interactive) (condition-case nil (Cv) (error (eed))))
(defun ce  () (interactive) (e) (save-buffer) (ce0))


(defun d0 () (interactive) 





(progn

(setq eec-stem     "2020-2-C3-taylor")
(setq eec-pbname   "2020-2-C3-taylor.pdf")
(setq eec-pfname   (ee-LATEXfile eec-pbname))
(setq eec-cmd      "lualatex -record 2020-2-C3-taylor.tex")
(setq eec-cbname   (format "cd %s\n%s" ee-LATEXdir eec-cmd))
(defun e () (interactive) (find-LATEX "2020-2-C3-taylor.tex"))
(defun v () (interactive) (find-pdftools-page eec-pfname))
(defun eec-cbkill () (interactive) (ee-kill-buffer eec-cbname))
(defun eec-cbview () (interactive) (find-ebuffer eec-cbname :end))
(defun eec-cbrun0 () (interactive) (find-LATEXsh eec-cmd "Success!!!"))
(defun eec-pview0 ()
  (interactive)
  (if (get-buffer eec-pbname)
      (find-ebuffer eec-pbname)
    (find-estring "(no PDF)")))
(defun eec-view-ok () (interactive) (find-2a '(e) '(progn (v) (g))))
(defun eec-view-err ()
  (interactive)
  (find-wset "132_o_o_o" '(e) '(eec-cbview) '(eec-pview0)))

(defun ce ()
  (interactive)
  (e) (save-buffer) (eec-cbkill)
  (condition-case nil
    (progn (eec-cbrun0)
	   (eec-view-ok))
    (error (eec-view-err))))

)

(eec-cbrun0)
(eec-pview0)
(eec-view-ok)

;; (find-es "emacs" "condition-case")




(defun C () (interactive) (find-LATEXsh eec-cmd "Success!!!"))



(defun c () (interactive) (find-LATEXsh "lualatex -record 2020-2-C3-taylor.tex" :end))
(defun C () (interactive) (find-LATEXSH "lualatex 2020-2-C3-taylor.tex" "Success!!!"))
(defun D () (interactive) (find-pdf-page      "~/LATEX/2020-2-C3-taylor.pdf"))
(defun d () (interactive) (find-pdftools-page "~/LATEX/2020-2-C3-taylor.pdf"))
(defun e () (interactive) (find-LATEX "2020-2-C3-taylor.tex"))
(defun o () (interactive) (find-LATEX "2020-2-C3-taylor.tex"))
(defun u () (interactive) (find-latex-upload-links "2020-2-C3-taylor"))
(defun v () (interactive) (find-2a '(e) '(d)))
(defun d0 () (interactive) (find-ebuffer "2020-2-C3-taylor.pdf"))
(defun cv () (interactive) (C) (ee-kill-this-buffer) (v) (g))






;; (find-find-links-links-new "code-xxx" "basicargs keywordargs")
;; (find-eev "eev-pdflike.el" "code-pdfbackend")









(defun eejump-34 () (find-2a nil '(find-eejumps 2 "eejump-34" '(eek "M-0 C-l"))))
(defun eejump-35 () (eek "C-a M-x r"))
(defun eejump-36 () (eek "C-a <up> C-a C-k C-k"))
(defun eejump-37 () (clear-fbclids))
(defun eejump-38 () (eek "C-a http://archive.md/ C-a"))
(defun eejump-39 () (brg))




O OBSStudio é pra gravar vídeos, pra editá-los, ou pras duas coisas?
Eu tenho gravado vídeos - screencasts, na verdade - usando o
SimpleScreenRecorder, configurando ele pra 6 frames per second... isso
me gera vídeos com cerca de 1.5MB por minuto, e como vários dos meus
alunos têm banda estreitíssima isso é bem melhor pra eles do que
vídeos com mais megabytes...

Aqui tem um exemplo de vídeo que eu gravei e editei usando esses
truques todos. Esse foi um em que eu caprichei muitíssimo - eu ensaiei
ele muito, gravei ele em vários pedacinhos e grudei eles depois, subi
ele pro Youtube (coisa que eu faço com poucos dos meus vídeos) e ainda
criei índices pra ele... repara que esse vídeo tem 48 minutos e o .mp4
dele tem só 74MB...

  "On why most of the best features in eev look like 5-minute hacks":
  http://angg.twu.net/emacsconf2020.html
  http://angg.twu.net/emacsconf2020.html#code-video
  http://angg.twu.net/eev-videos/emacsconf2020.mp4
  http://www.youtube.com/watch?v=hOAqBc42Gg8






(defun ce ()
  (interactive)
  (condition-case nil
      (progn (kcb) (C) (v) (g))
    (find-wset "132_o_o_o" '(e) '(cbe) '(d))))

(defun cv () (interactive) (C) (ee-kill-this-buffer) (v) (g))


(kcb)

(ce)

;; (find-node "(elisp)Handling Errors")


         (delete-file filename)
       (error nil))



% (defun cv () (interactive) (kcb) (C) (v) (g))








(code-youtube "CCC" "tBxjacxRshE" "Monk")

      "ERROR")))



# (find-angg "LUA/lua50init.lua" "to_youtube_hash")




  (file-expand-wildcards (format "%s*%s*" dir hash)))


;; (find-youtubedl-links "/sda5/videos/" nil "fty9QL4aSRc" nil "{stem}")

# (setq ee-youtubedl-dirs '("/sda5/videos/" "/tmp/videos/" "/tmp/"))
# (setq ee-youtubedl-dir "/sda5/videos/")

(find-eppp
(apply 'append
(mapcar
  (lambda (dir) (ee-youtubedl-guess* dir "fty9QL4aSRc"))
  (cons ee-youtubedl-dir ee-youtubedl-dirs)
  )
))


append
funcall
apply




(setq ee-c-dir "~/LATEX/")
(setq ee-c-cmd "lualatex -record 2021logicday.tex")
(setq ee-c-succstr "Success!!!")
(setq ee-c-buf nil)

(defun ee-c () (interactive)
  (find-sh-at-dir ee-c-dir ee-c-cmd)
  (setq ee-c-buf (buffer-name))
  (goto-char (point-min))
  (setq ee-c-succp (search-forward ee-c-succstr nil 'noerror)))

(defun ee-c0 () (find-ebuffer ee-c-buf :end))
(defun ee-k0 () (ee-kill-buffer ee-c-buf))
(defun ee-ecv0 () (find-wset "132_o_o_o" (e) (ee-c0) (v)))






;; Tests:
;; (find-estring-elisp (ee-find-extra-file-links nil "/tmp/o"))

(defun ee-find-extra-file-links (c fname)
  (let* ((dir (file-name-directory fname)))
    (ee-template0 "\
;; See: (find-eev-quick-intro \"9.1. `code-c-d'\")
;;      (find-pdf-like-intro \"9. Generating three pairs\" \"`M-h M-p'\")
;;      (find-audiovideo-intro \"2.1. `find-extra-file-links'\")

;; Links to this file and directory:
;; (find-fline {(ee-S fname)})
;; (find-fline {(ee-S dir)})
\(code-c-d \"{c}\" \"{dir}\")
;; (find-{c}file \"\")

;; Links to a PDF file:
;; (find-pdf-page \"{fname}\")
;; (find-pdf-text \"{fname}\")
\(code-pdf-page \"{c}\" \"{fname}\")
\(code-pdf-text \"{c}\" \"{fname}\")
;; (find-{c}page)
;; (find-{c}text)

;; Links to an audio file:
;; (find-audio \"{fname}\")
\(code-audio \"{c}audio\" \"{fname}\")
;; (find-{c}audio)
;; (find-{c}audio \"0:00\")

;; Links to a video file:
;; (find-video \"{fname}\")
\(code-video \"{c}video\" \"{fname}\")
;; (find-{c}video)
;; (find-{c}video \"0:00\")
;;
;; (eev-avadj-mode 0)
;; (eev-avadj-mode)

;; Links to an shell-like program (for eepitch):
;; (eepitch-comint \"{c}\" \"{fname}\")

(defun eepitch-{c} () (interactive)
  (eepitch-comint \"{c}\"
     \"{fname}\"))

;; Test:

* (eepitch-{c})
* (eepitch-kill)
* (eepitch-{c})
")))




       (lh-eevs2 (--map (cons (car it)
			      


(let* ((lh-eevs (--filter (string-match "eev" (car it)) load-history))
       (a (nth 7 lh-eevs))
       (b (cdr a))
       (c (--filter (and (consp it) (eq (car it) 'defun)) b))
       )
  ;; (find-epp lh-eevs)
  (setq A a)
  ;; (find-epp a)
  (find-epp c)
  )


    (c (--filter (and (consp it) (eq (car it) 'defun)) b))
   




(require 'dash)
;; See: https://github.com/magnars/dash.el#functions

;; Tests:
;; (find-epp        (assoc (symbol-file 'find-pdf-page 'defun) load-history))
;; (setq a-lh-entry (assoc (symbol-file 'find-pdf-page 'defun) load-history))
;; (find-epp                    a-lh-entry)
;; (find-epp (ee-lh-entry-finds a-lh-entry))
;;
(defun ee-lh-entry-finds (lh-entry)
  "Filter a load-history entry to keep only the `(defun . find-*)'s"
  (let* ((b (--filter (consp it) lh-entry))
	 (c (--filter (eq (car it) 'defun) b))
	 (d (--filter (string-match "^find-" (symbol-name (cdr it))) c)))
    (cons (car lh-entry) d)))

(defun ee-lh-eev-finds ()
  "Filter the load-history - returns a stripped version with only
the eev files and the `(defun . find-*)'s in them."
  (let* ((lh-eevs (--filter (string-match "eev" (car it)) load-history)))
    (-map 'ee-lh-entry-finds lh-eevs)))

;; Test:
;; (find-epp (ee-lh-eev-finds))







;; <find-ssr-links>
;; Skel: (find-find-links-links-new "ssr" "stem c" "")
;; (find-es "xfce" "keyboard-shortcuts")
;; Alt-F1 -> Multimedia -> SimpleScreenRecorder
;; Alt-F9 == hide_window_key
;; (find-es "screencasts" "simplescreenrecorder")
;;




;; «find-record-eev-video-links»  (to ".find-record-eev-video-links")
;; Skel: (find-find-links-links-new "record-eev-video" "stem" "")
;;
(defun find-record-eev-video-links (&optional stem &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for record-eev-video."
  (interactive)
  (setq stem (or stem "{stem}"))
  (apply
   'find-elinks
   `((find-record-eev-video-links ,stem ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-record-eev-video-links)
     ""
     ,(ee-template0 "\
")
     )
   pos-spec-list))









;;;                _                                          _     _            
;;;   ___ ___   __| | ___        __ _ _ __   __ _  __ ___   _(_) __| | ___  ___  
;;;  / __/ _ \ / _` |/ _ \_____ / _` | '_ \ / _` |/ _` \ \ / / |/ _` |/ _ \/ _ \ 
;;; | (_| (_) | (_| |  __/_____| (_| | | | | (_| | (_| |\ V /| | (_| |  __/ (_) |
;;;  \___\___/ \__,_|\___|      \__,_|_| |_|\__, |\__, | \_/ |_|\__,_|\___|\___/ 
;;;                                         |___/ |___/                          
;;
;; Tests: (find-code-anggvideo "c333" "2020.1-C3/C3_aula_3_video_3.mp4")
;;        (find-code-anggvideo "c333" "2020.1-C3/C3_aula_3_video_3.mp4" "1234567890")
;;             (code-anggvideo "c333" "2020.1-C3/C3_aula_3_video_3.mp4" "1234567890")
;;                        (find-c333video "0:12")
;;
(defun      code-anggvideo (c anggfname &optional youtubeid)
  (eval (ee-read (ee-code-anggvideo c anggfname youtubeid))))
(defun find-code-anggvideo (&optional c anggfname youtubeid &rest rest)
  (setq c (or c "{c}"))
  (setq anggfname (or anggfname "{anggfname}"))
  (setq youtubeid (or youtubeid "{youtubeid}"))
  (find-estring-elisp (apply 'ee-code-anggvideo c anggfname youtubeid rest)))
(defun   ee-code-anggvideo (c anggfname youtubeid)
  (ee-template0 "\
;; (find-code-anggvideo \"{c}\" \"{anggfname}\" \"{youtubeid}\")
;;      (code-anggvideo \"{c}\" \"{anggfname}\" \"{youtubeid}\")

(defun find-{c}video (&optional time &rest rest)
  (find-anggvideo-links \"{c}\" \"{anggfname}\" \"{youtubeid}\" time))
"))



;; <find-anggvideo-links>
;; Skel: (find-find-links-links-new "anggvideo" "c anggfname youtubeid time" "url")
;; Test: (find-anggvideo-links "c333" "2020.1-C3/C3_aula_3_video_3.mp4" "1234567890")
;;
(defun find-anggvideo-links (&optional c anggfname youtubeid time &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for anggvideo."
  (interactive)
  (setq c (or c "{c}"))
  (setq anggfname (or anggfname "{anggfname}"))
  (setq youtubeid (or youtubeid "{youtubeid}"))
  (setq time (or time "{time}"))
  (let* ((url (concat "http://angg.twu.net/" anggfname)))
    (apply
     'find-elinks
     `((find-anggvideo-links ,c ,anggfname ,youtubeid ,time ,@pos-spec-list)
       ,(ee-psnevideo-links c url youtubeid time)
       )
     pos-spec-list)))


















(defun ee-fg (color str)
  (propertize str 'face `(:foreground ,color)))

(defun ee-add-arrow (str)
  (format "\n   %s %s\n"
	  (ee-fg "OrangeRed" "-->")
	  (ee-fg "orange1" str)))

(defun ee-eval-last-sexp-8 ()
  (let* ((result0 (ee-eval (read (ee-last-sexp))))
	 (result1 (ee-add-arrow (ee-S result0))))
    (insert result1)))

(define-key my-mode-map (kbd "M-a")
  (lambda () (interactive) (end-of-line) (ee-eval-last-sexp-8)))


;; (set-frame-font "Monospace 12")
;; (set-frame-font "Monospace 16")
;; (find-elisp-intro)
;; (find-elisp-intro "2. Lists and conses")




;;;  _        _ _             _ _ 
;;; | |_ __ _(_) |   ___ __ _| | |
;;; | __/ _` | | |  / __/ _` | | |
;;; | || (_| | | | | (_| (_| | | |
;;;  \__\__,_|_|_|  \___\__,_|_|_|
;;;                               

;; <find-tail-call-links>
;; Skel: (find-find-links-links-new "tail-call" "stem firstargs" "")
;; Skel: (find-find-links-links-new "tail-call" "stem firstargs c fname" "")
;; Test: (find-tail-call-links)
;;       (find-tail-call-links "XPDF" nil "C" "FNAME")
;;
(defun find-tail-call-links (&optional stem firstargs c fname &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for tail-call."
  (interactive)
  (setq stem (or stem "{stem}"))
  (setq firstargs (or firstargs "{firstargs}"))
  (setq c (or c "{c}"))
  (setq fname (or fname "{fname}"))
  (apply
   'find-elinks-elisp
   `((find-tail-call-links ,stem ,firstargs ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-tail-call-links)
     ""
     ,(ee-template0 "\
;; (find-efunction 'code-{stem})

;; find-{stem}-page
;;
\(defalias 'find-{stem}page
          'find-{stem}-page)
\(defun     find-{stem}-page (fname &optional page &rest rest)
  (find-bgprocess (ee-find-{stem}-page fname page)))
\(defvar ee-find-{stem}-page-args nil)
\(defun  ee-find-{stem}-page (fname &optional page)
  `(\"{stem}\" ,@ee-find-{stem}-page-args
         ,@(if page `(,(format \"--page=%d\" page)))
         ,fname))

;; code-{stem}: top-level functions
;;
\(defun      code-{stem} ({c} {fname} &rest rest)
  (eval (ee-read      (apply 'ee-code-{stem} {c} {fname} rest))))
\(defun find-code-{stem} ({c} {fname} &rest rest)
  (find-estring-elisp (apply 'ee-code-{stem} {c} {fname} rest)))
\(defun   ee-code-{stem} ({c} {fname} &rest rest)
  (concat (ee-template0 \"\\
    (defun find-{c}page (&optional page &rest rest)
      (find-{stem}-page fname page))
\")  (ee-code-{stem}-rest rest)))

;; Support for extra arguments
;;
\(defun ee-code-{stem}-rest (rest)
  (ee-tail-call \"ee-code-{stem}-%S\" rest))

\(defun ee-code-{stem}-:key (arg &rest rest)
  (concat (ee-template0 \"\\
    (defun find-{c}page () ...)
\")  (ee-code-{stem}-rest rest)))

;; Test:
;; (find-code-{stem} \"{c}\" \"{fname}\" :key \"{<}foo{>}\" :key \"{<}bar{>}\")
")
     )
   pos-spec-list))





;;;                 _              _              _     
;;;  _ __ ___   ___| |_ __ _      | |_ ___   ___ | |___ 
;;; | '_ ` _ \ / _ \ __/ _` |_____| __/ _ \ / _ \| / __|
;;; | | | | | |  __/ || (_| |_____| || (_) | (_) | \__ \
;;; |_| |_| |_|\___|\__\__,_|      \__\___/ \___/|_|___/
;;;                                                     



' (let ((ee-youtubedl-dirs '("DIR1" "DIR2")))
    (find-youtubedl-links))







;; Local Variables:
;; coding:               utf-8-unix
;; modes:                (fundamental-mode emacs-lisp-mode)
;; End: