Warning: this is an htmlized version!
The original is here, and
the conversion rules are here.
;; This file:
;;    http://anggtwu.net/.emacs.templates
;;    http://anggtwu.net/.emacs.templates.html
;; file:///home/edrx/TH/L/.emacs.templates.html
;; (find-angg ".emacs.templates")
;;
;; (load (buffer-file-name))

;; (find-angg ".emacs")
;; (find-angg ".emacs" ".emacs.papers")
;; (find-angg ".emacs" ".emacs.templates")

;; «.ee-template»			(to "ee-template")
;; «.ee-template-expand»		(to "ee-template-expand")
;; «.ee-match-data-replace»		(to "ee-match-data-replace")
;; «.find-edrx-update-links»		(to "find-edrx-update-links")
;; «.find-qtdemo-links»			(to "find-qtdemo-links")
;; «.find-dn4tex-links»			(to "find-dn4tex-links")
;; «.find-beamer-links»			(to "find-beamer-links")
;; «.s2008a»				(to "s2008a")
;; «.find-blogme3-links»		(to "find-blogme3-links")
;; «.find-blogme3-curso-links»		(to "find-blogme3-curso-links")
;; «.find-curso-links»			(to "find-curso-links")
;; «.find-curso-makefile-links»		(to "find-curso-makefile-links")
;; «.find-quadro-links»			(to "find-quadro-links")
;; «.find-baudio-links»			(to "find-baudio-links")
;; «.bsec»				(to "bsec")
;; «.ee-bsec»				(to "ee-bsec")
;; «.ee-mkdl»				(to "ee-mkdl")
;; «.find-mkdl»				(to "find-mkdl")
;; «.ee-ps2pdf-script»			(to "ee-ps2pdf-script")
;; «.class»				(to "class")
;; «.bname»				(to "bname")
;; «.find-scp-links»			(to "find-scp-links")
;; «.find-gigapedia-links»		(to "find-gigapedia-links")
;; «.find-dn5-file-links»		(to "find-dn5-file-links")
;; «.find-blogme4-file-links»		(to "find-blogme4-file-links")
;; «.find-dhmake-links»			(to "find-dhmake-links")
;; «.find-dhmake-old-links»		(to "find-dhmake-old-links")
;; «.find-escript-links»		(to "find-escript-links")
;; «.find-thttpd-links»			(to "find-thttpd-links")
;; «.find-gitclone-links»		(to "find-gitclone-links")
;; «.find-newhost-links»		(to "find-newhost-links")
;; «.find-newhost-links-old»		(to "find-newhost-links-old")
;; «.find-prince-links»			(to "find-prince-links")
;; «.find-youtubedl-links-old»		(to "find-youtubedl-links-old")
;; «.find-eepitch-def-links»		(to "find-eepitch-def-links")
;; «.find-wpa-links»			(to "find-wpa-links")
;; «.find-intro-links»			(to "find-intro-links")
;; «.diagskel»				(to "diagskel")
;; «.ee-latex-header»			(to "ee-latex-header")
;; «.find-tail-call-links»		(to "find-tail-call-links")
;; «.find-pdflikedef-links»		(to "find-pdflikedef-links")
;; «.find-eev-video-record-links» 	(to "find-eev-video-record-links")
;; «.find-eev-create-tar-links»		(to "find-eev-create-tar-links")
;; «.find-screencast-links»		(to "find-screencast-links")
;; «.find-angg-upload-links»		(to "find-angg-upload-links")
;; «.find-blogme-upload-links»		(to "find-blogme-upload-links")
;; «.find-a2html-upload-links»		(to "find-a2html-upload-links")
;; «.find-escript-upload-links»		(to "find-escript-upload-links")
;; «.find-latex-upload-links»		(to "find-latex-upload-links")
;; «.find-book-links»			(to "find-book-links")
;; «.find-lua-links»			(to "find-lua-links")
;; «.find-scast-links»			(to "find-scast-links")
;; «.find-python-links»			(to "find-python-links")
;; «.find-fbc-links»			(to "find-fbc-links")
;; «.find-lualatex-links»		(to "find-lualatex-links")
;; «.find-dlualatex-links»		(to "find-dlualatex-links")
;; «.find-br-links»			(to "find-br-links")
;; «.find-pastebin-links»		(to "find-pastebin-links")
;; «.find-texlive-links»		(to "find-texlive-links")
;; «.find-matplotlib-links»		(to "find-matplotlib-links")
;; «.find-C-links»			(to "find-C-links")
;; «.find-luarocks-links»		(to "find-luarocks-links")
;; «.find-luarocks-src-links»		(to "find-luarocks-src-links")
;; «.find-math-b-links»			(to "find-math-b-links")
;; «.find-defcsprefix-links»		(to "find-defcsprefix-links")
;; «.find-debian-version-links»		(to "find-debian-version-links")
;; «.find-sound-debug-links»		(to "find-sound-debug-links")
;; «.find-bradytdd-links»		(to "find-bradytdd-links")
;; «.find-dednat4-convert-links»	(to "find-dednat4-convert-links")
;; «.find-psne-article-links»		(to "find-psne-article-links")
;; «.find-psne-arxiv-links»		(to "find-psne-arxiv-links")
;; «.find-book-grep-links»		(to "find-book-grep-links")
;; «.find-my-this-file-links»		(to "find-my-this-file-links")
;; «.find-ebook-convert-links»		(to "find-ebook-convert-links")
;; «.find-lilypond-links»		(to "find-lilypond-links")
;; «.find-latexgimp-links»		(to "find-latexgimp-links")
;; «.find-latexinkscape-links»		(to "find-latexinkscape-links")
;; «.find-latexscan-links»		(to "find-latexscan-links")
;; «.find-C2-aula-links»		(to "find-C2-aula-links")
;; «.find-C3-aula-links»		(to "find-C3-aula-links")
;; «.ee-template0-file»			(to "ee-template0-file")
;; «.find-CN-aula-links»		(to "find-CN-aula-links")
;; «.find-MM-aula-links»		(to "find-MM-aula-links")
;; «.find-MM-aula-2023-2-links»		(to "find-MM-aula-2023-2-links")
;; «.find-MM-tudo-links»		(to "find-MM-tudo-links")
;; «.find-ssr-links»			(to "find-ssr-links")
;; «.find-obs-links»			(to "find-obs-links")
;; «.find-emacs-test-links»		(to "find-emacs-test-links")
;; «.find-vimeodl-links»		(to "find-vimeodl-links")
;; «.find-repl-lualatex-links»		(to "find-repl-lualatex-links")
;; «.find-classroom-trab-links»		(to "find-classroom-trab-links")
;; «.find-emacsdevel-links»		(to "find-emacsdevel-links")
;; «.find-helpgnuemacs-links»		(to "find-helpgnuemacs-links")
;; «.find-emacsorgmode-links»		(to "find-emacsorgmode-links")
;; «.find-vscan-links»			(to "find-vscan-links")
;; «.find-LATEXpdf-links»		(to "find-LATEXpdf-links")
;; «.find-pdfpages-links»		(to "find-pdfpages-links")
;; «.find-pdfpages2-links»		(to "find-pdfpages2-links")
;; «.find-sshot-links»			(to "find-sshot-links")
;; «.find-eevvideopage-links»		(to "find-eevvideopage-links")
;; «.find-eevvideopage-linkss»		(to "find-eevvideopage-linkss")
;; «.eev-videos-data»			(to "eev-videos-data")
;; «.code-youtube»			(to "code-youtube")
;; «.find-fossil-update-srf-links»	(to "find-fossil-update-srf-links")
;; «.find-code-xxx-links»		(to "find-code-xxx-links")
;; «.code-eec-LATEX»			(to "code-eec-LATEX")
;; «.code-eec-dir»			(to "code-eec-dir")
;; «.find-cp-angg-links»		(to "find-cp-angg-links")
;; «.find-eevshortvideo-links»		(to "find-eevshortvideo-links")
;; «.find-telegram-save-log-links»	(to "find-telegram-save-log-links")
;; «.find-build-for-arxiv-links»	(to "find-build-for-arxiv-links")
;; «.find-mygitrepo-links»		(to "find-mygitrepo-links")
;; «.find-rcirc-quick-links»		(to "find-rcirc-quick-links")
;; «.find-anggwget-links»		(to "find-anggwget-links")
;; «.find-find-angg-links»		(to "find-find-angg-links")
;; «.find-find-es-links»		(to "find-find-es-links")
;; «.find-maclanemoerdijk-links»	(to "find-maclanemoerdijk-links")
;; «.find-cwm-links»			(to "find-cwm-links")
;; «.find-emacs28-bisect-by-hand-links»	(to "find-emacs28-bisect-by-hand-links")
;; «.find-agda-links»			(to "find-agda-links")
;; «.find-agdafile-links»		(to "find-agdafile-links")
;; «.find-emodeline-links»		(to "find-emodeline-links")
;; «.find-fvwmdoc-links»		(to "find-fvwmdoc-links")
;; «.find-agdalatex-links»		(to "find-agdalatex-links")
;; «.find-fsbot-links»			(to "find-fsbot-links")
;; «.find-mvideo-links»			(to "find-mvideo-links")
;; «.find-princeurl-links»		(to "find-princeurl-links")
;; «.find-luademo-links»		(to "find-luademo-links")
;; «.find-emlua-links»			(to "find-emlua-links")
;; «.find-pict2elua-links»		(to "find-pict2elua-links")
;; «.find-maxima-links»			(to "find-maxima-links")
;; «.find-pip3-links»			(to "find-pip3-links")
;; «.find-yttranscript-links»		(to "find-yttranscript-links")
;; «.find-maximaindex-links»		(to "find-maximaindex-links")
;; «.find-maximamsg-links»		(to "find-maximamsg-links")
;; «.find-maximamsg»			(to "find-maximamsg")
;; «.find-Maxima2-links»		(to "find-Maxima2-links")
;; «.find-qdraw-links»			(to "find-qdraw-links")
;; «.find-stream-links»			(to "find-stream-links")
;; «.code-etv»				(to "code-etv")
;; «.find-cabal-links»			(to "find-cabal-links")
;; «.find-cabal-unpack-links»		(to "find-cabal-unpack-links")
;; «.find-cabal-unpack»			(to "find-cabal-unpack")
;; «.find-cabos-links»			(to "find-cabos-links")
;; «.find-elinks-haskell»		(to "find-elinks-haskell")
;; «.find-ghc-links»			(to "find-ghc-links")
;; «.find-opam-links»			(to "find-opam-links")
;; «.find-tikz-links»			(to "find-tikz-links")
;; «.find-tikzsearch-links»		(to "find-tikzsearch-links")
;; «.find-C2C3git-links»		(to "find-C2C3git-links")
;; «.find-MMMMgit-links»		(to "find-MMMMgit-links")
;; «.find-paps-links»			(to "find-paps-links")
;; «.find-sandwiches-def-links»		(to "find-sandwiches-def-links")
;; «.find-untgz-links»			(to "find-untgz-links")
;; «.find-sandwichsexp-links»		(to "find-sandwichsexp-links")
;; «.find-blogme3-rstdoc-links»		(to "find-blogme3-rstdoc-links")
;; «.find-eepitch-select-shell-links»	(to "find-eepitch-select-shell-links")
;; «.find-movebigfiles-links»		(to "find-movebigfiles-links")
;; «.find-jpgstopdf-links»		(to "find-jpgstopdf-links")
;; «.find-curso2023-links»		(to "find-curso2023-links")
;; «.find-semestre-links»		(to "find-semestre-links")
;; «.find-semestre-MM-links»		(to "find-semestre-MM-links")
;; «.find-semestre-emacs-links»		(to "find-semestre-emacs-links")
;; «.find-semestre-MM-quadros-links»	(to "find-semestre-MM-quadros-links")
;; «.find-mkdir-links»			(to "find-mkdir-links")
;; «.find-wgetrecursive-links»		(to "find-wgetrecursive-links")
;; «.find-ajuda-email-links»		(to "find-ajuda-email-links")
;; «.find-ajuda-jpgs-links»		(to "find-ajuda-jpgs-links")
;; «.find-engrave-faces-links»		(to "find-engrave-faces-links")
;; «.find-planodecurso-links»		(to "find-planodecurso-links")
;; «.find-mtp-links»			(to "find-mtp-links")
;; «.find-copy-quadros-links»		(to "find-copy-quadros-links")
;; «.find-gmail-links»			(to "find-gmail-links")
;; «.find-class-links»			(to "find-class-links")
;; «.find-expands-links»		(to "find-expands-links")
;; «.code-etv2»				(to "code-etv2")
;; «.find-editeevsubtitles-links»	(to "find-editeevsubtitles-links")
;; «.find-blogme3-legendas-links»	(to "find-blogme3-legendas-links")
;; «.find-blogme3-st-up-links»		(to "find-blogme3-st-up-links")
;; «.find-cp-LUA-links»			(to "find-cp-LUA-links")
;; «.find-Deps1-links»			(to "find-Deps1-links")
;; «.find-show2-links»			(to "find-show2-links")
;;   «.show2»				(to "show2")
;; «.find-godotref-links»		(to "find-godotref-links")
;; «.find-defhydra-links»		(to "find-defhydra-links")
;; «.find-rsynccamera-links»		(to "find-rsynccamera-links")
;; «.find-eev-new-el-file-links»	(to "find-eev-new-el-file-links")
;; «.find-tikz2-links»			(to "find-tikz2-links")
;; «.find-screenkey-links»		(to "find-screenkey-links")
;; «.find-tikzsearch2-links»		(to "find-tikzsearch2-links")
;; «.find-luaso-links»			(to "find-luaso-links")
;; «.find-let*-macro-links»		(to "find-let*-macro-links")
;; «.find-luawget-links»		(to "find-luawget-links")
;; «.eewrap-require»			(to "eewrap-require")
;; «.find-termux-links»			(to "find-termux-links")
;; «.tm-expand»				(to "tm-expand")
;; «.tm-setenv»				(to "tm-setenv")
;; «.find-npm-links»			(to "find-npm-links")
;; «.find-my-mode-links»		(to "find-my-mode-links")
;; «.find-show2-use-links»		(to "find-show2-use-links")
;; «.find-etv-links»			(to "find-etv-links")
;; «.find-luatree-links»		(to "find-luatree-links")
;; «.find-lean-links»			(to "find-lean-links")
;; «.find-twitter-links»		(to "find-twitter-links")
;; «.find-pdfanim-links»		(to "find-pdfanim-links")
;; «.find-qrencode-links»		(to "find-qrencode-links")
;; «.find-leanrstdoc-links»		(to "find-leanrstdoc-links")
;; «.find-leanhtml-links»		(to "find-leanhtml-links")
;; «.find-pyghtml-links»		(to "find-pyghtml-links")
;; «.find-leanbook-links»		(to "find-leanbook-links")
;; «.find-leanquestion-links»		(to "find-leanquestion-links")
;; «.find-wrap-links»			(to "find-wrap-links")
;; «.find-machinectl-tar-links»		(to "find-machinectl-tar-links")
;; «.find-lakefile-links»		(to "find-lakefile-links")
;; «.find-leanwgetr-links»		(to "find-leanwgetr-links")
;; «.find-subtitles3-links»		(to "find-subtitles3-links")
;; «.kla-tex»				(to "kla-tex")
;; «.find-instagram-links»		(to "find-instagram-links")
;; «.find-htmlpdf-links»		(to "find-htmlpdf-links")
;; «.find-sbcl-links»			(to "find-sbcl-links")
;; «.find-dednat7debug-links»		(to "find-dednat7debug-links")
;; «.eewrap-maximamsg»			(to "eewrap-maximamsg")
;; «.find-tryit-links»			(to "find-tryit-links")
;; «.find-subs-links»			(to "find-subs-links")




;; «ee-template»  (to ".ee-template")
;; «ee-template-expand»  (to ".ee-template-expand")
;; (find-efunction 'replace-regexp-in-string)
;; (find-elnode "Index" "* replace-regexp-in-string:")
;; (find-elnode "Search and Replace")
;; (find-elnode "Association Lists")
;; (cadr (assoc "b" '(("a" "AA") ("b" "CC") ("c" "CC"))))
;; (find-efunction 'find-psne-links)

;; Moved to:
;; (find-eev "eev-insert.el")
;; (find-eev "eev-insert.el" "ee-template")
' (defun ee-template (pairs template)
  (let ((f (lambda (match)
	     (or (cadr (assoc (match-string 1 match) pairs))
		 match))))
    (replace-regexp-in-string "{\\([^{}]+\\)}" f template 'fixedcase)))

;; Two demos:

' (ee-template
    '(("a" "AA") ("b" "CC") ("c" "CC"))
    "foo{a}bar{bla}poo{b}bletch")

' (ee-template
    '(("http" "https") ("a/b/" "foo/bar/") ("c" "index.html"))
"* (eepitch-shell)
mkdir -p $S/{http}/{a/b/}
cd       $S/{http}/{a/b/}
wget     '{http}://{a/b/}{c}'
echo     '{http}://{a/b/}{c}' >> ~/.psne.log")



;; «ee-match-data-replace»  (to ".ee-match-data-replace")
;; (find-efunction 'replace-string)
;; (find-efunction 'replace-regexp-in-string)
;; (find-elnode "Search and Replace" "replace-regexp-in-string")
;; (find-elnode "Entire Match Data")
;; (find-elnode "Saving Match Data")
;; (find-elnode "Replacing Match")
;; (find-efunction 'set-match-data)
;; (find-efunction 'match-data)
;;
(defun ee-match-data-pairs (start strings)
  (if strings
      (let* ((len (length (car strings)))
	     (end (+ start len)))
	`(,start ,end . ,(ee-match-data-pairs end (cdr strings))))))

(defun ee-match-data-replace (strings replacement)
  (save-match-data
    (let* ((subj (apply 'concat strings))
	   (pairs (ee-match-data-pairs 0 strings)))
      (set-match-data `(0 ,(length subj) . ,pairs))
      (replace-match replacement 'fixedcase nil subj))))

;; Tests:
' (progn
    (string-match "<\\([a-z]+\\)_\\([a-z]+\\)>" "a<bc_def>g" 0)
    (match-data))
;;  --> (1 9  2 4  5 8)
' (ee-match-data-pairs 0 '("bc" "def"))
;;  -->      (0 2  2 5)
' (ee-match-data-replace '("bc" "def") "<\\1_\\2>")
;;  --> "<bc_def>"





;; «find-edrx-update-links»  (to ".find-edrx-update-links")
;; Skel: (find-find-links-links-new "edrx-update" "" "")
;; Test: (find-edrx-update-links)
;;
(defun find-edrx-update-links (&rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for edrx-update."
  (interactive)
  (apply
   'find-elinks
   `((find-edrx-update-links ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-edrx-update-links)
     ""
     ,(ee-template0 "\
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd
laf   edrx.tgz edrx-old.tgz
mv -v edrx.tgz edrx-old.tgz
wget http://anggtwu.net/edrx.tgz
laf   edrx.tgz edrx-old.tgz
tar -xvzf edrx.tgz
  ")
     )
   pos-spec-list))





;; «find-qtdemo-links»  (to ".find-qtdemo-links")
;; (find-qtdemo-links)
(defun find-qtdemo-links (&optional name &rest rest)
  (interactive)
  (setq name (or name "{qtdemo}"))
  (find-elinks
   `((find-qtdemo-links ,name ,@rest)
     (find-angg ".emacs.templates" "find-qtdemo-links")
     (find-angg ".emacs" "qt")
     (find-qtprogrammingw3m "toc.html")
     (find-qt4docfile "")
     (find-es "qt")
     ""
     ,(ee-template
      `(("qtdemo" ,name))
      "#*
rm -Rv /tmp/{qtdemo}/
mkdir  /tmp/{qtdemo}/
cd     /tmp/{qtdemo}/
cat > {qtdemo}.pro <<'%%%'
TEMPLATE = app
CONFIG   += qt warn_on
HEADERS  =
SOURCES  = main.cpp
TARGET   = {qtdemo}
QTDIR_build:REQUIRES=\"contains(QT_CONFIG, small-config)\"
%%%

cat > main.cpp <<'%%%'
#include <QApplication>
#include <QPushButton>
int main(int argc, char *argv[]) {
  QApplication app(argc, argv);
  QPushButton hello(\"Hello world!\");
  hello.resize(100, 30);
  hello.show();
  return app.exec();
}
%%%

qmake-qt4 -project
qmake-qt4 {qtdemo}.pro
make CXX=\"gcc -g\" |& tee om

#*"))))



;; «find-dn4tex-links»  (to ".find-dn4tex-links")
;; (find-angg ".emacs" "find-dn4tex-links")
;; (define-key eev-mode-map "\M-h\M-u" 'find-dn4tex-links)
;; Test:
;; (find-dn4tex-links)
;;
(defun find-dn4tex-links (&optional stem &rest rest)
  "Visit a temporary buffer containing hyperlinks for dn4tex."
  (interactive)
  (setq stem (or stem "{stem}"))
  (apply 'find-elinks `(
    (find-dn4tex-links ,stem ,@rest)
    ;; ""
    ,(ee-template0 "\
# (kill-new \"  LATEX/{stem}.tex\\n\")
# (find-blogme3file \"anggmake.lua\" \"LATEX/\")
# (wrobak 2 ' (find-angg \"LATEX/{stem}.tex\"))

% (find-angg \"LATEX/{stem}.tex\")
% (find-dn4ex \"edrx08.sty\")
% (find-angg \".emacs.templates\" \"s2008a\")
% (defun c () (interactive) (find-zsh \"cd ~/LATEX/ && ~/dednat4/dednat41 {stem}.tex && latex    {stem}.tex\"))
% (defun c () (interactive) (find-zsh \"cd ~/LATEX/ && ~/dednat4/dednat41 {stem}.tex && pdflatex {stem}.tex\"))
% (eev \"cd ~/LATEX/ && Scp {stem}.{<}dvi,pdf{>} edrx@anggtwu.net:slow_html/LATEX/\")
% (defun d () (interactive) (find-dvipage \"~/LATEX/{stem}.dvi\"))
% (find-dvipage \"~/LATEX/{stem}.dvi\")
% (find-pspage  \"~/LATEX/{stem}.ps\")
% (find-pspage  \"~/LATEX/{stem}.pdf\")
% (find-xpdfpage \"~/LATEX/{stem}.pdf\")
% (find-zsh0 \"cd ~/LATEX/ && dvipdf         {stem}.dvi {stem}.pdf\")
% (find-zsh0 \"cd ~/LATEX/ && dvips -D 300 -o {stem}.ps {stem}.dvi\")
% (find-zsh0 \"cd ~/LATEX/ && dvips -D 600 -P pk -o {stem}.ps {stem}.dvi && ps2pdf {stem}.ps {stem}.pdf\")
% (find-zsh0 \"cd ~/LATEX/ && dvips -D 300 -o tmp.ps tmp.dvi\")
% (find-pspage  \"~/LATEX/tmp.ps\")
% (ee-cp \"~/LATEX/{stem}.pdf\" (ee-twupfile \"LATEX/{stem}.pdf\") 'over)
% (ee-cp \"~/LATEX/{stem}.pdf\" (ee-twusfile \"LATEX/{stem}.pdf\") 'over)
% (find-twusfile     \"LATEX/\" \"{stem}\")
% http://anggtwu.net/LATEX/{stem}.pdf")
    ;;
    "\\documentclass[oneside]{book}
\\usepackage[latin1]{inputenc}
\\usepackage{edrx08}       % (find-dn4ex \"edrx08.sty\")
%L process \"edrx08.sty\"  -- (find-dn4ex \"edrx08.sty\")
\\input edrxheadfoot.tex   % (find-dn4ex \"edrxheadfoot.tex\")
\\begin{document}\n
\\input {stem}.dnt\n
%*
% (eedn4-51-bounded)\n
Index of the slides:
\\msk
% To update the list of slides uncomment this line:
%\\makelos{tmp.los}
% then rerun LaTeX on this file, and insert the contents of \"tmp.los\"
% below, by hand (i.e., with \"insert-file\"):
% (find-fline \"tmp.los\")
% (insert-file \"tmp.los\")\n
%*\n
\\end{document}\n
% L\157cal Variables:
% coding:           raw-text-unix
% ee-anchor-format: \"«%s»\"
% End:\n"
    ) rest))




;; «find-beamer-links» (to ".find-beamer-links")
;; (find-find-links-links "{k}" "beamer" "stem")
;; A test: (find-beamer-links ___)

(defun find-beamer-links (&optional stem &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for foo."
  (interactive)
  (setq stem (or stem "{stem}"))
  (let* ((bigstr0 (ee-read-file "~/LATEX/beamer-template.tex"))
	 (bigstr1 (replace-regexp-in-string "BSTEM" stem bigstr0 'fixedcase)))
    (apply 'find-elinks
     `((find-beamer-links ,stem ,@pos-spec-list)
       ;; Convention: the first sexp always regenerates the buffer.
       (find-efunction 'find-beamer-links)
       ""
       ,bigstr1
       )
     pos-spec-list)))

;; Test: (find-beamer-links "2099-foo")





;; «s2008a»  (to ".s2008a")
;; (find-angg ".emacs.templates" "s2008a")
;; Used to create section headers for some LaTeX files.
;; (find-LATEX "2008comprcat.tex")
;; (defalias 's 's2008a)
;; Example:
' (eesteps '(
    (find-estring (format "%% %S\n" '(s2008a "Slide: foo bar" "foo-bar")))
    "M-e"))

(defun ee-delete-and-extract-this-line (&optional adjust)
  (ee-no-trailing-nl
   (ee-no-properties
    (ee-delete-and-extract-line adjust))))

(defun mysection (sectioncommand spaces title tag)
  (insert (ee-template
   `(("_section" ,sectioncommand)
     (" "         ,spaces)
     ("title"     ,title)
     ("tag"       ,tag)
     ("line"      ,(ee-delete-and-extract-this-line))) "\
% { }«.{tag}»	(to \"{tag}\")
% --------------------
% «{tag}»  (to \".{tag}\")
{line}
{_section} {{title}} {{tag}}
")))

(defun slide  (title tag) (mysection "\\\\myslide"      ""     title tag))
(defun chap   (title tag) (mysection "\\\\mychapter"    ""     title tag))
(defun sec    (title tag) (mysection "\\\\mysection"    "  "   title tag))
(defun subsec (title tag) (mysection "\\\\mysubsection" "    " title tag))

;; (mysection "\\\\section" "  " "Foo Bar" "foo-bar")
;; (chap "Foo bar" "foo-bar")

(defalias 's2008a 'sec)
(defalias 's      'slide)
(defalias 'sec2008a 'sec)
(defalias 'chap2008a 'chap)




;; «find-blogme3-links»  (to ".find-blogme3-links")
;; Skel: (find-find-links-links-new "blogme3" "stem" "")
;; Test: (find-blogme3-links)
;; See:  (find-efunction 'find-find-links-links)
;;       (find-efunction 'find-dn4tex-links)
;;       (find-efunction 'blogme3-footer)
;;       (find-efunction 'blogme3-lisp)
;;       (find-find-links-links "blogme3")
;;
(defun find-blogme3-links (&optional stem &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for blogme3."
  (interactive)
  (setq stem (or stem "{stem}"))
  (apply 'find-elinks `(
    (find-blogme3-links ,stem ,@pos-spec-list)
    (find-blogme3-utf8-links ,stem ,@pos-spec-list)
    (find-efunction 'find-blogme3-links)
    (find-efunction 'find-blogme3-utf8-links)
    (find-blogme3-curso-links)
    (find-blogme3file "blogme3.el")
    (find-blogme3file "")
    ""
    (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))



(defun find-blogme3-links (&optional stem &rest rest)
  "Visit a temporary buffer containing hyperlinks for blogme3."
  (interactive)
  (setq stem (or stem "{stem}"))
  (apply 'find-elinks `(
    (find-blogme3-links ,stem ,@rest)
    (find-efunction 'find-blogme3-links)
    (find-blogme3-curso-links)
    (find-blogme3file "blogme3.el")
    (find-blogme3file "")
    ""
    (kill-new ,stem)
    (find-blogme3 "anggmake.lua" "blogmestems")
    (find-TH ,stem)
    (ee-copy-rest 1 '(find-TH ,stem))
    ;; (wrobak 2 ' (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]]
\[htmlize [J (Title)]\n
]
\[#
 # Local Variables:
 # coding: raw-text-unix
 # modes: (fundamental-mode blogme-mode)
 # End:
#]")
    ) rest))



;; «find-blogme3-curso-links» (to ".find-blogme3-curso-links")
;; Test: (find-blogme3-curso-links)
;; Test: (find-blogme3-curso-links "2017" "2" "GA" "2017.1")
;; Test: (find-blogme3-curso-links "2017" "2" "C2" "2017.1")
;; Test: (find-blogme3-curso-links "2017" "2" "LA" "2017.1")
;; Test: (find-blogme3-curso-links "2020" "1" "C2" "2019.2")
;; Test: (find-blogme3-curso-links "2020" "1" "C3" "2019.2")
;; Test: (find-blogme3-curso-links "2020" "2" "C2" "2020.1")
;; Test: (find-blogme3-curso-links "2020" "2" "C3" "2020.1")
;;
(defun find-blogme3-curso-links (&optional year sem name prevsem &rest pos-spec-list)
  "Visit a temporary buffer containing hyperlinks for blogme3."
  (interactive)
  (setq year (or year "{year}"))
  (setq sem (or sem "{sem}"))
  (setq name (or name "{name}"))
  (setq prevsem (or prevsem "{prevsem}"))
  (let ((stem (format "%s.%s-%s" year sem name)))
    (apply 'find-elinks `(
      (find-blogme3-curso-links ,year ,sem ,name ,prevsem ,@pos-spec-list)
      (find-efunction 'find-blogme3-curso-links)
      ""
      (kill-new ,stem)
      (find-blogme3 "anggmake.lua" "blogmestems")
      (find-blogme3 "anggmake.lua" "blogmestems" "2017.1-LA")
      (find-TH ,stem)
      ""
      ,(ee-template0 "
# Create directories and makefiles

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
mkdir   ~/{year}.{sem}-{name}/
cp -iv  ~/{prevsem}-{name}/Makefile ~/{year}.{sem}-{name}/
# (find-2b '(find-angg \"{prevsem}-{name}/Makefile\") '(find-angg \"{year}.{sem}-{name}/Makefile\"))
# (find-fline \"~/{year}.{sem}-{name}/Makefile\")

# (kill-new               \"{stem}\")
# (find-THfile \"Makefile\" \"2019.1-TD\")
# (kill-new                    \"\\n  {stem}/Makefile\")
# (find-blogme3file \"anggmake.lua\" \"2019.1-TD/Makefile\")

* (eepitch-Twu)
* (eepitch-kill)
* (eepitch-Twu)
mkdir ~/public_html/{year}.{sem}-{name}/
mkdir   ~/slow_html/{year}.{sem}-{name}/

# Create ___-material.tex:
# (find-lualatex-links \"{year}-{sem}-{name}-material\")

# Create {year}.{sem}.blogme:
# (find-2a '(find-TH \"{prevsem}\") '(find-TH \"{year}.{sem}\"))

# Adjust {stem}.blogme:
# (find-2a '(find-TH \"{prevsem}-{name}\") '(find-TH \"{stem}\"))



# Create {stem}.blogme:
# (ee-copy-rest 1 '(find-TH \"{stem}\"))

\[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
;; (find-curso-links \"{year}\" \"{sem}\" \"{name}\" \"78\")
;;
;; (find-fline     \"~/{stem}/\")
;; (find-pdf-page  \"~/{stem}/{stem}.pdf\")
;; (find-sh0 \"cp -v ~/{stem}/{stem}.pdf /tmp/\")

#]
\[lua: LR = R ]
\[htmlize [J {name} {year}.{sem} - Eduardo Ochs]\n

\[P [R {year}.{sem}.html Salas, horários, etc]
\[BR] [R {prevsem}-{name}.html Página do semestre anterior]
\]

\[BE'
PDFs com todos os quadros:
http://anggtwu.net/{stem}/{stem}.pdf (este semestre)
http://anggtwu.net/{prevsem}-{name}/{prevsem}-{name}.pdf (semestre anterior)
Material para exercícios:
http://anggtwu.net/LATEX/{year}-{sem}-{name}-material.pdf (este semestre)
http://anggtwu.net/LATEX/{year}-{sem}-{name}-material.pdf (semestre anterior)

Fotos dos quadros:
\(ainda não\)
\]

\[#
Alunos:
#]

]
\[#
 # Local Variables:
 # coding: raw-text-unix
 # modes: (fundamental-mode blogme-mode)
 # End:
#]")
      ) pos-spec-list)))



;; «find-curso-links» (to ".find-curso-links")

(defun find-curso-links (&optional year sem name nlines variants &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for foo."
  (interactive)
  (setq year     (or year "{year}"))
  (setq sem      (or sem "{sem}"))
  (setq name     (or name "{name}"))
  (setq nlines   (or nlines "{nlines}"))
  (setq variants (or variants ""))
  (apply 'find-elinks
   `((find-curso-links ,year ,sem ,name ,nlines ,@pos-spec-list)
     (find-curso-links "2016" "2" "GA" "20" ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-curso-links)
     "# Superseded by: (find-efunction 'find-curso2023-links)"
     ""
     ,(ee-find-curso-script year sem name nlines variants)
;;      ,(ee-template0 "\
;; ")
     )
   pos-spec-list))

;; (find-estring (ee-find-curso-script "2016" "1" "GA" "20"))
;;
(defun ee-find-curso-script (year sem name nlines variants)
  "Return a list of sexps and strings for curso.
This is an internal function used by `find-curso-links'."
  (ee-template0 "\
# Adjust nlines:
# (find-2a nil '(find-TH \"{year}.{sem}-{name}\"))
# (eek          \"M-o M-> {nlines}*<up> M-o\")

# (find-angg     \"{year}.{sem}-{name}/\")
# (find-twusfile \"{year}.{sem}-{name}/\")
# (find-fline    \"/tmp/\")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd /tmp/
# sudo chmod -v 644 {year}*{name}*.jpg
       chmod -v 644 {year}*{name}*.jpg
A=($(ls {year}*{name}*.jpg))
print -l $A
for i in $A; do
  echo convert $i -rotate 0 -auto-orient $i
       convert $i -rotate 0 -auto-orient $i
done
# (find-fline \"/tmp/\")
cp -iv $A ~/{year}.{sem}-{name}/
cd        ~/{year}.{sem}-{name}/
for i in $A; do
  echo \"http://anggtwu.net/{year}.{sem}-{name}/$i\"
done |& tee /tmp/o.{name}
#
* (kill-new (find-sh00 \"cat /tmp/o.{name}\"))
* (find-2a nil '(find-TH \"{year}.{sem}-{name}\"))
* (eek \"M-o M-> {nlines}*<up> M-o\")
** Now run this with M-e: (eek \"M-o C-y M-o\")
**
cd /tmp/
A=($(ls {year}*{name}*.jpg))
print -l $A
cd ~/{year}.{sem}-{name}/
laf $A
{
Scp-np $A edrx@anggtwu.net:/home/edrx/slow_html/{year}.{sem}-{name}/
Scp-np $A edrx@anggtwu.net:/home/edrx/public_html/{year}.{sem}-{name}/
}
# (find-twusfile \"{year}.{sem}-{name}/\")

** Make djvus
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell2)
cd ~/{year}.{sem}-{name}/
make pngs
make djvus
make {year}.{sem}-{name}.djvu
make {year}.{sem}-{name}.pdf
make pdfs
{
Scp-np {year}.{sem}-{name}{variants}.{<}djvu,pdf{>} edrx@anggtwu.net:/home/edrx/slow_html/{year}.{sem}-{name}/
Scp-np {year}.{sem}-{name}{variants}.{<}djvu,pdf{>} edrx@anggtwu.net:/home/edrx/public_html/{year}.{sem}-{name}/
}
# http://anggtwu.net/{year}.{sem}-{name}/{year}.{sem}-{name}.pdf

# (find-fline       \"~/{year}.{sem}-{name}/\")
# (find-djvupage    \"~/{year}.{sem}-{name}/{year}.{sem}-{name}.djvu\")
# (find-xpdfpage    \"~/{year}.{sem}-{name}/{year}.{sem}-{name}.pdf\")

** Update html
* (find-2a nil '(find-TH \"{year}.{sem}-{name}\"))
* (eek \"M-o C-x C-s M-o\")
*
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# makeR
# touch ~/TH/{year}.{sem}-{name}.blogme
makeR1     {year}.{sem}-{name}.html
Scp-np     {year}.{sem}-{name}.html      $TWUP/{year}.{sem}-{name}.html
# Scp-np  TH/{year}.{sem}-{name}.blogme $TWUP/TH/{year}.{sem}-{name}.blogme
#    http://anggtwu.net/{year}.{sem}-{name}.html
# file:///home/edrx/TH/R/{year}.{sem}-{name}.html
"))





;; «find-curso-makefile-links» (to ".find-curso-makefile-links")
;; (find-curso-makefile-links)

(defun find-curso-makefile-links (&optional year sem name &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for foo."
  (interactive)
  (setq year (or year "{year}"))
  (setq sem (or sem "{sem}"))
  (setq name (or name "{name}"))
  (apply 'find-elinks
   `((find-curso-makefile-links ,year ,sem ,name ,@pos-spec-list)
     (find-curso-makefile-links "2016" "2" "GA")
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-curso-makefile-links)
     ""
     ,(ee-template0 "\
# (kill-new \"  {year}.{sem}-{name}/Makefile\\n\")
# (find-blogme3file \"anggmake.lua\" \"2016.1-LA/Makefile\")

# (kill-new \"{year}.{sem}-{name}\")
# (find-THfile \"Makefile\" \"2016.2-LA\")

# (kill-new \"{year}.{sem}-{name}\")
# (find-twusfile \"\" \"2016.1-LA\")

# (mkdir \"~/{year}.{sem}-{name}/\")
# (ee-copy-rest 1 '(find-fline \"~/{year}.{sem}-{name}/Makefile\"))

# This file:    (find-angg \"{year}.{sem}-{name}/Makefile\")
# Based on:     (find-angg \"bin/djvuize\")
# Generated by: (find-angg \".emacs.templates\" \"find-curso-makefile-links\")

# (find-angg \"2014.2-GA/Makefile\")
# (find-angg \"SCANS/Makefile\")
# (find-node \"(make)Text Functions\")

THIS  = {year}.{sem}-{name}
PNGS  = $(patsubst %.jpg,%.png,$(wildcard *.jpg))
DJVUS = $(patsubst %.png,%.djvu,$(wildcard *.png))

# (find-angg \"bin/whiteboard\")
# (find-es \"gimp\" \"whiteboard\")
pngs_:
	echo $(PNGS)
pngs: $(PNGS)
%.png: %.jpg
	whiteboard $< $@

%.pgm: %.png
	convert $< $@
%.pbm: %.pgm
	mkbitmap -x -f 50 -t 0.4 $< -o $@
%.djvu: %.pbm
	cjb2 -lossy $< $@

djvus_:
	echo $(DJVUS)
djvus: $(DJVUS)

djvu: $(THIS).djvu
$(THIS).djvu: $(DJVUS)
	djvm -create $(THIS).djvu $(DJVUS)

pdf: $(THIS).pdf
%.pdf: %.djvu
	ddjvu -format=pdf $< $@
")
     )
   pos-spec-list))








;; «find-quadro-links» (to ".find-quadro-links")
;; (find-find-links-links "{k}" "quadro" "name yys")
;;
(defun find-quadro-links (&optional name yys &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for foo."
  (interactive)
  (setq name (or name "{name}"))
  (setq yys (or yys "{yys}"))
  (apply 'find-elinks
   `((find-quadro-links ,name ,yys ,@pos-spec-list)
     (find-quadro-links "la" "172" ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-quadro-links)
     ""
     ,(ee-template0 "\
;; <{name}q{yys}>
\(defun {name}qe{yys} (&rest rest) (interactive) (apply 'find-angg \".emacs\" \"{name}q{yys}\" rest))
\(defun {name}qe    (&rest rest) (interactive) (apply '{name}qe{yys} rest))
;; ({name}q{yys}  1 \"201708xx\" \"\")
")
     )
   pos-spec-list))

;; Test: (find-quadro-links)






;; «find-baudio-links» (to ".find-baudio-links")
;; Test: (find-baudio-links)
;; Test: (find-baudio-links nil "2013dec-EP")
;; (find-find-links-links "baudio")
;;
(defun find-baudio-links (&optional dir/ stem &rest rest)
  "Visit a temporary buffer containing hyperlinks for blogme3."
  (interactive)
  (setq dir/ (or dir/ "audios/"))
  (setq stem (or stem "{stem}"))
  (apply 'find-elinks `(
    (find-baudio-links ,dir/ ,stem ,@rest)
    (find-2a '(find-twusfile "audios/") '(find-twupfile "audios/"))
    ;; (eev ,(format "Scp ~/audios/%s.mp3 $TWUS/audios/%s.mp3" stem stem))
    ""
    (find-angg ".emacs.audios" ,stem)
    ;; (find-blogme3file "blogme3.el")
    ;; (find-blogme3file "")
    ;;
    ,(ee-template0 "\
;; <{stem}>
;; (find-TH \"audios/{stem}\")
;; (find-fline \"~/audios/\")
;; (find-fline \"~/audios/\" \"{stem}.mp3\")
;; (find-audio \"~/audios/{stem}.mp3\")
\(code-audio \"{stem}\" \"~/audios/{stem}.mp3\")
;; (find-{stem} \"0:00\")
;; (find-{stem} t)
;; (eev-avadj-mode 1)
")
    ;;
    (kill-new                 ,(format "audios/%s" stem))
    (find-blogme3 "anggmake.lua" "blogmestems" "audios/")
    (find-TH                  ,(format "audios/%s" stem))
    (ee-copy-rest 1 '(find-TH ,(format "audios/%s" stem)))
    ;;
    ,(ee-template0 "
\[INCLUDE TH/speedbar.blogme]
\[SETFAVICON dednat4/dednat4-icon.png]
\[SETFAVICON IMAGES/forthsun.png]
\[# 
\(defun c () (interactive) (find-blogme3-sh0-if      \"audios/{stem}\"))
\(defun u () (interactive) (find-blogme-upload-links \"audios/{stem}\"))
;;    http://anggtwu.net/audios/{stem}.html
;; file:///home/edrx/TH/L/audios/{stem}.html
;; (find-sh0    \"cp -lv ~/audios/{stem}.mp3 ~/TH/L/audios/\")
;; (find-angg   \".emacs.audios\" \"{stem}\")
;; (find-blogme3 \"anggdefs.lua\" \"html5-audio\")
#]
\[lua: LR = R ]
\[htmlizetxt [J {stem}]

\[AUDIO_INDEX {stem}.mp3
0:00
]

\[BE'
# Pra baixar uma copia local:
wget http://anggtwu.net/audios/{stem}.mp3
wget http://anggtwu.net/audios/{stem}.html
# Veja:
# http://anggtwu.net/ferramentas-para-ativistas.html#audios
# http://anggtwu.net/ferramentas-para-ativistas.html#audios-copias-locais
]

]
\[#
 # Local Variables:
 # coding: raw-text-unix
 # modes: (fundamental-mode blogme-mode)
 # End:
#]")
    ) rest))






;; «bsec»  (to ".bsec")
;; (find-THfile "monep.blogme" "defun bsec")
;; (find-blogme3grep "grep -nH -e sec *.lua")
;; (find-blogme3 "anggdefs.lua" "readqline" "sec")
;; (bsec "{tag}" "{H}" "{title}")
;; (bsec "foo" "H2" "Foo Bar")

(defun ee-bsec-string (tag H title)
  (ee-template0 "\
\[br ----------------------------------------]\n
\[#
 # «.{tag}»		(to \"{tag}\")
 # (bsec \"{tag}\" \"{H}\" \"{title}\")
#]
\[sec «{tag}» (to \".{tag}\")
  {H} [++N]. {title}]
"))

;; (defun bsec (tag H title)
;;   (ee-delete-and-extract-line)
;;   (insert (ee-bsec-string tag H title)))

;; (find-efunction 'bsec)
;; (find-efunction 'eewrap-audiovideo)
(defun bsec (&optional tag H title)
  (interactive)
  (if (not tag)
      (ee-this-line-wrapn 3 'ee-bsec-string)
    (ee-this-line-extract)
    (insert (ee-bsec-string tag H title))))


;; «ee-bsec» (to ".ee-bsec")
;; 2017abr14
;; Typical usage: (find-THfile "luatex.blogme" "defun bsec")
;; A test: (find-estring (ee-bsec "ebl-2017" "H2" "IPL For Children and"))
(defun ee-bsec (tag h head)
  (ee-template0 "
\[br ----------------------------------------]

\[#
 # «.{tag}»\t\t(to \"{tag}\")
 # {(format \"%S\" `(bsec ,tag ,h ,head))}
 #]
\[sec «{tag}» (to \".{tag}\")
  {h} [++N]. {head}]
"))





;; «ee-mkdl»  (to ".ee-mkdl")
;; «find-mkdl»  (to ".find-mkdl")
;; (find-dn4 "Makefile.base")
;; Make a download block for my makefiles
;; (find-efunction 'eeurl-u-to-f)
;; (find-efunction 'ee-template)
;; (find-estring (ee-mkdl "FOO" "http://foo.org/bar/plic.tgz"))
;; (find-mkdl "STEM" "http://foo/bar/plic.tgz")

(defun find-mkdl (STEM url)
  (interactive (list "STEM" "http://foo/bar/plic.tgz"))
  (find-elinks `((find-mkdl ,STEM ,url) nil ,(ee-mkdl STEM url))))

(defun ee-mkdl (STEM url)
  (let* ((localurl (replace-regexp-in-string
		    "^\\(https?\\|ftp\\)://" "\\1/" url))
	 (localurldir (file-name-directory localurl)))
    (ee-template
     `(("http://www.foo.org/bar/plic.tgz" ,url)
       (  "http/www.foo.org/bar/plic.tgz" ,localurl)
       (  "http/www.foo.org/bar/"         ,localurldir)
       ("STEM" ,STEM)
       ("stem" ,(downcase STEM))) "\
{STEM}URL    =    {http://www.foo.org/bar/plic.tgz}
{STEM}TGZ    = $(S)/{http/www.foo.org/bar/plic.tgz}
{STEM}TGZDIR = $(S)/{http/www.foo.org/bar/}

{stem}download: $({STEM}TGZ)
$({STEM}TGZ):
	mkdir -p $({STEM}TGZDIR)
	cd       $({STEM}TGZDIR) && \\
	$(wget)  $({STEM}URL)
")))



;; «ee-ps2pdf-script»  (to ".ee-ps2pdf-script")
;; (find-efunctiondescr 'ee-template)
;; (ee-ps2pdf-script "$S/http/foo/" "stem" ".ps.gz")
(defun ee-ps2pdf-script (dir stem ext)
  (ee-template
   `(("$S/http/foo/" ,dir) ("stem" ,stem) (".ps.gz" ,ext))
   "cd {$S/http/foo/} && zcat {stem}{.ps.gz} | ps2pdf - {stem}.pdf"))



;; «class»  (to ".class")
;; For: (find-dn6 "eoo.lua")
;; See: (find-dn6 "eoo.lua" "Vector")
;;      (find-dn6 "eoo.lua" "Vector" "Vector = Class {")
;;      (to "find-class-links")
;; Usage: if the point is on a line that says just "FooBar" and you type
;; `M-x class' then that line will be converted into these five lines:
;;
;;   FooBar = Class {
;;     type    = "FooBar",
;;     __index = {
;;     },
;;   }
;;
;; (find-angg "LUA/canvas2.lua" "Class")
;; (find-efunction 'ee-delete-and-extract-line)
;; (find-eev "eev-wrap.el" "ee-this-line-wrapn")
;; (find-eewrap-links "{C}" "class" "str")
(defalias 'class 'eewrap-class)

(defun  eewrap-class () (interactive)
  (ee-this-line-wrapn 1 'ee-wrap-class))
(defun ee-wrap-class (Name)
  "An internal function used by `eewrap-class'."
  (ee-template0 "\
{Name} = Class {<}
  type    = \"{Name}\",
  __index = {<}
  {>},
{>}
"))




;; «bname»  (to ".bname")
;;
(defun bname () (interactive)
  (let ((str (ee-no-trailing-nl
	      (ee-no-properties
	       (ee-delete-and-extract-line 1)))))
    (insert (format "\
\[# «%s»  (to \".%s\")
 # «.%s»\t\t(to \"%s\")
#\]
\[NAME %s\]" str str str str str))))




;; «find-scp-links»  (to ".find-scp-links")
;; (find-scp-links)
;;
(defun find-scp-links (&optional user addr &rest rest)
  "Visit a temporary buffer containing hyperlinks for scp."
  (interactive)
  (setq user (or user "{user}"))
  (setq addr (or addr "{addr}"))
  (apply 'find-elinks `(
    (find-scp-links ,user ,addr ,@rest)
    (find-fline "/etc/hosts" ,addr)
    ""
    ,(ee-template `(user addr) "\
\(defun eepitch-{addr} () (interactive)
  (eepitch '(find-comintprocess \"ssh {addr}\" \"ssh {user}@{addr}\")))

\(code-c-d \"{addr}\" \"/scp:{user}@{addr}:\")

;; (find-{addr}file \"\")
* (eepitch-{addr})
* (eepitch-kill)
* (eepitch-{addr})")
    ) rest))



;; «find-gigapedia-links»  (to ".find-gigapedia-links")
;; (define-key eev-mode-map "\M-G" 'find-gigapedia-links)
;; Deleted.






;; «find-dn5-file-links»  (to ".find-dn5-file-links")
;; (find-find-links-links "dn5-file" "stem")
;; (find-dn5-file-links)
;;
(defun find-dn5-file-links (&optional c stem ext &rest rest)
  (interactive)
  (setq c    (or c    "--"))
  (setq stem (or stem "{stem}"))
  (setq ext  (or ext  ".lua"))
  (apply 'find-elinks `(
    (find-dn5-file-links ,c ,stem ,ext ,@rest)
    (find-dn5-file-links "--" ,stem ".lua" ,@rest)
    (find-dn5-file-links "%" ,stem ".tex" ,@rest)
    ,(ee-template `(c stem ext) "\
{c} (kill-new \"  dednat5/{stem}{ext}\")
{c} (find-blogme3file \"anggmake.lua\" \"dednat5/\" \"\\n\")
{c} (find-dn5file \"{stem}{ext}\")

{c} {stem}{ext}:
{c} This file:
{c}   http://anggtwu.net/dednat5/{stem}{ext}.html
{c}   http://anggtwu.net/dednat5/{stem}{ext}
{c}                    (find-dn5 \"{stem}{ext}\")
{c} Author: Eduardo Ochs <eduardoochs@gmail.com>
{c} Version: 2011feb27?
{c} License: GPL3
{c}

require \"eoo\"         -- (find-dn5 \"eoo.lua\")

{c} dump-to: tests
{c}[==[
{c}]==]

{c} Local Variables:
{c} coding:             raw-text-unix
{c} ee-anchor-format:   \"«%s»\"
{c} End:
")
    ) rest))

;; (find-dn5-file-links)

;; (find-dn5file "")
;; (find-dn5-file-links "prefixes")
;; (find-dn5-file-links "process")
;; (find-dn5-file-links "trees")
;; (find-dn5-file-links "diags")
;; (find-dn5-file-links "common")
;; (find-dn5file "common.lua")
;; (find-dn5file "prefixes.lua")
;; (find-dn5file "process.lua")
;; (find-dn5file "trees.lua")
;; (find-dn5file "diags.lua")

;; (find-dn5file "parse.lua")
;; (find-dn5file "trees.lua")





;; «find-blogme4-file-links»  (to ".find-blogme4-file-links")

;; (find-find-links-links "blogme4-file" "stem")
;; (find-blogme4-file-links)
;;
(defun find-blogme4-file-links (&optional c stem ext &rest rest)
  (interactive)
  (setq c    (or c    "--"))
  (setq stem (or stem "{stem}"))
  (setq ext  (or ext  ".lua"))
  (apply 'find-elinks `(
    (find-blogme4-file-links ,c ,stem ,ext ,@rest)
    (find-blogme4-file-links "--" ,stem ".lua" ,@rest)
    (find-blogme4-file-links "%" ,stem ".tex" ,@rest)
    ,(ee-template `(c stem ext) "\
{c} (kill-new \"  blogme4/{stem}{ext}\")
{c} (find-blogme3file \"anggmake.lua\" \"blogme4/\" \"\\n\")
{c} (find-blogme4file \"{stem}{ext}\")

{c} {stem}{ext}:
{c} This file:
{c}   http://anggtwu.net/blogme4/{stem}{ext}.html
{c}   http://anggtwu.net/blogme4/{stem}{ext}
{c}                    (find-blogme4 \"{stem}{ext}\")
{c} Author: Eduardo Ochs <eduardoochs@gmail.com>
{c} Version: 2011jun02?
{c} License: GPL3
{c}

require \"eoo\"         -- (find-blogme4 \"eoo.lua\")

{c} dump-to: tests
{c}[==[
{c}]==]

{c} Local Variables:
{c} coding:             raw-text-unix
{c} ee-anchor-format:   \"«%s»\"
{c} End:
")
    ) rest))

;; (find-blogme4-file-links)

;; (find-blogme4file "")
;; (find-blogme4-file-links "prefixes")
;; (find-blogme4-file-links "process")
;; (find-blogme4-file-links "trees")
;; (find-blogme4-file-links "diags")
;; (find-blogme4-file-links "common")
;; (find-blogme4file "common.lua")
;; (find-blogme4file "prefixes.lua")
;; (find-blogme4file "process.lua")
;; (find-blogme4file "trees.lua")
;; (find-blogme4file "diags.lua")

;; (find-blogme4file "parse.lua")
;; (find-blogme4file "trees.lua")






;; (find-scan-links)
(defun find-scan-links (&optional dir &rest rest)
  "Visit a temporary buffer containing hyperlinks for scan."
  (interactive)
  (setq dir (or dir "/tmp/scans/"))
  (apply 'find-elinks `(
    ;; Convention: the first sexp always regenerates the buffer.
    (find-scan-links ,dir ,@rest)
    (find-scan-links "~/SCANS/foo/" ,@rest)
    (find-fline "~/SCANS/")
    ,(ee-expand dir)
    ;; Body:
    ""
    ,(ee-template0 "\
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
mkdir {dir}
cd    {dir}
sudo xsane &
# (find-fline \"{dir}\")
# (find-xzgv  \"{dir}\")
# (find-fline \"~/SCANS/Makefile\")
make -f ~/SCANS/Makefile djvu600s
make -f ~/SCANS/Makefile all.djvu
make -f ~/SCANS/Makefile all.pdf
# (find-djvupage \"{dir}all.djvu\")
# (find-xpdfpage \"{dir}all.pdf\")

* (eepitch-eshell)
cd {dir}
cp -v all.djvu (ee-twusfile \"SCANS/\")
cp -v all.pdf  (ee-twusfile \"SCANS/\")

* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)
for i=166,210,2 do
  s = format(\"%04d\", i)
  printf(\"convert %s.jpg -rotate 180 %sr.jpg; mv -v %sr.jpg %s.jpg\\n\",
    s, s, s, s)
end
")
    ) rest))

;; (find-scan-links)




;; «find-dhmake-links»  (to ".find-dhmake-links")

;;;      _ _                     _        
;;;   __| | |__  _ __ ___   __ _| | _____ 
;;;  / _` | '_ \| '_ ` _ \ / _` | |/ / _ \
;;; | (_| | | | | | | | | | (_| |   <  __/
;;;  \__,_|_| |_|_| |_| |_|\__,_|_|\_\___|
;;;                                       
;; «find-dhmake-links»  (to ".find-dhmake-links")
;;
;; Some templates for generating ".deb"s.
;; If you want to build a .deb for a package called, say, "foo-bar",
;; these scripts will use the directory "~/usrc/foo-bar/foo-bar_xxx/"
;; to build it - that directory will be recreated from scratch each
;; time - and the "override files for dhmake" will be taken from the
;; directory "~/foo-bar/". At this moment these paths are hardcoded.
;;
;; I generate the 3 main packages at
;;   http://anggtwu.net/debian/
;;   http://anggtwu.net/debian/README.html
;; with these commands:
;;   (find-dhmake-links "eev" "eevbuild")
;;   (find-dhmake-links "eev-puro" "eevpuro")
;;   (find-dhmake-links "eev-lua-extras" "eevluaextras")

(defvar ee-dhmake-fullname "Eduardo Ochs")
(defvar ee-dhmake-email "eduardoochs@gmail.com")

;; (find-estring-elisp (ee-dhmake-codecds "eev-puro" "eevpuro" "20120305"))
;;
(defun ee-dhmake-codecds (stem c date)
  (ee-template '(stem c date) "\
;; Generated by:
;; (ee-dhmake-codecds \"{stem}\" \"{c}\" \"{date}\")
;;
\(code-c-d \"{c}dh\"  \"~/{stem}/\")
\(code-c-d \"{c}dhd\" \"~/{stem}/debian/\")
\(code-c-d \"{c}\"    \"~/usrc/{stem}/{stem}-0.1.{date}/\")
\(code-c-d \"{c}d\"   \"~/usrc/{stem}/{stem}-0.1.{date}/debian/\")
\(code-c-d \"{c}dd\"  \"~/usrc/{stem}/{stem}-0.1.{date}/debian/{stem}/\")
\(code-c-d \"{c}unp\" \"~/usrc/{stem}/{stem}-unpacked/\")
;; (find-{c}dhfile  \"\")
;; (find-{c}dhdfile \"\")
;; (find-{c}file    \"\")
;; (find-{c}dfile   \"\")
;; (find-{c}ddfile  \"\")
;; (find-{c}unpfile \"\")
;; (find-{c}dsh   \"find * | sort\")
;; (find-{c}ddsh  \"find * | sort\")
;; (find-{c}unpsh \"find * | sort\")
;; (find-status   \"{stem}-deb\")
;; (find-vldifile \"{stem}-deb.list\")
;; (find-udfile   \"{stem}-deb-puro/\")"))

;; (find-estring (ee-dhmake-build "eev-puro" "eevpuro" "20120305"))
;;
(defun ee-dhmake-build (stem c date)
  (ee-template '(stem c date ee-dhmake-fullname ee-dhmake-email) "\
# Generated by:
# (ee-dhmake-build \"{stem}\" \"{c}\" \"{date}\")
#
rm   -Rv ~/usrc/{stem}/
mkdir -p ~/usrc/{stem}/
mkdir    ~/usrc/{stem}/{stem}-0.1.{date}/
# ln -s                {stem}-0.1.{date}  ~/usrc/{stem}/{stem}-0.1
  ln -s                {stem}-0.1.{date}  {stem}-0.1
cd       ~/usrc/{stem}/{stem}-0.1.{date}/

echo | \\
DEBFULLNAME=\"{ee-dhmake-fullname}\" \\
  dh_make --email {ee-dhmake-email} \\
          --copyright=gpl \\
          --cdbs \\
          --native
rm -v debian/README.Debian
rm -v debian/*.EX
rm -v debian/*.ex
cp -iv debian/control debian/control.orig

# (find-fline      \"~/{stem}/debian/\")
# (find-sh0 \"rm -Rv ~/{stem}/debian/\")
mkdir  -p ~/{stem}/debian/
if [ ! -e ~/{stem}/Makefile ]; then
  echo Creating:               ~/{stem}/Makefile
  echo \"clean:\"              > ~/{stem}/Makefile
fi
if [ ! -e ~/{stem}/debian/control ]; then
  echo Creating:               ~/{stem}/debian/control
  cp -v debian/control         ~/{stem}/debian/control
fi
if [ ! -e ~/{stem}/debian/rules ]; then
  echo Creating:               ~/{stem}/debian/rules
  cp -v debian/rules           ~/{stem}/debian/rules
  echo \"build/{stem}::\"   >> ~/{stem}/debian/rules
  echo \"install/{stem}::\" >> ~/{stem}/debian/rules
fi

# (find-{c}dh \"debian/\")
# (find-{c}dh \"debian/control\")
# (find-{c}dh \"debian/rules\")
cp -v ~/{stem}/debian/* debian/
cp -v ~/{stem}/Makefile .

# (find-man \"1 dpkg-buildpackage\")
# dpkg-buildpackage -us -uc    -rfakeroot     2>&1 | tee odb
  dpkg-buildpackage -us -uc -b -rfakeroot     2>&1 | tee odb
# (find-{c}file \"odb\")

rm -Rv ~/usrc/{stem}/{stem}-unpacked/
mkdir  ~/usrc/{stem}/{stem}-unpacked/
mkdir  ~/usrc/{stem}/{stem}-unpacked/DEBIAN/
cd     ~/usrc/{stem}/
ar p {stem}_*.deb control.tar.gz | tar -C {stem}-unpacked/DEBIAN/ -xvzf -
ar p {stem}_*.deb data.tar.gz    | tar -C {stem}-unpacked/        -xvzf -

# (find-{c}unpfile \"\")
# (find-{c}unpfile \"DEBIAN/\")
# (find-{c}unpfile \"DEBIAN/control\")
# (find-{c}unpsh \"find * | sort\")"))

(defun find-dhmake-links (&optional stem c date &rest rest)
  "Visit a temporary buffer containing hyperlinks for dhmake."
  (interactive)
  (setq stem (or stem "{stem}"))
  (setq c    (or c    "{c}"))
  (setq date (or date (format-time-string "%Y%m%d")))
  (apply 'find-elinks `(
    ;; Convention: the first sexp always regenerates the buffer.
    (find-dhmake-links ,stem ,c ,date ,@rest)
    (find-efunction 'find-dhmake-links)
    ;; Body:
    ""
    ;; (find-estring-elisp (ee-dhmake-codecds ,stem ,c ,date))
    ;; (find-estring (ee-dhmake-build ,stem ,c ,date))
    ;; (eev (ee-dhmake-build ,stem ,c ,date))
    ;; (find-fline "$EE")
    ;; (find-fline (format "~/%s/debian/" stem))
    ;; (find-sh0 ,(format "rm -Rv ~/%s/debian/" stem))
    ;; ""
    ,(ee-template `(stem c date) "\
# Set up the build script that `ee' will execute:
# (find-estring-elisp (ee-dhmake-codecds \"{stem}\" \"{c}\" \"{date}\"))
# (find-estring       (ee-dhmake-build   \"{stem}\" \"{c}\" \"{date}\"))
# (eev                (ee-dhmake-build   \"{stem}\" \"{c}\" \"{date}\"))
# (find-fline \"$EE\")

# Examine its main control files:
# (find-fline \"~/{stem}/debian/rules\")
# (find-fline \"~/{stem}/debian/control\")
# (find-fline \"~/{stem}/debian/\")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
ee
cd ~/usrc/{stem}/
ls -lF *.deb
sudo dpkg -i {stem}*.deb
# sudo dselect update

# (find-status   \"{stem}\")
# (find-vldifile \"{stem}.list\")
# (find-udfile   \"{stem}/\")


# Upload to anggtwu.net.
# (THIS IS A HACK!)
# (find-twusfile \"debian/\")

* (eepitch-eshell)
cd ~/usrc/{stem}/
ls -l {stem}_0.1.{date}_all.deb
cp -v {stem}_0.1.{date}_all.deb (ee-twusfile \"debian/\")
ls -l (ee-twusfile \"debian/\")
#   (find-twusfile \"debian/\")

* (eepitch-Twu)
cd ~/slow_html/debian/
mkdir -p dists/./main/binary-i386/
mkdir -p dists/./main/binary-amd64/
ls -lAF
apt-ftparchive packages .
apt-ftparchive packages . \\
  | tee        dists/./main/binary-i386/Packages \\
  | gzip -c9 > dists/./main/binary-i386/Packages.gz
apt-ftparchive packages . \\
  | tee        dists/./main/binary-amd64/Packages \\
  | gzip -c9 > dists/./main/binary-amd64/Packages.gz
")
    ) rest))
 
;; (find-dhmake-links)
;; (find-dhmake-links "{stem}" "{c}" "{date}")
;; (find-dhmake-links "foo-bar" "foobar")
;; (find-dhmake-links "eev" "eevbuild")
;; (find-dhmake-links "eev" "eevbuild" "20120404")




;; «find-dhmake-old-links»  (to ".find-dhmake-old-links")
;; (find-angg ".emacs" "eev-puro")
;; (find-angg "debian/README")
;;
(defun find-dhmake-old-links (&optional stem c date &rest rest)
  "Visit a temporary buffer containing hyperlinks for dhmake."
  (interactive)
  (setq stem (or stem "{stem}"))
  (setq c    (or c    "{c}"))
  (setq date (or date "{date}"))
  (apply 'find-elinks `(
    ;; Convention: the first sexp always regenerates the buffer.
    (find-dhmake-old-links ,stem ,c ,date ,@rest)
    ;; Body:
    ""
    ,(ee-template `(stem c date) "\
# (find-angg \".emacs\" \"{stem}-deb\")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
rm -Rv ~/usrc/{stem}/
mkdir  ~/usrc/{stem}/
mkdir  ~/usrc/{stem}/{stem}-0.1.{date}/
# ln -s              {stem}-0.1.{date}  {stem}-0.1
  ln -s              {stem}-0.1.{date}  ~/usrc/{stem}/{stem}-0.1
cd     ~/usrc/{stem}/{stem}-0.1.{date}/

echo | \\
DEBFULLNAME=\"Eduardo Ochs\" \\
  dh_make --email eduardoochs@gmail.com \\
          --copyright=gpl \\
          --cdbs \\
          --native
rm -v debian/README.Debian
rm -v debian/*.EX
rm -v debian/*.ex
mv -iv debian/control debian/control.orig

# (find-angg \"{stem}/debian/\")
# (find-angg \"{stem}/debian/control\")
# (find-angg \"{stem}/debian/rules\")
cp -v ~/{stem}/debian/* debian/
cp -v ~/{stem}/Makefile .

# (find-man \"1 dpkg-buildpackage\")
# dpkg-buildpackage -us -uc    -rfakeroot     |& tee odb
  dpkg-buildpackage -us -uc -b -rfakeroot     |& tee odb
# (find-{c}file \"odb\")

rm -Rv ~/usrc/{stem}/{stem}-unpacked/
mkdir  ~/usrc/{stem}/{stem}-unpacked/
mkdir  ~/usrc/{stem}/{stem}-unpacked/DEBIAN/
cd     ~/usrc/{stem}/
ar p {stem}_*_all.deb control.tar.gz | tar -C {stem}-unpacked/DEBIAN/ -xvzf -
ar p {stem}_*_all.deb data.tar.gz    | tar -C {stem}-unpacked/        -xvzf -

# (find-{c}unpfile \"\")
# (find-{c}unpfile \"DEBIAN/\")
# (find-{c}unpfile \"DEBIAN/control\")
# (find-{c}unpsh \"find * | sort\")

cd     ~/usrc/{stem}/
# sudo dpkg -i {stem}_0.1.{date}_all.deb
  sudo dpkg -i {stem}*.deb
sudo dselect update

# (find-status   \"{stem}\")
# (find-vldifile \"{stem}.list\")
# (find-udfile   \"{stem}/\")

# (find-es \"eev\" \"apt-ftparchive\")
# (find-es \"eev\" \"eev-deb-unpacked\")

# (find-fline \"~/usrc/eev/eev-unpacked/\")
# (find-eev \"debian/README.Debian\")
# (find-angg \"debian/README\")

# (find-twusfile \"debian/\")

# (ee-cp \"~/usrc/{stem}/{stem}_0.1.{date}_all.deb\" (ee-twusfile \"debian/{stem}_0.1.{date}_all.deb\") 'over)
# (find-twusfile \"debian/\")

* (eepitch-Twu)
cd ~/slow_html/debian/
mkdir -p dists/./main/binary-i386/
mkdir -p dists/./main/binary-amd64/
ls -lAF
apt-ftparchive packages .
apt-ftparchive packages . \\
  | tee        dists/./main/binary-i386/Packages \\
  | gzip -c9 > dists/./main/binary-i386/Packages.gz
apt-ftparchive packages . \\
  | tee        dists/./main/binary-amd64/Packages \\
  | gzip -c9 > dists/./main/binary-amd64/Packages.gz





;; (find-angg \".emacs\" \"{stem}-deb\")
;; <{stem}-deb>
\(code-c-d \"{c}\"    \"~/usrc/{stem}/{stem}-0.1.{date}/\")
\(code-c-d \"{c}d\"   \"~/usrc/{stem}/{stem}-0.1.{date}/debian/\")
\(code-c-d \"{c}dd\"  \"~/usrc/{stem}/{stem}-0.1.{date}/debian/{stem}/\")
\(code-c-d \"{c}unp\" \"~/usrc/{stem}/{stem}-unpacked/\")
;; (find-{c}file    \"\")
;; (find-{c}dfile   \"\")
;; (find-{c}ddfile  \"\")
;; (find-{c}unpfile \"\")
;; (find-{c}dsh   \"find * | sort\")
;; (find-{c}ddsh  \"find * | sort\")
;; (find-{c}unpsh \"find * | sort\")
;; (find-status   \"{stem}-deb\")
;; (find-vldifile \"{stem}-deb.list\")
;; (find-udfile   \"{stem}-deb-puro/\")


cd ~/usrc/{stem}/{stem}-0.1.{date}/

cat > debian/control <<'%%%'
Source: {stem}
Section: unknown
Priority: extra
Maintainer: Eduardo Ochs <eduardoochs@gmail.com>
Build-Depends: cdbs, debhelper (>= 7.0.50~)
Standards-Version: 3.8.4
Homepage: http://anggtwu.net/{stem}.html

Package: {stem}
Architecture: all
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: <insert up to 60 chars description>
 <insert long description, indented with spaces>
%%%

cat >> debian/rules <<'%%%'
# clean::
build/{stem}::
install/{stem}::
%%%

echo \"clean:\" > debian/Makefile
echo \"clean:\" > Makefile

# (find-angg \"{stem}/debian/\")

cp -iv debian/control ~/{stem}/debian/
cp -iv debian/rules   ~/{stem}/debian/
")
    ) rest))

;; (define-key eev-mode-map "\M-h\M-u" 'find-dhmake-old-links)

;; Test:
;; (find-dhmake-old-links)
;; (find-dhmake-old-links "eev-puro" "eevpuro" "20111027")
;; (find-dhmake-old-links "eev" "eevbuild" "20110612")
;; (find-angg ".emacs" "eev-puro-deb")






;; «find-escript-links»  (to ".find-escript-links")
;; (find-find-links-links "escript" "stem")
;; (find-efunction 'find-find-links-links)
;;
(defun find-escript-links (&optional stem &rest rest)
  "Visit a temporary buffer containing hyperlinks for escript."
  (interactive)
  (setq stem (or stem "{stem}"))
  (apply 'find-elinks `(
    ;; Convention: the first sexp always regenerates the buffer.
    (find-escript-links ,stem ,@rest)
    (kill-new ,stem)
    (find-blogme3 "anggmake.lua" "escriptstems")
    ""
    ;; (wrobak 4 '(find-es ,stem))
    (ee-copy-rest 2 '(find-es ,stem))
    (find-es ,stem)
    ;; Body:
    ""
    ,(ee-template0 "\
#######
#
# E-scripts on {stem}.
#
# Note 1: use the eev command (defined in eev.el) and the
# ee alias (in my .zshrc) to execute parts of this file.
# Executing this file as a whole makes no sense.
# An introduction to eev can be found here:
#
#   (find-eev-quick-intro)
#   http://anggtwu.net/eev-intros/find-eev-quick-intro.html
#
# Note 2: be VERY careful and make sure you understand what
# you're doing.
#
# Note 3: If you use a shell other than zsh things like |&
# and the for loops may not work.
#
# Note 4: I always run as root.
#
# Note 5: some parts are too old and don't work anymore. Some
# never worked.
#
# Note 6: the definitions for the find-xxxfile commands are on my
# .emacs.
#
# Note 7: if you see a strange command check my .zshrc -- it may
# be defined there as a function or an alias.
#
# Note 8: the sections without dates are always older than the
# sections with dates.
#
# This file is at <http://anggtwu.net/e/{stem}.e>
#           or at <http://anggtwu.net/e/{stem}.e.html>.
#        See also <http://anggtwu.net/emacs.html>,
#                 <http://anggtwu.net/.emacs[.html]>,
#                 <http://anggtwu.net/.zshrc[.html]>,
#                 <http://anggtwu.net/escripts.html>,
#             and <http://anggtwu.net/>.
#
#######
\n\n\n\n
#  Local Variables:
#  coding:               utf-8-unix
#  End:\
")
    ) rest))

;; Test:
;; (find-escript-links)
;; (find-escript-links "foo")




;; «find-thttpd-links»  (to ".find-thttpd-links")
;;
(defun find-thttpd-links (&optional dir &rest rest)
  "Visit a temporary buffer containing hyperlinks for thttpd."
  (interactive)
  (setq dir (or dir "{dir}"))
  (apply 'find-elinks `(
    ;; Convention: the first sexp always regenerates the buffer.
    (find-thttpd-links ,dir ,@rest)
    (find-thttpd-links "~/usrc/varwww/" ,@rest)
    (find-angg ".emacs.templates" "find-thttpd-links")
    (find-es "http" "thttpd")
    "# http://localhost:8080/"
    (find-wget "http://localhost:8080/")
    (find-sh "/sbin/ifconfig")
    ;; Body:
    ""
    ,(ee-template `(dir) "\
* (eepitch-shell2)
* (eepitch-kill)
* (eepitch-shell2)

kill -9 $(cat {dir}pid); sleep 1
rm -Rv   {dir}
mkdir -p {dir}
cd       {dir}
/usr/sbin/thttpd -p 8080 \\
       -d {dir} \\
       -i {dir}pid \\
       -nor -nos -c \"*\" -l /dev/null \\
       -T iso-8859-1

cd {dir}
date > 1
date > 2

ln -s ~/TH/L .

# (find-sh \"/sbin/ifconfig\")
cd /etc/
sudo chmod 666 hosts
# (kill-new \"192.168.0.172  reef\")
# (find-file \"/etc/hosts\")
# http://reef:8080/
# http://reef:8080/L/e/tex.e.html
")
    ) rest))

;; (find-thttpd-links)



;; «find-gitclone-links»  (to ".find-gitclone-links")
;; (find-find-links-links "gitclone" "url stem")
;; (find-efunction 'find-find-links-links)
;;
(defun find-gitclone-links (&optional url stem &rest rest)
  "Visit a temporary buffer containing hyperlinks for gitclone."
  (interactive)
  (setq url (or url (car (browse-url-interactive-arg "URL: "))))
  (message "%S" url) 
  (setq stem (or stem "{foo}"))
  (apply 'find-elinks `(
    ;; Convention: the first sexp always regenerates the buffer.
    (find-gitclone-links ,url ,stem ,@rest)
    ;; Body:
    ""
    ,(ee-template0 "\
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
rm -Rfv /tmp/{stem}/
mkdir   /tmp/{stem}/
cd      /tmp/{stem}/
git clone {url}
tar -cvzf ~/tmp/{stem}-git.tgz *

rm -Rfv ~/usrc/{stem}/
tar -C  ~/usrc/ -xvzf ~/tmp/{stem}-git.tgz
cd      ~/usrc/{stem}/
")
    ) rest))





;; (find-find-links-links "newhost" "name ip VAR")

;; «find-newhost-links»  (to ".find-newhost-links")
;; «find-newhost-links-old»  (to ".find-newhost-links-old")
;; (find-eev "eev-template.el" "find-newhost-links")
;; (find-newhost-links)
;; (find-newhost-links "lugao" "192.168.0.198" "LU")
;; (find-newhost-links "varda" "192.168.1.100" "VA")
;; (find-newhost-links "gwen" "192.168.1.101" "GW")
;;
(defun find-newhost-links-old (&optional name ip VAR &rest rest)
  "Visit a temporary buffer with hyperlinks for connecting to a new host."
  (interactive)
  (setq name (or name "{name}"))
  (setq ip (or ip "{ip}"))
  (setq VAR (or VAR "{VAR}"))
  (apply 'find-elinks `(
    ;; Convention: the first sexp always regenerates the buffer.
    (find-newhost-links ,name ,ip ,VAR ,@rest)
    (find-efunction 'find-newhost-links)
    (kill-new ,ip ,name)
    (find-fline "/etc/hosts" ,name)
    ;; Body:
    ""
    ,(ee-template `(name ip VAR) "\
;; Basic setup
;; (find-sh \"/sbin/ifconfig\")
;; (find-sh \"/sbin/ifconfig\" \"wlan0\")
;; (find-sh \"/sbin/ifconfig\" \"wlan0\" \"inet addr:\")
;; (find-sh \"/sbin/ifconfig wlan0\" \"inet addr:\")
;; (find-fline \"/etc/hosts\")

;; Low-level tests
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
ssh edrx@{name}
* (eepitch-kill)

;; (find-fline \"/scp:edrx@{name}:\")

;; <{name}>
\(code-c-d \"{name}\" \"/scp:edrx@{name}:/\")
;; (find-{name}file \"\")
\(defun eepitch-{name} () (interactive)
  (eepitch '(find-comintprocess \"{name}\" \"ssh edrx@{name}\")))

* (eepitch-{name})
* (eepitch-kill)
* (eepitch-{name})


;; (setenv \"{VAR}\" \"/scp:edrx@{name}:\")

\(setenv \"LR\" \"/sudo::\")
\(setenv \"RE\"  \"/ssh:edrx@{name}:\")
\(setenv \"RR\" \"/sudo:root@{name}:\")
\(ee-tramp-proxy \"{name}\" \"/sudo:%h:\")
\(code-c-d \"LR\" (ee-expand \"$LR/\"))
\(code-c-d \"RE\" (ee-expand \"$RE/\"))
\(code-c-d \"RR\" (ee-expand \"$RR/\"))
\(defun eepitch-RE () (interactive) (eepitch-comint \"{name}\" \"ssh edrx@{name}\"))
\(defun eepitch-RR () (interactive) (eepitch-comint \"{name}/R\" \"ssh edrx@{name}\"))
;; (find-LRfile \"\")
;; (find-REfile \"\")
;; (find-RRfile \"\")

;; (find-sh \"/sbin/ifconfig\" \"wlan\" \"inet addr:\")
;; (find-RR3 \"etc/hosts\")
;; (find-thttpd-links)
* (eepitch-RE)
wget -O - http://reef:8080/

;; (find-RR3 \"etc/apt/apt.conf.d/90apt-proxy.conf\")



;; (find-fline      \"/sudo:{name}:\")
;; (find-fline \"/sudo:root@{name}:\")

\(ee-tramp-proxy \"{name}\" \"/ssh:%h:\")
\(ee-tramp-proxy \"{name}\" \"/ssh:%u@%h:\")
\(ee-tramp-proxy \"{name}\" \"/sudo:%h:\")

\(setq         tramp-default-proxies-alist nil)
\(add-to-list 'tramp-default-proxies-alist
             '(\"\\\\`{name}\\\\'\" \"\\\\`root\\\\'\" \"/ssh:%h:\"))
\(add-to-list 'tramp-default-proxies-alist
             '(\"\\\\`{name}\\\\'\" \"\\\\`root\\\\'\" \"/ssh:%u@%h:\"))
\(add-to-list 'tramp-default-proxies-alist
             '(\"\\\\`{name}\\\\'\" \"\\\\`root\\\\'\" \"/sudo:%h:\"))

;; (describe-variable 'tramp-default-proxies-alist)
")
    ) rest))



;; «find-prince-links»  (to ".find-prince-links")
;; (to "find-htmlpdf-links")
;; (find-es "html" "princexml")
;; (find-es "prince" "princexml")
;; (find-THgrep "grep -nH -e find-prince-links *.blogme")
;; Tests: (find-prince-links "2011.1-GA")
;;        (find-prince-links "2011.1-MD")
;;        (find-prince-links "2011.2-GA")
;;        (find-prince-links "2011.2-MD")
(defun find-prince-links (&optional stem GA size &rest rest)
  "Visit a temporary e-script that runs princexml on a blogme3 file."
  (interactive)
  (setq stem (or stem "{stem}"))
  (setq GA   (or GA   "GA"))
  (setq size (or size "{size}"))
  (apply 'find-elinks `(
    ;; Convention: the first sexp always regenerates the buffer.
    (find-prince-links ,stem ,GA ,size ,@rest)
    (find-prince-links ,stem ,GA "8pt" ,@rest)
    (find-efunction 'find-prince-links)
    ;; Body:
    ""
    ,(ee-template0 "\
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cat > /tmp/print.css <<'%%%'
body {<} font-size: {size} !important {>}
%%%

cd
lua51 blogme3/blogme3.lua \\
       -e \"PRINCEPRINT=1\"      \\
       -o /tmp/{stem}.html  \\
       -i   TH/{stem}.blogme

prince -s /tmp/print.css      \\
       -o /tmp/{stem}.pdf  \\
          /tmp/{stem}.html

# (find-pdf-page \"/tmp/{stem}.pdf\")

* (eepitch-shell)
mkdir /tmp/pen/
sudo mount -o uid=$UID /dev/sdb1 /tmp/pen/
cp -v /tmp/{stem}.pdf /tmp/pen/
# (find-sh \"dmesg | tail\")
# (find-fline \"/tmp/pen/\")
sudo umount /tmp/pen
sync

# (find-fline   \"/tmp/\" \"{stem}.pdf\")
# (find-xpdfpage   \"/tmp/{stem}.pdf\")
# (find-evincepage \"/tmp/{stem}.pdf\")
#            file:///tmp/{stem}.html

# (ee-cp \"/tmp/{stem}.pdf\" (ee-twusfile \"{GA}/{stem}.pdf\") 'over)
# (ee-cp \"/tmp/{stem}.pdf\" (ee-twupfile \"{GA}/{stem}.pdf\") 'over)
#     (find-twusfile \"{GA}/\")
# http://anggtwu.net/{GA}/{stem}.pdf

echo $TWUS/{GA}/{stem}.pdf
Scp-np /tmp/{stem}.pdf $TWUS/{GA}/{stem}.pdf
Scp-np /tmp/{stem}.pdf $TWUP/{GA}/{stem}.pdf
")
    ) rest))



;; «find-youtubedl-links-old»  (to ".find-youtubedl-links-old")
;; (find-eev "eev-tlinks.el" "find-youtubedl-links")
;; (find-es "video" "youtube-dl")
;; (find-eev "eev-tlinks.el" "find-youtubedl-links")
;; (find-find-links-links "youtubedl" "dir title hash ext")
;; (find-youtubedl-links nil nil "vcXUrNSvjhU" ".flv")
;; (find-youtubedl-links "/sda5/videos/" "Prince_XML_Generating_High_Quality_PDFs_from_HTML_CSS" "vcXUrNSvjhU" ".flv" "princexml")
;; (find-es "video" "youtube-dl")
;; (find-es "html" "princexml-video")
;;
;; (find-fline "/sda5/videos/")
;; (find-sh "ls /sda5/videos | tr '.-' '\n\n'")
;; (find-sh "ls /sda5/videos | tr '.-' '\n\n' | awk 'length($1)==11'")
;; (find-sh "ls /sda5/videos/ | grep ZjiQQlgkBVM")
;; (find-sh "ls /sda5/videos/ | grep ZjiQQlgkBVM | awk -F . '{print substr($1, 1, length($1)-12)}'")
;; (find-sh "ls /sda5/videos/ | grep ZjiQQlgkBVM | awk -F . '{print $2}'")
;; (find-sh "ls /sda5/videos/ | grep ZjiQQlgkBVM | awk -F . '{print \".\" $2}'")
;; (find-fline "/sda5/videos/" "Marco_Baringer_s_SLIME_Tutorial_Video-_B_4vhsmRRI.flv")
;; (find-fline "/sda5/videos/" "Sun_Will_Set-l4WN9elfA9o.flv")
;; (ee-youtube-guess "/sda5/videos/" "l4WN9elfA9o" 'title)
;; (ee-youtube-guess "/sda5/videos/" "l4WN9elfA9o" 'ext)
;;
(defun ee-youtube-guess0 (dir hash prog)
  (if (eq prog 'title) (setq prog "substr($1, 1, length($1)-12)"))
  (if (eq prog 'ext)   (setq prog "\".\" $2"))
  (format "ls %s | grep -e %s | awk -F . '{print %s}'" dir hash prog))

(defun ee-youtube-guess (dir hash prog &optional default)
  (let ((ans (find-sh0 (ee-youtube-guess0 dir hash prog))))
    (if (and default (equal ans ""))
	default
      ans)))

(defun find-youtubedl-links-old (&optional dir title hash ext stem &rest rest)
  "Visit a temporary buffer containing hyperlinks for youtube-dl."
  (interactive)
  (setq dir   (or dir   "{dir}"))
  (setq title (or title "{title}"))
  (setq hash  (or hash  "{hash}"))
  (setq ext   (or ext   "{ext}"))
  (setq stem  (or stem  "{stem}"))
  (let* ((dirp    (file-directory-p dir))
	 (hash-g  (ee-no-properties (ee-stuff-around-point "-0-9A-Za-z_")))
	 (title-g (if dirp (ee-youtube-guess dir hash 'title)))
	 (ext-g   (ee-youtube-guess dir hash 'ext))
	)
    (apply 'find-elinks `(
      ;; Convention: the first sexp always regenerates the buffer.
      (find-youtubedl-links ,dir ,title ,hash ,ext ,stem ,@rest)
      ;;
      (find-youtubedl-links ,dir ,title ,hash-g ,ext ,stem ,@rest)
      (find-youtubedl-links "/sda5/videos/" ,title ,hash ,ext ,stem ,@rest)
      ,(if dirp `(find-youtubedl-links ,dir ,title-g ,hash ,ext-g ,stem ,@rest))
      ;; Body:
      ""
      ,(ee-template0 "\
* (eepitch-shell2)
* (eepitch-kill)
* (eepitch-shell2)
cd {dir}
youtube-dl -t 'http://www.youtube.com/watch?v={hash}'

# http://www.youtube.com/watch?v={hash}
# youtube-dl -F    -t 'http://www.youtube.com/watch?v={hash}'
# youtube-dl -f 18 -t 'http://www.youtube.com/watch?v={hash}'

# (find-es \"video\" \"youtube-dl\")
# (find-fline \"{dir}\" \"{hash}\")
# (find-fline \"{dir}\" \"{title}-{hash}\")
# (find-fline \"{dir}\" \"{title}-{hash}{ext}\")
# (find-mplayer  \"{dir}{title}-{hash}{ext}\")
# (find-mplayer  \"{dir}{title}-{hash}{ext}.part\")
# (code-mplayer \"{stem}\" \"{dir}{title}-{hash}{ext}\")
# (code-mplayer \"{stem}\" \"{dir}{title}-{hash}{ext}.part\")
# (find-{stem})
")
      ) rest)))



;; «find-eepitch-def-links»  (to ".find-eepitch-def-links")
;; (find-find-links-links "eepitch-def" "stem")
;;
(defun find-eepitch-def-links (&optional stem &rest rest)
  "Visit a temporary buffer containing hyperlinks for eepitch-def."
  (interactive)
  (setq stem (or stem "{stem}"))
  (apply 'find-elinks `(
    ;; Convention: the first sexp always regenerates the buffer.
    (find-eepitch-def-links ,stem ,@rest)
    ;; Body:
    ""
    ,(ee-template `(stem) "\
\(defun eepitch-{stem} () (interactive) (eepitch-comint \"{stem}\" \"{stem}\"))

* (eepitch-{stem})
* (eepitch-kill)
* (eepitch-{stem})
")
    ) rest))





;; «find-wpa-links»  (to ".find-wpa-links")
;; 2012apr26: scripts to connect and disconnect from net devices
;; semi-manually.
;; Written in collaboration with Jose Flavio Pereira Guimaraes.
;;
;; (find-wpa-links)

(defun find-wpa-links (&optional nomedoarquivo essid password &rest rest)
  "Visit a temporary buffer containing hyperlinks for wpa."
  (interactive)
  (setq nomedoarquivo (or nomedoarquivo "{nomedoarquivo}"))
  (setq essid         (or essid         "{essid}"))
  (setq password      (or password      "{password}"))
  (apply 'find-elinks `(
    ;; Convention: the first sexp always regenerates the buffer.
    (find-wpa-links ,nomedoarquivo ,essid ,password ,@rest)
    (find-wpa-links "Casa" ,@rest)
    (find-wpa-links "Lab2" ,@rest)
    (find-wpa-links "LLaRC" ,@rest)
    (find-wpa-links "Livre" "LIVRE" ,@rest)
    (find-livre-links)
    (find-fline "/home/Rede/")
    (find-efunction 'find-wpa-links)
    ;; Body:
    ""
    ,(ee-template `(nomedoarquivo essid password) "\

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# Modo rapido:
sudo ifconfig wlan0 up
sudo iwconfig wlan0 essid \"{essid}\"
sudo iwconfig wlan0 essid \"{essid}\" key \"{password}\"
sudo wpa_supplicant -D wext -i wlan0 -c /home/Rede/{nomedoarquivo}Rede -B
sudo kill -9 $(cat /var/run/dhcpcd.pid)
sudo dhcpcd

# Testes:
     ifconfig
     ifconfig wlan0
sudo ifconfig wlan0 down
sudo ifconfig wlan0 up
     ifconfig wlan0
     ifconfig

     iwconfig wlan0
sudo iwconfig wlan0 essid \"{essid}\"
     iwconfig wlan0

sudo dhcpcd

ps ax | grep dhcp
               cat /var/run/dhcpcd.pid
echo kill -9 $(cat /var/run/dhcpcd.pid)
sudo kill -9 $(cat /var/run/dhcpcd.pid)
ps ax | grep dhcp

sudo dhcpcd
")
    ) rest))

;; (define-key eev-mode-map "\M-h\M-w" 'find-wpa-links)



;; «find-intro-links»  (to ".find-intro-links")
;; (find-eev "eev-tlinks.el" "find-intro-links")





(defun find-mydvi-links (&optional c stem &rest rest)
  "Visit a temporary buffer containing hyperlinks for mydvi."
  (interactive)
  (setq c (or c "{c}"))
  (setq stem (or stem "{stem}"))
  (apply 'find-elinks `(
    ;; Convention: the first sexp always regenerates the buffer.
    (find-mydvi-links ,c ,stem ,@rest)
    (find-efunction 'find-mydvi-links)
    ;; Body:
    ""
    ,(ee-template `(c stem) "\
;; «.{c}»	(to \"{c}\")
;; «{c}»  (to \".{c}\")
\(code-c-d       \"{c}\" \"~/LATEX/{stem}.tex\" :anchor)
\(code-dvi       \"{c}\" \"~/LATEX/{stem}.dvi\")
\(code-pdftotext \"{c}\" \"~/LATEX/{stem}.pdf\")
;; (find-{c}     \"\" \"lambda-intro\")
;; (find-{c}page 25 \"17. Objects of Line Type\")
;; (find-{c}text)
")
    ) rest))



;; «diagskel»  (to ".diagskel")
;; Used to be here: (find-angg ".emacs-tex.el" "diagskel")
;;
(defun diagskel () (interactive)
  (insert "
%D diagram ??
%D 2Dx     100
%D 2D  100
%D 2D
%D 2D  +20
%D 2D
%D # ren ==>
%D
%D ((
%D
%D ))
%D enddiagram
%D
$$\\pu
  \\diag{??}
$$
"))





;; «ee-latex-header»  (to ".ee-latex-header")

(defun ee-latex-header (d/ stem)
  (ee-template0 "\
% (find-angg \"{d/}{stem}.tex\")
% (find-dn4ex \"edrx08.sty\")
% (defun c () (interactive) (find-zsh \"cd ~/{d/} && latex    {stem}.tex\"))
% (defun c () (interactive) (find-zsh \"cd ~/{d/} && pdflatex {stem}.tex\"))
% (eev \"cd ~/{d/} && Scp {stem}.pdf edrx@anggtwu.net:slow_html/{d/}\")
% (defun d () (interactive) (find-dvipage \"~/{d/}{stem}.dvi\"))
% (find-dvipage    \"~/{d/}{stem}.dvi\")
% (find-pspage     \"~/{d/}{stem}.ps\")
% (find-xpdfpage   \"~/{d/}{stem}.pdf\")
% (find-evincepage \"~/{d/}{stem}.pdf\")
% (find-bgprocess \"evince ~/{d/}{stem}.pdf\")
% (find-zsh0 \"cd ~/{d/} && dvipdf          {stem}.dvi {stem}.pdf\")
% (find-zsh0 \"cd ~/{d/} && dvips -D 300 -o {stem}.ps  {stem}.dvi\")
% (find-zsh0 \"cd ~/{d/} && dvips -D 600 -P pk -o {stem}.ps {stem}.dvi && ps2pdf {stem}.ps {stem}.pdf\")
% (find-zsh0 \"cd ~/{d/} && dvips -D 300 -o tmp.ps tmp.dvi\")
% (find-pspage  \"~/{d/}tmp.ps\")
% (ee-cp \"~/{d/}{stem}.pdf\" (ee-twupfile \"{d/}{stem}.pdf\") 'over)
% (ee-cp \"~/{d/}{stem}.pdf\" (ee-twusfile \"{d/}{stem}.pdf\") 'over)
% (find-twusfile     \"{d/}\" \"{stem}\")
% http://anggtwu.net/{d/}{stem}.pdf
"))

;; (find-estring (ee-latex-header "quadradinho/" "quadradinho-a5"))



;; «find-tail-call-links»  (to ".find-tail-call-links")
;; Orig skel: (find-find-links-links "\\M-P" "tail-call" "stem firstargs")
;; New skel:  (find-find-links-links-new "tail-call" "stem firstargs" "")
;; Test: 

(defun find-tail-call-links (&optional stem firstargs &rest rest)
  "Visit a temporary buffer containing hyperlinks for tail-call."
  (interactive)
  (setq stem (or stem "{stem}"))
  (setq firstargs (or firstargs "{firstargs}"))
  (apply 'find-elinks `(
    ;; Convention: the first sexp always regenerates the buffer.
    (find-tail-call-links ,stem ,firstargs ,@rest)
    (find-efunction 'find-tail-call-links)
    (emacs-lisp-mode)
    ;; Body:
    ""
    ,(ee-template `(stem ("c fname" ,firstargs)) "\
;; (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}\")
")
    ) rest))

;; Tests:
;; (find-tail-call-links)
;; (find-tail-call-links "xpdf" "c fname")
;; (find-tail-call-links "xpdf" "c fname")





;; «find-pdflikedef-links»  (to ".find-pdflikedef-links")
;; (find-find-links-links "pdflikedef" "stem firstargs")

(defun find-pdflikedef-links (&optional stem firstargs &rest rest)
  "Visit a temporary buffer containing hyperlinks for pdflikedef."
  (interactive)
  (setq stem (or stem "{stem}"))
  (setq firstargs (or firstargs "{firstargs}"))
  (apply 'find-elinks-elisp `(
    ;; Convention: the first sexp always regenerates the buffer.
    (find-pdflikedef-links ,stem ,firstargs ,@rest)
    (find-pdflikedef-links ,stem "c fname" ,@rest)
    (find-efunction 'find-pdflikedef-links)
    ;; Body:
    ""
    ,(ee-template0 "\
\(defun     find-{stem}-page (fname &optional page &rest rest)
  (find-bgprocess (ee-find-{stem}-page fname page)))
\(defvar ee-find-{stem}-page-options '())
\(defun  ee-find-{stem}-page (fname &optional page)
  `(\"{stem}\"
    ,@ee-find-{stem}-page-options
    ,@(if page `(,(format \"--page=%d\" page)))
    ,fname))

;; (find-efunction 'code-{stem})

;; find-{stem}page
;; find-{stem}-page
;; code-{stem}
;;
\(defalias 'find-{stem}page
          'find-{stem}-page)

\(defun      code-{stem} ({firstargs} &rest rest)
  (eval (ee-read      (apply 'ee-code-{stem} {firstargs} rest))))
\(defun find-code-{stem} ({firstargs} &rest rest)
  (find-estring-elisp (apply 'ee-code-{stem} {firstargs} rest)))
\(defun   ee-code-{stem} ({firstargs} &rest rest)
  (concat (ee-template0 \"\\
\\(defun find-{<}c{>}page (&optional page &rest rest)
  (find-{stem}-page {<}(ee-pp0 fname){>} page))
\")  (ee-code-pdftext-rest rest)))

;; Tests:
;; (find-epp (ee-find-{stem}-page \"/tmp/foo.pdf\"))
;; (find-epp (ee-find-{stem}-page \"/tmp/foo.pdf\" 2))
;;           (find-{stem}-page    \"/tmp/foo.pdf\")
;;           (find-{stem}-page    \"/tmp/foo.pdf\" 2)
;;
;;      (find-code-{stem} \"foo\"   \"/tmp/foo.pdf\")
;;           (code-{stem} \"foo\"   \"/tmp/foo.pdf\")
;;                 (find-foopage)
;;                 (find-foopage 2)
;;      (code-pdftotext \"foo\"   \"/tmp/foo.pdf\")
")
    ) rest))

;; Tests:
;; (find-pdflikedef-links)
;; (find-pdflikedef-links "xpdf" "c fname")
;;
;; (find-epp (ee-find-xpdf-page "/tmp/foo.pdf"))
;; (find-epp (ee-find-xpdf-page "/tmp/foo.pdf" 2))
;;           (find-xpdf-page    "/tmp/foo.pdf")
;;           (find-xpdf-page    "/tmp/foo.pdf" 2)
;;
;;      (find-code-xpdf "foo"   "/tmp/foo.pdf")
;;           (code-xpdf "foo"   "/tmp/foo.pdf")
;;                 (find-foopage)
;;                 (find-foopage 2)
;;      (code-pdftotext "foo"   "/tmp/foo.pdf")





;; «find-eev-video-record-links» (to ".find-eev-video-record-links")
;; (find-find-links-links "<none>" "eev-video" "stem")
;; A test: (find-eev-video-record-links)

(defun find-eev-video-record-links-old (&optional stem &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for foo."
  (interactive)
  (setq stem (or stem "{stem}"))
  (apply 'find-elinks
   `((find-eev-video-record-links ,stem ,@pos-spec-list)
     (find-eev-video-record-links "2" ,@pos-spec-list)
     (find-eev-video-record-links nil ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-eev-video-record-links)
     ,(ee-template0 "\
;; (emacs-lisp-mode)
;; (sh-mode)


# Edit
#
# (find-angg \".zshrc\" \"eev2-files\")
# (find-eev  \"eev-readme.el\")
# (find-angg \"eev-videos/\")
# (find-angg \"eev-videos/0.sh\")
# (find-angg \"eev-videos/2.sh\")
# (find-angg \"eev-videos/2.el\")
# (eee)
# (find-zsh \"eev2-build-tgz; cp -v ~/eev-videos/2.el /tmp/\")
# (find-sh0 \"~/eev-videos/2.sh record\")



# Rehearse / record / upload
#
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
eev2-build-tgz; cp -v ~/eev-videos/2.el /tmp/
#eev2-upload -v; rm -v /tmp/eev2.tgz /tmp/2.el
~/eev-videos/2.sh record
killall avconv

# (find-mplayer \"/tmp/out.mp4\")



# Copy video and audio
# (find-fline \"~/eev-videos/\")
# (find-fline \"~/eev-videos/\" \"video{stem}-\")
# (find-fline \"/tmp/\")
# (find-fline \"/tmp/pen/VOICE/FOLDER01/\")
#
laf -h /tmp/out.mp4
cp -iv /tmp/out.mp4 ~/eev-videos/video{stem}-video.mp4
#
# (find-pen-links)
mkdir /tmp/pen/
sudo mount -o ro               /dev/sdb1 /tmp/pen/
sudo mount -o ro               /dev/sdc1 /tmp/pen/
sudo mount -o uid=$UID         /dev/sdb1 /tmp/pen/
sudo mount -o uid=$UID         /dev/sdc1 /tmp/pen/
# (find-fline \"/tmp/pen/\")
# (find-fline \"/tmp/pen/VOICE/FOLDER01/\")
#
A0=$('ls' /tmp/pen/VOICE/FOLDER01/* | tail -n 1)
echo   $A0
laf -h $A0
cp -iv $A0 ~/eev-videos/video{stem}-audio.mp3
#
sudo umount /tmp/pen
sync




# Play
#
;; (eev-avadj-mode 0)
;; (eev-avadj-mode 1)
;; (find-fline \"~/eev-videos/\")
\(code-audio \"lastaudio\" \"~/eev-videos/video{stem}-audio.mp3\")
\(code-video \"lastvideo\" \"~/eev-videos/video{stem}-video.mp4\")
\(code-video \"lastall\"   \"~/eev-videos/video{stem}.mp4\")
;; (find-lastaudio)
;; (find-lastvideo)
;; (find-lastall)


# Stick audio and video together
# (find-es \"ffmpeg\" \"adding-audio\")

* (eepitch-shell2)
* (eepitch-kill)
* (eepitch-shell2)
cd ~/eev-videos/
avconv -i video{stem}-video.mp4 \\
       -i video{stem}-audio.mp3 \\
       -map 0 -map 1 -c copy \\
       video{stem}.mp4



# Upload
# http://anggtwu.net/eev-videos/
# http://anggtwu.net/eev-videos/README.html
# http://anggtwu.net/eev-videos/video{stem}.mp4
# (find-twusfile     \"eev-videos/\")
# (find-angg         \"eev-videos/README\")

Scp-np ~/eev-videos/video{stem}.mp4 \\
  edrx@anggtwu.net:/home/edrx/slow_html/eev-videos/



\(defun e () (interactive) (find-angg  \"eev-videos/2.sh\"))
\(defun r () (interactive) (find-sh0 \"~/eev-videos/2.sh record\"))
\(defun k () (interactive) (message \"%s\" (find-sh0 \"killall -v ffmpeg\")))
;;
\(defun ev () (interactive)
  (find-3L '(find-angg \"eev-videos/0.sh\") '(find-angg \"eev-videos/2.sh\")))
\(defun ee () (interactive)
  (find-3L '(find-angg  \"eev-videos/2.sh\") '(find-eev \"eev-readme.el\")))
\(defun eee () (interactive)
  (find-wset '\"13_o2_o_o\"
	     '(find-angg \"eev-videos/2.sh\")
	     '(find-eev  \"eev-readme.el\")
	     '(find-angg \"eev-videos/2.el\")
	     ))

# (find-eev \"eev-readme.el\")
# (find-zsh0 \"eev2-build-tgz && cp -v ~/eev-videos/2.el /tmp/\")
# (find-angg  \"eev-videos/0.sh\")
# (find-angg  \"eev-videos/2.sh\")
# (find-angg  \"eev-videos/2.el\")

# (find-es \"ffmpeg\" \"avconv\")
# Edit scripts
# (find-file \"~/eev-videos/video2-pt-video.mp4\")
# (find-fline \"/tmp/pen/VOICE/FOLDER01/\")


# (find-angg  \"eev-videos/\")

# (find-mplayer \"/tmp/out.mp4\")
")
     )
   pos-spec-list))

;; A test: (find-eev-video-record-links "2pt")



;; «find-eev-create-tar-links»  (to ".find-eev-create-tar-links")
;; Skel: (find-find-links-links-new "eev-create-tar" "date" "")
;; Test: (find-eev-create-tar-links)
;;
(defun find-eev-create-tar-links (&optional date &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for eev-create-tar."
  (interactive)
  (setq date (or date "{date}"))
  (apply
   'find-elinks
   `((find-eev-create-tar-links ,date ,@pos-spec-list)
     (find-eev-create-tar-links "20201022")
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-eev-create-tar-links)
     ""
     ,(ee-template0 "\
# http://elpa.gnu.org/packages/eev.html
# http://elpa.gnu.org/packages/eev-20201013.tar
# (find-eev2-links)

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
rm -Rfv /tmp/eev-g
mkdir   /tmp/eev-g/
cd      /tmp/eev-g/ && git clone https://github.com/edrx/eev.git .
cd      /tmp/eev-g/
git checkout UTF-8

rm -Rfv  /tmp/eev-tar/
mkdir -p /tmp/eev-tar/eev-{date}/
cd       /tmp/eev-tar/eev-{date}/
cp -iv  /tmp/eev-g/* .
rm -v    /tmp/eev-tar/eev-{date}/ChangeLog
cd       /tmp/eev-tar/
tar -cvf /tmp/eev-tar/eev-{date}.tar eev-{date}/
Scp-np   /tmp/eev-tar/eev-{date}.tar edrx@anggtwu.net:public_html/tmp/
# (find-fline \"/tmp/eev-tar/eev-{date}.tar\")


* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
rm -fv /tmp/eev-{date}.tar
cd     /tmp/
wget  http://anggtwu.net/tmp/eev-{date}.tar
# (package-install-file \"/tmp/eev-{date}.tar\")
")
     )
   pos-spec-list))




;; «find-screencast-links» (to ".find-screencast-links")
;; (find-find-links-links "{k}" "screencast" "geom")
;; A test: (find-screencast-links)

(defun find-screencast-links (&optional geom &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for foo."
  (interactive)
  ;; (setq geom (or geom "{geom}"))
  (setq geom (or geom (frame-width-height)))
  (apply 'find-elinks
   `((find-screencast-links ,geom ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-screencast-links)
     ""
     (defalias 'r 'ee-scast-start)
     (defalias 's 'ee-scast-stop)
     (find-fline "/tmp/" "out.mp4")
     (find-video "/tmp/out.mp4")
     ""
     (frame-width--)
     (frame-width++)
     (frame-height--)
     (frame-height++)
     (frame-width-height)
     (frame-width-height-set " 80c 37c")
     (frame-width-height-set "167c 46c")
     (frame-width-height-set "108c 37c")
     )
   pos-spec-list))




;; «find-angg-upload-links» (to ".find-angg-upload-links")
;; «find-blogme-upload-links» (to ".find-blogme-upload-links")
;; «find-escript-upload-links» (to ".find-escript-upload-links")
;; (find-find-links-links "<none>" "blogme-upload" "stem")
;; A test: (find-blogme-upload-links "2012.1")

;; (find-eapropos "suffix")

(defalias 'bup 'find-blogme-upload-links)

(defun find-blogme-upload-links (&optional stem &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for foo."
  (interactive)
  ;; (ee-rmprefix "~/TH/" "~/THfname "")
  (setq stem (or stem "{stem}"))
  (apply 'find-elinks
   `((find-blogme-upload-links ,stem ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-blogme-upload-links)
     (find-TH ,stem)
     ,(ee-template0 "
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# makeR
# touch ~/TH/{stem}.blogme
makeR1     {stem}.html
scp        {stem}.html      $LINP/{stem}.html
Scp-np     {stem}.html      $TWUP/{stem}.html

Scp-np  TH/{stem}.blogme $TWUP/TH/{stem}.blogme
#     http://anggtwu.net/{stem}.html
# file:///home/edrx/TH/R/{stem}.html")
     )
   pos-spec-list))

(defun find-angg-upload-links (&optional dir stem &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for foo."
  (interactive)
  ;; (ee-rmprefix "~/TH/" "~/THfname "")
  (setq dir (or dir "{stem}"))
  (setq stem (or stem "{stem}"))
  (apply 'find-elinks
   `((find-angg-upload-links ,dir ,stem ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-angg-upload-links)
     ;; (find-angg ,stem)
     ,(ee-template0 "
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# makeR
# touch ~/TH/{stem}.blogme
makeL1 {dir}{stem}.html
makeR1 {dir}{stem}.html
Scp-np {dir}{stem} {dir}{stem}.html $TWUP/{dir}

#    http://anggtwu.net/{dir}{stem}.html
#    http://anggtwu.net/{dir}{stem}
# file:///home/edrx/TH/L/{dir}{stem}.html
# file:///home/edrx/TH/R/{dir}{stem}.html")
     )
   pos-spec-list))



;; «find-a2html-upload-links» (to ".find-a2html-upload-links")
;; (find-blogme3 "options.lua" "dooptions")
;; (find-blogme3 "options.lua" "dooptions" "dooption_a2html")
;; (find-a2html-upload-links "blogme3/options.lua" "dooptions")
;;
(defalias 'aup 'find-a2html-upload-links)

(defun find-a2html-upload-links (&optional stem tag &rest pos-spec-list)
"Visit a temporary buffer containing a script to upload an ascii file to angg."
  (interactive)
  (setq stem (or stem
		 (ee-rmprefix "~/" (ee-fname-here))
		 "{stem}"))
  (setq tag (or tag "{tag}"))
  (apply 'find-elinks
   `((find-a2html-upload-links ,stem ,tag ,@pos-spec-list)
     (find-a2html-upload-links ,stem ,(ee-last-kill-matches "^[!-~]+$"))
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-a2html-upload-links)
     (find-angg ,stem ,tag)
     (find-angg ,stem)
     ,(ee-template0 "
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# makeR
# touch ~/{stem}
makeR1  {stem}.html
scp     {stem}.html $LINP/{stem}.html
scp     {stem}      $LINP/{stem}

Scp-np  {stem}.html $TWUP/{stem}.html
Scp-np  {stem}      $TWUP/{stem}

* (eepitch-linode)
* (eepitch-kill)
* (eepitch-linode)
cd ~/public_html/
makepageindexhtmls

#     http://anggtwu.net/{stem}.html
# file:///home/edrx/TH/R/{stem}.html
#     http://anggtwu.net/{stem}.html#{tag}
# file:///home/edrx/TH/R/{stem}.html#{tag}

# (find-angg \"{stem}\" \"{tag}\")
# (find-anggwgeta \"{stem}\" \"{tag}\")
# (find-wget \"http://anggtwu.net/{stem}\")
# (find-wget-elisp \"http://anggtwu.net/{stem}\")
")
     )
   pos-spec-list))



;; «find-escript-upload-links» (to ".find-escript-upload-links")
;; (find-find-links-links "<none>" "escript-upload" "stem")
;; A test: (find-escript-upload-links "python")

(defalias 'eup 'find-escript-upload-links)

(defun find-escript-upload-links (&optional stem tag &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for foo."
  (interactive)
  ;; (setq stem (or stem "{stem}"))
  (setq stem (or stem
		 (ee-rmprefixsuffix "~/e/" ".e" (ee-fname-here))
		 "{stem}"))
  (setq tag (or tag "{tag}"))
  (apply 'find-elinks
   `((find-escript-upload-links ,stem ,tag ,@pos-spec-list)
     (find-escript-upload-links ,stem ,(ee-last-kill-matches "^[!-~]+$"))
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-escript-upload-links)
     ""
     (find-es ,stem)
     (find-es ,stem ,tag)
     ""
     (find-blogme3 "sandwiches-defs.lua")
     (find-blogme3 "sandwiches-defs.lua" "code_helponly2_lines")
     ""
     ,(ee-template0 "\
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
makeL; makeR
touch ~/e/{stem}.e
makeR1  e/{stem}.e.html
scp     e/{stem}.e.html $LINP/e/{stem}.e.html
scp     e/{stem}.e      $LINP/e/{stem}.e

Scp-np  e/{stem}.e.html $TWUP/e/{stem}.e.html
Scp-np  e/{stem}.e      $TWUP/e/{stem}.e

#     http://anggtwu.net/e/{stem}.e.html
# file:///home/edrx/TH/R/e/{stem}.e.html
#     http://anggtwu.net/e/{stem}.e.html#{tag}
# file:///home/edrx/TH/R/e/{stem}.e.html#{tag}

# (find-es \"{stem}\" \"{tag}\")
# (find-angg \"e/{stem}.e\" \"{tag}\")
# (find-anggwgeta \"e/{stem}.e\" \"{tag}\")
")
     )
   pos-spec-list))

;; «find-latex-upload-links» (to ".find-latex-upload-links")
;; (find-find-links-links "{k}" "latex-upload" "stem")
;; A test: (find-latex-upload-links "2015-2-GA-material")

(defun find-latex-upload-links (&optional stem dir)
"Visit a temporary buffer containing hyperlinks for foo."
  (interactive)
  (setq stem (or stem "{stem}"))
  (setq dir (or dir "/tmp/edrx-latex/"))
  (find-elinks
   `((find-latex-upload-links ,stem ,dir)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-latex-upload-links)
     ""
     ,(ee-template0 "\
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# Upload pdf
cd ~/LATEX/
scp    {stem}.pdf $LINP/LATEX/{stem}.pdf
scp    {stem}.pdf $LINS/LATEX/{stem}.pdf
Scp-np {stem}.pdf $TWUP/LATEX/{stem}.pdf
Scp-np {stem}.pdf $TWUS/LATEX/{stem}.pdf
# Test the pdf (open the urls in a browser):
# (find-pdf-page  \"~/LATEX/{stem}.pdf\")
# http://anggtwu.net/LATEX/{stem}.pdf
#  file:///home/edrx/LATEX/{stem}.pdf

# Make .tgz and upload it
cd ~/LATEX/
flsfiles-tgz {stem}.fls {stem}.tgz
Scp-np {stem}.tgz $LINP/LATEX/{stem}.tgz
Scp-np {stem}.tgz $LINS/LATEX/{stem}.tgz
Scp-np {stem}.tgz $TWUP/LATEX/{stem}.tgz
Scp-np {stem}.tgz $TWUS/LATEX/{stem}.tgz
# http://anggtwu.net/LATEX/{stem}.tgz

# Make .zip and upload it
cd ~/LATEX/
flsfiles-zip {stem}.fls {stem}.zip
Scp-np {stem}.zip $LINP/LATEX/{stem}.zip
Scp-np {stem}.zip $LINS/LATEX/{stem}.zip
Scp-np {stem}.zip $TWUP/LATEX/{stem}.zip
Scp-np {stem}.zip $TWUS/LATEX/{stem}.zip
# http://anggtwu.net/LATEX/{stem}.zip

# Test the .tgz.
# The e-script below downloads, unpacks and compiles the .tgz in {dir}
#
rm -rfv /tmp/{stem}.tgz
rm -rfv {dir}
cd /tmp/
wget http://anggtwu.net/LATEX/{stem}.tgz
# curl -O http://anggtwu.net/LATEX/{stem}.tgz
# cp -v ~/LATEX/{stem}.tgz .
mkdir  {dir}
tar -C {dir} -xvzf /tmp/{stem}.tgz
cd     {dir}
lualatex {stem}.tex
# (find-fline    \"{dir}\")
# (find-pdf-page \"{dir}{stem}.pdf\")
# (find-pdf-text \"{dir}{stem}.pdf\")

# Test the .zip.
# The e-script below downloads, unpacks and compiles the .zip in {dir}
#
rm -rfv /tmp/{stem}.zip
rm -rfv {dir}
cd /tmp/
wget http://anggtwu.net/LATEX/{stem}.zip
# cp -v ~/LATEX/{stem}.zip .
mkdir    {dir}
unzip -d {dir} /tmp/{stem}.zip
cd       {dir}
lualatex {stem}.tex
# (find-fline    \"{dir}\")
# (find-pdf-page \"{dir}{stem}.pdf\")
# (find-pdf-text \"{dir}{stem}.pdf\")

% (defun u () (interactive) (find-latex-upload-links \"{stem}\"))
")
     )))



;; «find-book-links» (to ".find-book-links")
;;
(defun ee-dired-to-fname0 ()
  (and (eq major-mode 'dired-mode)
       (file-name-nondirectory (ee-dired-to-fname))))

(defun find-book-links (&optional fmt dir fname author stem &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for foo."
  (interactive (list nil nil (and (ee-dired-to-fname0))))
  (setq fmt (or fmt "pdf"))
  (setq dir (or dir "{dir}"))
  (setq fname (or fname "{fname}"))
  (setq author (or author "{author}"))
  (setq stem (or stem "{stem}"))
  (apply 'find-elinks
   `((find-book-links ,fmt ,dir ,fname ,author ,stem)
     (find-book-links "djvu" ,dir ,fname ,author ,stem)
     (find-book-links ,fmt "__alg"      ,fname ,author ,stem)
     (find-book-links ,fmt "__etc"      ,fname ,author ,stem)
     (find-book-links ,fmt "__cats"     ,fname ,author ,stem)
     (find-book-links ,fmt "__comp"     ,fname ,author ,stem)
     (find-book-links ,fmt "__phil"     ,fname ,author ,stem)
     (find-book-links ,fmt "__logic"    ,fname ,author ,stem)
     (find-book-links ,fmt "__small"    ,fname ,author ,stem)
     (find-book-links ,fmt "__gender"   ,fname ,author ,stem)
     (find-book-links ,fmt "__physics"  ,fname ,author ,stem)
     (find-book-links ,fmt "__analysis" ,fname ,author ,stem)
     (find-book-links ,fmt "__discrete" ,fname ,author ,stem)
     (find-book-links ,fmt "__politics" ,fname ,author ,stem)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-book-links)
     ""
     ,(ee-template0 "\
# (find-efunction 'find-book-links)
# (find-books \"{dir}/{dir}.el\")
# (find-books \"{dir}/{dir}.el\" \"{author}\")

# (find-sh0 \"mv -iv {fname} ~/books/{dir}/\")
# (ee-copy-rest 1 ' (find-angg \"books/{dir}/{dir}.el\"))

;; <{author}>
;; (find-books \"{dir}/{dir}.el\" \"{author}\")
\(code-{fmt}-page \"{stem}\" \"~/books/{dir}/{fname}\")
\(code-{fmt}-text \"{stem}\" \"~/books/{dir}/{fname}\" 1)
;; (find-{stem}page)
;; (find-{stem}page        1  \"Contents\")
;; (find-{stem}page (+ 1 189) \"Index\")
;; (find-{stem}text \"\")
")
     )
   pos-spec-list))

;; (find-book-links)




;; «find-lua-links» (to ".find-lua-links")
;; (find-find-links-links "{k}" "lua" "fname")
;;
;; Test: (find-sh0 "rm -v /tmp/foo.lua")
;;       (find-lua-links "/tmp/foo.lua")
;;
(defun find-lua-links (&optional fname &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for foo."
  (interactive)
  (setq fname (or fname "{fname}"))
  (let ((dir    (file-name-directory    fname))
	(fname0 (file-name-nondirectory fname)))
    (find-elinks
     `((find-lua-links ,fname ,@pos-spec-list)
       (find-lua-links "~/LUA/foo.lua")
       ;; Convention: the first sexp always regenerates the buffer.
       (find-efunction 'find-lua-links)
       ""
       (find-fline ,dir ,fname0)
       (find-sh0 ,(format "touch %s && chmod 755 %s" fname fname))
       ""
       (ee-copy-rest 1 '(find-fline ,fname))
       ""
       ,(ee-template0 "\
#!/usr/bin/env lua5.1
-- (defun c () (interactive) (find-sh \"cd {dir}; ./{fname0}\"))
-- (defun d () (interactive) (find-fline \"{dir}\"))
-- (defun e () (interactive) (find-fline \"{fname}\"))
--
-- (find-sh \"./{fname0} arg1 arg2\")
--
-- (find-lua51manual \"\")
-- (find-pil2page 8 \"Contents\")
-- (find-pil2text 8 \"Contents\")
-- (find-fline \"~/LUA/lua50init.lua\")

print(\"Hello from {fname}\")

--[[
* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)
dofile \"{fname0}\"

--]]\
")
     ))))


;; Test: (find-lua-links "~/LUA/foo.lua")


(defun find-lua-links-old (&optional fname &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for foo."
  (interactive)
  (setq fname (or fname "{fname}"))
  (let ((fname- (file-name-nondirectory fname)))
    (apply 'find-elinks
     `((find-lua-links ,fname ,@pos-spec-list)
       ;; Convention: the first sexp always regenerates the buffer.
       (find-efunction 'find-lua-links)
       ""
       (kill-new ,fname)
       (find-blogme3 "anggmake.lua" "anggtranslate")
       ""
       (ee-copy-rest 1 '(find-angg ,fname))
       ""
       ,(ee-template0 "\
-- This file:
-- http://anggtwu.net/{fname}
-- http://anggtwu.net/{fname}.html
--  (find-angg        \"{fname}\")
--
-- (find-lua51manualw3m \"\")
-- (find-books \"__comp/__comp.el\" \"ierusalimschy\")
-- (find-pil2page 8 \"Contents\")
-- (find-pil2text 8 \"Contents\")

--[[
* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)
dofile \"{fname-}\"

--]]


-- Local Variables:
-- coding: raw-text-unix
-- End:
")
       )
     pos-spec-list)))

;; Test: (find-lua-links)
;; (find-lua-links "LUA/youtube.lua")



;; «find-scast-links» (to ".find-scast-links")
;; (find-find-links-links "{k}" "scast" "prep stem sexp")
;; A test: (find-scast-links "R=6" "git-animations" '(find-es "git" "git-animations"))

(defun find-scast-links (&optional prep stem sexp &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for foo."
  (interactive)
  (setq prep (or prep "{prep}"))
  (setq stem (or stem "{stem}"))
  (setq sexp (or sexp "{sexp}"))
  (apply 'find-elinks
   `((find-scast-links ,prep ,stem ,sexp ,@pos-spec-list)
     (find-scast-links "R=6;r" ,stem ,sexp ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-scast-links)
     ""
     ,(ee-template0 "\

\(scast \"k\")

\(progn
  (scast \"R=6;c;g\")
  {(ee-S sexp)}
  )

\(scast \"k\")

# (find-video \"/tmp/out.mp4\")
# file:///tmp/out.mp4
#
# (find-fline \"~/screencasts/\" \"{stem}.mp4\")
# (find-sh0 \"cp -v /tmp/out.mp4 ~/screencasts/{stem}.mp4\")
#    (find-video \"~/screencasts/{stem}.mp4\"
# file:///home/edrx/screencasts/{stem}.mp4

# http://anggtwu.net/screencasts/
# http://anggtwu.net/screencasts/{stem}.mp4

")
     )
   pos-spec-list))

;; Test: (find-scast-links ___)




;; «find-python-links» (to ".find-python-links")
;; (find-find-links-links "{k}" "python" "dir fname")
;; A test: (find-python-links ___)

(defun find-python-links (&optional dir fname &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for foo."
  (interactive)
  (setq dir (or dir "{dir}"))
  (setq fname (or fname "{fname}"))
  (apply 'find-elinks
   `((find-python-links ,dir ,fname ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-python-links)
     ""
     (kill-new ,(concat "  " dir fname "\n"))
     (find-blogme3 "anggmake.lua" "anggtranslate")
     (ee-copy-rest 1 '(find-angg ,(concat dir fname)))
     ""
     ,(ee-template0 "\
# vim: set fileencoding=latin-1 :
# This file:
# http://anggtwu.net/{dir}{fname}
# http://anggtwu.net/{dir}{fname}.html
#  (find-angg        \"{dir}{fname}\")
#
# Edrx:
# (defun p  () (interactive) (find-angg \"{dir}{fname}\"))
# (defun pu () (interactive) (find-angg \"{dir}{fname}\" \"upload\"))
#
# Tau:
# (defun p  () (interactive) (find-fline \"/tmp/{fname}\"))
# (defun d  () (interactive) (find-sh \"cd /tmp/ && wget -O {fname} http://anggtwu.net/{dir}{fname}\"))
# (defun w  () (interactive) (find-wget \"http://anggtwu.net/{dir}{fname}\"))
#
# file:///usr/share/doc/python2.7/html/howto/regex.html
# file:///usr/share/doc/python2.7/html/reference/executionmodel.html

\"\"\"
* (eepitch-python)
* (eepitch-kill)
* (eepitch-python)
execfile(\"{fname}\", globals())
\"\"\"

\"\"\"
# <upload>
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
makeR1 {dir}{fname}.html
Scp-np {dir}{fname}.html {dir}{fname} $TWUP/{dir}
# http://anggtwu.net/{dir}{fname}.html
\"\"\"

# Local Variables:
# coding: raw-text-unix
# End:
")
     )
   pos-spec-list))

;; Test: (find-python-links "foo/" "bar.py")
;; Test: (find-python-links "fbcache/" "q.py")



;; «find-fbc-links» (to ".find-fbc-links")
;; (find-find-links-links "{k}" "fbc" "id")
;; Test: (find-fbc-links "1412988905624743")
;;
(defun find-fbc-links (&optional id &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for Python-fbcache."
  (interactive "sId: ")
  (setq id (or id "{id}"))
  (apply 'find-elinks
   `((find-fbc-links ,id)
     (find-fbc-links "1412988905624743")
     (find-fbcacheluafile ,id)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-angg "fbcache/urls.lua" "prubyks")
     (find-angg ".pythonrc.py")
     (find-efunction 'find-fbc-links)
     ""
     ,(ee-template0 "\
* (eepitch-python)
* (eepitch-kill)
* (eepitch-python)
o = ggo(\"{id}\")
type(o)
o.keys()
o['description'][:1000]
o['message'][:1000]
")
     )
   pos-spec-list))

;; Test: (find-fbc-links "1412988905624743")





;; «find-lualatex-links» (to ".find-lualatex-links")
;; (find-find-links-links "{k}" "lualatex" "stem tla")
;; Tests: (find-lualatex-links)
;;        (find-lualatex-links "2022yoneda-pseudocode" "yps")

(defun find-lualatex-links (&optional stem tla &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for foo."
  (interactive)
  (setq stem (or stem "{stem}"))
  (setq tla (or tla "{tla}"))
  (apply 'find-elinks
   `((find-lualatex-links ,stem ,tla ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-lualatex-links)
     ""
     (kill-new ,(concat "  LATEX/" stem ".tex\n"))
     (find-blogme3 "anggmake.lua" "anggtranslate")
     (find-blogme3 "anggmake.lua" "anggtranslate" "LATEX/")
     (find-blogme3 "anggmake.lua" "anggtranslate" "LATEX/2019.mk")
     ""
     (find-eeshortdefs)
     (code-etex-tla ,tla ,stem)
     ""
     (ee-copy-rest 1 '(find-LATEX ,(concat stem ".tex")))
     ""
     ,(ee-template0 "\
% (find-LATEX \"{stem}.tex\")
% (defun c () (interactive) (find-LATEXsh \"lualatex -record {stem}.tex\" :end))
% (defun C () (interactive) (find-LATEXSH \"lualatex {stem}.tex\" \"Success!!!\"))
% (defun D () (interactive) (find-pdf-page      \"~/LATEX/{stem}.pdf\"))
% (defun d () (interactive) (find-pdftools-page \"~/LATEX/{stem}.pdf\"))
% (defun e () (interactive) (find-LATEX \"{stem}.tex\"))
% (defun u () (interactive) (find-latex-upload-links \"{stem}\"))
% (defun v () (interactive) (find-2a '(e) '(d)))
% (defun cv () (interactive) (C) (ee-kill-this-buffer) (v) (g))
% (defun d0 () (interactive) (find-ebuffer \"{stem}.pdf\"))
%          (code-eec-LATEX \"{stem}\")
% (find-pdf-page   \"~/LATEX/{stem}.pdf\")
% (find-sh0 \"cp -v  ~/LATEX/{stem}.pdf /tmp/\")
% (find-sh0 \"cp -v  ~/LATEX/{stem}.pdf /tmp/pen/\")
%   file:///home/edrx/LATEX/{stem}.pdf
%               file:///tmp/{stem}.pdf
%           file:///tmp/pen/{stem}.pdf
%  http://anggtwu.net/LATEX/{stem}.pdf
% (find-LATEX \"2019.mk\")
% (find-lualatex-links \"{stem}\" \"{tla}\")")
     ;;
     "
\\documentclass[oneside,12pt]{article}
\\usepackage[colorlinks,citecolor=DarkRed,urlcolor=DarkRed]{hyperref} % (find-es \"tex\" \"hyperref\")
\\usepackage{amsmath}
\\usepackage{amsfonts}
\\usepackage{amssymb}
\\usepackage{pict2e}
\\usepackage[x11names,svgnames]{xcolor} % (find-es \"tex\" \"xcolor\")
%\\usepackage{colorweb}                 % (find-es \"tex\" \"colorweb\")
%\\usepackage{tikz}
%
% (find-dn6 \"preamble6.lua\" \"preamble0\")
%\\usepackage{proof}   % For derivation trees (\"%:\" lines)
%\\input diagxy        % For 2D diagrams (\"%D\" lines)
%\\xyoption{curve}     % For the \".curve=\" feature in 2D diagrams
%
\\usepackage{edrx21}               % (find-LATEX \"edrx21.sty\")
\\input edrxaccents.tex            % (find-LATEX \"edrxaccents.tex\")
\\input edrx21chars.tex            % (find-LATEX \"edrx21chars.tex\")
\\input edrxheadfoot.tex           % (find-LATEX \"edrxheadfoot.tex\")
\\input edrxgac2.tex               % (find-LATEX \"edrxgac2.tex\")
%\\input 2017planar-has-defs.tex    % (find-LATEX \"2017planar-has-defs.tex\")
%
%\\usepackage[backend=biber,
%   style=alphabetic]{biblatex}            % (find-es \"tex\" \"biber\")
%\\addbibresource{catsem-slides.bib}        % (find-LATEX \"catsem-slides.bib\")
%
% (find-es \"tex\" \"geometry\")
\\begin{document}

\\catcode`\\^^J=10
\\directlua{dofile \"dednat6load.lua\"}  % (find-LATEX \"dednat6load.lua\")

% %L dofile \"edrxtikz.lua\"  -- (find-LATEX \"edrxtikz.lua\")
% %L dofile \"edrxpict.lua\"  -- (find-LATEX \"edrxpict.lua\")
% \\pu

%\\printbibliography

\\GenericWarning{Success:}{Success!!!}  % Used by `M-x cv'

\\end{document}
"
     ,(ee-template0 "\
%  __  __       _        
% |  \\/  | __ _| | _____ 
% | |\\/| |/ _` | |/ / _ \\
% | |  | | (_| |   <  __/
% |_|  |_|\\__,_|_|\\_\\___|
%                        
% <make>

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# (find-LATEXfile \"2019planar-has-1.mk\")
make -f 2019.mk STEM={stem} veryclean
make -f 2019.mk STEM={stem} pdf

% Local Variables:
% coding: utf-8-unix
% ee-tla: \"{tla}\"
% End:
")
     ) pos-spec-list))





;; «find-dlualatex-links» (to ".find-lualatex-links")
;; (find-find-links-links "{k}" "dlualatex" "stem")
;; A test: (find-dlualatex-links)

(defun find-dlualatex-links (&optional stem &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for foo."
  (interactive)
  (setq stem (or stem "{stem}"))
  (apply 'find-elinks
   `((find-dlualatex-links ,stem ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-dlualatex-links)
     ""
     (kill-new ,(concat "  dednat6/" stem ".tex\n"))
     (find-blogme3 "anggmake.lua" "anggtranslate")
     (find-blogme3 "anggmake.lua" "anggtranslate" " dednat6/")
     (ee-copy-rest 1 '(find-dednat6 ,(concat stem ".tex")))
     ""
     ,(ee-template0 "\
% (find-angg \"dednat6/{stem}.tex\")
% (defun c () (interactive) (find-dednat6sh \"lualatex -record {stem}.tex\"))
% (defun d () (interactive) (find-pdf-page \"~/dednat6/{stem}.pdf\"))
% (defun e () (interactive) (find-dednat6 \"{stem}.tex\"))
% (defun u () (interactive) (find-latex-upload-links \"{stem}\"))
% (find-pdf-page   \"~/dednat6/{stem}.pdf\")
% (find-sh0 \"cp -v  ~/dednat6/{stem}.pdf /tmp/\")
% (find-sh0 \"cp -v  ~/dednat6/{stem}.pdf /tmp/pen/\")
%   file:///home/edrx/dednat6/{stem}.pdf
%                 file:///tmp/{stem}.pdf
%             file:///tmp/pen/{stem}.pdf
% http://anggtwu.net/dednat6/{stem}.pdf")
     ;;
     "\
\\documentclass[oneside]{book}
\\usepackage[colorlinks]{hyperref} % (find-es \"tex\" \"hyperref\")
\\usepackage{amsmath}
\\usepackage{amsfonts}
\\usepackage{amssymb}
\\usepackage{pict2e}
\\usepackage[x11names,svgnames]{xcolor} % (find-es \"tex\" \"xcolor\")
%\\usepackage{tikz}
%
% (find-dn6 \"preamble6.lua\" \"preamble0\")
%\\usepackage{proof}   % For derivation trees (\"%:\" lines)
%\\input diagxy        % For 2D diagrams (\"%D\" lines)
%\\xyoption{curve}     % For the \".curve=\" feature in 2D diagrams
%
\\begin{document}

\\catcode`\\^^J=10
\\directlua{dofile \"dednat6load.lua\"}  % (find-LATEX \"dednat6load.lua\")

\\end{document}

% Local Variables:
% coding: utf-8-unix
% End:"
     ) pos-spec-list))








;; «find-br-links» (to ".find-br-links")
;; (find-find-links-links "{key}" "br" "fun stem")
;; Test: (find-br-links "find-fline" "f")

(defun find-br-links (&optional fun stem)
"Visit a temporary buffer containing hyperlinks for foo."
  (interactive)
  (setq fun (or fun "{fun}"))
  (setq stem (or stem "{stem}"))
  (find-elinks
   `((find-br-links ,fun ,stem)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-br-links)
     ""
     ,(ee-template0 "\
;; (find-code-brurl '{fun} :remote 'br{stem} :local 'br{stem}l :dired 'br{stem}d)
;; (find-code-brfile '{fun} :local 'br{stem}l)

\(code-brurl '{fun} :remote 'br{stem} :local 'br{stem}l :dired 'br{stem}d)
\(code-brfile '{fun} :local 'br{stem}l)
")
     )))





;; «find-pastebin-links» (to ".find-pastebin-links")
;; (find-es "emacs" "pastebin")
;;
(defun find-pastebin-links (&optional a &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for foo."
  (interactive)
  (setq a (or a "{a}"))
  (apply 'find-elinks
   `((find-pastebin-links ,a ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-pastebin-links)
     ""
     ,(ee-template0 "\
# <ecbrown> edrx: ,,pastebin
# http://emacswiki.org/wiki/pastebin
# http://paste.lisp.org/new
# see also <lisppaste>, <pastebin.el>
# https://www.emacswiki.org/emacs/download/pastebin.el
")
     )
   pos-spec-list))

;; Test: (find-pastebin-links)








;; «find-matplotlib-links»  (to ".find-matplotlib-links")
;; (find-find-links-links "{k}" "matplotlib" "subdir name")
;; (find-matplotlibexfile "mplot3d/")
;; Test: (find-matplotlib-links "mplot3d" "wire3d_animation_demo")

(defun find-matplotlib-links (&optional subdir name &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for matplotlib."
  (interactive)
  (setq subdir (or subdir "{subdir}"))
  (setq name (or name "{name}"))
  (let* ((origfname (format "/usr/share/doc/python-matplotlib-doc/examples/%s/%s.py"
			    subdir name))
	 (bigstr (ee-read-file origfname))
	 )
    (apply 'find-elinks
     `((find-matplotlib-links ,subdir ,name ,@pos-spec-list)
       ;; Convention: the first sexp always regenerates the buffer.
       (find-efunction 'find-matplotlib-links)
       ""
       ,(ee-template0 "\
# (ee-copy-rest 1 '(find-angg \"MATPLOTLIB/{name}.py\"))

# This file: (find-angg \"MATPLOTLIB/{name}.py\")
# (find-matplotlib-links \"{subdir}\" \"{name}\")
# (find-es \"python\" \"matplotlib-examples\")
# (find-matplotlibexfile \"{subdir}/\")
# (find-matplotlibexfile \"{subdir}/{name}.py\")
# file:///usr/share/doc/python-matplotlib-doc/html/gallery.html#{subdir}
# file:///usr/share/doc/python-matplotlib-doc/html/examples/{subdir}/{name}.html

* (eepitch-python3)
* (eepitch-kill)
* (eepitch-python3)
{bigstr}
")
       )
     pos-spec-list)
    (python-mode)
    ))

;; Test: (find-matplotlib-links "mplot3d" "wire3d_animation_demo")


;; (defun ee-matplotlib-subdir (&optional fname)
;;   (car (ee-matplotlib-split (or fname (ee-dired-to-fname)))))
;; 
;; (defun ee-matplotlib-name (&optional fname)
;;   (cadr (ee-matplotlib-split (or fname (ee-dired-to-fname)))))

(defun ee-matplotlib-subdir (&optional fname) (car (ee-matplotlib-split fname)))
(defun ee-matplotlib-name  (&optional fname) (cadr (ee-matplotlib-split fname)))
(defun ee-matplotlib-split (fname)
  (setq fname (replace-regexp-in-string "\\(\\.py\\|\\.html\\)$" "" fname))
  (if (string-match "^.*/\\([^/]+\\)/\\([^/]+\\)$" fname)
      (list (match-string 1 fname)
	    (match-string 2 fname))
    (error "Not a matplotlib thing: %s fname")))

(defun find-matplotlib-file (fname)
  (interactive (list (ee-dired-to-fname)))
  (find-matplotlib-links (ee-matplotlib-subdir fname) (ee-matplotlib-name fname)))

(code-brfile 'find-matplotlib-file  :dired 'brmpd)

;; Test: go here and type M-x brmpd on a file:
;; (find-matplotlibexfile "mplot3d/")

;; (setq mystr "/usr/share/doc/python-matplotlib-doc/examples/mplot3d/2dcollections3d_demo.py")
;; (ee-matplotlib-split mystr)





;; «find-C-links»  (to ".find-C-links")
;; (find-find-links-links "{k}" "C" "fname")
;; (find-C-links)

(defun find-C-links (&optional stem &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for foo."
  (interactive)
  (setq stem (or stem "{stem}"))
  (let* ((stem stem))
    (apply 'find-elinks
     `((find-C-links ,stem ,@pos-spec-list)
       ;; Convention: the first sexp always regenerates the buffer.
       (find-efunction 'find-C-links)
       ""
       ,(ee-template0 "\
# (find-C-links \"{stem}\")
# (find-C-links \"/tmp/test\")

# (ee-copy-rest 1 '(find-fline \"{stem}.c\"))

/*
// (defun c () (interactive) (find-sh \"gcc -o {stem} {stem}.c\"))
// (defun e () (interactive) (find-fline \"{stem}.c\"))
// (find-libcnode \"Function Index\" \" printf:\")
*/

#include <stdio.h>
#include <stdlib.h>

int main()
{<}
  return 0;
{>}

/*
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
gcc -o {stem} {stem}.c

*/
")
       )
     pos-spec-list)))




;; «find-luarocks-links»  (to ".find-luarocks-links")
;; Test: (find-luarocks-links)
;;       (find-luarocks-links "StackTracePlus")
;;       (find-luarocks-links "ltcltk" "0.9-1")
;;       (find-luarocks-links "lpeg" "0.10" "-2")
;;       (find-luarocks-links "lposix" "20031107" "-1" "posix")
;;       (find-luarocks-links "luamacro" "2.4" "-1" "macro")
;;       (find-luarocks-links "penlight" "0.9.8" "-1" "pl???")
;; See:  (find-TH "eev/find-luarocks-links")
;;       (find-angg ".emacs" "luarocks")
;;       (find-angg "LUA/lua50init.lua" "userocks")
;;       (find-es "lua5" "luarocks")
;; Skel: (find-find-links-links-new "luarocks" "pkgname v s req" "")
;;
(defun find-luarocks-links (&optional pkgname v s req &rest rest)
  "Visit a temporary buffer containing hyperlinks for luarocks."
  (interactive (list (ee-stuff-around-point "a-z")))
  (setq pkgname (or pkgname "{pkgname}"))
  (setq v       (or v       "{ver}"))
  (setq s       (or s       "{sub}"))
  (setq req     (or req     pkgname))
  (apply 'find-elinks `(
    (find-luarocks-links ,pkgname ,@rest)
    (find-luarocks-links ,pkgname ,v ,s ,req ,@rest)
    ;; (find-luarocks-links "ltcltk" "0.9-1")
    (find-angg ".emacs.templates" "find-luarocks-links")
    (find-efunction 'find-luarocks-links)
    ""
    ;; (find-angg ".emacs" "luarocks")
    ;; (find-angg "LUA/lua50init.lua" "userocks")
    ;; (find-es "lua5" "luarocks")
    ,(ee-template0 "\
** Search
** ======
** https://luarocks.org/search?q={pkgname}
** (find-sh \"luarocks list\")
** (find-sh \"luarocks list            {pkgname}\")
** (find-sh \"luarocks search          {pkgname}\")
** (find-sh \"luarocks install --local {pkgname}\")
** (find-fline   \"~/.luarocks/lib/luarocks/rocks/\")
** (find-sh \"find ~/.luarocks/ ~/.cache/luarocks/ | sort\")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
luarocks
luarocks help
luarocks help path
luarocks path
luarocks path --lr-path
luarocks path --lr-cpath
luarocks path --lr-bin
luarocks path --lr-path  | tr ';' '\\n'
luarocks path --lr-cpath | tr ';' '\\n'
luarocks path --lr-bin   | tr ';' '\\n'

** Reinstall luarocks
** ==================
** (find-status   \"luarocks\")
** (find-vldifile \"luarocks.list\")
** (find-udfile   \"luarocks/\")
** (find-sh \"find    ~/.cache/luarocks/ ~/.luarocks/ | sort\")
** (find-sh \"rm -Rfv ~/.cache/luarocks/ ~/.luarocks/ | sort\")
** (find-angg \".zshrc\" \"luarocks\")
**
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
aptrm luarocks
apti  luarocks



# 2014aug29:
https://rocks.moonscript.org/m/root

# Search (locally):
# (find-luarocksfile \"lib/lua/5.1/\")
# (find-luarocksfile \"share/lua/5.1/\")
# (find-luarocksfile \"lib/luarocks/rocks/\")
# (find-luarocksfile \"bin/\" \"{pkgname}\")
# (find-luarockssh \"find * | sort\")
# (find-luarocksfile \"\")
# (find-luarockssh \"bin/luarocks\")
# (find-luarockssh \"bin/luarocks list\")
# (find-luarockssh \"bin/luarocks list {pkgname}\")
# (find-luarockssh \"bin/luarocks show {pkgname}\")
# (find-luarockssh \"bin/luarocks help search\")
# (find-luarockssh \"bin/luarocks help list\")

# Search and download (from the internet):
# https://luarocks.org/search?q={pkgname}
# http://luarocks.org/repositories/rocks/
# http://luarocks.org/repositories/rocks/index.html#{pkgname}
# (find-luarockssh \"bin/luarocks search -all\")
# (find-luarockssh \"bin/luarocks search   {pkgname}\")
# (find-luarockssh \"cd bin/; ./luarocks download {pkgname}\")

# Install (from the internet):
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd /tmp/
luarocks list            {pkgname}
luarocks show            {pkgname}
luarocks search          {pkgname}
luarocks --local install {pkgname} |& tee olli-{pkgname}

cd ~/usrc/luarocks/bin/
./luarocks download {pkgname}
./luarocks build    {pkgname}  |& tee olb-{pkgname}
# (find-luarocksbinfile \"\")
# (find-luarocksbinfile \"olb-{pkgname}\")

#./luarocks install {pkgname}  |& tee oli-{pkgname}

# Test:
* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)
userocks()  -- (find-angg \"LUA/lua50init.lua\" \"userocks\")
require \"{req}\"

# Inspect:
# (find-luarocksrocksfile \"\")
# (find-luarocksrocksfile \"manifest\")
# (find-luarocksrocksfile \"{pkgname}/{v}{s}/\")

# Inspect and unpack:
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# (find-luarocksfile \"bin/\" \"{pkgname}\")
# (find-luarocksfile    \"bin/{pkgname}-{v}{s}.src.rock\")
unzip -l ~/usrc/luarocks/bin/{pkgname}-{v}{s}.src.rock
unzip -p ~/usrc/luarocks/bin/{pkgname}-{v}{s}.src.rock {pkgname}-{v}.tar.gz \\
  | tar -tvzf -
rm -Rfv ~/usrc/{pkgname}-{v}/
unzip -p ~/usrc/luarocks/bin/{pkgname}-{v}{s}.src.rock {pkgname}-{v}.tar.gz \\
  | tar -C ~/usrc/ -xvzf -
cd     ~/usrc/{pkgname}-{v}/

;; (find-angg \".emacs\" \"luarocks\")
;; (find-luarocks-links \"{pkgname}\" \"{v}\" \"{s}\")
;; (find-{pkgname}file \"\")
\(code-c-d \"{pkgname}\" \"~/usrc/{pkgname}-{v}/\")

")
    ) rest))

;; Test: (find-luarocks-links)
;;       (find-luarocks-links "ltcltk")
;;       (find-luarocks-links "ltcltk" "0.9-1")
;; (find-luarocks-links "lpeg" "0.10" "-1")
;; (find-luarocks-links "lpeg" "0.12" "-1")



;; «find-luarocks-src-links»  (to ".find-luarocks-src-links")
;; Skel: (find-find-links-links-new "luarocks-src" "pkgname dir c" "")
;; Test: (find-luarocks-src-links "lpeglabel")
;;
(defun ee-luarocks-src-dir1 ()
  (find-sh0 "cd /tmp/rock/* && find * -maxdepth 0 -type d"))

(defun find-luarocks-src-links (&optional pkgname dir c &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for luarocks-src."
  (interactive)
  (setq pkgname (or pkgname "{pkgname}"))
  (setq dir (or dir "{dir}"))
  (setq c (or c pkgname "{c}"))
  (apply
   'find-elinks
   `((find-luarocks-src-links ,pkgname ,dir ,c ,@pos-spec-list)
     (find-luarocks-src-links ,pkgname (ee-luarocks-src-dir1) ,c ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-luarocks-src-links)
     ""
     ,(ee-template0 "\
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
luarocks search {pkgname} | tee /tmp/ols
# (find-fline \"/tmp/ols\")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
rm -Rv /tmp/rock/
mkdir  /tmp/rock/
cd     /tmp/rock/
luarocks unpack {pkgname}

# (find-luarocks-src-links \"{pkgname}\" (ee-luarocks-src-dir1) \"{c}\")

rm -Rv ~/usrc/{dir}/
cd /tmp/rock/
cd * 
cp -Rv {dir} ~/usrc/

# (code-c-d \"{c}\" \"~/usrc/{dir}/\")
# (find-{c}file \"\")
")
     )
   pos-spec-list))





;; «find-math-b-links»  (to ".find-math-b-links")
;; Skel: (find-find-links-links-new "math-b" "tag fnamestem" "")
;; Test: (find-math-b-links "2020-classifier" "2019classifier")
;;
(defun find-math-b-links (&optional tag fnamestem &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for math-b."
  (interactive)
  (setq tag (or tag "{tag}"))
  (setq fnamestem (or fnamestem "{fnamestem}"))
  (apply
   'find-elinks
   `((find-math-b-links ,tag ,fnamestem ,@pos-spec-list)
     (find-math-b-links ,(ee-last-kill) ,(ee-last-kill) ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-math-b-links)
     ""
     ,(ee-template0 "\
% (find-TH \"math-b\" \"{tag}\")
%     http://anggtwu.net/math-b.html#{tag}
% file:///home/edrx/TH/L/math-b.html#{tag}

[# (find-math-b-links \"{tag}\" \"{fnamestem}\")
 # (find-LATEX \"{fnamestem}.tex\")
 # (find-pdf-page \"~/LATEX/{fnamestem}.pdf\")
 # http://anggtwu.net/LATEX/{fnamestem}.pdf
#]
")
     )
   pos-spec-list))



;; «find-defcsprefix-links»  (to ".find-defcsprefix-links")
;; Skel: (find-find-links-links-new "defcsprefix" "csprefix fullname" "")
;; Test: (find-defcsprefix-links "zha")
;;       (find-defcsprefix-links "tcg")
;;       (find-defcsprefix-links "mateight" "MATRIX 4x2")
;;
(defun find-defcsprefix-links (&optional csprefix fullname &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for defcsprefix."
  (interactive)
  (setq csprefix (or csprefix "{csprefix}"))
  (setq fullname (or fullname (upcase csprefix) "{fullname}"))
  (apply
   'find-elinks
   `((find-defcsprefix-links ,csprefix ,fullname ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-defcsprefix-links)
     ""
     ,(ee-template0 "\
% <def{csprefix}>
% Skel: (find-defcsprefix-links \"{csprefix}\" \"{fullname}\")
%
\\def\\def{csprefix}#1#2{<}\\expandafter\\def\\csname {csprefix}-#1\\endcsname{<}#2{>}{>}
\\def\\if{csprefix}undefined#1{<}\\expandafter\\ifx\\csname {csprefix}-#1\\endcsname\\relax{>}
\\def\\{csprefix}#1{<}\\if{csprefix}undefined{<}#1{>}
    \\errmessage{<}UNDEFINED {fullname}: #1{>}
  \\else
    \\csname {csprefix}-#1\\endcsname
  \\fi
{>}
")
     )
   pos-spec-list))




;; «find-debian-version-links»  (to ".find-debian-version-links")
;; Skel: (find-find-links-links-new "debian-version" "" "")
;; Test: (find-debian-version-links)
;;
(defun find-debian-version-links (&rest pos-spec-list)
"Visit a temporary buffer containing a script for determining the Debian version."
  (interactive)
  (apply
   'find-elinks
   `((find-debian-version-links ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-debian-version-links)
     ;; ""
     ,(ee-template0 "\
# https://linuxconfig.org/check-what-debian-version-you-are-running-on-your-linux-system
# https://www.debian.org/releases/
# https://www.debian.org/doc/manuals/debian-faq/
# https://www.debian.org/doc/manuals/debian-faq/getting-debian.en.html#version
# https://en.wikipedia.org/wiki/Debian_version_history
# (find-es \"x\" \"which-window-manager\")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cat /etc/issue
cat /etc/debian_version
cat /etc/os-release
cat /etc/hostname
lsb_release -da
hostnamectl 

wmctrl -m
echo $XDG_CURRENT_DESKTOP
echo $GDMSESSION

echo $SHELL
")
     )
   pos-spec-list))



;; «find-sound-debug-links»  (to ".find-sound-debug-links")
;; Skel: (find-find-links-links-new "sound-debug" "" "")
;; Test: (find-sound-debug-links)
;;
(defun find-sound-debug-links (&rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for sound-debug."
  (interactive)
  (apply
   'find-elinks
   `((find-sound-debug-links ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-sound-debug-links)
     ""
     "
logthis () { echo $*:; eval $* 2>&1; echo; echo; }
{
  # (find-efunction 'find-debian-version-links)
  logthis cat /etc/issue
  logthis cat /etc/debian_version
  logthis cat /etc/os-release
  logthis lsb_release -da
  logthis hostnamectl 

  # (find-es \"alsa\" \"aplay\")
  logthis aplay -l
  logthis aplay -L

  # (find-es \"sound\" \"troubleshooting\")
  logthis \"lspci -vvv | grep -A8 Audio\"
  logthis \"lspci -knn | grep -A2 Audio\"

  logthis groups

  logthis \"rm -f /tmp/oac; /usr/sbin/alsactl -f /tmp/oac store; cat /tmp/oac\"

} \\
  | tee ~/oalsa
"
     ,(ee-template0 "\
")
     )
   pos-spec-list))



;; «find-bradytdd-links»  (to ".find-bradytdd-links")
;; Skel: (find-find-links-links-new "bradytdd" "fullfname" "shortfname stem")
;; Test: (find-bradytdd-links "~/IDRIS/brady/02/Average.idr")
;;
(defun find-bradytdd-links (&optional fullfname &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for bradytdd."
  (interactive)
  (setq fullfname (or fullfname buffer-file-name))
  (setq fullfname (or fullfname "{fullfname}"))
  (let* ((shortfname (replace-regexp-in-string "^.*/IDRIS/" "" fullfname))
         (stem (replace-regexp-in-string
		"^.*/\\([-A-Za-z0-9_]*\\).idr$" "\\1" shortfname)))
    (apply
     'find-elinks
     `((find-bradytdd-links ,fullfname ,@pos-spec-list)
       ;; Convention: the first sexp always regenerates the buffer.
       ;; `(find-efunction 'find-bradytdd-links)
       (ee-copy-rest 1 '(find-fline ,fullfname))
       ""
       ,(ee-template0 "\
-- This file:
--   http://anggtwu.net/IDRIS/{shortfname}.html
--   http://anggtwu.net/IDRIS/{shortfname}
--           (find-angg \"IDRIS/{shortfname}\")
--
-- (find-bradytddfile \"Chapter2/\")
-- (find-books \"__comp/__comp.el\" \"brady\")

{<}-
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
idris {stem}

-{>}

")
       )
     pos-spec-list)))


;; «find-dednat4-convert-links»  (to ".find-dednat4-convert-links")
;; Skel: (find-find-links-links-new "dednat4-convert" "fname" "stem")
;; Test:
;;
(defun find-dednat4-convert-links (&optional fname &rest pos-spec-list)
"Material for converting a .tex from dednat4 to dednat6."
  (interactive)
  (setq fname (or fname buffer-file-name))
  (setq fname (or fname "{fname}"))
  (let* ((stem (file-name-nondirectory fname)))
    (setq stem (replace-regexp-in-string "\\.tex$" "" stem))
    (setq stem (replace-regexp-in-string "\\-utf8$" "" stem))
    (apply
     'find-elinks
     `((find-dednat4-convert-links ,fname ,@pos-spec-list)
       ;; Convention: the first sexp always regenerates the buffer.
       (find-efunction 'find-dednat4-convert-links)
       ""
       (find-lualatex-links ,(concat stem "-utf8"))
       (find-LATEX ,(concat stem      ".tex"))
       (find-LATEX ,(concat stem "-utf8.tex"))
       "
\\catcode`\\^^O=13 \\def*{\\ensuremath{\\bullet}}
% (find-dednat6 \"dednat6/block.lua\" \"TexLines\")
\\directlua{tf:processuntil(texlines:nlines())}
"
       ,(ee-template0 "
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cp -v ~/LATEX/{stem}.tex /tmp/o
~/LUA/texcatcodes.lua -trans /tmp/o /tmp/o2
# (find-fline \"/tmp/o2\")
")
       )
     pos-spec-list)))


;; «find-psne-article-links»  (to ".find-psne-article-links")
;; Skel: (find-find-links-links-new "psne-article" "url stem" "localurl localdir")
;;
(defun find-psne-article-links (&optional url stem &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for psne-article."
  (interactive)
  (setq url (or url "{url}"))
  (setq stem (or stem "{stem}"))
  (let* ((localurl (ee-url-to-fname0 url))
	 (localdir (file-name-directory localurl))
         )
    (apply
     'find-elinks
     `((find-psne-article-links ,url ,stem ,@pos-spec-list)
       ;; Convention: the first sexp always regenerates the buffer.
       (find-efunction 'find-psne-article-links)
       ""
       ,(ee-template0 "\
* (eepitch-shell2)
* (eepitch-kill)
* (eepitch-shell2)
mkdir -p {localdir}
cd       {localdir}
wget -nc '{url}'
echo     '{url}' >> ~/.psne.log

# (find-fline \"{localdir}\")
# (find-pdf-page \"{localurl}\")
# (find-pdf-text \"{localurl}\")

;; <{stem}>
;; {url}
;; (find-fline \"{localdir}\")
\(code-pdf-page \"{stem}\" \"{localurl}\")
\(code-pdf-text \"{stem}\" \"{localurl}\")
;; (find-{stem}page)
;; (find-{stem}text)

")
       )
     pos-spec-list)))

(code-brurl 'find-psne-article-links :remote 'brap)



;; «find-psne-arxiv-links»  (to ".find-psne-arxiv-links")
;; Skel: (find-find-links-links-new "psne-arxiv" "url stem" "localurl localdir")
;; Test: (find-psne-arxiv-links "https://arxiv.org/pdf/1906.11236.pdf")
;;
(defun find-psne-arxiv-links (&optional url stem &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for psne-arxiv."
  (interactive)
  (setq url (or url "{url}"))
  (setq stem (or stem "{stem}"))
  (let* ((localurl (ee-url-to-fname0 url))
	 (localdir (file-name-directory localurl))
	 ;;
	 (fname0   (file-name-nondirectory localurl))
	 (fname00  (replace-regexp-in-string ".pdf$" "" fname0))
	 (srcurl   (format "https://arxiv.org/e-print/%s" fname00))
	 (srcfile (format "$S/https/arxiv.org/e-print/%s.tar" fname00))
	 (srcdir          "$S/https/arxiv.org/e-print/")
	 (usrcdir  (format "~/usrc/arxiv-%s/" stem))
	 )
    (apply
     'find-elinks
     `((find-psne-arxiv-links ,url ,stem ,@pos-spec-list)
       ;; Convention: the first sexp always regenerates the buffer.
       (find-efunction 'find-psne-arxiv-links)
       ""
       ,(ee-template0 "\
* (eepitch-shell2)
* (eepitch-kill)
* (eepitch-shell2)
mkdir -p {localdir}
cd       {localdir}
cp -iv /tmp/{(file-name-nondirectory localurl)} {localdir} 
# wget -nc '{url}'
echo     '{url}' >> ~/.psne.log

# (find-fline \"{localdir}\")
# (find-pdf-page \"{localurl}\")
# (find-pdf-text \"{localurl}\")

;; <{stem}>
;; https://arxiv.org/abs/{fname00}
;; {url}
\(code-pdf-page \"{stem}\" \"{localurl}\")
\(code-pdf-text \"{stem}\" \"{localurl}\")
;; (find-{stem}page)
;; (find-{stem}text)



# Download the source:
# https://arxiv.org/abs/{fname00}
# {url}
# {srcurl}
# (find-fline \"{srcfile}\")
# (find-fline \"{usrcdir}\")

* (eepitch-shell2)
* (eepitch-kill)
* (eepitch-shell2)
mkdir -p {srcdir}
cp -v /tmp/{fname00} {srcfile}
rm -Rv {usrcdir}
mkdir  {usrcdir}
cd     {usrcdir}
tar -xvf {srcfile}

# (find-psne-arxiv-links \"{url}\" \"{stem}\")
# (find-booksgrep \"grep --color -nH --null -e {stem} */*.el\")
# (code-c-d \"{stem}\" \"~/usrc/arxiv-{stem}/\")
# (find-{stem}file \"\")

")
       )
     pos-spec-list)))

;; Test: (find-psne-arxiv-links "https://arxiv.org/pdf/1906.11236.pdf")
;; Test: (find-psne-arxiv-links "https://arxiv.org/pdf/1906.11236.pdf" "hughesfopws")

(code-brurl 'find-psne-arxiv-links :remote 'brarxp)



;; «find-book-grep-links»  (to ".find-book-grep-links")
;; Skel: (find-find-links-links-new "book-grep" "str" "")
;; Test: (book-grep)
;;
(defalias  'book-grep 'find-book-grep-links)
(defun find-book-grep-links (&optional str0 &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for book-grep."
  (interactive)
  (setq str0 (or str0 "{str0}"))
  (apply
   'find-elinks
   `((find-book-grep-links ,str0 ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-book-grep-links)
     ""
     ,(ee-template0 "\
# (find-booksgrep \"grep --color -nH --null -e {str0} */*.el\")
# (find-booksgrep \"grep --color -niH --null -e {str0} */*.el\")
")
     )
   pos-spec-list))



;; «find-my-this-file-links»  (to ".find-my-this-file-links")
;; Skel: (find-find-links-links-new "my-this-file" "fname0 c" "fname pre post")
;; Test: (find-my-this-file-links)
;;
(defun find-my-this-file-links (&optional fname0 c pre post &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for my-this-file."
  (interactive)
  (setq fname0 (or fname0 (ee-shorten-file-name (buffer-file-name)) "{fname0}"))
  (setq c (or c "%" "{c}"))
  (let* ((fname (ee-replace-prefix "~/" "" fname0))
         (pre  (or pre  ""))
         (post (or post "")))
    (apply
     'find-elinks
     `((find-my-this-file-links ,fname0 ,c ,@pos-spec-list)
       (find-my-this-file-links ,fname0 "#")
       (find-my-this-file-links ,fname0 "%")
       (find-my-this-file-links ,fname0 "--")
       (find-my-this-file-links ,fname0 ";;")
       (find-my-this-file-links ,fname0 "//")
       (find-my-this-file-links ,fname0 " *" "/*\n" "\n*/")
       (find-my-this-file-links ,fname0 "--" "<!--\n" "\n-->")
       (find-my-this-file-links ,fname0 "{c}")
       ;; Convention: the first sexp always regenerates the buffer.
       (find-efunction 'find-my-this-file-links)
       ""
       ,(ee-template0 "\
# (kill-new \"  {fname}\")
# (find-blogme3 \"anggmake.lua\" \"anggtranslate\")
# (find-blogme3 \"anggmake.lua\" \"anggtranslate\" \" LEAN/\")
# (find-blogme3 \"anggmake.lua\" \"anggtranslate\" \" LUA/\")

# (find-THfile \"Makefile\" \"dirs\")

# (ee-copy-rest 2 '(find-fline \"{fname0}\"))
# (ee-copy-rest0 1 nil)

{pre}\
{c} This file:
{c}   http://anggtwu.net/{fname}.html
{c}   http://anggtwu.net/{fname}
{c}          (find-angg \"{fname}\")
{c} Author: Eduardo Ochs <eduardoochs@gmail.com>
{c}
{c} (defun e () (interactive) (find-angg \"{fname}\"))\
{post}

{pre}\
{c} Local Variables:
{c} coding:  utf-8-unix
{c} End:\
{post}
")
       )
     pos-spec-list)))

;; Test: (find-my-this-file-links)



;; «find-ebook-convert-links»  (to ".find-ebook-convert-links")
;; Skel: (find-find-links-links-new "ebook-convert" "fname" "dir fname- stem")
;;
(defun find-ebook-convert-links (&optional fname &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for ebook-convert."
  (interactive)
  (setq fname (or fname (ee-dired-to-fname) "{fname}"))
  (let* ((dir    (file-name-directory fname))
         (fname- (file-name-nondirectory fname))
         (stem   (replace-regexp-in-string ".epub$" "" fname-)))
    (apply
     'find-elinks
     `((find-ebook-convert-links ,fname ,@pos-spec-list)
       ;; Convention: the first sexp always regenerates the buffer.
       (find-efunction 'find-ebook-convert-links)
       ""
       ,(ee-template0 "\
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd {dir}
ebook-convert \\
  {fname-} \\
  {stem}.pdf \\
  --base-font-size=12 \\
  --pdf-page-numbers

cd {dir}
pandoc      \\
  -f epub   \\
  -t latex  \\
  -o my.pdf \\
  --epub-chapter-level=1 \\
  --pdf-engine=lualatex  \\
    {fname-}

# (find-pdf-page \"{dir}{stem}.pdf\")
# (find-pdf-text \"{dir}{stem}.pdf\")
# (cd \"{dir}\")
# (find-book-links \"pdf\" nil \"{stem}.pdf\")
")
       )
     pos-spec-list)))

(code-brfile 'find-ebook-convert-links   :dired 'brecd)

;; (find-ebook-convert-links "/tmp/cheng__cakes_custard_and_category_theory.epub")



;; «find-lilypond-links»  (to ".find-lilypond-links")
;; Skel: (find-find-links-links-new "lilypond" "stem" "")
;;
(defun find-lilypond-links (&optional stem &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for lilypond."
  (interactive)
  (setq stem (or stem "{stem}"))
  (apply
   'find-elinks
   `((find-lilypond-links ,stem ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-lilypond-links)
     ""
     ,(ee-template0 "\
# (kill-new \"  LILYPOND/{stem}.ly\\n\")
# (find-fline \"~/blogme3/anggmake.lua\" \"LILYPOND/\")

# (ee-copy-rest 1 '(find-fline \"~/LILYPOND/{stem}.ly\"))

% (defun c () (interactive) (find-sh \"cd ~/LILYPOND/ && lilypond {stem}.ly\"))
% (defun d () (interactive) (find-pdf-page      \"~/LILYPOND/{stem}.pdf\"))
% (defun d () (interactive) (find-pdftools-page \"~/LILYPOND/{stem}.pdf\"))
% (defun e () (interactive) (find-fline         \"~/LILYPOND/{stem}.ly\"))
% (defun v () (interactive) (find-2a '(e) '(d)) (g))

% (find-lilylearnpage 2 \"Table of Contents\")
% (find-lilylearntext 2 \"Table of Contents\")

% (find-books \"__comp/__comp.el\" \"lilypond\")
% (find-lilylearnpage (+ 5 1) \"1.1 Compiling a file\")
% (find-lilylearntext (+ 5 1) \"1.1 Compiling a file\")

\\version \"2.18.2\"
{<}
  c' e' g' e'
{>}
")
     )
   pos-spec-list))

;; Test: (find-lilypond-links "a_new_ground")



;; «find-latexgimp-links»  (to ".find-latexgimp-links")
;; Skel: (find-find-links-links-new "latexgimp" "fname" "fullfname fulldir")
;;
(defun find-latexgimp-links (&optional fname &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for latexgimp."
  (interactive)
  (setq fname (or fname "{fname}"))
  (setq fname (or (ee-if-prefixp "~/LATEX/" "" fname 'fname+) fname))
  (let* ((fullfname (concat "~/LATEX/" fname))
         (fulldir (file-name-directory fullfname))
         )
    (apply
     'find-elinks
     `((find-latexgimp-links ,fname ,@pos-spec-list)
       ;; Convention: the first sexp always regenerates the buffer.
       (find-efunction 'find-latexgimp-links)
       ""
       ,(ee-template0 "\
% (find-fline \"{fulldir}\")
% (find-fline \"{fullfname}.png\")
% (kill-new   \"{fullfname}.xcf\")
% (kill-new   \"{fullfname}.png\")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd   {fulldir}
gimp {fullfname}.xcf

% (eek \"2*<right> C-SPC 3*<down> M-w\")

% (find-latexgimp-links \"{fname}\")
% (find-fline   \"{fullfname}.png\")
\\includegraphics[width=2cm]{<}{fname}.png{>}

")
       )
     pos-spec-list)))

;; Test: (find-latexgimp-links "~/LATEX/GIMP/1")



;; «find-latexinkscape-links»  (to ".find-latexinkscape-links")
;; Skel: (find-find-links-links-new "latexinkscape" "fname" "fullfname fulldir")
;;
(defun find-latexinkscape-links (&optional fname &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for latexinkscape."
  (interactive)
  (setq fname (or fname "{fname}"))
  (setq fname (or (ee-if-prefixp "~/LATEX/" "" fname 'fname+) fname))
  (let* ((fullfname (concat "~/LATEX/" fname))
         (fulldir (file-name-directory fullfname)))
    (apply
     'find-elinks
     `((find-latexinkscape-links ,fname ,@pos-spec-list)
       ;; Convention: the first sexp always regenerates the buffer.
       (find-efunction 'find-latexinkscape-links)
       ""
       ,(ee-template0 "\
% (find-fline    \"{fulldir}\")
% (find-fline    \"{fullfname}.svg\")
% (find-fline    \"{fullfname}.pdf\")
% (find-pdf-page \"{fullfname}.pdf\")
% (kill-new      \"{fullfname}.svg\")
% (kill-new      \"{fullfname}.pdf\")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# mkdir  {fulldir}
cd       {fulldir}
inkscape {fullfname}.svg

% (eek \"2*<right> C-SPC 3*<down> M-w\")

% (find-latexinkscape-links \"{fname}\")
% (find-fline      \"{fullfname}.pdf\")
\\includegraphics[width=2cm]{<}{fname}.pdf{>}

")
       )
     pos-spec-list)))


;; «find-latexscan-links»  (to ".find-latexscan-links")
;; Skel: (find-find-links-links-new "latexscan" "cn stem" "pdffname")
;; Test: (find-latexscan-links)
;;
(defun find-latexscan-links (&optional cn stem &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for latexscan."
  (interactive)
  (setq cn (or cn "{cn}"))
  (setq stem (or stem "{stem}"))
  (let* ((pdffname (ee-template0 "2024-2-{cn}/{stem}.pdf")))
    (apply
     'find-elinks
     `((find-latexscan-links ,cn ,stem ,@pos-spec-list)
       (find-latexscan-links "C3" "20201125_114928_poli_grau_5")
       ;; Convention: the first sexp always regenerates the buffer.
       (find-efunction 'find-latexscan-links)
       ""
       ,(ee-template0 "\
% (find-fline \"~/2024.2-{cn}/\")
% (find-fline \"~/LATEX/2024-2-{cn}/\")
% (find-LATEX \"2020-1-C3-aprox-2a-ordem-R2.tex\" \"scans\")

% (find-latexscan-links \"{cn}\" \"{stem}\")
% (find-xpdf-page \"~/LATEX/{pdffname}\")
\\includegraphics[height=8cm]{<}{pdffname}{>}
\\includegraphics[width=11cm]{<}{pdffname}{>}

")
       )
     pos-spec-list)))



;; «find-C2-aula-links»  (to ".find-C2-aula-links")
;; Skel: (find-find-links-links-new "C2-aula" "stem n shortsuffix" "")
;; Test: (find-C2-aula-links)
;;       (find-C2-aula-links "2020-1-C2-somas-2" "2" "somas2")
;;
(defun find-C2-aula-links (&optional stem n shortsuffix &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for C2-aula."
  (interactive)
  (setq stem (or stem "{stem}"))
  (setq n (or n "{n}"))
  (setq shortsuffix (or shortsuffix "{shortsuffix}"))
  (apply
   'find-elinks
   `((find-C2-aula-links ,stem ,n ,shortsuffix ,@pos-spec-list)
     (find-C2-aula-links "2020-1-C2-foo-bar" "42" "foobar")
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-C2-aula-links)
     ""
     ,(ee-template0 "\
# (find-angg \".emacs\" \"2020-1-slides-aulas\")
(code-etex \"c2m201{shortsuffix}\" \"{stem}\")
(code-etex \"c2m{n}\"         \"{stem}\")

# (find-lualatex-links \"{stem}\")
# (find-LATEX          \"{stem}.tex\")

# (c2m201{shortsuffix}p)
# (c2m201{shortsuffix})
# (c2m{n}p)
# (c2m{n})

% (find-es \"tex\" \"geometry\")
\\usepackage[a6paper, landscape,
            top=1.5cm, bottom=.25cm, left=1cm, right=1cm, includefoot
           ]{<}geometry{>}
%

% ee-tla: \"c2m201{shortsuffix}\"

(find-2a '(find-LATEX \"2020-1-C2-somas-1.tex\" \"defs\")
         '(find-LATEX \"{stem}.tex\")
         )

% (find-vscan-links \"{stem}\")

")
     )
   pos-spec-list))


;; «find-C3-aula-links»  (to ".find-C3-aula-links")
;; Skel: (find-find-links-links-new "C3-aula" "stem n shortsuffix" "")
;; Test: (find-C3-aula-links)
;;       (find-C3-aula-links "2020-1-C3-taylor-1" "2" "taylor1")
;;
(defun find-C3-aula-links (&optional stem n shortsuffix &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for C3-aula."
  (interactive)
  (setq stem (or stem "{stem}"))
  (setq n (or n "{n}"))
  (setq shortsuffix (or shortsuffix "{shortsuffix}"))
  (apply
   'find-elinks
   `((find-C3-aula-links ,stem ,n ,shortsuffix ,@pos-spec-list)
     (find-C3-aula-links "2020-1-C3-foo-bar" "42" "foobar")
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-C3-aula-links)
     ""
     ,(ee-template0 "\
# (find-angg \".emacs\" \"2020-1-slides-aulas\")
(code-etex \"c3m201{shortsuffix}\" \"{stem}\")
(code-etex \"c3m{n}\"         \"{stem}\")

# (find-lualatex-links \"{stem}\")
# (find-LATEX          \"{stem}.tex\")

% (find-es \"tex\" \"geometry\")
\\usepackage[a6paper, landscape,
            top=1.5cm, bottom=.25cm, left=1cm, right=1cm, includefoot
           ]{<}geometry{>}
%

% ee-tla: \"c3m201{shortsuffix}\"

(find-2a ;; ' (find-LATEX \"2020-1-C3-vetor-tangente.tex\" \"defs\")
         ' (find-LATEX \"2020-1-C3-taylor-3.tex\" \"defs\")
         ' (find-LATEX \"{stem}.tex\")
         )
")
     )
   pos-spec-list))




;; «ee-template0-file»  (to ".ee-template0-file")
;; Tests:
' (find-2a ' (find-fline "~/LATEX/2020-1-CN-template.tex")
           ' (find-estring
	      (let ((stem "*STEM*"))
		(ee-template0-file "~/LATEX/2020-1-CN-template.tex"
				   "⟦\\([!-~]+\\)⟧"))))

' (find-2a ' (find-fline "~/LATEX/2022template.lagda.tex")
           ' (find-estring
	      (let ((stem "*STEM*"))
		(ee-template0-file "~/LATEX/2022template.lagda.tex"))))

;;
(defvar ee-template0-file-re "⟦\\([!-~]+\\)⟧")
(defun ee-template0-file (fname &optional re)
  (let ((ee-template00-re (or re ee-template0-file-re)))
    (ee-template0 (ee-read-file fname))))



;;;   ____ _   _                   _       
;;;  / ___| \ | |       __ _ _   _| | __ _ 
;;; | |   |  \| |_____ / _` | | | | |/ _` |
;;; | |___| |\  |_____| (_| | |_| | | (_| |
;;;  \____|_| \_|      \__,_|\__,_|_|\__,_|
;;;                                        
;; «find-CN-aula-links»  (to ".find-CN-aula-links")
;; Skel: (find-find-links-links-new "CN-aula" "stem N tlalong tla" "yys")
;; Tests: (find-CN-aula-links "2020-2-C5-foo-bar" "5" "c5mfoobar" "c5mfb")
;;        (find-CN-aula-links "2020-2-C2-intro" "2" "c2m202intro" "c2m202i")
;;
(defun find-CN-aula-links (&optional stem N tlalong tla &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for CN-aula."
  (interactive)
  (setq stem (or stem "{stem}"))
  (setq N (or N "{N}"))
  (setq tlalong (or tlalong "{tlalong}"))
  (setq tla (or tla "{tla}"))
  (let* ((yys "{yys}"))
    (apply
     'find-elinks
     `((find-CN-aula-links ,stem ,N ,tlalong ,tla ,@pos-spec-list)
       ;; Convention: the first sexp always regenerates the buffer.
       (find-efunction 'find-CN-aula-links)
       ""
       ,(ee-template0 "\

# (kill-new \"  LATEX/{stem}.tex\\n\")
# (find-blogme3 \"anggmake.lua\" \"anggtranslate\")
# (find-blogme3 \"anggmake.lua\" \"anggtranslate\" \"LATEX/2023-1\")
# ^ Add to the makefile

;; ({tlalong}a \"title\")
(code-etex-tla \"{tla}\"    \"{stem}\")
(code-etex-tla \"{tlalong}\" \"{stem}\")
;; ^ add to: (find-angg \".emacs\" \"c{N}-2023-1\")

       [R http://anggtwu.net/LATEX/{stem}.pdf PDF].
       [# ({tlalong}p 1 \"index\")
        # ({tlalong}a   \"index\")
       #]

     # ^ copy to: (find-TH \"2023.1-C{N}\")

% ({tlalong}a \"title\")
\\incl{<}{stem}{>}

     % ^ copy to: (find-LATEX \"2023-1-C{N}-tudo.tex\" \"parts\")

# (ee-copy-rest 3 '(find-LATEX \"{stem}.tex\"))


")
       ;; (find-LATEX              "2023-1-CN-template.tex")
       ;; (find-LATEX              "2022-2-CN-template.tex")
       ;; (find-LATEX              "2022-1-CN-template.tex")
       ;; (find-LATEX              "2021-2-CN-template.tex")
       ,(ee-template0-file "~/LATEX/2023-1-CN-template.tex"
			   "⟦\\([!-~]+\\)⟧")
       )
     pos-spec-list)))



;;;  __  __ __  __                   _       
;;; |  \/  |  \/  |       __ _ _   _| | __ _ 
;;; | |\/| | |\/| |_____ / _` | | | | |/ _` |
;;; | |  | | |  | |_____| (_| | |_| | | (_| |
;;; |_|  |_|_|  |_|      \__,_|\__,_|_|\__,_|
;;;                                          
;; «find-MM-aula-links»  (to ".find-MM-aula-links")
;; Skel: (find-find-links-links-new "MM-aula" "stem M tlalong tla" "")
;; Test: (find-MM-aula-links "2024-1-C3-teste-niv" "3" "c3m241testeniv" "c3tn")
;;
(defun find-MM-aula-links (&optional stem M tlalong tla &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for MM-aula."
  (interactive)
  (setq stem (or stem "{stem}"))
  (setq M (or M "{M}"))
  (setq tlalong (or tlalong "{tlalong}"))
  (setq tla (or tla "{tla}"))
  (apply
   'find-elinks
   `((find-MM-aula-links ,stem ,M ,tlalong ,tla ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-MM-aula-links)
     (find-LATEX "2024-2-MM-template.tex")
     ""
     ,(ee-template0 "\

# (kill-new \"  LATEX/{stem}.tex\\n\")
# (find-blogme3 \"anggmake.lua\" \"anggtranslate\")
# (find-blogme3 \"anggmake.lua\" \"anggtranslate\" \"LATEX/2024-2\")
# ^ Add to the makefile

;; ({tlalong}a \"title\")
(code-etex-tla \"{tla}\"    \"{stem}\")
(code-etex-tla \"{tlalong}\" \"{stem}\")
;; ^ add to: (find-angg \".emacs\" \"c{M}-2024-2\")

       [R http://anggtwu.net/LATEX/{stem}.pdf PDF].
       [# ({tlalong}p 1 \"index\")
        # ({tlalong}a   \"index\")
       #]

     # ^ copy to: (find-TH \"2024.2-{M}\")

% ({tlalong}a \"title\")
\\incl{<}{stem}{>}

     % ^ copy to: (find-LATEX \"2024-2-C{M}-tudo.tex\" \"parts\")

                ({tlalong}a \"title\")
    ({tla}p)  -> http://anggtwu.net/LATEX/{stem}.pdf

     % ^ copy to: (find-TH \"2024.2-C{M}\" \"executado\")

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


;; ;; «find-MM-aula-2023-2-links»  (to ".find-MM-aula-2023-2-links")
;; ;; Skel: (find-find-links-links-new "MM-aula" "stem MM tlalong tla" "yys mm")
;; ;; Test: (find-MM-aula-links "2023-1-LA-intro" "LA" "lam231intro" "lami")
;; ;;
;; (defun find-MM-aula-links (&optional stem MM tlalong tla &rest pos-spec-list)
;; "Visit a temporary buffer containing hyperlinks for MM-aula."
;;   (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-links ,stem ,MM ,tlalong ,tla ,@pos-spec-list)
;;        ;; Convention: the first sexp always regenerates the buffer.
;;        (find-efunction 'find-MM-aula-links)
;;        (find-LATEX "2023-2-MM-template.tex")
;;        ""
;;        ,(ee-template0 "\
;; 
;; # (kill-new \"  LATEX/{stem}.tex\\n\")
;; # (find-blogme3 \"anggmake.lua\" \"anggtranslate\")
;; # (find-blogme3 \"anggmake.lua\" \"anggtranslate\" \"LATEX/2023-2\")
;; # ^ Add to the makefile
;; 
;; ;; ({tlalong}a \"title\")
;; (code-etex-tla \"{tla}\"    \"{stem}\")
;; (code-etex-tla \"{tlalong}\" \"{stem}\")
;; ;; ^ add to: (find-angg \".emacs\" \"{mm}-2023-2\")
;; 
;;        [R http://anggtwu.net/LATEX/{stem}.pdf PDF].
;;        [# ({tlalong}p 1 \"index\")
;;         # ({tlalong}a   \"index\")
;;        #]
;; 
;;      # ^ copy to: (find-TH \"2023.2-{MM}\")
;; 
;; % ({tlalong}a \"title\")
;; \\incl{<}{stem}{>}
;; 
;;      % ^ copy to: (find-LATEX \"2023-2-{MM}-tudo.tex\" \"parts\")
;; 
;; # (ee-copy-rest 3 '(find-LATEX \"{stem}.tex\"))
;; 
;; 
;; ")
;;        ;; (find-LATEX              "2023-1-CN-template.tex")
;;        ;; (find-LATEX              "2023-1-MM-template.tex")
;;        ;; (find-LATEX              "2023-2-MM-template.tex")
;;        ,(ee-template0-file "~/LATEX/2023-2-MM-template.tex"
;; 			   "⟦\\([!-~]+\\)⟧")
;;        )
;;      pos-spec-list)))



;; «find-MM-tudo-links»  (to ".find-MM-tudo-links")
;; Skel: (find-find-links-links-new "MM-tudo" "yy s MM" "mm")
;; Test: (find-MM-tudo-links "23" "1" "LA")
;;
(defun find-MM-tudo-links (&optional yy s MM &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for MM-tudo."
  (interactive)
  (setq yy (or yy "{yy}"))
  (setq s (or s "{s}"))
  (setq MM (or MM "{MM}"))
  (let* ((mm (downcase MM)))
    (apply
     'find-elinks
     `((find-MM-tudo-links ,yy ,s ,MM ,@pos-spec-list)
       ;; Convention: the first sexp always regenerates the buffer.
       (find-efunction 'find-MM-tudo-links)
       (find-LATEX "2023-2-MM-tudo-template.tex")
       ""
       ,(ee-template0 "\
# (kill-new \"  LATEX/20{yy}-{s}-{MM}-tudo.tex\\n\")
# (find-blogme3 \"anggmake.lua\" \"anggtranslate\")
# (find-blogme3 \"anggmake.lua\" \"anggtranslate\" \"LATEX/2023-2\")
# ^ Add to the makefile

# (ee-copy-rest 1 '(find-LATEX \"20{yy}-{s}-{MM}-tudo.tex\"))
")
       ;; (find-LATEX              "2023-1-MM-tudo-template.tex")
       ;; (find-LATEX              "2023-2-MM-tudo-template.tex")
       ,(ee-template0-file "~/LATEX/2023-2-MM-tudo-template.tex"
			   "⟦\\([!-~]+\\)⟧")
       )
     pos-spec-list)))






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



;;;               
;;;  ___ ___ _ __ 
;;; / __/ __| '__|
;;; \__ \__ \ |   
;;; |___/___/_|   
;;;               

;; «find-ssr-links»  (to ".find-ssr-links")
;; Skel: (find-find-links-links-new "ssr" "stem c hash" "")
;; Test: (find-ssr-links "nam" "nameofthevideofile")
;;
(defun find-ssr-links (&optional c stem hash time &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for SimpleScreenRecorder."
  (interactive)
  (setq stem (or stem "{stem}"))
  (setq c (or c "{c}"))
  (setq hash (or hash "{hash}"))
  (setq time (or time "{time}"))
  (apply
   'find-elinks
   `((find-ssr-links ,c ,stem ,hash ,time ,@pos-spec-list)
     (find-ssr-links "nam" "nameofthevideofile" ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-ssr-links)
     ""
     ,(ee-template0 "\
# (find-es \"xfce\" \"keyboard-shortcuts\")
# Alt-F1 -> Multimedia -> SimpleScreenRecorder
# Alt-F9 = hide_window_key
# SSR hotkey (record/stop): super-R

# Play:
# (find-fline \"/tmp/\" \"ssr.mp4\")
# (find-video \"/tmp/ssr.mp4\")
http://anggtwu.net/eev-videos/{stem}.mp4
https://www.youtube.com/watch?v={hash}


* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)

cd /tmp/
  scp    ssr.mp4 $LINP/eev-videos/{stem}.mp4
  scp    ssr.mp4 $LINS/eev-videos/{stem}.mp4
  Scp-np ssr.mp4 $TWUP/eev-videos/{stem}.mp4
  Scp-np ssr.mp4 $TWUS/eev-videos/{stem}.mp4
#   http://anggtwu.net/eev-videos/{stem}.mp4
#   (find-linpfile \"eev-videos/\" \"{stem}\")
#   (find-linsfile \"eev-videos/\" \"{stem}\")
#   (find-twupfile \"eev-videos/\" \"{stem}\")
#   (find-twusfile \"eev-videos/\" \"{stem}\")
# cp -v /tmp/ssr.mp4 $S/http/anggtwu.net/eev-videos/{stem}.mp4

mkdir -p $S/http/anggtwu.net/eev-videos/
cd       $S/http/anggtwu.net/eev-videos/
wget -nc 'http://anggtwu.net/eev-videos/{stem}.mp4'
echo     'http://anggtwu.net/eev-videos/{stem}.mp4' >> ~/.psne.log

# (find-fline \"$S/http/anggtwu.net/eev-videos/\")
# (find-fline \"$S/http/anggtwu.net/eev-videos/\" \"{stem}.mp4\")
# (find-video  \"http://anggtwu.net/eev-videos/{stem}.mp4\")
# (find-video \"$S/http/anggtwu.net/eev-videos/{stem}.mp4\")

# Upload to youtube:
# (kill-new \"/home/edrx/snarf/anggtwu.net/eev-videos/{stem}.mp4\")
# (find-sh0    \"cp -v $S/http/anggtwu.net/eev-videos/{stem}.mp4 /tmp/\")

# (setq ee-subs-c       \"{c}\")
# (setq ee-subs-hash    \"{hash}\")
# (setq ee-subs-mp4stem \"{stem}\")
# (setq ee-subs-length  \"{time}\")
# (find-subs-links \"{c}\")

     videos [R http://anggtwu.net/eev-videos/{stem}.mp4 1]
           ([R https://www.youtube.com/watch?v={hash} YT])

# https://www.youtube.com/watch?v={hash}
# https://www.youtube.com/watch?v={hash}#t=0m00s

# (code-video \"{c}video\" \"$S/http/anggtwu.net/eev-videos/{stem}.mp4\")

% (find-ssr-links     \"{c}\" \"{stem}\" \"{hash}\")
% (code-eevvideo      \"{c}\" \"{stem}\" \"{hash}\")
% (code-eevlinksvideo \"{c}\" \"{stem}\" \"{hash}\")
% (find-1stclassvideolsubs \"{c}\")
% (find-{c}video \"0:00\")

;; Info: (find-1stclassvideo-links \"{c}\")
;;       (find-eev \"eev-videolinks.el\" \"{c}\")
;;       (find-eev \"eev-videolinks.el\" \"eev2021\")
;;
(ee-1stclassvideos-add '

    ;;
    ;; <{c}>
    ;; Play: (find-{c}video \"0:00\")
    ;; Index: (find-1stclassvideoindex \"{c}\")
    (\"{c}\"
     :title \"TITLE\"
     :mp4   \"http://anggtwu.net/eev-videos/{stem}.mp4\"
     :yt    \"http://www.youtube.com/watch?v={hash}\"
     :page  \"http://anggtwu.net/PAGE.html\"
     :lang  \"portuguese\"
     :date    \"DATE\"
     :length  \"{time}\"
     :subs    \".vtt\"
     :comment \"COMMENT\")

)

;; (find-code-1stclassvideos)
        (code-1stclassvideos)

code_eevshortvideo(\"{c}\", \"{stem}\", \"{hash}\")
# ^ copy to: (find-blogme3 \"sandwiches-defs.lua\" \"code_eevshortvideos\")

      [\"{c}\"] = \"{hash}\",
# ^ copy to: (find-blogme3 \"videoindex.lua\")

# (find-sshot-links \"5\" \"{stem}\")

  def [[ PLEFT 1 body \"<p align=\\\"left\\\">$body</p>\" ]]
  def [[ FIG 2 target,img \"<a href=\\\"$target\\\"><IMG SRC=\\\"$img\\\"></a>\" ]]

[PLEFT
  [FIG http://anggtwu.net/eev-videos/{stem}.mp4
          IMAGES/{stem}-small.png]
]

# (find-subtitles3-links   \"{c}\" \"{stem}\" \"{hash}\")
# (find-yttranscript-links \"{c}\" \"{stem}\" \"{hash}\")
# (find-editeevsubtitles-links-1 \"{c}\")
# (find-blogme3-legendas-links \"{c}\" \"{stem}\" \"{hash}\")

{<}\\footnotesize

\\url{<}http://anggtwu.net/eev-videos/{stem}.mp4{>}

\\url{<}https://www.youtube.com/watch?v={hash}{>}

{>}

")
     )
   pos-spec-list))

     ;; ,(ee-find-psne-core (format "http://anggtwu.net/eev-videos/%s.mp4" stem) "-nc")




;;;   ___  _         
;;;  / _ \| |__  ___ 
;;; | | | | '_ \/ __|
;;; | |_| | |_) \__ \
;;;  \___/|_.__/|___/
;;;                  
;; «find-obs-links»  (to ".find-obs-links")
;; Skel: (find-find-links-links-new "obs" "stem c hash" "")
;; Test: (find-obs-links "2022test0" "test0")
;;
(defun find-obs-links (&optional stem c hash &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for obs."
  (interactive)
  (setq stem (or stem "{stem}"))
  (setq c (or c "{c}"))
  (setq hash (or hash "{hash}"))
  (apply
   'find-elinks
   `((find-obs-links ,stem ,c ,hash ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-obs-links)
     ""
     ,(ee-template0 "\
# (find-es \"xfce\" \"keyboard-shortcuts\")
# Alt-F1 -> Multimedia -> SimpleScreenRecorder
# Alt-F9 = hide_window_key
# SSR hotkey (record/stop): super-R


* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# Rename:
# (find-fline \"/tmp/\" \" Screen\")
cd /tmp/
ls -lAF /tmp/Screen*.mov
ls -lAF /tmp/Screen*.mov
#mv -iv /tmp/Screen*.mov /tmp/obs.mov
 mv  -v /tmp/Screen*.mov /tmp/obs.mov

# Convert:
ffmpeg -i obs.mov -vcodec h264 obs.mp4

# Play:
# (find-fline \"/tmp/\" \"obs.mov\")
# (find-fline \"/tmp/\" \"obs.mp4\")
# (find-video \"/tmp/obs.mov\")
# (find-video \"/tmp/obs.mp4\")

# Upload:
# (Scp-np is my script to run scp with no password - please change)
Scp-np {stem}.mp4 marc@0branch.com:snippets/eev-videos/{stem}.mp4

# Check with tramp:
# (find-fline \"/scp:marc@0branch.com:~/public_html/eev-videos/\")
# (find-fline \"/scp:marc@0branch.com:~/public_html/eev-videos/\" \"{stem}.mp4\")

# Psne it:
mkdir -p $S/https/0branch.com/snippets/eev-videos/
cd       $S/https/0branch.com/snippets/eev-videos/
wget -nc 'https://0branch.com/snippets/eev-videos/{stem}.mp4'
echo     'https://0branch.com/snippets/eev-videos/{stem}.mp4' >> ~/.psne.log

# Verify and play the local copy:
# (find-fline \"$S/https/0branch.com/snippets/eev-videos/\" \"{stem}.mp4\")
# (find-video \"$S/https/0branch.com/snippets/eev-videos/{stem}.mp4\")
# (code-video \"{c}video\" \"$S/https/0branch.com/snippets/eev-videos/{stem}.mp4\")
# (find-{c}video \"0:00\")
")
     )
   pos-spec-list))




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

EMACSFONT=\"Monospace 14\"
EMACSFONT=\"6x13\"
function emacs-with-big-font () {<}
  ~/bigsrc/emacs27/src/emacs -fg bisque -bg black -fn \"$EMACSFONT\" $*
{>}

# (find-fline \"~/.emacs\")
# (find-fline \"~/.emacs.d/\")
# (find-fline \"~/.emacs.d/elpa/\")
# (find-fline \"~/.emacs-orig\")
# (find-fline \"~/.emacs-orig.d/\")
# (find-fline \"~/.emacs-orig.d/elpa/\")
# (find-fline \"~/.emacs-{stem}\")
# (find-fline \"~/.emacs-{stem}.d/\")
# (find-fline \"~/.emacs-{stem}.d/elpa/\")

cd; mv -ivT .emacs        .emacs-orig
cd; mv -ivT .emacs.d      .emacs-orig.d
cd; mv -ivT .emacs-{stem}   .emacs
cd; mv -ivT .emacs-{stem}.d .emacs.d

# (require 'package)
# (package-initialize)
# (package-install 'eev)
# (eev-beginner)
# (add-to-list 'package-archives '(\"melpa\" . \"https://melpa.org/packages/\"))

emacs-with-big-font

cd; mv -ivT .emacs        .emacs-{stem}
cd; mv -ivT .emacs.d      .emacs-{stem}.d
cd; mv -ivT .emacs-orig   .emacs  
cd; mv -ivT .emacs-orig.d .emacs.d
")
     )
   pos-spec-list))




;; «find-vimeodl-links»  (to ".find-vimeodl-links")
;; (find-fline "/sda5/videos/__shibari/")
;;
(defvar ee-vimeodl-dir "/sda5/videos/")
(defvar ee-vimeodl-dir2 "/sda5/videos/__shibari/")
(defvar ee-vimeodl-command "youtube-dl")
(defun ee-vimeodl-hash-around-point () (ee-stuff-around-point "0-9"))

;; (find-efunction 'find-youtubedl-links)
;; Test: (find-vimeodl-links nil nil "193478557")
;;
(defun find-vimeodl-links (&optional dir title hash ext- stem &rest rest)
  "Visit a temporary buffer containing hyperlinks for vimeo-dl."
  (interactive)
  (setq dir   (or dir   ee-vimeodl-dir "{dir}"))
  (setq hash  (or hash  (ee-vimeodl-hash-around-point)    "{hash}"))
  ;; (setq title (or title (ee-vimeodl-guess-title dir hash) "{title}"))
  ;; (setq ext-   (or ext-   (ee-vimeodl-guess-ext-   dir hash) "{ext-}"))
  (setq title (or title "{title}"))
  (setq ext- (or ext- "{ext-}"))
  (setq stem  (or stem "{stem}"))
  (apply 'find-elinks `(
    ;; Convention: the first sexp always regenerates the buffer.
    (find-vimeodl-links ,dir ,title ,hash ,ext- ,stem)
    (find-vimeodl-links ,dir nil ,hash nil ,stem)
    ""
    (find-vimeodl-links ,ee-vimeodl-dir  nil ,hash nil ,stem)
    (find-vimeodl-links ,ee-vimeodl-dir2 nil ,hash nil ,stem)
    ;; (find-vimeodl-links ,ee-vimeodl-dir3 nil ,hash nil ,stem)
    ;; (find-vimeodl-links ,ee-vimeodl-dir4 nil ,hash nil ,stem)
    (setq ee-vimeodl-dir "/sda5/sda5/videos/__shibari/")
    (find-efunction 'find-vimeodl-links)
    ;;
    ;; (find-vimeodl-links ee-vimeodl-dir ,title ,hash ,ext- ,stem)
    ;; (setq ee-vimeodl-dir ,ee-vimeodl-dir)
    ""
    ;; (find-ydbgrep ,(format "grep --color -nH -e %s db.lua" hash))
    ;;
    ;; Body:
    ""
    ,(ee-template0 "\
* (eepitch-shell2)
* (eepitch-kill)
* (eepitch-shell2)
# https://vimeo.com/{hash}
# http://www.vimeo.com/watch?v={hash}#t=0h00m00s
cd {dir}
{ee-vimeodl-command} -f http-540p 'https://vimeo.com/{hash}'

# Or:
{ee-vimeodl-command} -F 'https://vimeo.com/{hash}'
{ee-vimeodl-command}    'https://vimeo.com/{hash}'

# (find-es \"video\" \"vimeo-dl\")
# (find-fline \"{dir}\" \"{hash}\")
# (find-fline \"{dir}\" \"{title}-{hash}\")
# (find-fline \"{dir}\" \"{title}-{hash}{ext-}\")
# (find-video \"{dir}{title}-{hash}{ext-}\")
# (find-video \"{dir}{title}-{hash}{ext-}.part\")
# (code-video \"{stem}video\" \"{dir}{title}-{hash}{ext-}\")
# (code-video \"{stem}video\" \"{dir}{title}-{hash}{ext-}.part\")
# (find-{stem}video)
# (find-{stem}video \"0:00\")

# Error messages (for the player):
# (find-ebuffer \"*Messages*\")
")
    ) rest))



;; «find-repl-lualatex-links»  (to ".find-repl-lualatex-links")
;; Skel: (find-find-links-links-new "repl-lualatex" "" "")
;; Test: (find-repl-lualatex-links)
;;
(defun find-repl-lualatex-links (&rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for repl-lualatex."
  (interactive)
  (apply
   'find-elinks
   `((find-repl-lualatex-links ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-repl-lualatex-links)
     ""
     ,(ee-template0 "\

% (find-LATEX \"tmp.tex\")
\\catcode`\\^^J=10
\\directlua{<}dofile \"dednat6load.lua\"{>}  % (find-LATEX \"dednat6load.lua\")
\\def\\repl{<}\\directlua{<}print(); REPL = Repl:new(); REPL:repl(){>}{>}
\\repl

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# (find-es \"luatex\" \"show\")
cd ~/LATEX/
lualatex tmp.tex
mt = function (s) tok = token.create(s); print(tok) end
ma = function (s) print(token.get_macro(s)) end
me = function (s) print(token.get_meaning(s)) end
md = function (s)
    local meaning = token.get_meaning(s)
    local a,b = meaning:match\"^(.-)%->(.*)$\"
    print(\"\\\\\"..s..a..\"\\n -> \"..b)
  end
ma \"break\"
me \"break\"
ma \"section\"
ma \"@startsection\"

md \"thmsubsection\"
md \"@thm\"
md \"@xthm\"
md \"@begintheorem\"
md \"@endtheorem\"
md \"end\"
")
     )
   pos-spec-list))



;; «find-classroom-trab-links»  (to ".find-classroom-trab-links")
;; Skel: (find-find-links-links-new "classroom-trab" "name" "dir len")
;; Test: (find-classroom-trab-links "Alexandre Dos Santos Goncalves Junior")
;;
(defun find-classroom-trab-links (&optional name &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for classroom-trab."
  (interactive)
  (setq name (or name "{name}"))
  (let* ((dir ee-classroom-dir)
         (len (length name)))
    (apply
     'find-elinks
     `((find-classroom-trab-links ,name ,@pos-spec-list)
       ;; Convention: the first sexp always regenerates the buffer.
       (find-efunction 'find-classroom-trab-links)
       ""
       (setq ee-classroom-dir "~/2020.1-C2/P1/C1/")
       (setq ee-classroom-dir "~/2020.1-C2/P1/E1/")
       (setq ee-classroom-dir "~/2020.1-C3/P1/")
       (find-fline ,ee-classroom-dir)
       ""
       ,(ee-template0 "\
# (kill-new \"{name}\")
# (find-fline \"{dir}\")
# (find-fline \"{dir}\" \"{name}\")
# (kill-new   \"{dir}{name}.pdf\")
# (kill-new   \"{dir}{name}_1.jpg\")
# (kill-new   \"{dir}{name}_2.jpg\")
# (kill-new   \"{dir}{name}_3.jpg\")
# (kill-new   \"{dir}{name}_4.jpg\")
# (find-fline \"{dir}{name}.pdf\")
# (find-fline \"{dir}{name}_all.pdf\")
# (find-fline \"{dir}{name}_corr.pdf\")
# (find-pdf-page \"{dir}{name}.pdf\")
# (find-pdf-page \"{dir}{name}_all.pdf\")
# (find-pdf-page \"{dir}{name}_corr.pdf\")
# (find-xournalpp \"{dir}{name}.pdf\")
# (find-xournalpp \"{dir}{name}_all.pdf\")
# (find-xournalpp \"{dir}{name}_corr.pdf\")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd {dir}
laf     \"{name}\"*
convert \"{name}\"*.jpg \"{name}_all\".pdf
laf     \"{name}\"*

laf   \"{name}\"*_small.jpg
rm -v \"{name}\"*_small.jpg
laf   \"{name}\"*.jpg

ls \"{name}\"*.jpg
ls \"{name}\"*.jpg | cut -b{(+ 2 len)}-
ls \"{name}\"*.jpg | cut -b{(+ 2 len)}- | rev | cut -b5- | rev | tee /tmp/o

for i in 01 02 03 04 05 06 07 08 09 10; do
  convert      \"{name}\"_$i.jpg \\
    -scale 50% \"{name}\"_${<}i{>}_small.jpg
done
laf     \"{name}\"*
convert \"{name}\"*small.jpg \"{name}_all\".pdf
laf     \"{name}\"*



# (find-fline \"{dir}\" \"{name}\")
cp -v {dir}\"{name}\".pdf /tmp/a.pdf
#
rm -Rv /tmp/pdf-jpg-pdf/
mkdir  /tmp/pdf-jpg-pdf/
cd     /tmp/pdf-jpg-pdf/
pdftoppm -jpeg -jpegopt quality=80 -r 150 /tmp/a.pdf b
convert b*.jpg /tmp/b.pdf
# (find-fline \"/tmp/pdf-jpg-pdf/\")
# (find-fline \"/tmp/\" \"a.pdf\")
# (find-fline \"/tmp/\" \"b.pdf\")
#
cp -v /tmp/b.pdf {dir}\"{name}\"_small.pdf


")
       )
     pos-spec-list)))

(setq ee-classroom-dir "~/2020.1-C2/P1/C1/")




;; «find-emacsdevel-links»  (to ".find-emacsdevel-links")
;; Skel: (find-find-links-links-new "emacsdevel" "yyyy-mm nnnn" "")
;; Test: (find-emacsdevel-links)
;;
(defalias 'find-eml-links 'find-emacsdevel-links)

(defun find-emacsdevel-links (&optional yyyy-mm nnnn &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for emacsdevel."
  (interactive)
  (setq yyyy-mm (or yyyy-mm "2024-11"))
  (setq yyyy-mm (or yyyy-mm "{yyyy-mm}"))
  (setq nnnn (or nnnn "{nnnn}"))
  (apply
   'find-elinks
   `((find-emacsdevel-links ,yyyy-mm ,nnnn ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-emacsdevel-links)
     (find-efunction 'find-eml-links)
     ""
     ,(ee-template0 "\
# http://lists.gnu.org/archive/html/emacs-devel/
# https://lists.gnu.org/archive/html/emacs-devel/{yyyy-mm}/index.html
# https://lists.gnu.org/archive/html/emacs-devel/{yyyy-mm}/index.html#{nnnn}
# https://lists.gnu.org/archive/html/emacs-devel/{yyyy-mm}/threads.html
# https://lists.gnu.org/archive/html/emacs-devel/{yyyy-mm}/threads.html#{nnnn}
# https://lists.gnu.org/archive/html/emacs-devel/{yyyy-mm}/msg{nnnn}.html

# https://lists.gnu.org/archive/cgi-bin/namazu.cgi?idxname=emacs-devel

# http://lists.gnu.org/archive/html/help-gnu-emacs/
# https://lists.gnu.org/archive/html/help-gnu-emacs/{yyyy-mm}/index.html
# https://lists.gnu.org/archive/html/help-gnu-emacs/{yyyy-mm}/index.html#{nnnn}
# https://lists.gnu.org/archive/html/help-gnu-emacs/{yyyy-mm}/threads.html
# https://lists.gnu.org/archive/html/help-gnu-emacs/{yyyy-mm}/threads.html#{nnnn}
# https://lists.gnu.org/archive/html/help-gnu-emacs/{yyyy-mm}/msg{nnnn}.html

# https://lists.gnu.org/archive/cgi-bin/namazu.cgi?idxname=help-gnu-emacs

# http://lists.gnu.org/archive/html/bug-gnu-emacs/
# https://lists.gnu.org/archive/html/bug-gnu-emacs/{yyyy-mm}/index.html
# https://lists.gnu.org/archive/html/bug-gnu-emacs/{yyyy-mm}/index.html#{nnnn}
# https://lists.gnu.org/archive/html/bug-gnu-emacs/{yyyy-mm}/threads.html
# https://lists.gnu.org/archive/html/bug-gnu-emacs/{yyyy-mm}/threads.html#{nnnn}
# https://lists.gnu.org/archive/html/bug-gnu-emacs/{yyyy-mm}/msg{nnnn}.html

# https://lists.gnu.org/archive/cgi-bin/namazu.cgi?idxname=bug-gnu-emacs

# http://lists.gnu.org/archive/html/emacs-orgmode/
# https://lists.gnu.org/archive/html/emacs-orgmode/{yyyy-mm}/index.html
# https://lists.gnu.org/archive/html/emacs-orgmode/{yyyy-mm}/index.html#{nnnn}
# https://lists.gnu.org/archive/html/emacs-orgmode/{yyyy-mm}/threads.html
# https://lists.gnu.org/archive/html/emacs-orgmode/{yyyy-mm}/threads.html#{nnnn}
# https://lists.gnu.org/archive/html/emacs-orgmode/{yyyy-mm}/msg{nnnn}.html

# https://lists.gnu.org/archive/html/eev/
# https://lists.gnu.org/archive/html/eev/{yyyy-mm}/

# https://lists.gnu.org/archive/cgi-bin/namazu.cgi?idxname=emacs-orgmode

# https://lists.gnu.org/archive/html/info-gnu-emacs/
# https://lists.gnu.org/archive/html/info-gnu-emacs/{yyyy-mm}/index.html
# https://lists.gnu.org/archive/html/info-gnu-emacs/{yyyy-mm}/index.html#{nnnn}
# https://lists.gnu.org/archive/html/emacs-tangents/{yyyy-mm}/
# https://lists.gnu.org/archive/html/emacs-tangents/{yyyy-mm}/msg{nnnn}.html


")
     )
   pos-spec-list))




;; «find-helpgnuemacs-links»  (to ".find-helpgnuemacs-links")
;; Skel: (find-find-links-links-new "helpgnuemacs" "yyyy-mm nnnn" "")
;; Test: (find-helpgnuemacs-links)
;;
(defun find-helpgnuemacs-links (&optional yyyy-mm nnnn &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for helpgnuemacs."
  (interactive)
  (setq yyyy-mm (or yyyy-mm "2021-12"))
  (setq yyyy-mm (or yyyy-mm "{yyyy-mm}"))
  (setq nnnn (or nnnn "{nnnn}"))
  (apply
   'find-elinks
   `((find-helpgnuemacs-links ,yyyy-mm ,nnnn ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-helpgnuemacs-links)
     ""
     ,(ee-template0 "\
# http://lists.gnu.org/archive/html/help-gnu-emacs/
# https://lists.gnu.org/archive/html/help-gnu-emacs/{yyyy-mm}/index.html
# https://lists.gnu.org/archive/html/help-gnu-emacs/{yyyy-mm}/index.html#{nnnn}
# https://lists.gnu.org/archive/html/help-gnu-emacs/{yyyy-mm}/threads.html
# https://lists.gnu.org/archive/html/help-gnu-emacs/{yyyy-mm}/threads.html#{nnnn}
# https://lists.gnu.org/archive/html/help-gnu-emacs/{yyyy-mm}/msg{nnnn}.html

# https://lists.gnu.org/archive/cgi-bin/namazu.cgi?idxname=help-gnu-emacs
")
     )
   pos-spec-list))




;; «find-emacsorgmode-links»  (to ".find-emacsorgmode-links")
;; Skel: (find-find-links-links-new "emacsorgmode" "yyyy-mm nnnn" "")
;; Test: (find-emacsorgmode-links)
;;
(defun find-emacsorgmode-links (&optional yyyy-mm nnnn &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for emacsorgmode."
  (interactive)
  (setq yyyy-mm (or yyyy-mm "2021-01"))
  (setq yyyy-mm (or yyyy-mm "{yyyy-mm}"))
  (setq nnnn (or nnnn "{nnnn}"))
  (apply
   'find-elinks
   `((find-emacsorgmode-links ,yyyy-mm ,nnnn ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-emacsorgmode-links)
     ""
     ,(ee-template0 "\
# http://lists.gnu.org/archive/html/emacs-orgmode/
# https://lists.gnu.org/archive/html/emacs-orgmode/{yyyy-mm}/index.html
# https://lists.gnu.org/archive/html/emacs-orgmode/{yyyy-mm}/index.html#{nnnn}
# https://lists.gnu.org/archive/html/emacs-orgmode/{yyyy-mm}/threads.html
# https://lists.gnu.org/archive/html/emacs-orgmode/{yyyy-mm}/threads.html#{nnnn}
# https://lists.gnu.org/archive/html/emacs-orgmode/{yyyy-mm}/msg{nnnn}.html

# https://lists.gnu.org/archive/cgi-bin/namazu.cgi?idxname=emacs-orgmode
")
     )
   pos-spec-list))




;; «find-vscan-links»  (to ".find-vscan-links")
;; Skel: (find-find-links-links-new "vscan" "fname" "thisfname")
;; Test: (find-vscan-links "2020-1-C3-P2")
;;
(defun find-vscan-links (&optional fname &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for vscan."
  (interactive)
  (setq fname (or fname "{fname}"))
  (let* ((thisfname (buffer-file-name)))
    (apply
     'find-elinks
     `((find-vscan-links ,fname ,@pos-spec-list)
       (find-vscan-links ,thisfname ,@pos-spec-list)
       (find-vscan-links "2020-1-C3-P2")
       ;; Convention: the first sexp always regenerates the buffer.
       (find-efunction 'find-vscan-links)
       ""
       ,(ee-template0 "\
# (ee-copy-rest 1 '(find-LATEX \"{fname}.tex\"))

% <videos>
% (find-ssr-links \"2020_videoname\" \"videoc\")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cp -v  ~/LATEX/{fname}.pdf /tmp/
cd /tmp/
xournalpp      {fname}.pdf


% <scans>
% (find-LATEX \"2020-1-C3-aprox-2a-ordem-R2.tex\" \"scans\")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# (find-fline \"~/2020.1-C2/\")
# (find-fline \"~/2020.1-C3/\")
# (find-fline \"~/LATEX/2020-1-C2/\")
# (find-fline \"~/LATEX/2020-1-C3/\")
# (find-fline \"/tmp/qc3/\")
# (find-fline \"/tmp/\")
cd /tmp/qc3/
cd /tmp/
for i in *.jpg; do echo f $(basename $i .jpg); done

f () {<} rm -fv $1.png $1.pdf; djvuize $1.pdf {>}
f () {<} rm -fv $1.png $1.pdf; djvuize WHITEBOARDOPTS=\"-m 0.5\" $1.pdf; xpdf $1.pdf {>}
f () {<} rm -fv $1.png $1.pdf; djvuize WHITEBOARDOPTS=\"-m 0.25\" $1.pdf; xpdf $1.pdf {>}
f () {<} cp -fv $1.png $1.pdf       ~/2020.1-C3/ {>}
f () {<} cp -fv        $1.pdf ~/LATEX/2020-1-C3/ {>}
f () {<} cp -fv $1.png $1.pdf       ~/2020.1-C2/
       cp -fv        $1.pdf ~/LATEX/2020-1-C2/
       cat <<%%%
% (find-latexscan-links \"C2\" \"$1\")
%%%
{>}

f 20201202_substtrig_grande
f 20201202_substtrig_ids_e_blocos
")
       )
     pos-spec-list)))



;; «find-LATEXpdf-links»  (to ".find-LATEXpdf-links")
;; Skel: (find-find-links-links-new "LATEXpdf" "stem n" "")
;; Test: (find-LATEXpdf-links "2020-1-C2-P1" "10")
;;       (c2mp1p 10)
;;
(defun find-LATEXpdf-links (&optional stem n &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for LATEXpdf."
  (interactive)
  (setq stem (or stem "{stem}"))
  (setq n (or n 1))
  (setq n (or n "{n}"))
  (apply
   'find-elinks
   `((find-LATEXpdf-links ,stem ,n ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-LATEXpdf-links)
     ""
     ,(ee-template0 "\
# (find-xpdf-page \"~/LATEX/{stem}.pdf\" {n})
# (find-fline     \"~/LATEX/{stem}.tex\")
# (kill-new \"http://anggtwu.net/LATEX/{stem}.pdf#page={n}\")
# (brg      \"http://anggtwu.net/LATEX/{stem}.pdf#page={n}\")
")
     )
   pos-spec-list))



;; «find-pdfpages-links»  (to ".find-pdfpages-links")
;; Skel: (find-find-links-links-new "pdfpages" "pages" "")
;; Test: (find-pdfpages-links "7,11-16,175-185")
;;
(defun find-pdfpages-links (&optional pages &rest pos-spec-list)
"Generate an e-script for extracting pages with the pdfpages package in latex."
  (interactive)
  (setq pages (or pages "{pages}"))
  (apply
   'find-elinks
   `((find-pdfpages-links ,pages ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-pdfpages-links)
     ""
     ,(ee-template0 "\

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# (find-pdf-page \"/tmp/inp.pdf\")
# (find-pdf-page \"/tmp/out.pdf\")

cd    /tmp/
cat > /tmp/out.tex <<'---'
\\documentclass[oneside]{<}book{>}
\\usepackage{<}pdfpages{>}
\\begin{<}document{>}
\\includepdf[pages={<}{pages}{>}]{<}inp.pdf{>}
\\end{<}document{>}
---
lualatex  out.tex

# (find-pdf-page \"/tmp/inp.pdf\")
# (find-pdf-page \"/tmp/out.pdf\")


")
     )
   pos-spec-list))



;; «find-pdfpages2-links»  (to ".find-pdfpages2-links")
;; Skel: (find-find-links-links-new "pdfpages2" "dir stem suffix opts" "")
;; Test: (find-pdfpages2-links)
;; Test: (find-pdfpages2-links "~/LATEX/" "2024-1-C2-P1")
;; Test: (find-pdfpages2-links "~/LATEX/" "2024-1-C2-P1" "-pp")
;; Test: (find-pdfpages2-links "~/LATEX/" "2024-1-C2-P1" "-pp" "fitpaper")
;; Test: (find-pdfpages2-links "~/LATEX/" "2024-1-C2-P1" "-pp" "pages=1-last,angle=90")
;;   (find-es "tex" "pdfpages")
;;
(defun find-pdfpages2-links (&optional dir stem suffix opts &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for pdfpages2."
  (interactive)
  (setq dir (or dir "{dir}"))
  (setq stem (or stem "{stem}"))
  (setq suffix (or suffix "{suffix}"))
  (setq opts (or opts "{opts}"))
  (apply
   'find-elinks
   `((find-pdfpages2-links ,dir ,stem ,suffix ,opts ,@pos-spec-list)
     (find-pdfpages2-links ,dir ,stem "-pp" "pages=1-,fitpaper")
     (find-pdfpages2-links ,dir ,stem "-pp" "pages=1-,fitpaper,landscape=true")
     (find-pdfpages2-links ,dir ,stem)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-pdfpages2-links)
     ""
     ,(ee-template0 "\
% (find-es \"tex\" \"pdfpages\")

%%% (ee-copy-rest-3m nil \"%%%-- end\" \"{dir}{stem}{suffix}.tex\")
\\documentclass[oneside,a4paper,landscape]{<}article{>}
\\usepackage{<}pdfpages{>}
\\begin{<}document{>}
\\includepdf[{opts}]{<}{stem}.pdf{>}
\\end{<}document{>}
%%%-- end

(find-sh \"cd {dir} && lualatex {stem}{suffix}.tex\" :end)
(find-pdf-page           \"{dir}{stem}{suffix}.pdf\")
(find-sh0          \"cp -v {dir}{stem}{suffix}.pdf /tmp/\")
(find-pdf-page              \"/tmp/{stem}{suffix}.pdf\")

")
     )
   pos-spec-list))



;; «find-sshot-links»  (to ".find-sshot-links")
;; Skel: (find-find-links-links-new "sshot" "nsecs" "")
;; Test: (find-sshot-links)
;;  See: (find-es "paste" "scrot-imgbb")
;;       https://lists.gnu.org/archive/html/help-gnu-emacs/2021-07/msg00882.html
;;       (find-angg ".emacs" "sshot-run")
;;
(defun find-sshot-links (&optional nsecs stem &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks taking a screenshot."
  (interactive)
  (setq stem (or stem "{stem}"))
  (setq nsecs (or nsecs "5"))
  (setq nsecs (or nsecs "{nsecs}"))
  (let ((ee-buffer-name (or ee-buffer-name "*find-sshot-links*")))
    (apply
     'find-elinks
     `((find-sshot-links ,nsecs ,stem ,@pos-spec-list)
       (find-sshot-links "{nsecs}")
       ;; Convention: the first sexp always regenerates the buffer.
       (find-efunction 'find-sshot-links)
       ""
       (find-angg "bin/scrxpp")
       (find-es "tcl" "screenshooter")
       (find-cp-angg-links "sshot.png" "/tmp/" "tmp/")
       (find-bgprocess "tclsh ~/usrc/screenshooter/screenshooter.tcl")
       ""
       ,(ee-template0 "\
\(find-sh0 \"rm -v /tmp/sshot*.png\")

\(eev                        \"sleep {nsecs} && scrot -o          --select /tmp/sshot.png\")
\(find-bgprocess '(\"sh\" \"-c\" \"sleep {nsecs} && scrot -o          --select /tmp/sshot.png\"))
\(find-bgprocess '(\"sh\" \"-c\" \"sleep {nsecs} && scrot -o          --select /tmp/sshot.png && scrxpp\"))
\(find-bgprocess '(\"sh\" \"-c\" \"sleep {nsecs} && scrot -o --border --select /tmp/sshot.png\"))
\(find-bgprocess \"xzgv /tmp/sshot.png\")
\(find-bgprocess \"gimp /tmp/sshot.png\")
\(find-fline   \"/tmp/\" \"sshot.png\")
\(find-fline   \"/tmp/sshot.png\")
\(imgbb-upload \"/tmp/sshot.png\")


# (find-fline \"~/blogme3/anggmake.lua\" \"2022tikz-exercises.png\")
# (find-fline \"~/blogme3/anggmake.lua\" \"2023-ELpeg2\")
# (find-fline \"~/IMAGES/\" \"2022tikz-exercises.png\")
# (find-fline \"~/IMAGES/\" \"2023-ELpeg2\")


* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cp -v /tmp/sshot.png /tmp/{stem}.png
convert /tmp/{stem}.png -scale 25% /tmp/{stem}-small.png
laf /tmp/*.png

convert /tmp/{stem}.png            /tmp/{stem}.jpg
convert /tmp/{stem}.png -scale 25% /tmp/{stem}-small.jpg
laf /tmp/*.png /tmp/*.jpg

# (find-fline \"/tmp/\" \"{stem}.png\")
# (find-fline   \"/tmp/{stem}.png\")
# (find-fline   \"/tmp/{stem}-small.png\")
# (xz           \"/tmp/{stem}.png\")
# (xz           \"/tmp/{stem}.jpg\")
# (xz           \"/tmp/{stem}-small.png\")
# (xz           \"/tmp/{stem}-small.jpg\")

cp -v /tmp/{stem}-small.png ~/IMAGES/
cp -v /tmp/{stem}.png       ~/IMAGES/

cp -v /tmp/{stem}-small.jpg ~/IMAGES/
cp -v /tmp/{stem}.jpg       ~/IMAGES/

# (find-fline \"~/IMAGES/{stem}.png\")
# (find-fline \"~/IMAGES/{stem}-small.png\")
# (kill-new   \"  IMAGES/{stem}.png\")
# (kill-new   \"  IMAGES/{stem}-small.png\")
# (kill-new   \"  IMAGES/{stem}-small.jpg\")
# (find-blogme3file \"anggmake.lua\" \"IMAGES/2022tikz\")
# (find-blogme3file \"anggmake.lua\" \"IMAGES/2024-find-luaso\")

makeL
makeR

cd /tmp/
scp    {stem}.png \\
       {stem}-small.png $LINP/IMAGES/
scp    {stem}.png       $LINS/IMAGES/
# (find-linodesfile \"IMAGES/\")
# (find-linodesfile \"IMAGES/\" \"{stem}\")

# http://anggtwu.net/IMAGES/{stem}.png

Scp-np {stem}.png \\
       {stem}-small.png $TWUP/IMAGES/


[PLEFT [FIG IMAGES/{stem}.png
            IMAGES/{stem}-small.png]
]

")
       )
     pos-spec-list)))

(defalias 'sshot 'find-sshot-links)





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

  (find-angg \".emacs.templates\" \"eev-videos-data\")
  (find-angg \".emacs.templates\" \"eev-videos-data\" \"{c}\")

' (find-eevvideopage-links
   \"{title}\"
   \"{pagestem}\"
   \"{c}\" \"{mp4stem}\" \"{hash}\")

  (find-eev \"eev-audiovideo.el\" \"video-tutorials\" \"find-{c}video\")

  (find-efunction 'find-videos-intro \"1. Some videos\")
  (find-videos-intro \"1. Some videos\")

  _. \"{title}\":
     http://anggtwu.net/{pagestem}.html
     http://anggtwu.net/{pagestem}.html#code-video
     http://anggtwu.net/eev-videos/{mp4stem}.mp4
     http://www.youtube.com/watch?v={hash}

  (find-angg \".emacs.videos\" \"{c}\")

;; \"{title}\":
;; (find-TH \"{pagestem}\")
;; http://anggtwu.net/{pagestem}.html
;; http://anggtwu.net/eev-videos/{mp4stem}.mp4
;; (find-eevvideo-links \"{c}\" \"{pagestem}\" \"{hash}\")
;; (find-code-eevvideo  \"{c}\" \"{pagestem}\" \"{hash}\")
      ' (code-eevvideo  \"{c}\" \"{pagestem}\" \"{hash}\")
;; (find-angg \".emacs.templates\" \"eev-videos-data\" \"{c}\")
;; (find-eev \"eev-audiovideo.el\" \"video-tutorials\" \"find-{c}video\")
;; (find-videos-intro \"1. Some videos\" \"{c}\")

;; (find-TH \"{pagestem}\")
;; http://anggtwu.net/{pagestem}.html
;; (find-code-eevvideo \"{c}\" \"{pagestem}\" \"{hash}\")
;; (code-eevvideo \"{c}\" \"{pagestem}\" \"{hash}\")

;; (find-eevvideo-links \"{c}\" \"{mp4stem}\" \"{hash}\")
;; (code-video \"{c}video\" \"$S/http/anggtwu.net/eev-videos/{mp4stem}.mp4\")
;; (find-{c}video)

;; (ee-use-find-eevvideo-links)
;; (ee-use-find-youtube-video)
;; (setq ee-find-youtube-video-program 'find-googlechrome)
;; (setq ee-find-youtube-video-program 'find-firefox)
;; (code-eevvideo \"{c}\" \"{mp4stem}\" \"{hash}\")
;; (find-{c}video \"\")
")
     )
   pos-spec-list))


;; «find-eevvideopage-linkss»  (to ".find-eevvideopage-linkss")
;; «eev-videos-data»  (to ".eev-videos-data")
;; (find-videos-intro "1. Some videos")
;; This is obsolete!
;; See: (find-video-links-intro "9. First-class videos")

' (find-eevvideopage-links
   "How to record executable notes with eev - and how to play them back"
   "emacsconf2019"
   "eev2019" "emacsconf2019" "86yiRG8YJD0")

' (find-eevvideopage-links
   "On why most of the best features in eev look like 5-minute hacks"
   "emacsconf2020"
   "eev2020" "emacsconf2020" "hOAqBc42Gg8")

' (find-eevvideopage-links
   "Some template-based functions of eev that are not five-minute hacks"
   "2020-some-template-based"
   "eevtempl" "2020-some-template-based" "91-9YfRPsuk")

' (find-eevvideopage-links
   "How to install eev with M-x list-packages and how to navigate its tutorials"
   "2020-list-packages-eev-nav"
   "eevnav" "M-x-list-packages-eev-nav" "kxBjiUo88_U")

' (find-eevvideopage-links
   "How to create hyperlinks to \"here\" with `find-here-links'"
   "2020-find-here-links"
   "eevfherel" "2020-find-here-links" "8jtiBlaDor4")

' (find-eevvideopage-links
   "Using test blocks in eev"
   "2021-test-blocks"
   "testbls" "2020-test-blocks-1" "fpsF_M55W4o")

' (find-eevvideopage-links
   "Short videos about workflows - and how to upload them"
   "2021-ssr"
   "2020ssr" "2020-short-find-ssr-links-2" "_0_NLXTVhBk")

' (find-eevvideopage-links
  "How to use the `[Video links:]' blocks in the `intro's of eev"
  "2021-video-links"
  "vlinks" "2021-video-links" "xQqWufQgzVY")

;; Videos in Portuguese:

;; (find-eevvideo-links "eev2021pe" "2021projeto-de-ensino" "OW6WRnSQwc0")

' (find-eevvideopage-links
  "Introdução ao Software Livre: Python, shell, Lua e eev"
  "2021projeto-de-ensino"
  "eev2021pe" "2021projeto-de-ensino" "OW6WRnSQwc0")

' (find-eevvideopage-links
  "Como instalar o eev no Emacs"
  "2021-oficina"
  "eevnov2021a" "2021-oficina-1" "acFPMuZ5Jf4")




;; «code-youtube»  (to ".code-youtube")
;; Tests: (code-youtube "chavosoband" "5Si7_LaxRkM" "A esquerda defende bandido?")
;;        (code-youtube "hstocore" "fty9QL4aSRc" "Haskell to Core")
;;        (find-hstocorevideo "0:00")
;;
(defun code-youtube (c0 hash &rest rest)
  (let ((fname (car (ee-youtubedl-guess** hash)))
	(c (concat c0 "video")))
    (if fname
	(code-video c fname)
      (find-elinks
       `((code-youtube ,c ,hash ,@rest)
	 ,(ee-H "")
	 ,(ee-H "Local copy not found! Run:")
	 (find-youtubedl-links nil nil ,hash nil ,c)
	 )))))

;; Test: (find-eppp (ee-youtubedl-guess** "fty9QL4aSRc" nil "Haskell to Core"))
;;  See: (find-eev "eev-tlinks.el" "find-youtubedl-links" "(defun ee-youtubedl-guess*")

(defun ee-youtubedl-guess** (hash &optional dirs &rest rest)
  "Return all the files containg HASH in DIRS.
HASH is usually a 11-character string.
When DIRS is nil use (cons ee-youtubedl-dir ee-youtubedl-dirs)."
  (setq dirs (or dirs (cons ee-youtubedl-dir ee-youtubedl-dirs)))
  (apply 'append
	 (mapcar
	  (lambda (dir) (ee-youtubedl-guess* dir hash))
	  dirs)))


;; «find-fossil-update-srf-links»  (to ".find-fossil-update-srf-links")
;; Skel: (find-find-links-links-new "fossil-update-srf" "" "")
;;
(defun find-fossil-update-srf-links (&rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for fossil-update-srf."
  (interactive)
  (apply
   'find-elinks
   `((find-fossil-update-srf-links ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-fossil-update-srf-links)
     ""
     ,(ee-template0 "\
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd ~/usrc/srf/
fossil up
fossil branch
fossil checkout trunk
fossil checkout multiline-comments

* (cd \"~/usrc/srf/eg/\")
* (eepitch-srf)
* (eepitch-kill)
* (eepitch-srf)
* (eek \"M-K M-K <up>\")

-- (find-srffile \"ports/lua/\")
-- (find-srffile \"eg/\")
-- (find-fline \"~/.srfrc\")
")
     )
   pos-spec-list))

(defun fus () (interactive) (find-fossil-update-srf-links 13))




;; «find-code-xxx-links»  (to ".find-code-xxx-links")
;; Skel: (find-find-links-links-new "code-xxx" "xxx basicargs keywordargs" "")
;; Test: (find-code-xxx-links "eec-LATEX" "stem" "")
;;
(defun find-code-xxx-links (&optional xxx basicargs keywordargs &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for code-xxx."
  (interactive)
  (setq xxx (or xxx "{xxx}"))
  (setq basicargs (or basicargs "{basicargs}"))
  (setq keywordargs (or keywordargs "{keywordargs}"))
  (let* (({vars} "{{vars}}"))
    (apply
     'find-elinks-elisp
     `(;; Convention: the first sexp always regenerates the buffer.
       ,(ee-template0 "\
;; (find-code-xxx-links \"{xxx}\" \"{basicargs}\" \"{keywordargs}\")
;; (find-efunction 'find-code-xxx-links)
              
(defun      code-{xxx} ({basicargs})
  (eval (ee-read      (ee-code-{xxx} {basicargs}))))
(defun find-code-{xxx} ({basicargs})
  (find-estring-elisp (ee-code-{xxx} {basicargs})))
(defun   ee-code-{xxx} ({basicargs})
  (ee-template0 \"\\
;; (find-code-{xxx} \\\"C\\\" \\\"FNAME\\\")
;;      (code-{xxx} \\\"C\\\" \\\"FNAME\\\")
\"))

")
       )
     pos-spec-list)))




;; «code-eec-LATEX»  (to ".code-eec-LATEX")
;; Skel: (find-code-xxx-links "eec-LATEX" "stem" "")
;; Test: (find-code-eec-LATEX "2020-2-C3-taylor")
;;            (code-eec-LATEX "2020-2-C3-taylor")
;;
(defun      code-eec-LATEX (stem)
  (eval (ee-read      (ee-code-eec-LATEX stem))))
(defun find-code-eec-LATEX (stem)
  (find-estring-elisp (ee-code-eec-LATEX stem)))
(defun   ee-code-eec-LATEX (stem)
  (ee-template0 "\

\(setq eec-stem     \"{stem}\")
\(setq eec-pbname   \"{stem}.pdf\")
\(setq eec-pfname   (ee-LATEXfile eec-pbname))
\(setq eec-cmd      \"lualatex -record {stem}.tex\")
\(setq eec-cbname   (format \"cd %s\\n%s\" ee-LATEXdir eec-cmd))
\(defun e () (interactive) (find-LATEX \"{stem}.tex\"))
\(defun d () (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-comp () (interactive) (e) (save-buffer) (eec-cbkill) (eec-cbrun0))
\(defun eec-view-ok () (interactive) (find-2a '(e) '(progn (d) (g))))
\(defun eec-view-err ()
  (interactive)
  (find-wset \"132_o_o_o\" '(e) '(eec-cbview) '(eec-pview0)))

\(defun ce ()
  (interactive)
  (condition-case nil
    (progn (eec-comp)
	   (eec-view-ok))
    (error (eec-view-err))))

"))

(defun   ee-code-eec-LATEX (stem)
  (ee-code-eec-dir "LATEX" stem))

;; «code-eec-dir»  (to ".code-eec-dir")
(defun      code-eec-dir (c stem)
  (eval (ee-read      (ee-code-eec-dir c stem))))
(defun find-code-eec-dir (c stem)
  (find-estring-elisp (ee-code-eec-dir c stem)))
(defun   ee-code-eec-dir (c stem)
  (ee-template0 "\

\(setq eec-stem     \"{stem}\")
\(setq eec-pbname   \"{stem}.pdf\")
\(setq eec-pfname   (ee-{c}file eec-pbname))
\(setq eec-cmd      \"lualatex -record {stem}.tex\")
\(setq eec-cbname   (format \"cd %s\\n%s\" ee-{c}dir eec-cmd))
\(defun e () (interactive) (find-{c} \"{stem}.tex\"))
\(defun d () (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-{c}sh eec-cmd \"Success!!!\"))
\(defun eec-pview0 ()
  (interactive)
  (if (get-buffer eec-pbname)
      (find-ebuffer eec-pbname)
    (find-estring \"(no PDF)\")))

\(defun eec-comp () (interactive) (e) (save-buffer) (eec-cbkill) (eec-cbrun0))
\(defun eec-view-ok () (interactive) (find-2a '(e) '(progn (d) (g))))
\(defun eec-view-err ()
  (interactive)
  (find-wset \"132_o_o_o\" '(e) '(eec-cbview) '(eec-pview0)))

\(defun ce ()
  (interactive)
  (condition-case nil
    (progn (eec-comp)
	   (eec-view-ok))
    (error (eec-view-err))))

"))



;; «find-cp-angg-links»  (to ".find-cp-angg-links")
;; Skel: (find-find-links-links-new "cp-angg" "fname localdir anggdir" "")
;;
(defun find-cp-angg-links (&optional fname localdir anggdir &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for cp-angg."
  (interactive)
  (if (eq major-mode 'dired-mode)
      (let* ((full0    (ee-shorten-file-name (ee-dired-to-fname)))
	     (dir0     (file-name-directory full0))
	     (fname0   (file-name-nondirectory full0))
	     (anggdir0 (replace-regexp-in-string "~/" "" dir0)))
	(setq fname    (or fname fname0))
	(setq localdir (or localdir dir0))
	(setq anggdir  (or anggdir anggdir0))))
  (setq fname (or fname "{fname}"))
  (setq localdir (or localdir "{localdir}"))
  (setq anggdir (or anggdir "{anggdir}"))
  (apply
   'find-elinks
   `((find-cp-angg-links ,fname ,localdir ,anggdir ,@pos-spec-list)
     (find-cp-angg-links ,fname ,localdir "tmp/" ,@pos-spec-list)
     (find-cp-angg-links ,fname ,localdir "2022.2-C2/" ,@pos-spec-list)
     (find-cp-angg-links ,fname ,localdir "2022.2-C3/" ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-cp-angg-links)
     ""
     ,(ee-template0 "\
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd {localdir}
scp -v {fname} $LINP/{anggdir}
scp -v {fname} $LINS/{anggdir}
# cp -v {fname} ~/{anggdir}

# (find-linpfile \"{anggdir}\" \"{fname}\")
# (find-linsfile \"{anggdir}\" \"{fname}\")
# (find-twupfile \"{anggdir}\" \"{fname}\")
# (find-twusfile \"{anggdir}\" \"{fname}\")
# http://anggtwu.net/{anggdir}{fname}

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd {localdir}
Scp-np {fname} $TWUP/{anggdir}
Scp-np {fname} $TWUS/{anggdir}

# (find-twupfile \"{anggdir}\" \"{fname}\")
# (find-twusfile \"{anggdir}\" \"{fname}\")
# http://angg.twu.net/{anggdir}{fname}
")
     )
   pos-spec-list))



;; «find-eevshortvideo-links»  (to ".find-eevshortvideo-links")
;; Moved to: (find-eev "eev-tlinks.el" "find-eevshortvideo-links")



;; «find-telegram-save-log-links»  (to ".find-telegram-save-log-links")
;; Skel: (find-find-links-links-new "telegram-save-log" "yyyy s cn tt" "")
;; Test: (find-telegram-save-log-links "2021" "1" "C2" "C1")
;;       (find-telegram-save-log-links "2021" "1" "C2" "E1")
;;       (find-telegram-save-log-links "2021" "1" "C3" "M1")
;;
;; (code-pdf-page "20211C2C1" "~/2021.1-C2/C2-C1-RCN-PURO-2021.1.pdf")
;; (code-pdf-text "20211C2C1" "~/2021.1-C2/C2-C1-RCN-PURO-2021.1.pdf")
;; (find-20211C2C1page)
;; (find-20211C2C1text)
;; (code-pdf-page "20211C2E1" "~/2021.1-C2/C2-E1-RCN-PURO-2021.1.pdf")
;; (code-pdf-text "20211C2E1" "~/2021.1-C2/C2-E1-RCN-PURO-2021.1.pdf")
;; (brg "~/2021.1-C2/C2-E1-RCN-PURO-2021.1.pdf")
;; (find-20211C2E1page)
;; (find-20211C2E1text)
;; (find-20211C2E1page 36 "jeito esperto")
;; (find-20211C2E1text 36 "jeito esperto")
;; (code-pdf-page "20211C3M1" "~/2021.1-C3/C3-M1-RCN-PURO-2021.1.pdf")
;; (code-pdf-text "20211C3M1" "~/2021.1-C3/C3-M1-RCN-PURO-2021.1.pdf")
;; (find-20211C3M1page)
;; (find-20211C3M1text)
;;
(defun find-telegram-save-log-links (&optional yyyy s cn tt &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for telegram-save-log."
  (interactive)
  (setq yyyy (or yyyy "{yyyy}"))
  (setq s (or s "{s}"))
  (setq cn (or cn "{cn}"))
  (setq tt (or tt "{tt}"))
  (apply
   'find-elinks
   `((find-telegram-save-log-links ,yyyy ,s ,cn ,tt ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-telegram-save-log-links)
     ""
     ,(ee-template0 "\
# (find-fline \"~/Downloads/Telegram Desktop/\" \"ChatExport\")
# (kill-new \"/tmp/{cn}-{tt}-RCN-PURO-{yyyy}.{s}\")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# (find-fline \"~/{yyyy}.{s}-{cn}/\")
# (find-fline \"~/{yyyy}.{s}-{cn}/\" \"{cn}-{tt}-RCN-PURO-{yyyy}.{s}\")
# (find-fline        \"/tmp/\" \"{cn}-{tt}-RCN-PURO-{yyyy}.{s}\")

# For tests:
# (find-sh0 \"mv -iv ~/{yyyy}.{s}-{cn}/{cn}-{tt}-RCN-PURO-{yyyy}.{s} /tmp/\")

cat > /tmp/print.css <<'%%%'
body {<} font-size: 12 !important {>}
@page {<}
  @bottom {<}
    content: counter(page);
  {>}
{>}
%%%

cd /tmp/
rm -v         /tmp/{cn}-{tt}-RCN-PURO-{yyyy}.{s}.zip
zip -r        /tmp/{cn}-{tt}-RCN-PURO-{yyyy}.{s}.zip {cn}-{tt}-RCN-PURO-{yyyy}.{s}/
prince     -s /tmp/print.css      \\
           -o /tmp/{cn}-{tt}-RCN-PURO-{yyyy}.{s}.pdf  \\
              /tmp/{cn}-{tt}-RCN-PURO-{yyyy}.{s}/messages.html
prince     -s /tmp/print.css      \\
           -o /tmp/{cn}-{tt}-RCN-PURO-{yyyy}.{s}-2.pdf  \\
              /tmp/{cn}-{tt}-RCN-PURO-{yyyy}.{s}/messages2.html
prince     -s /tmp/print.css      \\
           -o /tmp/{cn}-{tt}-RCN-PURO-{yyyy}.{s}-3.pdf  \\
              /tmp/{cn}-{tt}-RCN-PURO-{yyyy}.{s}/messages3.html
prince     -s /tmp/print.css      \\
           -o /tmp/{cn}-{tt}-RCN-PURO-{yyyy}.{s}-4.pdf  \\
              /tmp/{cn}-{tt}-RCN-PURO-{yyyy}.{s}/messages4.html
prince     -s /tmp/print.css      \\
           -o /tmp/{cn}-{tt}-RCN-PURO-{yyyy}.{s}-5.pdf  \\
              /tmp/{cn}-{tt}-RCN-PURO-{yyyy}.{s}/messages5.html

# (find-pdf-page \"/tmp/{cn}-{tt}-RCN-PURO-{yyyy}.{s}.pdf\")
# (find-pdf-text \"/tmp/{cn}-{tt}-RCN-PURO-{yyyy}.{s}.pdf\")
# (find-pdf-page \"/tmp/{cn}-{tt}-RCN-PURO-{yyyy}.{s}-2.pdf\")
# (find-pdf-text \"/tmp/{cn}-{tt}-RCN-PURO-{yyyy}.{s}-2.pdf\")
# (find-pdf-page \"/tmp/{cn}-{tt}-RCN-PURO-{yyyy}.{s}-3.pdf\")
# (find-pdf-text \"/tmp/{cn}-{tt}-RCN-PURO-{yyyy}.{s}-3.pdf\")
# (find-pdf-page \"/tmp/{cn}-{tt}-RCN-PURO-{yyyy}.{s}-4.pdf\")
# (find-pdf-text \"/tmp/{cn}-{tt}-RCN-PURO-{yyyy}.{s}-4.pdf\")
# (find-pdf-page \"/tmp/{cn}-{tt}-RCN-PURO-{yyyy}.{s}-5.pdf\")
# (find-pdf-text \"/tmp/{cn}-{tt}-RCN-PURO-{yyyy}.{s}-5.pdf\")

rm -Rv         ~/{yyyy}.{s}-{cn}/{cn}-{tt}-RCN-PURO-{yyyy}.{s}*
mv -iv                /tmp/{cn}-{tt}-RCN-PURO-{yyyy}.{s}* ~/{yyyy}.{s}-{cn}/
# (find-fline \"~/{yyyy}.{s}-{cn}/{cn}-{tt}-RCN-PURO-{yyyy}.{s}/\")
# (find-fline \"~/{yyyy}.{s}-{cn}/\" \"{cn}-{tt}-RCN-PURO-{yyyy}.{s}\")

#Scp-np ~/{yyyy}.{s}-{cn}/{cn}-{tt}-RCN-PURO-{yyyy}.{s}.pdf $TWUP/{yyyy}.{s}-{cn}/
# http://anggtwu.net/{yyyy}.{s}-{cn}/{cn}-{tt}-RCN-PURO-{yyyy}.{s}.pdf
# http://anggtwu.net/{yyyy}.{s}-{cn}/{cn}-{tt}-RCN-PURO-{yyyy}.{s}.pdf#page=1
# (find-twupfile \"{yyyy}.{s}-{cn}/\" \"{cn}-{tt}-RCN-PURO-{yyyy}.{s}.pdf\")

Scp-np ~/{yyyy}.{s}-{cn}/{cn}-{tt}-RCN-PURO-{yyyy}.{s}.pdf   $TWUP/tmp/
Scp-np ~/{yyyy}.{s}-{cn}/{cn}-{tt}-RCN-PURO-{yyyy}.{s}-2.pdf $TWUP/tmp/
Scp-np ~/{yyyy}.{s}-{cn}/{cn}-{tt}-RCN-PURO-{yyyy}.{s}-3.pdf $TWUP/tmp/
Scp-np ~/{yyyy}.{s}-{cn}/{cn}-{tt}-RCN-PURO-{yyyy}.{s}-4.pdf $TWUP/tmp/
Scp-np ~/{yyyy}.{s}-{cn}/{cn}-{tt}-RCN-PURO-{yyyy}.{s}-5.pdf $TWUP/tmp/
# http://anggtwu.net/tmp/{cn}-{tt}-RCN-PURO-{yyyy}.{s}.pdf
# http://anggtwu.net/tmp/{cn}-{tt}-RCN-PURO-{yyyy}.{s}-2.pdf
# http://anggtwu.net/tmp/{cn}-{tt}-RCN-PURO-{yyyy}.{s}-3.pdf
# http://anggtwu.net/tmp/{cn}-{tt}-RCN-PURO-{yyyy}.{s}-4.pdf
# http://anggtwu.net/tmp/{cn}-{tt}-RCN-PURO-{yyyy}.{s}-5.pdf

# (find-fline \"~/{yyyy}.{s}-{cn}/{cn}-{tt}-RCN-PURO-{yyyy}.{s}/\" \"messages.html\")
# (find-fline \"~/{yyyy}.{s}-{cn}/{cn}-{tt}-RCN-PURO-{yyyy}.{s}/\" \"messages2.html\")

# (code-pdf-page \"{yyyy}{s}{cn}{tt}\" \"~/{yyyy}.{s}-{cn}/{cn}-{tt}-RCN-PURO-{yyyy}.{s}.pdf\")
# (code-pdf-text \"{yyyy}{s}{cn}{tt}\" \"~/{yyyy}.{s}-{cn}/{cn}-{tt}-RCN-PURO-{yyyy}.{s}.pdf\")
# (code-pdf-page \"{yyyy}{s}{cn}{tt}2\" \"~/{yyyy}.{s}-{cn}/{cn}-{tt}-RCN-PURO-{yyyy}.{s}-2.pdf\")
# (code-pdf-text \"{yyyy}{s}{cn}{tt}2\" \"~/{yyyy}.{s}-{cn}/{cn}-{tt}-RCN-PURO-{yyyy}.{s}-2.pdf\")
# (code-pdf-page \"{yyyy}{s}{cn}{tt}3\" \"~/{yyyy}.{s}-{cn}/{cn}-{tt}-RCN-PURO-{yyyy}.{s}-3.pdf\")
# (code-pdf-text \"{yyyy}{s}{cn}{tt}3\" \"~/{yyyy}.{s}-{cn}/{cn}-{tt}-RCN-PURO-{yyyy}.{s}-3.pdf\")
# (code-pdf-page \"{yyyy}{s}{cn}{tt}4\" \"~/{yyyy}.{s}-{cn}/{cn}-{tt}-RCN-PURO-{yyyy}.{s}-4.pdf\")
# (code-pdf-text \"{yyyy}{s}{cn}{tt}4\" \"~/{yyyy}.{s}-{cn}/{cn}-{tt}-RCN-PURO-{yyyy}.{s}-4.pdf\")
# (code-pdf-page \"{yyyy}{s}{cn}{tt}5\" \"~/{yyyy}.{s}-{cn}/{cn}-{tt}-RCN-PURO-{yyyy}.{s}-5.pdf\")
# (code-pdf-text \"{yyyy}{s}{cn}{tt}5\" \"~/{yyyy}.{s}-{cn}/{cn}-{tt}-RCN-PURO-{yyyy}.{s}-5.pdf\")
# (find-{yyyy}{s}{cn}{tt}page)
# (find-{yyyy}{s}{cn}{tt}text)
# (find-{yyyy}{s}{cn}{tt}2page)
# (find-{yyyy}{s}{cn}{tt}2text)
# (find-{yyyy}{s}{cn}{tt}3page)
# (find-{yyyy}{s}{cn}{tt}3text)
# (find-{yyyy}{s}{cn}{tt}4page)
# (find-{yyyy}{s}{cn}{tt}4text)
# (find-{yyyy}{s}{cn}{tt}5page)
# (find-{yyyy}{s}{cn}{tt}5text)

")
     )
   pos-spec-list))




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


%     _              _       
%    / \\   _ ____  _(_)_   __
%   / _ \\ | '__\\ \\/ / \\ \\ / /
%  / ___ \\| |   >  <| |\\ V / 
% /_/   \\_\\_|  /_/\\_\\_| \\_/  
%                            
% <arxiv>
% (find-build-for-arxiv-links \"{stem}\")
% (find-LATEX \"2020favorite-conventions.tex\" \"make-for-arxiv\")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd ~/LATEX/
#export PATH=/usr/local/texlive/2016/bin/x86_64-linux:$PATH
export PATH=/usr/local/texlive/2019/bin/x86_64-linux:$PATH
#export PATH=/usr/local/bin:$PATH
which biber
biber --version
make -f 2019.mk STEM={stem} veryclean
lualatex             {stem}.tex
biber                {stem}
pdflatex -record     {stem}.tex

# (find-LATEXfile \"{stem}.fls\" \"biblatex/\")

cd ~/LATEX/
flsfiles-zip {stem}.fls {stem}.zip
rm -rfv /tmp/{stem}.zip
rm -rfv /tmp/edrx-latex/
cd /tmp/
cp -v ~/LATEX/{stem}.zip .
mkdir    /tmp/edrx-latex/
unzip -d /tmp/edrx-latex/ /tmp/{stem}.zip
cd       /tmp/edrx-latex/
pdflatex {stem}.tex
pdflatex {stem}.tex

cp -v    {stem}.pdf /tmp/

# (find-fline    \"/tmp/edrx-latex/\")
# (find-fline    \"/tmp/edrx-latex/{stem}.bbl\" \"bbl format version\")
# (find-pdf-page \"/tmp/edrx-latex/{stem}.pdf\")
# (find-pdf-text \"/tmp/edrx-latex/{stem}.pdf\")
# (find-fline \"/tmp/{stem}.zip\")

")
     )
   pos-spec-list))




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

# Initialize:
# (find-fline   \"~/{stem}/\")
# (find-fline   \"~/{stem}/README.org\")
# (magit-status \"~/{stem}/\")
# (find-gitk    \"~/{stem}/\")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd ~/{stem}/
laf
rm -Rf ~/{stem}/.git/
git init
git add README.org
git commit -m \"first commit\"
git branch -M main
git remote add origin https://github.com/edrx/{stem}.git
git push -u origin main




# (ee-copy-rest 1 '(find-angg \"{stem}/README.org\"))

# This file:
#   https://github.com/edrx/{stem}
#        http://anggtwu.net/{stem}/README.org.html
#        http://anggtwu.net/{stem}/README.org
#               (find-angg \"{stem}/README.org\")
#               (find-angg \"{stem}/\")
# Author: Eduardo Ochs <eduardoochs@gmail.com>
# 
# Some eev-isms:
# (defun c  () (interactive) (eek \"C-c C-e h h\"))
# (defun o  () (interactive) (find-angg \"{stem}/README.org\"))
# (defun v  () (interactive) (brg     \"~/{stem}/README.html\"))
# (defun cv () (interactive) (c) (v))
# 
# Skel: (find-mygitrepo-links \"{stem}\")
#       (find-efunction 'find-mygitrepo-links)
#  See: (find-angg \"pict2e-lua/README.org\")
# 
# (find-orgnode \"Table of Contents\")
#+OPTIONS: toc:nil num:nil
#+OPTIONS: org-html-postamble:nil

#+begin_comment
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd ~/{stem}/
laf
rm -v *~
rm -v *.html

# (find-fline   \"~/{stem}/\")
# (magit-status \"~/{stem}/\")
# (find-gitk    \"~/{stem}/\")
#
#   (s)tage all changes
#   (c)ommit -> (c)reate
#   (P)ush -> (p)ushremote
#   https://github.com/edrx/{stem}
#
#+end_comment

# Local Variables:
# coding:               utf-8-unix
# modes:                (org-mode fundamental-mode)
# org-html-postamble:   nil
# End:
")
     )
   pos-spec-list))




;; «find-rcirc-quick-links»  (to ".find-rcirc-quick-links")
;; Skel: (find-find-links-links-new "rcirc-quick" "nick passwd" "")
;; Test: (find-rcirc-quick-links)
;;
(defun find-rcirc-quick-links (&optional nick passwd &rest pos-spec-list)
"Super-quick configuration for rcirc on eev."
  (interactive)
  (setq nick (or nick "{nick}"))
  (setq passwd (or passwd "{passwd}"))
  (apply
   'find-elinks-elisp
   `((find-rcirc-quick-links ,nick ,passwd ,@pos-spec-list)
     (find-rcirc-quick-links "edrx" "MyP4ssw0rd" ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-rcirc-quick-links)
     ""
     ,(ee-template0 "\
;; See:
;; (find-rcirc-intro)
;; (find-rcirc-intro \"1. The example that I use in workshops\")
;; (find-rcirc-intro \"4. Commands with very short names\")

\(setq rcirc-default-nick \"{nick}\")
\(defun e2 () (interactive) (find-libera-2a \"#eev\"))
\(defun e3 () (interactive) (find-libera-3a \"#eev\"))
\(defun m2 () (interactive) (find-libera-2a \"#emacs\"))
\(defun m3 () (interactive) (find-libera-3a \"#emacs\"))

\(setq rcirc-authinfo '((\"libera\" nickserv \"{nick}\" \"{passwd}\")
		       ))
")
     )
   pos-spec-list))



;; «find-anggwget-links»  (to ".find-anggwget-links")
;; Skel: (find-find-links-links-new "anggwget" "" "")
;; Test: (find-anggwget-links)
;; Use this instead: (find-angg-es-links)
;;   (find-efunction 'find-angg-es-links)


;; «find-find-angg-links»  (to ".find-find-angg-links")
;; Skel: (find-find-links-links-new "find-angg" "fname rest" "url findwget")
;; Tests (use `M-x efi'on the last one): 
;;        (find-find-angg-links "e/bullseye.e")
;;        (find-find-angg-links "e/bullseye.e" "2021aug16")
;;        (find-find-angg-links "e/bullseye.e" "2021aug16" "asroot")
;;             (find-angg       "e/bullseye.e" "2021aug16" "asroot")
;;
(defun find-find-angg-links (&optional fname &rest rest)
"Visit a temporary buffer containing hyperlinks for find-angg."
  (interactive)
  (setq fname (or fname "{fname}"))
  (let* ((url0 (format "http://anggtwu.net/%s" fname))
         (url1 (format "http://anggtwu.net/%s.html" fname))
         (url2 (if (car rest) (format "%s#%s" url1 (car rest))))
         (findwget `(find-wgeta ,url0 ,@rest)))
    (apply
     'find-elinks
     `((find-find-angg-links ,fname ,@rest)
       ;; Convention: the first sexp always regenerates the buffer.
       (find-efunction 'find-find-angg-links)
       ""
       ""
       ,url0
       ,url1
       ,url2
       ,(ee-S `(find-wgeta       ,url0 ,@rest))
       ,(ee-S `(find-wgeta-elisp ,url0 ,@rest))
       ""
       ,(ee-S `(find-angg ,fname ,@rest))
       ,(ee-template0 "\
")
       )
     nil ;; pos-spec-list
     )))

(defalias 'find-find-angg 'find-find-angg-links)


;; «find-find-es-links»  (to ".find-find-es-links")
;; Skel: (find-find-links-links-new "find-es" "fname rest" "url findwget")
;; Tests (use `M-x efi'on the last one): 
;;        (find-find-es-links "bullseye")
;;        (find-find-es-links "bullseye" "2021aug16")
;;        (find-find-es-links "bullseye" "2021aug16" "asroot")
;;             (find-es       "bullseye" "2021aug16" "asroot")
;;
(defun find-find-es-links (&optional fname &rest rest)
"Visit a temporary buffer containing hyperlinks for find-es."
  (interactive)
  (setq fname (or fname "{fname}"))
  (let* ((url0 (format "http://anggtwu.net/e/%s.e" fname))
         (url1 (format "http://anggtwu.net/e/%s.e.html" fname))
         (url2 (if (car rest) (format "%s#%s" url1 (car rest))))
         (findwget `(find-wgeta ,url0 ,@rest)))
    (apply
     'find-elinks
     `((find-find-es-links ,fname ,@rest)
       ;; Convention: the first sexp always regenerates the buffer.
       (find-efunction 'find-find-es-links)
       ""
       ""
       ,url0
       ,url1
       ,url2
       ,(ee-S    `(find-wgeta       ,url0 ,@rest))
       ;; ,(ee-S `(find-wgeta-elisp ,url0 ,@rest))
       ""
       ,(ee-S `(find-es ,fname ,@rest))
       ,(ee-template0 "\
")
       )
     nil ;; pos-spec-list
     )))

(defalias 'find-find-es 'find-find-es-links)



;; «find-maclanemoerdijk-links»  (to ".find-maclanemoerdijk-links")
;; Skel: (find-find-links-links-new "maclanemoerdijk" "page comment" "pmain pmain3")
;; Test: (find-maclanemoerdijk-links (+ 11 26) "This makes y into a functor")
;; Used in: (find-LATEX "2021sgl.tex")
;;
(defun find-maclanemoerdijk-links (&optional page comment suffix &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for maclanemoerdijk."
  (interactive)
  (setq page (or page 226))
  (setq comment (or comment "{comment}"))
  (setq suffix  (or suffix  "{s}"))
  (let* ((pmain  (- page 11))
         (pmain3 (format "%03d" pmain)))
    (apply
     'find-elinks
     `((find-maclanemoerdijk-links ,page ,comment ,suffix ,@pos-spec-list)
       ;; Convention: the first sexp always regenerates the buffer.
       (find-maclanemoerdijkpage (+ 11 ,pmain) ,comment ,suffix ,@pos-spec-list)
       (find-angg "PYTHON/onepagepdftopng.py")
       (find-es "ps" "mupdf")
       (find-efunction 'find-maclanemoerdijk-links)
       ""
       ,(ee-template0 "\
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
SGL=$HOME/books/__cats/maclane_moerdijk__sheaves_in_geometry_and_logic.pdf
mutool draw -o ~/LATEX/2021sgl/p{pmain3}.pdf $SGL {page}
mutool info    ~/LATEX/2021sgl/p{pmain3}.pdf
~/PYTHON/onepagepdftopng.py \\
               ~/LATEX/2021sgl/p{pmain3}.pdf \\
               ~/LATEX/2021sgl/p{pmain3}.png

# (find-pdf-page \"~/LATEX/2021sgl/p{pmain3}.pdf\")
# (find-gimp     \"~/LATEX/2021sgl/p{pmain3}.png\")
# (find-fline    \"~/LATEX/2021sgl/p{pmain3}.png\")
# (find-fline    \"~/LATEX/2021sgl/\" \"p{pmain3}.png\")

# (kill-new      \"~/LATEX/2021sgl/p{pmain3}{suffix}.png\")
# (find-fline    \"~/LATEX/2021sgl/p{pmain3}{suffix}.png\")
# (find-pdf-page \"~/LATEX/2021sgl/p{pmain3}{suffix}.pdf\")

cd ~/LATEX/2021sgl/
convert p{pmain3}{suffix}.png p{pmain3}{suffix}.pdf

$% (find-pdf-page \"~/LATEX/2021sgl/p{pmain3}{suffix}.pdf\")
  \\incgr{<}width=6cm{>}{<}2021sgl/p{pmain3}{suffix}.pdf{>}
$


")
       )
     pos-spec-list)))



;; «find-cwm-links»  (to ".find-cwm-links")
;; Skel: (find-find-links-links-new "cwm" "page comment suffix" "pmain pmain3")
;; Test: (find-cwm-links (+ 13 45) "6. Comma Categories")
;; Used in: (find-LATEX "2020cwm.tex")
;;
(defun find-cwm-links (&optional page comment suffix &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for cwm."
  (interactive)
  (setq page (or page 226))
  (setq comment (or comment "{comment}"))
  (setq suffix  (or suffix  "{s}"))
  (let* ((pmain  (- page 13))
         (pmain3 (format "%03d" pmain)))
    (apply
     'find-elinks
     `((find-cwm-links ,page ,comment ,suffix ,@pos-spec-list)
       ;; Convention: the first sexp always regenerates the buffer.
       (find-cwm2page (+ 13 ,pmain) ,comment ,suffix ,@pos-spec-list)
       (find-angg "PYTHON/onepagepdftopng.py")
       (find-es "ps" "mupdf")
       (find-efunction 'find-cwm-links)
       ""
       ,(ee-template0 "\
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
CWM=$HOME/books/__cats/maclane__cwm_springer_2nd_ed.pdf
mutool draw -o ~/LATEX/2021cwm/p{pmain3}.pdf $CWM {page}
mutool info    ~/LATEX/2021cwm/p{pmain3}.pdf
~/PYTHON/onepagepdftopng.py \\
               ~/LATEX/2021cwm/p{pmain3}.pdf \\
               ~/LATEX/2021cwm/p{pmain3}.png

# (find-pdf-page \"~/LATEX/2021cwm/p{pmain3}.pdf\")
# (find-gimp     \"~/LATEX/2021cwm/p{pmain3}.png\")
# (find-fline    \"~/LATEX/2021cwm/p{pmain3}.png\")
# (find-fline    \"~/LATEX/2021cwm/\" \"p{pmain3}.png\")

# (kill-new      \"~/LATEX/2021cwm/p{pmain3}{suffix}.png\")
# (find-fline    \"~/LATEX/2021cwm/p{pmain3}{suffix}.png\")
# (find-pdf-page \"~/LATEX/2021cwm/p{pmain3}{suffix}.pdf\")

cd ~/LATEX/2021cwm/
convert p{pmain3}{suffix}.png p{pmain3}{suffix}.pdf

$% (find-pdf-page \"~/LATEX/2021cwm/p{pmain3}{suffix}.pdf\")
  \\incgr{<}width=6cm{>}{<}2021cwm/p{pmain3}{suffix}.pdf{>}
$


")
       )
     pos-spec-list)))



;; «find-emacs28-bisect-by-hand-links»  (to ".find-emacs28-bisect-by-hand-links")
;; Skel: (find-find-links-links-new "emacs28-bisect-by-hand" "n" "")
;; See:  (find-es "git" "git-bisect-by-hand")
;; Test: (find-emacs28-bisect-by-hand-links "42")
;;
(defun find-emacs28-bisect-by-hand-links (&optional n &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for emacs28-bisect-by-hand."
  (interactive)
  (setq n (or n "{n}"))
  (apply
   'find-elinks
   `((find-emacs28-bisect-by-hand-links ,n ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-emacs28-bisect-by-hand-links)
     ""
     ,(ee-template0 "\

* (eepitch-shell2)
* (eepitch-kill)
* (eepitch-shell2)
# (find-fline \"~/bigsrc/emacs28_{n}/\")
rm -Rfv    ~/bigsrc/emacs28_{n}/
mkdir      ~/bigsrc/emacs28_{n}/
cd         ~/bigsrc/emacs28_{n}/

cd         ~/bigsrc/emacs/
cp -a .* * ~/bigsrc/emacs28_{n}/
cd         ~/bigsrc/emacs28_{n}/

export PAGER=cat
git branch --list -a
git for-each-ref
git log --oneline --graph --all -20

# (find-gitk    \"~/bigsrc/emacs28_{n}/\")
# (magit-status \"~/bigsrc/emacs28_{n}/\")
# (find-fline   \"~/bigsrc/emacs28_{n}/\")

git checkout master~{n}
./autogen.sh                2>&1 | tee oa
# ./configure               2>&1 | tee oc
./configure --with-modules  2>&1 | tee oc
make                        2>&1 | tee om

cat > /tmp/foo.el <<'%%%'
(progn
  (add-to-list 'load-path \"~/eev-current\")
  (require 'eev-beginner)
  )
%%%
~/bigsrc/emacs28_{n}/src/emacs -T emacs28_{n} -fg bisque -bg black -fn $EMACSFONT /tmp/foo.el
~/bigsrc/emacs28_{n}/src/emacs -T emacs28_{n} -fg bisque -bg black -fn $EMACSFONT -Q /tmp/foo.el

")
     )
   pos-spec-list))




;; «find-agda-links»  (to ".find-agda-links")
;; Skel: (find-find-links-links-new "agda" "" "")
;; Test: (find-agda-links)
;;
(defun fal () (interactive) (find-2a nil '(find-agda-links)))
;;
(defun find-agda-links (&rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for agda."
  (interactive)
  (apply
   'find-elinks-elisp
   `((find-agda-links ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-agda-links)
     ""
     (find-angg ".emacs.agda" "recordstutorial")
     (find-es "agda" "agda2-mode-map")
     (find-es "agda" "selinger")
     (find-agdamodeelfile "agda-input.el")
     (eejump-554)
     ""
     (find-my-mode-links)
     (define-key my-mode-map (kbd "M-,") 'ee-compose-pair)
     (define-key my-mode-map (kbd "M-,") nil)
     ""
     ";; For Agda:"
     ";; (keymap-unset eev-mode-map \"M-,\"  'remove)"
     ";; (ee-composes-do ee-composes-bigstr-math '(ee-composes-do-remove-face))"
     ""
     ";; For non-Agda:"
     ";; (define-key   eev-mode-map (kbd \"M-,\") 'ee-compose-pair)"
     ";; (ee-composes-do ee-composes-bigstr-math)"
     ;; (find-es "agda" "M-,")
     ;;
     ;; (eek "M-h M-k  C-c C-l    ;; agda2-load - replace question mark with hole")
     ;; (eek "M-h M-k  C-c C-SPC  ;; agda2-give - fill in hole")
     ;; (eek "M-h M-k  C-c C-a    ;; agda2-auto-maybe-all - automatically fill in hole")
     ;; (eek "M-h M-k  M-.        ;; agda2-goto-definition-keyboard")
     ;; (eek "M-h M-k  M-,        ;; agda2-go-back")
     ;; (eek "M-h M-k  C-c C-c    ;; agda2-make-case - case split")
     ;; (eek "M-h M-k  C-c C-r    ;; agda2-refine - refine with constructor")
     ;; (eek "M-h M-k  C-c C-,    ;; agda2-goal-and-context - goal type and context")
     ;; (eek "M-h M-k  C-c C-.    ;; agda2-goal-and-context-and-inferred - ...type")
     ;; (eek "M-h M-k  C-c C-d    ;; agda2-infer-type-maybe-toplevel")
     ;; (eek "M-h M-k  C-c C-n    ;; agda2-compute-normalised-maybe-toplevel")
     ;; (eek "M-h M-k  C-c C-w    ;; agda2-why-in-scope-maybe-toplevel")
     ""
     (find-agdausermanualpage (+ 4 12) "2.5 Quick Guide to Editing")
     (find-agdausermanualtext (+ 4 12) "2.5 Quick Guide to Editing")
     (find-agdausermanualpage (+ 4 186) "4.4 Emacs Mode")
     (find-agdausermanualtext (+ 4 186) "4.4 Emacs Mode")
     ""
     (eek "M-h M-k  C-c C-l    ;; load or reload file")
     (eek "M-h M-k  C-c C-SPC  ;; give: fill hole")
     (eek "M-h M-k  C-c C-a    ;; automatically fill in hole")
     (eek "M-h M-k  M-.        ;; go to definition")
     (eek "M-h M-k  M-,        ;; go back")
     (eek "M-h M-k  C-c C-c    ;; case split")
     (eek "M-h M-k  C-c C-r    ;; refine with constructor")
     (eek "M-h M-k  C-c C-,    ;; goal type and context")
     (eek "M-h M-k  C-c C-.    ;; goal type, context, inferred type")
     (eek "M-h M-k  C-c C-d    ;; infer type")
     (eek "M-h M-k  C-c C-n    ;; compute normalized")
     (eek "M-h M-k  C-c C-w    ;; why in scope")
     ""
     ,(ee-template0 "\
(defun ph1p (&optional n a b c d)
  (interactive)
  (find-2a nil '(find-pdftools-page \"~/LATEX/2017planar-has-1.pdf\" n)))

(defun excp (&optional n a b c d)
  (interactive)
  (find-2a nil '(find-pdftools-page \"~/LATEX/2021excuse.pdf\" n)))
")
     )
   pos-spec-list))



;; «find-agdafile-links»  (to ".find-agdafile-links")
;; Skel: (find-find-links-links-new "agdafile" "stem" "")
;; Test: (find-agdafile-links)
;;
(defun find-agdafile-links (&optional stem &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for agdafile."
  (interactive)
  (setq stem (or stem "{stem}"))
  (apply
   'find-elinks
   `((find-agdafile-links ,stem ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-agdafile-links)
     ""
     ,(ee-template0 "\
# (kill-new \"  AGDA/{stem}.agda\")
# (find-blogme3 \"anggmake.lua\" \"anggtranslate\")
# (find-blogme3 \"anggmake.lua\" \"anggtranslate\" \"AGDA/\")

# (ee-copy-rest 1 '(find-angg \"AGDA/{stem}.agda\"))

-- This file:
--   http://anggtwu.net/AGDA/{stem}.agda.html
--   http://anggtwu.net/AGDA/{stem}.agda
--           (find-angg \"AGDA/{stem}.agda\")
-- Author: Eduardo Ochs <eduardoochs@gmail.com>
-- Version: {(date-as-string 5)}
-- Public domain.
--
-- ;; (find-angg \"AGDA/find-agdatype.el\")
-- (load       \"~/AGDA/find-agdatype.el\")
--
-- (find-eev \"eev-pdflike.el\" \"change-default-viewer\")
-- (defalias 'find-pdf-page 'find-pdftoolsr-page)
-- (defalias 'find-pdf-page 'find-xpdf-page)
--
-- (defun a () (interactive) (find-angg \"AGDA/{stem}.agda\"))

module {stem} where


-- Local Variables:
-- coding:  utf-8-unix
-- End:
")
     )
   pos-spec-list))



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

     ""
     ,(ee-template0 "\
# (find-fvwm3file \"doc/\" 1 '(eek \"% m txt RET t k\"))
# (find-fvwm3grep \"grep --color=auto -nRH --null -e {word} doc/*.txt\")
# (find-fvwm3grep \"grep --color=auto -nRH --null -e '{word}' doc/*.txt\")
# (find-fvwm3grep \"grep --color=auto -niRH --null -e {word} doc/*.txt\")
# (find-fvwm3grep \"grep --color=auto -niRH --null -e '{word}' doc/*.txt\")
# (find-fvwm3grep \"grep --color=auto -niRH --null -e {word} doc/*.adoc\")
# (find-fvwm3grep \"grep --color=auto -nRH --null -e {word} doc/*.adoc\")
# (find-fvwm3file \"doc/\")
# (find-angg \".fvwm/doc_Makefile\")
# (find-angg \".fvwm/config\")
# (find-angg \".emacs.fvwm\")
")
     )
   pos-spec-list))


;; «find-agdalatex-links»  (to ".find-agdalatex-links")
;; Skel: (find-find-links-links-new "agdalatex" "stem" "fname fullfname")
;; Test: (find-agdalatex-links "2022AgdaTest")
;;       (find-agdalatex-links "2022Cats3")
;;
(defun find-agdalatex-links (&optional stem &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for agdalatex."
  (interactive)
  (setq stem (or stem "{stem}"))
  (let* ((fname     (format         "%s.lagda.tex" stem))
         (fullfname (format "~/LATEX/%s.lagda.tex" stem)))
    (apply
     'find-elinks
     `((find-agdalatex-links ,stem ,@pos-spec-list)
       ;; Convention: the first sexp always regenerates the buffer.
       (find-efunction 'find-agdalatex-links)
       (find-LATEX "2022template.lagda.tex")
       ;; (find-2a nil '(find-LATEX "2022template.lagda.tex"))
       ""
       ,(ee-template0 "\
# (kill-new \"  LATEX/{fname}\")
# (find-blogme3 \"anggmake.lua\" \"anggtranslate\" \"LATEX/2022agda\")

# (find-2a nil    '(find-LATEX \"2022template.lagda.tex\"))
# (ee-copy-rest 1 '(find-LATEX \"{fname}\"))
")
       ,(ee-template0-file "~/LATEX/2022template.lagda.tex")
       )
     pos-spec-list)))



;; «find-fsbot-links»  (to ".find-fsbot-links")
;; Skel: (find-find-links-links-new "fsbot" "word" "fsbotnick")
;; Test: (find-fsbot-links)
;;
(defun find-fsbot-links (&optional word &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for fsbot."
  (interactive)
  (setq word (or word "{word}"))
  (let* ((fsbotnick "fsbot"))
    (apply
     'find-elinks
     `((find-fsbot-links ,word ,@pos-spec-list)
       ;; Convention: the first sexp always regenerates the buffer.
       (find-efunction 'find-fsbot-links)
       ""
     (find-es "emacs" "fsbot")
     (find-efunction 'eepitch-libera)
     ""
     ,(ee-template0 "\
* (eepitch-libera \"#emacs\")
/query {fsbotnick}
**
**
* (eepitch-libera \"{fsbotnick}\")
help erbot
**
{word}
forget {word} all
{word} is def1
{word} is also def2
{word}
")
       )
     pos-spec-list)))



;; «find-mvideo-links»  (to ".find-mvideo-links")
;; Skel: (find-find-links-links-new "mvideo" "fname" "fname-")
;; Test: (find-mvideo-links "20220302squeakdemo")
;;
(defun find-mvideo-links (&optional fname &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for mvideo."
  (interactive)
  (setq fname (or fname (ee-mvideo-name-here)))
  (let* ((fname- (file-name-sans-extension fname)))
    (apply
     'find-elinks
     `((find-mvideo-links ,fname ,@pos-spec-list)
       ;; Convention: the first sexp always regenerates the buffer.
       (find-efunction 'find-mvideo-links)
       ""
       ,(ee-template0 "\
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
mv -iv {fname} ~/mvideos/
cp -iv {fname} ~/mvideos/
# (find-fline \"~/mvideos/\" \"{fname}\")
# (find-video \"~/mvideos/{fname}\")
# (find-mvideo \"{fname-}\" \"0:00\")
")
       )
     pos-spec-list)))

(defun ee-mvideo-name-here ()
  (if (eq major-mode 'dired-mode)
      (file-name-nondirectory (ee-dired-to-fname))
    (ee-stuff-around-point "-_0-9A-Za-z")))

(defun find-mvideo (stem &optional time &rest rest)
  (find-video (format "~/mvideos/%s.mp4" stem) time))




;; «find-princeurl-links»  (to ".find-princeurl-links")
;; Skel: (find-find-links-links-new "princeurl" "url outdir" "")
;; Test: (brprinceurl "https://ocaml.org/learn/tutorials/a_first_hour_with_ocaml.html")
;; See: (find-efunction 'ee-find-psne-core)
;;      (to "find-htmlpdf-links")
;;
(code-brurl 'find-princeurl-links
       :remote 'brprinceurl :dired 'brprinceurld)

;; Skel: (find-find-links-links-new "princeurl" "url outdir" "")
;; Test: (find-princeurl-links)
;;
(defun find-princeurl-links (&optional url outdir &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for princeurl."
  (interactive)
  (setq url (or url "{url}"))
  (setq outdir (or outdir "{outdir}"))
  (apply
   'find-elinks
   `((find-princeurl-links ,url)
     (brprinceurl ,url)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-princeurl-links)
     ""
     ,(ee-findprinceurl-core url)
     )
   pos-spec-list))

(defun ee-findprinceurl-core (url &optional outdir)
  (let* ((fname0   (ee-url-to-fname0 url))
         (fnamepdf (replace-regexp-in-string ".html$" ".pdf" fname0))
	 (localdir (or outdir (file-name-directory    fnamepdf)))
	 (stempdf  (file-name-nondirectory fnamepdf)))
    (ee-template0 "\
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# {url}
# (find-fline \"{localdir}\" \"{stempdf}\")
# (find-pdf-page \"{fnamepdf}\")

cat > /tmp/print.css <<'%%%'
body {<} font-size: 12pt {>}
@page {<} size: A4 {>}
@page {<} @bottom-center {<} content: counter(page); {>} {>}
%%%

# @page {<}
#   @bottom {<}
#     content: counter(page);
#   {>}
# {>}

mkdir -p  {localdir}
cd        {localdir}
prince --media=print \\
       -s /tmp/print.css \\
       -o {fnamepdf}  \\
           {url}
")))





;; «find-luademo-links»  (to ".find-luademo-links")
;; Skel: (find-find-links-links-new "luademo" "fname" "fname-")
;; Test: (find-luademo-links "LUA/BlogMe3.lua")
;;
(defun find-luademo-links (&optional fname tag &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for luademo."
  (interactive)
  (setq tag (or tag "{tag}"))
  (setq fname (or fname
		  (ee-rmprefix "~/" (ee-fname-here))
		  "{fname}"))
  (let* ((fname- (file-name-nondirectory fname)))
    (apply
     'find-elinks
     `((find-luademo-links ,fname ,@pos-spec-list)
       ;; Convention: the first sexp always regenerates the buffer.
       (find-efunction 'find-luademo-links)
       (ee-use-red-bullets)
       (ee-use-red-stars)
       (setenv "LUA_INIT" "@/home/edrx/LUA/lua50init.lua")
       ""
       ,(ee-adjust-red-stars (ee-template0 "\
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
makeR
makeR1  {fname}.html
scp     {fname}      $LINP/{fname}
scp     {fname}.html $LINP/{fname}.html
scp     LUA/lua50init.lua      $LINP/LUA/lua50init.lua
scp     LUA/lua50init.lua.html $LINP/LUA/lua50init.lua.html

Scp-np  {fname}      $TWUP/{fname}
Scp-np  {fname}.html $TWUP/{fname}.html
Scp-np  LUA/lua50init.lua      $TWUP/LUA/lua50init.lua
Scp-np  LUA/lua50init.lua.html $TWUP/LUA/lua50init.lua.html

# http://anggtwu.net/{fname}
# http://anggtwu.net/{fname}.html
# http://anggtwu.net/{fname}.html#{tag}

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
rm -Rv /tmp/luademo/
mkdir  /tmp/luademo/
cd     /tmp/luademo/
wget http://anggtwu.net/LUA/lua50init.lua
wget http://anggtwu.net/{fname}
# (find-fline \"/tmp/luademo/\")

* (setenv \"LUA_INIT\" \"@/tmp/luademo/lua50init.lua\")
* (find-anchor \"/tmp/luademo/{fname-}\")
* (find-anchor \"/tmp/luademo/{fname-}\" \"{tag}\")
"))
       )
     pos-spec-list)))



;; «find-emlua-links»  (to ".find-emlua-links")
;; Skel: (find-find-links-links-new "emlua" "" "")
;; Test: (find-emlua-links)
;;
(defun find-emlua-links (&rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for emlua."
  (interactive)
  (apply
   'find-elinks
   `((find-emlua-links ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-emlua-links)
     ""
     ,(ee-template0 "\
* (add-to-list 'load-path \"~/emlua/\")
* (require 'emlua-repl)
* (emlua-init)
* (code-c-d \"emlua\" \"~/emlua/\" :anchor)
")
     ;;
     (find-emlua "emlua-repl.el")
     (find-emlua "emlua-repl.el" "eepitch-emlua")
     (find-emlua "emlua-repl.el" "eepitch-emlua" "test block")
     )
   pos-spec-list))



;; «find-pict2elua-links»  (to ".find-pict2elua-links")
;; Skel: (find-find-links-links-new "pict2elua" "" "")
;; Test: (find-pict2elua-links)
;;
(defun find-pict2elua-links (&rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for pict2elua."
  (interactive)
  (apply
   'find-elinks
   `((find-pict2elua-links ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-pict2elua-links)
     ""
     (find-1stclassvideo-links "2022pict2elua")
     (find-yttranscript-links "2022pict2elua" "hiHsUhGVLGM")
     (find-TH "pict2e-lua")
     (find-angg "pict2e-lua/README.org")
     (find-angg "LUA/Pict2e1.lua")
     (find-angg "LUA/Pict2e1-1.lua")
     ""
     ,(ee-template0 "\
")
     )
   pos-spec-list))

(defalias 'pil 'find-pict2elua-links)



;; «find-maxima-links»  (to ".find-maxima-links")
;; Skel: (find-find-links-links-new "maxima" "name" "")
;; Test: (find-maxima-links)
;;       (find-maxima-links "demo")
;;
(defun find-maxima-links (&optional name &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for maxima."
  (interactive)
  (setq name (or name "{name}"))
  (apply
   'find-elinks
   `((find-maxima-links ,name ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-maxima-links)
     ""
     (find-maxima-links "coeff")
     ""
     ,(ee-template0 "\
# (find-maximanode \"{name}\")
# (kill-new \"{name}\")
# (find-maximanode \"Function and Variable Index\" \"{name}\")
# (find-maximagitfile \"\")
# (find-maximagitgrep \"grep --color=auto -nH --null -e {name} $(cat .files.mac)\")
# (find-maximagitgrep \"grep --color=auto -nH --null -e {name} $(cat .files.lisp)\")
# (find-maximagitgrep \"grep --color=auto -niH --null -e {name} $(cat .files.mac)\")
# (find-maximagitgrep \"grep --color=auto -niH --null -e {name} $(cat .files.lisp)\")
# (find-maximagitgrep \"grep --color=auto -nH --null -e {name} $(find * | sort | grep 'mac$')\")
# (find-maximagitgrep \"grep --color=auto -nH --null -e {name} $(find * | sort | grep 'lisp$')\")
# (find-maximagitgrep \"grep --color=auto -niH --null -e {name} $(find * | sort | grep 'mac$')\")
# (find-maximagitgrep \"grep --color=auto -niH --null -e {name} $(find * | sort | grep 'lisp$')\")

* (eepitch-maxima)
* (eepitch-kill)
* (eepitch-maxima)
? {name}
?? {name}
 none
fundef({name});
grind(fundef({name}));
properties({name});
:lisp (describe '${name})
:lisp (symbol-plist '${name})
:lisp (get '${name} 'lineinfo)

** (find-try-sly-intro \"8. Inspect Maxima with Sly\")
* (eepitch-sly)
* (eepitch-kill)
* (eepitch-sly)
*
* (eepitch-maxima)
* (eepitch-kill)
* (eepitch-maxima)
  load(\"startsly\");
*
* (sly-connect \"localhost\" 56789)
* (eepitch-sly)
  (describe '${name})
  ;; Now go to the sly-mrepl buffer, put the point
  ;; on the \"MAXIMA::$<name>\", and type `M-.'. Or:

* (sly-edit-definition \"${name}\")
* (sly-edit-definition \"MAXIMA::${name}\")

")
     )
   pos-spec-list))

(defalias 'grim 'ee-grim)





;; «find-maximaindex-links»  (to ".find-maximaindex-links")
;; Skel: (find-find-links-links-new "maximaindex" "names" "lines")
;; Tests: (find-maximaindex-links)
;;        (find-maximaindex-links "draw gr2d")
;;        (ee-find-maximaindex-lines "foo bar")
;;
(defun find-maximaindex-links (&optional names &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for maximaindex."
  (interactive)
  (setq names (or names ""))
  (let* ((lines (ee-find-maximaindex-lines names)))
    (apply
     'find-elinks
     `((find-maximaindex-links ,names ,@pos-spec-list)
       (find-maximaindex-links "lambda subst" ,@pos-spec-list)
       ;; Convention: the first sexp always regenerates the buffer.
       (find-efunction 'find-maximaindex-links)
       ""
       ,(ee-template0 "\
# (find-maximaindex)
{lines}
")
       )
     pos-spec-list)))

(defun ee-find-maximaindex-lines (names)
  (let* ((f1 (lambda (name rest)
	       (format "# (find-maximaindex \"%s\"%s)\n" name rest)))
         (f2 (lambda (name)
	       (format "%s%s"
		       (funcall f1 name "")
		       (funcall f1 name " :RET")))))
    (mapconcat f2 (split-string names) "")))

(defun fmi () (interactive) (find-maximaindex-links))



;; «find-maximamsg-links»  (to ".find-maximamsg-links")
;; «find-maximamsg»        (to ".find-maximamsg")
;; Moved to: (find-eev "eev-tlinks.el" "find-maximamsg-links")
;;           (find-eev "eev-tlinks.el" "find-maximamsg")




;; «find-Maxima2-links»  (to ".find-Maxima2-links")
;; Skel: (find-find-links-links-new "Maxima2" "sa" "")
;; Test: (find-Maxima2-links)
;;       (find-Maxima2-links "blockname")
;;
(defun find-Maxima2-links (&optional sa &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for Maxima2."
  (interactive)
  (setq sa (or sa "{sa}"))
  (let ((ee-buffer-name (or ee-buffer-name "*find-Maxima2-links*")))
    (apply
     'find-elinks
     `((find-Maxima2-links ,sa ,@pos-spec-list)
       (find-Maxima2-links "blockname")
       ;; Convention: the first sexp always regenerates the buffer.
       (find-efunction 'find-Maxima2-links)
       ""
       (find-angg "LUA/Maxima2.lua" "show2-tests")
       ""
       ,(ee-template0 "\

* (setq last-kbd-macro (kbd \"C-a %M SPC C-a <down>\"))
* (eepitch-maxima)
* (eepitch-kill)
* (eepitch-maxima)
load(\"/usr/share/emacs/site-lisp/maxima/emaxima.lisp\")$
load(\"~/MAXIMA/barematrix1.mac\")$
load(\"~/MAXIMA/myqdraw1.mac\")$
myQdraw([args]) := apply('myQdraw_draw, args)$  myps(s):=ps(s);
myQdraw([args]) := apply('myQdraw_pdf,  args)$  myps(s):=ps(s/5);
:lisp (setf (get '$display2d 'assign) nil)
display2d:'emaxima$
linenum:0;

% (find-Deps1-cps   \"Maxima2\")

%L dofile \"Maxima2.lua\"                 -- (find-angg \"LUA/Maxima2.lua\")
\\pu

%M (%i1) 2*3;
%M (%o1) 5
%L maximahead:sa(\"{sa}\", \"\")
\\pu

\\vspace*{<}0cm{>}
\\def\\hboxthreewidth {<}14cm{>}
\\ga{<}{sa}{>}


** Debug:
** (find-angg \"LUA/Maxima2.lua\" \"MaximaHead-tests\")
** (find-angg \"LUA/Show2.lua\" \"texbody\")
* (show2-use \"~/LATEX/Show2.tex\")
* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)
Path.prependtopath \"~/LUA/?.lua\"
require \"Maxima2\"   -- (find-angg \"LUA/Maxima2.lua\")

bigstr = [=[
(%i1) 2*3;
(%o1) 5
(%i2) 2*3;
(%o2) 5
]=]
mios = MaximaIOs_parse(bigstr)
= mios
= mios:debug()
= maximahead:set_maxima_lines(bigstr)
= maximahead:show00 {<}scale=0.9{>}
= maximahead:show0  {<}scale=0.9{>}
= maximahead:show   {<}scale=0.9{>}
* (etv)

")
       )
     pos-spec-list)))

(defun maxima2 () (interactive) (find-2a nil '(find-Maxima2-links)))




;; «find-qdraw-links»  (to ".find-qdraw-links")
;; Moved to: (find-eev "eev-tlinks.el" "find-qdraw-links")



;; «find-stream-links»  (to ".find-stream-links")
;; Skel: (find-find-links-links-new "stream" "" "")
;; Test: (find-stream-links)
;;
(defun find-stream-links (&rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for stream."
  (interactive)
  (apply
   'find-elinks
   `((find-stream-links ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-stream-links)
     ""
     ,(ee-template0 "\
* (eepitch-shell3)
* (eepitch-kill)
* (eepitch-shell3)
streamlink --player=/usr/bin/mpv https://live-hls-web-aje.getaj.net/AJE/03.m3u8 best

# Aljazeera live news
# xdg-open -new-tab https://www.aljazeera.com/live/ &
# streamlink --player=/usr/bin/mpv https://www.aljazeera.com/live/ 540p &
# or 420p
# streamlink --player=/usr/bin/mpv https://live-hls-web-aje.getaj.net/AJE/03.m3u8 best &
# if you define the player here, it will not open in another user
# workspace. So that, it is better not to define it. Then streamlink will
# pick up another available player

# streamlink https://live-hls-web-aje.getaj.net/AJE/index.m3u8
# if you want to master the video resolution 
# or use the command above
")
     )
   pos-spec-list))



;; «code-etv»  (to ".code-etv")
;; Skel: (find-code-xxx-links "etv" "dir" "")
;; Test: (find-code-etv "~/LATEX/")
;;
(defun      code-etv (dir)
  (eval (ee-read      (ee-code-etv dir))))
(defun find-code-etv (dir)
  (find-estring-elisp (ee-code-etv dir)))
(defun   ee-code-etv (dir)
  (ee-template0 "\
;; (find-code-etv \"{dir}\")
;;      (code-etv \"{dir}\")

(defun eb  () (interactive) (find-fline \"{dir}2022pict2e-body.tex\"))
(defun et  () (interactive) (find-fline \"{dir}2022pict2e.tex\"))
(defun etl () (interactive) (find-fline \"{dir}2022pict2e.lua\"))
(defun v   () (interactive) (find-pdftools-page \"{dir}2022pict2e.pdf\"))
(defun tb  () (interactive) (find-ebuffer (eepitch-target-buffer)))
(defun etv () (interactive) (find-wset \"13o2_o_o\" '(tb) '(v)))
(setenv \"PICT2ELUADIR\" \"{dir}\")
"))


;; «find-cabal-links»  (to ".find-cabal-links")
;; Skel: (find-find-links-links-new "cabal" "pkg" "")
;; Test: (find-cabal-links)
;; Test: (find-cabal-links "hoogle")
;;
(defun find-cabal-links (&optional pkg &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for cabal."
  (interactive)
  (setq pkg (or pkg "{pkg}"))
  (apply
   'find-elinks
   `((find-cabal-links ,pkg ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-cabal-links)
     ""
     ,(ee-template0 "\
# (find-fline \"~/bin/eev-cabal\")
# (find-sh \"eev-cabal ghc_list\")
# (find-sh \"eev-cabal ghc_list {pkg}\")
# (find-sh \"eev-cabal ghc_describe {pkg}\")
# (find-sh \"eev-cabal ghc_field {pkg} homepage\")
# (find-sh \"eev-cabal ghc_field {pkg} library-dirs\")
# (find-sh \"eev-cabal cabal_tgz {pkg}\")
# (find-sh \"eev-cabal cabal_tgz_b {pkg}\")
# (find-sh \"eev-cabal cabal_tgz_unpack {pkg}\")
# (find-fline \"~/.cabal/packages/hackage.haskell.org/{pkg}/\")
# (find-sh \"find ~/.cabal/packages/hackage.haskell.org/ | sort\")

# (find-sh \"cabal --help\")
# (find-sh \"cabal list --installed\")
# (find-fline \"~/.cabal/\")
# (find-fline \"~/.cabal/config\")
# (find-fline \"~/.cabal/packages/hackage.haskell.org/\")
# (find-fline \"~/.cabal/packages/hackage.haskell.org/{pkg}/\")
# (find-fline \"~/.cabal/store/ghc-8.8.4/\")
# (find-fline \"~/.cabal/store/ghc-8.8.4/\" \" {pkg}\")
# https://cabal.readthedocs.io/en/stable/
# https://hackage.haskell.org/package/{pkg}

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cabal install {pkg}
cabal install --lib {pkg}

# (find-cabal-unpack \"{pkg}\")
")
     )
   pos-spec-list))


;; «find-cabal-unpack-links»  (to ".find-cabal-unpack-links")
;; Skel: (find-find-links-links-new "cabal-unpack" "name1 name2 name3" "")
;; Test: (find-cabal-unpack-links)
;;
(defun find-cabal-unpack-links (&optional name1 name2 name3 &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for cabal-unpack."
  (interactive)
  (setq name1 (or name1 "{name1}"))
  (setq name2 (or name2 "{name2}"))
  (setq name3 (or name3 "{name3}"))
  (apply
   'find-elinks
   `((find-cabal-unpack-links ,name1 ,name2 ,name3 ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-cabal-unpack-links)
     ""
     ,(ee-template0 "\
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
rm -Rv ~/usrc/{name2}/
mkdir  ~/usrc/{name2/
tar -C ~/usrc/ \\
  -xvzf {name3}
cd     ~/usrc/{name2}/

# (code-c-d \"{name1}\" \"~/usrc/{name2}/\")
# (find-{name1}file \"\")
")
     )
   pos-spec-list))

;; «find-cabal-unpack»  (to ".find-cabal-unpack")
;; Test: (find-cabal-unpack "hoogle")
;;
(defun find-cabal-unpack (name)
  (find-cabal-unpack-links
   name
   (find-sh0 (format "eev-cabal cabal_tgz_b %s" name))
   (ee-shorten-file-name (find-sh0 (format "eev-cabal cabal_tgz %s" name)))))



;; «find-cabos-links»  (to ".find-cabos-links")
;; Skel: (find-find-links-links-new "cabos" "fname0" "")
;; Test: (find-cabos-links)
;;       (find-cabos-links "piramide-1")
;;       (find-cabos-links "piramide-2")
;;       (find-cabos-links "barranco-1")
;;       (find-cabos-links "barranco-2")
;;       (find-cabos-links "2022-1-C3-VS")
;;       (find-cabos-links "2022-2-C3-P1")
;;
(defun find-cabos-links (&optional fname0 &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for cabos."
  (interactive)
  (setq fname0 (or fname0 "{fname0}"))
  (apply
   'find-elinks
   `((find-cabos-links ,fname0 ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-cabos-links)
     ""
     ,(ee-template0 "\
# (kill-new \"  GNUPLOT/{fname0}.dem\")
# (find-blogme3 \"anggmake.lua\" \"anggtranslate\")
# (find-blogme3 \"anggmake.lua\" \"anggtranslate\" \"GNUPLOT/\")

# (ee-copy-rest 2 '(find-fline \"~/GNUPLOT/{fname0}.dem\"))


# This file:
#   http://anggtwu.net/GNUPLOT/{fname0}.dem.html
#   http://anggtwu.net/GNUPLOT/{fname0}.dem
#          (find-angg \"GNUPLOT/{fname0}.dem\")
# Author: Eduardo Ochs <eduardoochs@gmail.com>
#
# (defun o () (interactive) (find-angg \"GNUPLOT/barranco-1.dem\"))
# (defun o () (interactive) (find-angg \"GNUPLOT/2023-2-C3-P1.dem\"))
# (defun e () (interactive) (find-angg \"GNUPLOT/{fname0}.dem\"))
# (defun l () (interactive) (find-angg \"LUA/Cabos3.lua\"))
# (find-cabos-links \"{fname0}\")

# (find-eepitch-intro \"3.3. `eepitch-preprocess-line'\")
# (setq eepitch-preprocess-regexp \"\")
# (setq eepitch-preprocess-regexp \"^#: \")
#
#: * (eepitch-lua51)
#: * (eepitch-kill)
#: * (eepitch-lua51)
#: Path.prependtopath \"~/LUA/?.lua\"
#: ee_dofile \"~/LUA/Cabos3.lua\"
#: bigstr = [[
#:   0 1 0
#:   0 1 1
#: ]]
#: ex = Expand.from(bigstr)
#: = ex:expandg()
#: c = CabosNaDiagonal.from [[
#:   0 - 1 - 0
#:   | . | \\ |
#:   0 - 1 - 1
#: ]]
#: = c

set for [o=1:n] obj o polygon depthorder fs transparent solid 0.8 fc \"gray75\"
set pm3d depthorder border lc \"black\" lw 2
set view equal xyz
set view 30,30,1.5
set title \"{fname0}\"
splot -10
pause -1 \"Hit return to continue\"

# (find-eepitch-intro \"3.3. `eepitch-preprocess-line'\")
# (setq eepitch-preprocess-regexp \"\")
# (setq eepitch-preprocess-regexp \"^#: \")
#
#: * (eepitch-shell)
#: * (eepitch-kill)
#: * (eepitch-shell)
#: gnuplot {fname0}.dem
# (find-bgprocess \"gnuplot {fname0}.dem\")

# Local Variables:
# coding:  utf-8-unix
# mode:    gnuplot
# End:
")
     )
   pos-spec-list))



;; «find-elinks-haskell»  (to ".find-elinks-haskell")
;; Based on: (find-efunction 'find-elinks-elisp)
;;           (find-efunction 'find-estring-elisp)
;;
(defun find-estring-haskell (string &rest pos-spec-list)
  (apply 'find-eoutput-rerun (or ee-buffer-name "*string*")
	 `(progn (insert ,string) (haskell-mode)) pos-spec-list))

(defun find-elinks-haskell (links &rest pos-spec-list)
  (let ((ee-buffer-name (or ee-buffer-name "*Elisp hyperlinks*"))
	(ee-hyperlink-prefix "-- "))
    (apply 'find-estring-haskell (ee-links-to-string links) pos-spec-list)))


;; «find-ghc-links»  (to ".find-ghc-links")
;; Skel: (find-find-links-links-new "ghc" "string" "")
;; Tests: (find-ghc-links)
;;        (find-ghc-links "toUpper")
;;
(defun find-ghc-links (&optional string &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for ghc."
  (interactive (list (ee-stuff-around-point "[!-~]")))
  (setq string (or string "{string}"))
  (apply
   'find-elinks-haskell
   `((find-ghc-links ,string ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-ghc-links)
     ""
     ,(ee-template0 "\
-- (find-es \"haskell\" \"{string}\")
-- (find-es \"haskell\" \"Prelude\")
-- (find-ghcbasesh \"find * | sort | grep 'hs$'\")
-- (find-ghcbasesh \"find * | sort | grep '{string}'\")
-- (find-ghcbasegrep \"grep --color=auto -nRH --null -e {string} *\")
-- (find-ghcbasefile \"\")
-- (find-ghcbasefile \"{string}\")
-- (find-hoogle \"{string}\")

* (eepitch-ghci)
* (eepitch-kill)
* (eepitch-ghci)
:t {string}
:info {string}
:hoogle {string}
")
     )
   pos-spec-list))

(defun ghl () (interactive) (call-interactively 'find-ghc-links))



;; «find-opam-links»  (to ".find-opam-links")
;; Skel: (find-find-links-links-new "opam" "pkg" "")
;; Tests: (find-opam-links)
;;        (find-opam-links "ocaml-canvas")
;;
(defun find-opam-links (&optional pkg &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for opam."
  (interactive)
  (setq pkg (or pkg "{pkg}"))
  (apply
   'find-elinks
   `((find-opam-links ,pkg ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-opam-links)
     ""
     (find-es "ocaml" "opam")
     ""
     ,(ee-template0 "\
* (eepitch-shell2)
* (eepitch-kill)
* (eepitch-shell2)
opam update
opam upgrade
opam install {pkg}

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
opam list
opam info {pkg}
opam show {pkg}

# (find-sh \"opam list\")
# (find-sh \"opam info {pkg}\")
# (find-sh \"opam show {pkg}\")

# (find-opamfile \"\")
# (find-opamsourcesfile \"\")
# (find-opamsourcessh \"find * | sort\")
# (find-opamsh \"find * | sort\")


* (eepitch-ocaml)
* (eepitch-kill)
* (eepitch-ocaml)
#use \"topfind\";;
#list;;
#require \"{pkg}\";;
#use \"canv.ml\";;
")
     )
   pos-spec-list))




;; «find-tikz-links»  (to ".find-tikz-links")
;; (find-angg "LUA/tikz1.el")
;; (find-angg "LUA/tikz1.el" "find-tikz-links")
;; (find-angg ".emacs" "tikz")


;; «find-tikzsearch-links»  (to ".find-tikzsearch-links")
;; (find-angg "LUA/tikz1.el" "find-tikzsearch-links")


;; «find-C2C3git-links»  (to ".find-C2C3git-links")
;; Skel: (find-find-links-links-new "C2C3git" "yyyys" "")
;; Test: (find-C2C3git-links "2022-2")
;;
(defun find-C2C3git-links (&optional yyyys &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for C2C3git."
  (interactive)
  (setq yyyys (or yyyys "{yyyys}"))
  (apply
   'find-elinks
   `((find-C2C3git-links ,yyyys ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-C2C3git-links)
     ""
     ,(ee-template0 "\
# (find-angg \".emacs\" \"c2-{yyyys}\")
# (find-angg \".emacs\" \"c3-{yyyys}\")
# (find-LATEX  \"{yyyys}-C2-tudo.tex\")
# (find-angg   \"{yyyys}-C2-C3/\")
# (find-angg   \"{yyyys}-C2-C3/README.org\")
# (find-angg   \"{yyyys}-C2-C3/Makefile\")
# (find-gitk \"~/{yyyys}-C2-C3/\")

** A hack:

** Use this to update
** the files in ~/{yyyys}-C2-C3/.
** This is the slow way, that runs
** \"lualatex -record\" many times.
**
* (sh-mode)
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)

cd ~/LATEX/
getincls0   () {<} grep ^.incl | tr '\\\\{<}{>}' '   ' {>}
getincls    () {<} getincls0 | awk 'NF==2 && $1==\"incl\" {<}print $2       {>}' {>}
getincltexs () {<} getincls0 | awk 'NF==2 && $1==\"incl\" {<}print $2 \".tex\"{>}' {>}
cat {yyyys}-C2-tudo.tex     | getincls0
cat {yyyys}-C2-tudo.tex     | getincls
cat {yyyys}-C2-tudo.tex     | getincltexs
cat {yyyys}-C{<}2,3{>}-tudo.tex | getincls
cat {yyyys}-C{<}2,3{>}-tudo.tex | getincltexs
cat {yyyys}-C{<}2,3{>}-tudo.tex | getincls    | sort | uniq | tee /tmp/.filest0.bn
cat {yyyys}-C{<}2,3{>}-tudo.tex | getincltexs | sort | uniq | tee /tmp/.filest0.tex

# (find-fline \"/tmp/.filest0.tex\")
# (find-fline \"/tmp/.filest0.bn\")

# This step regenerates the .fls files.
# It is optional and takes a long time.
# If you skip it then the next step will
# reuse the current .fls files.
for i in $(cat /tmp/.filest0.tex); do 
  lualatex -record $i
  done

for i in $(cat /tmp/.filest0.bn); do 
  flsfiles $i.fls
  done | sort | uniq | tee /tmp/{yyyys}.fls

cat /tmp/{yyyys}.fls     >  /tmp/{yyyys}+.fls
echo {yyyys}-C2-tudo.tex >> /tmp/{yyyys}+.fls
echo {yyyys}-C3-tudo.tex >> /tmp/{yyyys}+.fls
echo TocLines1.lua       >> /tmp/{yyyys}+.fls

# (find-tkdiff \"/tmp/{yyyys}.fls\" \"/tmp/{yyyys}+.fls\")

cd ~/LATEX/
tar -cvzf /tmp/{yyyys}.tgz   $(cat /tmp/{yyyys}+.fls)

cd ~/{yyyys}-C2-C3/
tar -xvzf /tmp/{yyyys}.tgz
# (find-fline \"~/{yyyys}-C2-C3/\")
# (find-fline \"~/{yyyys}-C2-C3/Makefile\")


** Use this to update
** the files in ~/{yyyys}-C2-C3/.
** This is the fast way, that uses
** \"git ls-files\" to get the list of files to copy.
**
** WORK IN PROGRESS!
**
* (sh-mode)
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)

cd ~/{yyyys}-C2-C3/ && git ls-files       | tee /tmp/.files
cat /tmp/.files      \\
  | grep -v README   \\
  | grep -v Makefile \\
  | grep -v gitignore                    | tee /tmp/.files-
cd ~/LATEX/ && tar -cvzf /tmp/.files.tgz $(cat /tmp/.files-)
cd ~/LATEX/                       && ls -lAF $(cat /tmp/.files-)
cd ~/{yyyys}-C2-C3/                && ls -lAF $(cat /tmp/.files-)
cd ~/{yyyys}-C2-C3/                && tar -xvzf     /tmp/.files.tgz

# (magit-status \"~/{yyyys}-C2-C3/\")
# (find-fline   \"~/{yyyys}-C2-C3/\")
# (find-fline \"/tmp/.files\")
# (find-fline \"/tmp/.files-\")
# (find-fline \"/tmp/.files.tgz\")




** Use this to test
** the files in ~/{yyyys}-C2-C3/
**
* (sh-mode)
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
*
# Test 1:
cd           ~/{yyyys}-C2-C3/
tar -cvzf /tmp/{yyyys}-C2-C3.tgz *
rm -Rfv   /tmp/{yyyys}-C2-C3/
mkdir     /tmp/{yyyys}-C2-C3/
cd        /tmp/{yyyys}-C2-C3/
tar -xvzf /tmp/{yyyys}-C2-C3.tgz
make
# (find-fline    \"/tmp/{yyyys}-C2-C3/\")
# (find-pdf-page \"/tmp/{yyyys}-C2-C3/{yyyys}-C2-tudo.pdf\")
# (find-pdf-page \"/tmp/{yyyys}-C2-C3/{yyyys}-C3-tudo.pdf\")


* (sh-mode)
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
*
# Test 2:
rm -Rfv   /tmp/{yyyys}-C2-C3/
mkdir     /tmp/{yyyys}-C2-C3/
cd        /tmp/{yyyys}-C2-C3/
git clone https://github.com/edrx/{yyyys}-C2-C3 .
# (find-fline \"/tmp/{yyyys}-C2-C3/\")
# (find-fline \"/tmp/{yyyys}-C2-C3/Makefile\")
make


* (sh-mode)
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
*
# Test 3:
cd           ~/{yyyys}-C2-C3/
tar -cvzf /tmp/{yyyys}-C2-C3.tgz *
rm -Rfv   /tmp/{yyyys}-C2-C3/
mkdir     /tmp/{yyyys}-C2-C3/
cd        /tmp/{yyyys}-C2-C3/
tar -xvzf /tmp/{yyyys}-C2-C3.tgz

rm -Rv /tmp/fake-home-dir/
mkdir  /tmp/fake-home-dir/
#cd    /tmp/fake-home-dir/
{
  export LUA_INIT=
  export HOME=/tmp/fake-home-dir
  cd          /tmp/{yyyys}-C2-C3/
  make
}


* (sh-mode)
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
*
# Test 4:
rm -Rfv   /tmp/{yyyys}-C2-C3/
mkdir     /tmp/{yyyys}-C2-C3/
cd        /tmp/{yyyys}-C2-C3/
git clone https://github.com/edrx/{yyyys}-C2-C3 .

rm -Rv /tmp/fake-home-dir/
mkdir  /tmp/fake-home-dir/
#cd    /tmp/fake-home-dir/
{
  export LUA_INIT=
  export HOME=/tmp/fake-home-dir
  cd          /tmp/{yyyys}-C2-C3/
  make
}



# (find-fline    \"/tmp/{yyyys}-C2-C3/\")
# (find-pdf-page \"/tmp/{yyyys}-C2-C3/{yyyys}-C2-tudo.pdf\")
# (find-pdf-page \"/tmp/{yyyys}-C2-C3/{yyyys}-C3-tudo.pdf\")


")
     )
   pos-spec-list))




;; «find-MMMMgit-links»  (to ".find-MMMMgit-links")
;; Skel: (find-find-links-links-new "MMMMgit" "yyyys C2-C3" "C2cC3")
;; Test: (find-MMMMgit-links "2022-1" "C2-C3")
;;       (find-MMMMgit-links "2022-2" "C2-C3")
;;
(defun find-MMMMgit-links (&optional yyyys C2-C3 &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for MMMMgit."
  (interactive)
  (setq yyyys (or yyyys "{yyyys}"))
  (setq C2-C3 (or C2-C3 "{C2-C3}"))
  (let* ((C2cC3 (replace-regexp-in-string "-" "," C2-C3)))
    (apply
     'find-elinks
     `((find-MMMMgit-links ,yyyys ,C2-C3 ,@pos-spec-list)
       (find-MMMMgit-links "2022-1" "C2-C3" ,@pos-spec-list)
       (find-MMMMgit-links "2022-2" "C2-C3" ,@pos-spec-list)
       (find-MMMMgit-links "2023-1" "C2-C4-ES" ,@pos-spec-list)
       ;; Convention: the first sexp always regenerates the buffer.
       (find-efunction 'find-MMMMgit-links)
       ""
       ,(ee-template0 "\
# (find-angg \".emacs\" \"c2-{yyyys}\")
# (find-angg \".emacs\" \"c3-{yyyys}\")
# (find-LATEX  \"{yyyys}-C2-tudo.tex\")
# (find-angg   \"{yyyys}-{C2-C3}/\")
# (find-angg   \"{yyyys}-{C2-C3}/README.org\")
# (find-angg   \"{yyyys}-{C2-C3}/Makefile\")
# (find-gitk \"~/{yyyys}-{C2-C3}/\")

** Use this to update
** the files in ~/{yyyys}-{C2-C3}/.
**
* (sh-mode)
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)

cd ~/LATEX/
getincls0   () {<} grep ^.incl | tr '\\\\{<}{>}' '   ' {>}
getincls    () {<} getincls0 | awk 'NF==2 && $1==\"incl\" {<}print $2       {>}' {>}
getincltexs () {<} getincls0 | awk 'NF==2 && $1==\"incl\" {<}print $2 \".tex\"{>}' {>}
cat {yyyys}-C2-tudo.tex     | getincls0
cat {yyyys}-C2-tudo.tex     | getincls
cat {yyyys}-C2-tudo.tex     | getincltexs
cat {yyyys}-{<}{C2cC3}{>}-tudo.tex | getincls
cat {yyyys}-{<}{C2cC3}{>}-tudo.tex | getincltexs
cat {yyyys}-{<}{C2cC3}{>}-tudo.tex | getincls    | sort | uniq | tee /tmp/.filest0.bn
cat {yyyys}-{<}{C2cC3}{>}-tudo.tex | getincltexs | sort | uniq | tee /tmp/.filest0.tex

# \"bn\" means \"base names\" (of .tex files).
# (find-fline \"/tmp/.filest0.tex\")
# (find-fline \"/tmp/.filest0.bn\")

** This \"for\" regenerates the .fls files by running
** \"lualatex -record\" in each one of the .tex files.
** It takes a long time and changes the dates in the footers.
** Also, it is optional! If you skip it then the rest
** of this (big) block will reuse the current .fls files.
**
# for i in $(cat /tmp/.filest0.tex); do 
#   lualatex -record $i
#   done

for i in $(cat /tmp/.filest0.bn); do 
  flsfiles $i.fls
  done | sort | uniq | tee /tmp/{yyyys}.fls

cat /tmp/{yyyys}.fls      >  /tmp/{yyyys}+.fls
echo TocLines1.lua       >> /tmp/{yyyys}+.fls
for i in {yyyys}-{<}{C2cC3}{>}-tudo; do
  echo ${<}i{>}.tex          >> /tmp/{yyyys}+.fls
  done


# (find-tkdiff \"/tmp/{yyyys}.fls\" \"/tmp/{yyyys}+.fls\")

cd ~/LATEX/
tar -cvzf /tmp/{yyyys}.tgz   $(cat /tmp/{yyyys}+.fls)

cd ~/{yyyys}-{C2-C3}/
tar -xvzf /tmp/{yyyys}.tgz
# (find-fline \"~/{yyyys}-{C2-C3}/\")
# (find-fline \"~/{yyyys}-{C2-C3}/Makefile\")


** Use this to update
** the files in ~/{yyyys}-{C2-C3}/.
** This is the fast way, that uses
** \"git ls-files\" to get the list of files to copy.
**
** WORK IN PROGRESS!
**
* (sh-mode)
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)

cd ~/{yyyys}-{C2-C3}/ && git ls-files       | tee /tmp/.files
cat /tmp/.files      \\
  | grep -v README   \\
  | grep -v Makefile \\
  | grep -v gitignore                    | tee /tmp/.files-
cd ~/LATEX/ && tar -cvzf /tmp/.files.tgz $(cat /tmp/.files-)
cd ~/LATEX/                       && ls -lAF $(cat /tmp/.files-)
cd ~/{yyyys}-{C2-C3}/                && ls -lAF $(cat /tmp/.files-)
cd ~/{yyyys}-{C2-C3}/                && tar -xvzf     /tmp/.files.tgz

# (magit-status \"~/{yyyys}-{C2-C3}/\")
# (find-fline   \"~/{yyyys}-{C2-C3}/\")
# (find-fline \"/tmp/.files\")
# (find-fline \"/tmp/.files-\")
# (find-fline \"/tmp/.files.tgz\")




** Use this to test
** the files in ~/{yyyys}-{C2-C3}/
**
* (sh-mode)
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
*
# Test 1:
cd           ~/{yyyys}-{C2-C3}/
tar -cvzf /tmp/{yyyys}-{C2-C3}.tgz *
rm -Rfv   /tmp/{yyyys}-{C2-C3}/
mkdir     /tmp/{yyyys}-{C2-C3}/
cd        /tmp/{yyyys}-{C2-C3}/
tar -xvzf /tmp/{yyyys}-{C2-C3}.tgz
make
# (find-fline    \"/tmp/{yyyys}-{C2-C3}/\")
# (find-pdf-page \"/tmp/{yyyys}-{C2-C3}/{yyyys}-C2-tudo.pdf\")
# (find-pdf-page \"/tmp/{yyyys}-{C2-C3}/{yyyys}-C3-tudo.pdf\")


* (sh-mode)
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
*
# Test 2:
rm -Rfv   /tmp/{yyyys}-{C2-C3}/
mkdir     /tmp/{yyyys}-{C2-C3}/
cd        /tmp/{yyyys}-{C2-C3}/
git clone https://github.com/edrx/{yyyys}-{C2-C3} .
# (find-fline \"/tmp/{yyyys}-{C2-C3}/\")
# (find-fline \"/tmp/{yyyys}-{C2-C3}/Makefile\")
make


* (sh-mode)
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
*
# Test 3:
cd           ~/{yyyys}-{C2-C3}/
tar -cvzf /tmp/{yyyys}-{C2-C3}.tgz *
rm -Rfv   /tmp/{yyyys}-{C2-C3}/
mkdir     /tmp/{yyyys}-{C2-C3}/
cd        /tmp/{yyyys}-{C2-C3}/
tar -xvzf /tmp/{yyyys}-{C2-C3}.tgz

rm -Rv /tmp/fake-home-dir/
mkdir  /tmp/fake-home-dir/
#cd    /tmp/fake-home-dir/
{
  export LUA_INIT=
  export HOME=/tmp/fake-home-dir
  cd          /tmp/{yyyys}-{C2-C3}/
  make
}


* (sh-mode)
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
*
# Test 4:
rm -Rfv   /tmp/{yyyys}-{C2-C3}/
mkdir     /tmp/{yyyys}-{C2-C3}/
cd        /tmp/{yyyys}-{C2-C3}/
git clone https://github.com/edrx/{yyyys}-{C2-C3} .

rm -Rv /tmp/fake-home-dir/
mkdir  /tmp/fake-home-dir/
#cd    /tmp/fake-home-dir/
{
  export LUA_INIT=
  export HOME=/tmp/fake-home-dir
  cd          /tmp/{yyyys}-{C2-C3}/
  make
}



# (find-fline    \"/tmp/{yyyys}-{C2-C3}/\")
# (find-pdf-page \"/tmp/{yyyys}-{C2-C3}/{yyyys}-C2-tudo.pdf\")
# (find-pdf-page \"/tmp/{yyyys}-{C2-C3}/{yyyys}-C3-tudo.pdf\")
")
       )
     pos-spec-list)))



;; «find-paps-links»  (to ".find-paps-links")
;; Skel: (find-find-links-links-new "paps" "fname" "fullfname fname-")
;; Test: (find-paps-links)
;;       (find-paps-links "~/elisp/test.el")
;;
(defun find-paps-links (&optional fname &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for paps."
  (interactive)
  (setq fname (or fname "{fname}"))
  (let* ((fullfname (ee-expand fname))
         (fname- "{fname-}"))
    (apply
     'find-elinks
     `((find-paps-links ,fname ,@pos-spec-list)
       ;; Convention: the first sexp always regenerates the buffer.
       (find-efunction 'find-paps-links)
       ""
       (find-es "ps" "paps")
       ""
       ,(ee-template0 "\
* (sh-mode)
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# cd /tmp/
paps \\
  --header-left=\"{<}now:%Y-%m-%d %H:%M{>}\" \\
  --header-center=\"{<}fname-{>}\" \\
  --header-right=\"Page {<}page_idx:02d}/{num_pages:02d{>}\" \\
  --header \\
  -o /tmp/opaps.pdf \\
     {fullfname}
")
       )
     pos-spec-list)))



;; «find-sandwiches-def-links»  (to ".find-sandwiches-def-links")
;; Skel: (find-find-links-links-new "sandwiches-def" "head" "ee-hyperlink-prefix")
;; Test: (find-sandwiches-def-links)
;;
(defun find-sandwiches-def-links (&optional head &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for sandwiches-def."
  (interactive)
  (setq head (or head "{head}"))
  (let* ((ee-hyperlink-prefix "-- "))
    (apply
     'find-elinks
     `((find-sandwiches-def-links ,head ,@pos-spec-list)
       ;; Convention: the first sexp always regenerates the buffer.
       (find-efunction 'find-sandwiches-def-links)
       ""
       (lua-mode)
       (ee-copy-rest 1 '(find-blogme3 "sandwiches-defs.lua"))
       ""
       ,(ee-template0 "\
-- <{head}>
-- Skel: (find-sandwiches-def-links \"{head}\")
--
_SH[\"{head}\"] = SexpHead {
  head = \"{head}\",
  help = sexp_to_target_st [[ (find-eev \"eev-tlinks.el\" \"{head}\") ]],
  f = function (sh, si)
      si:add_filling(1, nil, \"help\", sh.help)
      local hash = si:sexp_strarg(4)
      if hash then
        si:add_filling(4, 1, \"yt\", youtube_make_url(hash))
      end
    end,
}

-- <{head}-tests>
--[==[
* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)
dofile \"sandwiches-defs.lua\"
= sexp_to_target_si  [[ ({head} \"37675653 202207 1\" \"structural\") ]]
= sexp_to_target_st  [[ ({head} \"37675653 202207 1\" \"structural\") ]]

--]==]
")
       )
     pos-spec-list)))




;; «find-untgz-links»  (to ".find-untgz-links")
;; Supersedes: (find-angg ".emacs" "find-template-untgz")
;; Skel: (find-find-links-links-new "untgz" "url c" "fname d")
;; Test: (find-untgz-links)
;;       (find-untgz-links "https://gigamonkeys.com/book/practicals-1.0.3.tar.gz" "seibel")
;;
(defun find-untgz-links (&optional url c &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for untgz."
  (interactive)
  (setq url (or url "{url}"))
  (setq c (or c "{c}"))
  (let* ((fname (replace-regexp-in-string "^\\(https?\\|ftp\\)://" "$S/\\1/" url))
         (d (ee-tar-tzf-first-directory fname)))
    (apply
     'find-elinks
     `((find-untgz-links ,url ,c ,@pos-spec-list)
       ;; Convention: the first sexp always regenerates the buffer.
       (find-efunction 'find-untgz-links)
       ""
       ,(ee-template0 "\
# {url}

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
rm -Rv ~/usrc/{d}/
tar -C ~/usrc/ -xvzf \\
  {fname}
cd     ~/usrc/{d}/

# (code-c-d \"{c}\" \"~/usrc/{d}/\")
# (find-{c}file \"\")
")
       )
     pos-spec-list)))



;; «find-sandwichsexp-links»  (to ".find-sandwichsexp-links")
;; Supersedes: (find-angg ".emacs" "sexptotarget")
;; Skel: (find-find-links-links-new "sandwichsexp" "sexp0" "sexp sexpstr")
;; Test: (find-sandwichsexp-links)
;;       (find-sandwichsexp-links '(find-TH "eev-videos"))
;;
(defun find-sandwichsexp-links (&optional sexp0 &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for sandwichsexp."
  (interactive (list (read (ee-last-sexp))))
  (setq sexp0 (or sexp0 "{sexp0}"))
  (let* ((sexp (if (stringp sexp0) (read sexp0) sexp0))
         (sexpstr (ee-S sexp)))
    (apply
     'find-elinks
     `((find-sandwichsexp-links ',sexp0 ,@pos-spec-list)
       ;; Convention: the first sexp always regenerates the buffer.
       (find-efunction 'find-sandwichsexp-links)
       ""
       (find-blogme3 "sandwiches-defs.lua")
       ""
       ,(ee-template0 "\
* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)
chdir \"~/blogme3/\"
dofile \"sandwiches-defs.lua\"
= sexp_to_target_si  [[ {sexpstr} ]]
= sexp_to_target_st  [[ {sexpstr} ]]
= sexp_to_target     [[ {sexpstr} ]]

si = sexp_to_target_si0 [[ {sexpstr} ]]
  PPV(si)
= si.head
printf('(find-blogme3 \"sandwiches-defs.lua\" \"%s\")\\n', si.head)
")
       )
     pos-spec-list)))



;; «find-blogme3-rstdoc-links»  (to ".find-blogme3-rstdoc-links")
;; Skel: (find-find-links-links-new "blogme3-rstdoc" "c" "baseweb base htm")
;; Test: (find-blogme3-rstdoc-links "leanmeta")
;;       (find-blogme3-rstdoc-links "lean4")
;;       (find-blogme3-rstdoc-links "sqlite3")
;;
(defun find-blogme3-rstdoc-links (&optional c &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for blogme3-rstdoc."
  (interactive)
  (setq c (or c "{c}"))
  (let* ((baseweb (ee-rstdoc-getfield0 c :base-web))
         (base    (ee-rstdoc-getfield0 c :base))
         (htm     (ee-rstdoc-htm c)))
    (apply
     'find-elinks
     `((find-blogme3-rstdoc-links ,c ,@pos-spec-list)
       ;; Convention: the first sexp always regenerates the buffer.
       (find-efunction 'find-blogme3-rstdoc-links)
       (find-efunction 'find-sandwichsexp-links)
       (find-efunction 'ee-rstdoc-html)
       ""
       ,(ee-template0 "\
-- (find-angg \".emacs\" \"ee-rstdoc-:{c}\")
-- (find-rstdoc-links :{c})
-- (find-code-rstdoc :{c})
-- (find-sandwichsexp-links '(find-{c}doc \"{base}\"))

* (lua-mode)
* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)
chdir \"~/blogme3/\"
dofile \"sandwiches-defs.lua\"

-- (find-blogme3 \"sandwiches-defs.lua\" \"rstdoc\")
-- (find-blogme3 \"sandwiches-defs.lua\" \"rstdoc\" \"rstdoc_base_{c} \")
rstdoc_base_{c} = \"{baseweb}\"

-- (find-blogme3 \"sandwiches-defs.lua\" \"rstdoc\" \"\\\"find-{c}doc\\\"\")
--
_SH[\"find-{c}doc\"] = SexpHead {<}
  head = \"find-{c}doc\",
  help = rstdoc_help,
  base = rstdoc_base_{c},
  htm  = \"{htm}\",
  f    = rstdoc_f,
{>}

= sexp_to_target_si  [[ (find-{c}doc \"{base}\") ]]
= sexp_to_target_st  [[ (find-{c}doc \"{base}\") ]]
= sexp_to_target     [[ (find-{c}doc \"{base}\") ]]
")
       )
     pos-spec-list)))




;; «find-eepitch-select-shell-links»  (to ".find-eepitch-select-shell-links")
;; Skel: (find-find-links-links-new "eepitch-select-shell" "" "")
;; Test: (find-eepitch-select-shell-links)
;;
(defun find-eepitch-select-shell-links (&rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for eepitch-select-shell."
  (interactive)
  (apply
   'find-elinks-elisp
   `((find-eepitch-select-shell-links ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-eepitch-select-shell-links)
     (find-eev "eepitch.el" "eepitch-shell")
     (find-angg ".emacs" "eepitch-shell")
     ""
     ,(ee-template0 "\
;; Use bash (mainly for screenshots and videos):
(defun eepitch-shell  () (interactive) (eepitch-comint \"bash\" \"bash\"))
(defun eepitch-shell2 () (interactive) (eepitch-comint \"bash 2\" \"bash\"))
(defun eepitch-shell3 () (interactive) (eepitch-comint \"bash 3\" \"bash\"))

;; Default:
(defun eepitch-shell  () (interactive) (eepitch-de '(shell)))
(defun eepitch-shell2 () (interactive) (eepitch-de '(shell \"*shell 2*\")))
(defun eepitch-shell3 () (interactive) (eepitch-de '(shell \"*shell 3*\")))
")
     )
   pos-spec-list))



;; «find-movebigfiles-links»  (to ".find-movebigfiles-links")
;; Skel: (find-find-links-links-new "movebigfiles" "from to" "")
;; Test: (find-movebigfiles-links "/tmp/" "/home/")
;;
(defun find-movebigfiles-links (&optional from to &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for movebigfiles."
  (interactive)
  (setq from (or from "{from}"))
  (setq to (or to "{to}"))
  (apply
   'find-elinks
   `((find-movebigfiles-links ,from ,to ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-movebigfiles-links)
     ""
     ,(ee-template0 "\
(find-2a
  ' (find-fline {(ee-S from)})
  ' (find-fline {(ee-S to)})
  )

* (eepitch-shell3)
* (eepitch-kill)
* (eepitch-shell3)
laf    {(ee-S from)}
laf    {(ee-S to)}
du -c  {(ee-S from)}
du -ch {(ee-S from)}

mv -iv {(ee-S from)}* \\
    {(ee-S to)}
")
     )
   pos-spec-list))



;; «find-jpgstopdf-links»  (to ".find-jpgstopdf-links")
;; Skel: (find-find-links-links-new "jpgstopdf" "dir stem quality" "")
;; Test: (find-jpgstopdf-links)
;;       (find-jpgstopdf-links "~/LATEX/2022-comissao/" "2022-dec-22_WhatsApp_RCN")
;; See:  (find-classroom-trab-links nil 2 "/tmp/pdf-jpg-pdf/")
;;       (find-es "ps" "glue-pages")
;;
(defun find-jpgstopdf-links (&optional dir stem quality &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for jpgstopdf."
  (interactive)
  (setq dir (or dir "{dir}"))
  (setq stem (or stem "{stem}"))
  (setq quality (or quality "10"))
  (apply
   'find-elinks
   `((find-jpgstopdf-links ,dir ,stem ,quality ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-jpgstopdf-links)
     ""
     (find-fline ,dir ,stem)
     (find-pdf-page ,(format "%s%s.pdf" dir stem))
     ""
     ,(ee-template0 "\
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
rm -Rv /tmp/jpg-pdf/
mkdir  /tmp/jpg-pdf/
cd     /tmp/jpg-pdf/
cp -v {dir}{stem}*.jpg /tmp/jpg-pdf/
convert -quality {quality} *.jpg {stem}.pdf
laf
# (find-pdf-page \"/tmp/jpg-pdf/{stem}.pdf\")

cp -v /tmp/jpg-pdf/{stem}.pdf {dir}


% (find-jpgstopdf-links \"{dir}\" \"{stem}\")
% (find-pdf-page           \"{dir}{stem}.pdf\")
\\includecom  {<}pages=-,nup=2x1, frame, pagecommand={<}{>}, scale=0.8{>}
                      {<}{stem}{>}

")
     )
   pos-spec-list))




;; «find-curso2023-links»  (to ".find-curso2023-links")
;; Skel: (find-find-links-links-new "curso2023" "yy s MM  yyo so" "stem mm")
;; See:  (to "find-semestre-links")
;; Test: (find-curso2023-links "23" "1" "2"  "22" "2")
;;       (find-curso2023-links "23" "1" "3"  "22" "2")
;;       (find-curso2023-links "23" "1" "LA"  "22" "2")
;;
(defun find-curso2023-links (&optional yy s MM  yyo so &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for curso2023."
  (interactive)
  (setq yy (or yy "{yy}"))
  (setq s (or s "{s}"))
  (setq MM (or MM "{MM}"))
  (setq yyo (or yyo "{yyo}"))
  (setq so (or so "{so}"))
  (let* ((stem (ee-template0 "20{yy}.{s}-{MM}"))
         (mm (downcase MM)))
    (apply
     'find-elinks
     `((find-curso2023-links ,yy ,s ,MM ,yyo ,so ,@pos-spec-list)
       ;; Convention: the first sexp always regenerates the buffer.
       (find-efunction 'find-curso2023-links)
       (find-efunction 'find-blogme3-links)
       (find-blogme3-links ,stem)
       ""
       ,(ee-template0 "\
# (kill-new \"{stem}\")
# (find-blogme3 \"anggmake.lua\" \"blogmestems\")
# (find-blogme3 \"anggmake.lua\" \"blogmestems\" \"2024.1-C2\")
# (find-TH \"{stem}\")
# (ee-copy-rest 2 '(find-TH \"{stem}\"))


\[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
;; (find-curso2023-links \"{yy}\" \"{s}\" \"{MM}\"   \"{yyo}\" \"{so}\")
;; (find-angg \"20{yy}.{s}-{MM}/Makefile\")
;;
;; «.executado»		(to \"executado\")
#]
\[lua:
  require \"defs-2022\"    -- (find-blogme3 \"defs-2022.lua\")
  load_caepro5()         -- (find-blogme3 \"defs-2022.lua\" \"load_caepro5\")
  def [[ GRAY 1 body COLOR(\"#CCCCCC\", body) ]]
  def [[ FER  1 body COLOR(\"red\",     body) ]]
  def [[ REP  1 body COLOR(\"orange\",  body) ]]
  short_:add [[
    caepro                  => (find-TH \"2023-caepro\")
    slogans                 => (find-TH \"2023-precisamos-de-mais-slogans\")
    pdfzinhos               => (find-TH \"2023-links-curtos\" \"tabelona-explicacao\")
    quadros                 => (find-TH \"2023-links-curtos\" \"quadros-e-logs\")
    tabelona                => (find-TH \"2023-links-curtos\" \"tabelona\")
  ]]
]
\[SETHEADSTYLE [LUCIDA]]
\[htmlize [J {MM} 20{yy}.{s} - Eduardo Ochs]\n


[P [R 20{yy}.{s}.html Salas, horários, etc]
[BR] [R 20{yyo}.{so}-{MM}.html Página do semestre anterior.]
[BR] Fotos dos quadros: 
     [R http://anggtwu.net/20{yy}.{s}-{MM}/{MM}-quadros.pdf PDF],
     [R http://anggtwu.net/20{yy}.{s}-{MM}/ JPGs].
[BR] [R 2022-apresentacao-sobre-C2.html Material de todos os semestres desde 2019.2].
[BR] [R http://anggtwu.net/LATEX/20{yy}-{s}-{MM}-Tudo.pdf PDFzão]
        com todos os [_ pdfzinhos PDFzinhos] deste semestre.
[BR] [_ tabelona Material de todos os semestres desde 2019.2].
[BR] Os links curtos, como [C 3eT25] e [C Slogans08:54], estão
explicados [_ links-curtos aqui].
[BR] [_ caepro Sobre as reclamações do CAEPRO].
]

[P O plano de curso no formato tradicional está
   [R http://anggtwu.net/LATEX/20{yy}-{s}-{MM}-plano-de-curso.pdf aqui].
   [# ({mm}m{yy}{s}plcp 1 \"plano-de-curso\")
    # ({mm}m{yy}{s}plca   \"plano-de-curso\")
   #]
[# [BR] A versão detalhada com links está abaixo. #]
[BR] A tabela abaixo tem links pros [_ pdfzinhos] e [_ quadros] de cada aula.
]

[#
 # «executado»  (to \".executado\")
 # (find-angg \".emacs\" \"{mm}q{yy}{s}\")
#]
[lua:
  short_:add [[
  ]]
]


[#
Inscritos:

#]



]
\[#
 # Local Variables:
 # coding: raw-text-unix
 # modes: (fundamental-mode blogme-mode)
 # End:
#]")
       )
     pos-spec-list)))




;; «find-semestre-links»  (to ".find-semestre-links")
;; Skel: (find-find-links-links-new "semestre" "yy s n yyo so" "")
;; See:  (to "find-curso2023-links")
;; Test: (find-semestre-links "23" "1" "2"   "22" "2")
;;       (find-semestre-links "23" "1" "3"   "22" "2")
;;       (find-semestre-links "24" "2" "3"   "24" "1")
;;
(defun find-semestre-links (&optional yy s n yyo so &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for semestre."
  (interactive)
  (setq yy (or yy "{yy}"))
  (setq s (or s "{s}"))
  (setq n (or n "{n}"))
  (setq yyo (or yyo "{yyo}"))
  (setq so (or so "{so}"))
  (let ((ee-buffer-name (or ee-buffer-name "*find-semestre-links*")))
    (apply
     'find-elinks
     `((find-semestre-links ,yy ,s ,n ,yyo ,so ,@pos-spec-list)
       ;; Convention: the first sexp always regenerates the buffer.
       (find-efunction 'find-semestre-links)
       ""
       ,(ee-template0 "\
** Directories:
**
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd;                mkdir -p 20{yy}.{s}-quadros 20{yy}.{s}-C2 20{yy}.{s}-C3 20{yy}-{s}-C2-C3

* (eepitch-linode)
* (eepitch-kill)
* (eepitch-linode)
cd ~/slow_html/;   mkdir -p 20{yy}.{s}-quadros 20{yy}.{s}-C2 20{yy}.{s}-C3 20{yy}-{s}-C2-C3
cd ~/public_html/; mkdir -p 20{yy}.{s}-quadros 20{yy}.{s}-C2 20{yy}.{s}-C3 20{yy}-{s}-C2-C3

  mkdir -p 20{yy}.{s}-C2 20{yy}.{s}-C3 20{yy}-{s}-C2-C3
# Copy to: (find-THfile \"Makefile\" \"dirs\")


** Blogme files:
(find-curso2023-links \"{yy}\" \"{s}\" \"C2\"  \"{yyo}\" \"{so}\")
(find-curso2023-links \"{yy}\" \"{s}\" \"C3\"  \"{yyo}\" \"{so}\")


** Org files:
(find-2a '(find-angg \"20{yyo}-{so}-C2-C3/README.org\")
         '(find-angg \"20{yy}-{s}-C2-C3/README.org\")


** Makefiles:
**
  20{yy}.{s}-C2/Makefile
  20{yy}.{s}-C3/Makefile
  20{yy}-{s}-C2-C3/README.org
  20{yy}-{s}-C2-C3/Makefile
# Copy to: (find-blogme3 \"anggmake.lua\" \"anggtranslate\" \"2022.2-C2/\")

  LATEX/20{yy}-{s}-MM-template.tex
  LATEX/20{yy}-{s}-C2-intro.tex
  LATEX/20{yy}-{s}-C2-plano-de-curso.tex
  LATEX/20{yy}-{s}-C2-tudo.tex
  LATEX/20{yy}-{s}-C3-intro.tex
  LATEX/20{yy}-{s}-C3-plano-de-curso.tex
  LATEX/20{yy}-{s}-C3-tudo.tex
# Copy to: (find-blogme3 \"anggmake.lua\" \"anggtranslate\" \"LATEX/20{yy}-{s}-\")
#   or to: (find-blogme3 \"anggmake.lua\" \"anggtranslate\" \"LATEX/20{yyo}-{so}-\")

(find-2a '(find-angg \"20{yyo}.{so}-C2/Makefile\")
         '(find-angg \"20{yy}.{s}-C2/Makefile\"))
(find-2a '(find-angg \"20{yyo}.{so}-C3/Makefile\")
         '(find-angg \"20{yy}.{s}-C3/Makefile\"))
(find-2a '(find-angg \"20{yyo}-{so}-C2-C3/README.org\")
         '(find-angg \"20{yy}-{s}-C2-C3/README.org\"))
(find-2a '(find-angg \"20{yyo}-{so}-C2-C3/Makefile\")
         '(find-angg \"20{yy}-{s}-C2-C3/Makefile\"))


** .tex files:
**
(find-efunction 'find-MM-aula-links)
(find-2a '(find-angg \"LATEX/20{yyo}-{so}-MM-template.tex\")
         '(find-angg \"LATEX/20{yy}-{s}-MM-template.tex\"))

(find-MM-aula-links \"20{yy}-{s}-C2-intro\" \"C2\" \"c2m{yy}{s}intro\" \"c2in\")
(find-MM-aula-links \"20{yy}-{s}-C3-intro\" \"C3\" \"c3m{yy}{s}intro\" \"c3in\")
(find-MM-aula-links \"20{yy}-{s}-C2-tudo\" \"C2\" \"c2m{yy}{s}tudo\" \"c2tu\")
(find-MM-aula-links \"20{yy}-{s}-C3-tudo\" \"C3\" \"c3m{yy}{s}tudo\" \"c3tu\")
(find-MM-aula-links \"20{yy}-{s}-C2-plano-de-curso\" \"C2\" \"c2m{yy}{s}plc\" \"c2plc\")
(find-MM-aula-links \"20{yy}-{s}-C3-plano-de-curso\" \"C3\" \"c3m{yy}{s}plc\" \"c3plc\")


** ~/.emacs:
** (find-angg \".emacs\" \"c3-20{yyo}-{so}\")
**
;; (c{n}e)

;; <c{n}-20{yy}-{s}>
;; <c{n}-20{yy}-{s}-quadros>
;; Skel: (find-semestre-links \"{yy}\" \"{s}\" \"{n}\"  \"{yyo}\" \"{so}\")
(defun c{n}e () (interactive) (find-angg \".emacs\" \"c{n}-20{yy}-{s}\"))

;; <c{n}q{yy}{s}>
;; (find-angg \".emacs\" \"c2-2022-1-quadros\")
(defun c{n}q () (interactive) (find-angg \".emacs\" \"c{n}-20{yy}-{s}-quadros\"))
(code-pdf-page \"c{n}q{yy}{s}\" \"~/20{yy}.{s}-C{n}/C{n}-quadros.pdf\")
(code-pdf-text \"c{n}q{yy}{s}\" \"~/20{yy}.{s}-C{n}/C{n}-quadros.pdf\")
;; http://anggtwu.net/20{yy}.{s}-C{n}/C{n}-quadros.pdf
;; (find-angg \"20{yy}.{s}-C{n}/Makefile\")
;; (find-c{n}q{yy}{s}page  1 \"fev36: pagina fake\")
")
       )
     pos-spec-list)))



;; «find-semestre-MM-links»  (to ".find-semestre-MM-links")
;; Skel: (find-find-links-links-new "semestre-MM" "yy s MM yyo so" "mm")
;; Test: (find-semestre-MM-links)
;;
(defun find-semestre-MM-links (&optional yy s MM yyo so &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for semestre-MM."
  (interactive)
  (setq yy (or yy "{yy}"))
  (setq s (or s "{s}"))
  (setq MM (or MM "{MM}"))
  (setq yyo (or yyo "{yyo}"))
  (setq so (or so "{so}"))
  (let* ((mm "{mm}"))
    (apply
     'find-elinks
     `((find-semestre-MM-links ,yy ,s ,MM ,yyo ,so ,@pos-spec-list)
       ;; Convention: the first sexp always regenerates the buffer.
       (find-efunction 'find-semestre-MM-links)
       ""
       ,(ee-template0 "\
")
       )
     pos-spec-list)))




;; «find-semestre-emacs-links»  (to ".find-semestre-emacs-links")
;; Skel: (find-find-links-links-new "semestre-emacs" "yy s MM yyo so" "mm")
;; Test: (find-semestre-emacs-links "23" "1" "LA"  "22" "2")
;;
(defun find-semestre-emacs-links (&optional yy s MM yyo so &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for semestre-emacs."
  (interactive)
  (setq yy (or yy "{yy}"))
  (setq s (or s "{s}"))
  (setq MM (or MM "{MM}"))
  (setq yyo (or yyo "{yyo}"))
  (setq so (or so "{so}"))
  (let* ((mm (downcase MM)))
    (apply
     'find-elinks-elisp
     `((find-semestre-emacs-links ,yy ,s ,MM ,yyo ,so ,@pos-spec-list)
       ;; Convention: the first sexp always regenerates the buffer.
       (find-efunction 'find-semestre-emacs-links)
       ""
       ,(ee-template0 "\
;; (find-MM-aula-links \"20{yy}-{s}-{MM}-intro\" \"{MM}\" \"{mm}m{yy}{s}intro\" \"{mm}mi\")
;; (find-MM-tudo-links \"{yy}\" \"{s}\" \"{MM}\")


;; ({mm}e)

;; <{mm}-20{yy}-{s}>
;; <{mm}-20{yy}-{s}-quadros>
;; Skel: (find-semestre-emacs-links \"{yy}\" \"{s}\" \"{MM}\"  \"{yyo}\" \"{so}\")
(defun {mm}e  () (interactive) (find-angg \".emacs\" \"{mm}-20{yy}-{s}\"))
(defun {mm}eo () (interactive) (find-angg \".emacs\" \"{mm}-20{yyo}-{so}\"))

;; <{mm}q{yy}{s}>
;; (find-angg \".emacs\" \"{mm}-2022-1-quadros\")
(defun {mm}q () (interactive) (find-angg \".emacs\" \"{mm}-20{yy}-{s}-quadros\"))
(code-pdf-page \"{mm}q{yy}{s}\" \"~/20{yy}.{s}-{MM}/{MM}-quadros.pdf\")
(code-pdf-text \"{mm}q{yy}{s}\" \"~/20{yy}.{s}-{MM}/{MM}-quadros.pdf\")
;; http://anggtwu.net/20{yy}.{s}-{MM}/{MM}-quadros.pdf
;; (find-angg \"20{yy}.{s}-{MM}/Makefile\")
;; (find-{mm}q{yy}{s}page  1 \"fev36: pagina fake\")

;; ({mm}m{yy}{s}introa \"title\")
(code-etex-tla \"{mm}in\"        \"20{yy}-{s}-{MM}-intro\")
(code-etex-tla \"{mm}m{yy}{s}intro\" \"20{yy}-{s}-{MM}-intro\")

;; ({mm}m{yy}{s}plca \"title\")
(code-etex-tla \"{mm}plc\"     \"20{yy}-{s}-{MM}-plano-de-curso\")
(code-etex-tla \"{mm}m{yy}{s}plc\" \"20{yy}-{s}-{MM}-plano-de-curso\")

;; ({mm}m{yy}{s}tudoa \"title\")
(code-etex-tla \"{mm}tu\"       \"20{yy}-{s}-{MM}-tudo\")
(code-etex-tla \"{mm}m{yy}{s}tudo\" \"20{yy}-{s}-{MM}-tudo\")

")
       )
     pos-spec-list)))



;; «find-semestre-MM-quadros-links»  (to ".find-semestre-MM-quadros-links")
;; Skel: (find-find-links-links-new "semestre-MM-quadros" "yy s MM yyo so" "mm")
;; Test: (find-semestre-MM-quadros-links "23" "1" "C2"  "22" "2")
;;       (find-semestre-MM-quadros-links "23" "1" "LA"  "22" "2")
;;
(defun find-semestre-MM-quadros-links (&optional yy s MM yyo so &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for semestre-MM-quadros."
  (interactive)
  (setq yy (or yy "{yy}"))
  (setq s (or s "{s}"))
  (setq MM (or MM "{MM}"))
  (setq yyo (or yyo "{yyo}"))
  (setq so (or so "{so}"))
  (let* ((mm "{mm}"))
    (apply
     'find-elinks
     `((find-semestre-MM-quadros-links ,yy ,s ,MM ,yyo ,so ,@pos-spec-list)
       ;; Convention: the first sexp always regenerates the buffer.
       (find-efunction 'find-semestre-MM-quadros-links)
       ""
       ,(ee-template0 "\
# (find-angg  \"2022.2-C2/Makefile\")
# (find-angg  \"20{yy}.{s}-{MM}/Makefile\")

# (find-mkdir-links \"20{yy}.{s}-{MM}\")

# (kill-new \"  20{yy}.{s}-{MM}/Makefile\\n\")
# (find-blogme3 \"anggmake.lua\" \"anggtranslate\")
# (find-blogme3 \"anggmake.lua\" \"anggtranslate\" \"LATEX/20{yy}-{s}\")
# ^ Add to the makefile


# (makefile-gmake-mode)
# (ee-copy-rest 1 '(find-angg \"20{yy}.{s}-{MM}/Makefile\"))
")
       ;; (find-angg         "MAKE/2023.1-MM-template")
       ,(ee-template0-file "~/MAKE/2023.1-MM-template"
			   "⟦\\([!-~]+\\)⟧")
       )
     pos-spec-list)))



;; «find-mkdir-links»  (to ".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}"))
  (let ((ee-buffer-name (or ee-buffer-name "*find-mkdir-links*")))
    (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-THfile \"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)))



;; «find-ajuda-email-links»  (to ".find-ajuda-email-links")
;; Skel: (find-find-links-links-new "ajuda-email" "stem" "")
;; Test: (find-ajuda-email-links)
;;       (find-ajuda-email-links "2023-feb-09_oficio_anexo")
;;
(defun find-ajuda-email-links (&optional stem &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for ajuda-email."
  (interactive)
  (setq stem (or stem "{stem}"))
  (apply
   'find-elinks
   `((find-ajuda-email-links ,stem ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-ajuda-email-links)
     ""
     ,(ee-template0 "\
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
mv -iv /tmp/{stem}.pdf \\
  ~/LATEX/2022-comissao/

% (ajup 99)
% (find-ajuda-email-links \"{stem}\")
% (find-pdf-page \"~/LATEX/2022-comissao/{stem}.pdf\")
% (find-pdf-text \"~/LATEX/2022-comissao/{stem}.pdf\")
% gmail
\\includeemail{<}pages=-{>}{<}{stem}{>}

")
     )
   pos-spec-list))


;; «find-ajuda-jpgs-links»  (to ".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}"))
  (let ((ee-buffer-name (or ee-buffer-name "*find-ajuda-jpgs-links*")))
    (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)))



;; «find-engrave-faces-links»  (to ".find-engrave-faces-links")
;; Skel: (find-find-links-links-new "engrave-faces" "origdir newdir fname" "")
;; Test: (find-engrave-faces-links "SQUEAK/Squeak6.0-22104/shared/" "SQUEAK/" "See.st")
;;       (find-engrave-faces-links "SQUEAK/Squeak6.0-22104/shared/" "SQUEAK/" "Category-Edrx.st")
;;
(defun find-engrave-faces-links (&optional origdir newdir fname &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for engrave-faces."
  (interactive)
  (setq origdir (or origdir "{origdir}"))
  (setq newdir (or newdir "{newdir}"))
  (setq fname (or fname "{fname}"))
  (apply
   'find-elinks
   `((find-engrave-faces-links ,origdir ,newdir ,fname ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-engrave-faces-links)
     ""
     ,(ee-template0 "\
** (find-fline \"~/{origdir}{fname}\")
** (find-fline \"~/{origdir}\")
** (find-fline \"~/{newdir}{fname}\")
** (find-fline \"~/{newdir}\")
**
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
rm -fv ~/{newdir}{fname}
rm -fv ~/{newdir}{fname}.html
cp -v  ~/{origdir}{fname} ~/{newdir}
laf    ~/{origdir}
laf    ~/{newdir}

* (defun a () (interactive) (eek \"M-x engrave-faces-html-buffer-standalone RET\"))
* (defun b () (interactive) (eek \"C-x C-w ~/{newdir}{fname}.html RET\"))
* (ee-kill-buffer \"{fname}\")
* (ee-kill-buffer \"{fname}.html\")
** (find-2b nil '(find-fline \"~/{newdir}{fname}\"))

laf    ~/{origdir}
laf    ~/{newdir}

scp ~/{newdir}{fname}.html $LINP/{newdir}
scp ~/{newdir}{fname}      $LINP/{newdir}

#  file:///home/edrx/{newdir}{fname}.html
# http://anggtwu.net/{newdir}{fname}.html
# http://anggtwu.net/{newdir}{fname}

")
     )
   pos-spec-list))



;; «find-planodecurso-links»  (to ".find-planodecurso-links")
;; Skel: (find-find-links-links-new "planodecurso" "yy s MM" "mm")
;; Test: (find-planodecurso-links "23" "1" "ES")
;;
(defun find-planodecurso-links (&optional yy s MM &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for planodecurso."
  (interactive)
  (setq yy (or yy "{yy}"))
  (setq s (or s "{s}"))
  (setq MM (or MM "{MM}"))
  (let* ((mm (downcase MM)))
    (apply
     'find-elinks
     `((find-planodecurso-links ,yy ,s ,MM ,@pos-spec-list)
       ;; Convention: the first sexp always regenerates the buffer.
       (find-efunction 'find-planodecurso-links)
       ""
       (find-blogme3sh "grep plano-de-curso anggmake.lua")
       (find-blogme3sh "grep plano-de-curso anggmake.lua | sort")
       ""
       ,(ee-template0 "\
# (kill-new \"LATEX/20{yy}-{s}-{MM}-plano-de-curso.tex\")
# (find-blogme3 \"anggmake.lua\")
# (ee-copy-rest 1 '(find-LATEX \"20{yy}-{s}-{MM}-plano-de-curso.tex\"))
")
       ;; (find-angg         "MAKE/2023.1-MM-template")
       ;; (find-angg         "LATEX/2023-2-MM-plano-de-curso.tex")
       ,(ee-template0-file "~/LATEX/2023-2-MM-plano-de-curso.tex"
			   "⟦\\([!-~]+\\)⟧")
       )
     pos-spec-list)))




;; «find-mtp-links»  (to ".find-mtp-links")
;; Skel: (find-find-links-links-new "mtp" "phonedir localdir yyyy mm dd" "")
;; Test: (find-mtp-links)
;;       (find-mtp-links "Phone/DCIM/Camera/" "/tmp/phone-camera/")
;;       (find-mtp-links "Phone/DCIM/Screenshots/" "/tmp/phone-screenshots/")
;;
(defun find-mtp-links (&optional phonedir localdir yyyy mm dd &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for mtp."
  (interactive)
  (setq phonedir (or phonedir "{phonedir}"))
  (setq localdir (or localdir "{localdir}"))
  (setq yyyy (or yyyy (format-time-string "%Y")))
  (setq mm   (or mm   (format-time-string "%m")))
  (setq dd   (or dd   (format-time-string "%d")))
  (apply
   'find-elinks
   `((find-mtp-links ,phonedir ,localdir ,yyyy ,mm ,dd ,@pos-spec-list)
     (find-mtp-links "Phone/DCIM/Screenshots/" "/tmp/phone-screenshots/")
     (find-mtp-links "Phone/DCIM/Camera/" "/tmp/phone-camera/")
     (find-mtp-links "Phone/DCIM/Camera/" "/tmp/phone-wpp-images/")
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-mtp-links)
     ""
     (find-es "mtp" "screenshots")
     ""
     ,(ee-template0 "\
* (eepitch-shell2)
* (eepitch-kill)
* (eepitch-shell2)
# (find-fline \"/media/mtp/phone/\")

cd
sudo fusermount -u /media/mtp/phone/
sudo umount        /media/mtp/phone/
sudo mkdir -p      /media/mtp/phone/
sudo chmod 775     /media/mtp/phone/

# Connect the phone to the computer, then:
sudo go-mtpfs -allow-other /media/mtp/phone

# \"Allow the phone to access phone data?\" -> Allow. Then:
sudo go-mtpfs -allow-other /media/mtp/phone

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# (find-fline \"/media/mtp/phone/\")
# (find-fline \"/media/mtp/phone/{phonedir}\")
# (find-fline \"/media/mtp/phone/Phone/Android/media/com.whatsapp/WhatsApp/Media/WhatsApp Images/\")
# (find-fline \"{localdir}\")
mkdir -p {localdir}

cd \"/media/mtp/phone/Phone/Android/media/com.whatsapp/WhatsApp/Media/WhatsApp Images/\"
cd /media/mtp/phone/{phonedir}
# rsync -avvz -e *.jpg {localdir}
rsync -avvz -e            {yyyy}*.jpg     {localdir}
rsync -avvz -e            {yyyy}{mm}*.jpg   {localdir}
rsync -avvz -e            {yyyy}{mm}{dd}*.jpg {localdir}
cp -av                    {yyyy}{mm}{dd}*.jpg {localdir}
rsync -avvz -e Screenshot_{yyyy}*.jpg {localdir}
rsync -avvz -e IMG-{yyyy}{mm}{dd}* {localdir}
cd

ls -lt         /media/mtp/phone/

sudo go-mtpfs -allow-other /media/mtp/phone
ls -lt         /media/mtp/phone/

cd
sudo fusermount -u /media/mtp/phone/
sudo umount        /media/mtp/phone/
")
     )
   pos-spec-list))



;;;                                                    _               
;;;   ___ ___  _ __  _   _        __ _ _   _  __ _  __| |_ __ ___  ___ 
;;;  / __/ _ \| '_ \| | | |_____ / _` | | | |/ _` |/ _` | '__/ _ \/ __|
;;; | (_| (_) | |_) | |_| |_____| (_| | |_| | (_| | (_| | | | (_) \__ \
;;;  \___\___/| .__/ \__, |      \__, |\__,_|\__,_|\__,_|_|  \___/|___/
;;;           |_|    |___/          |_|                                
;;
;; «find-copy-quadros-links»  (to ".find-copy-quadros-links")
;; Skel: (find-find-links-links-new "copy-quadros" "yyyy mm dd" "ee-buffer-name")
;; Test: (find-copy-quadros-links)
;;
(defun find-copy-quadros-links (&optional yyyy mm dd &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for copy-quadros."
  (interactive)
  (setq yyyy (or yyyy (format-time-string "%Y")))
  (setq mm   (or mm   (format-time-string "%m")))
  (setq dd   (or dd   (format-time-string "%d")))
  (let* ((ee-buffer-name (or ee-buffer-name "*find-copy-quadros-links*")))
    (apply
     'find-elinks
     `((find-copy-quadros-links ,@pos-spec-list)
       ;; Convention: the first sexp always regenerates the buffer.
       (find-efunction 'find-copy-quadros-links)
       ""
       ,(ee-template0 "\
*  (defun cq2 () (interactive) (ee-cq-windows \"24\" \"2\" \"C2\"))
*  (defun cq3 () (interactive) (ee-cq-windows \"24\" \"2\" \"C3\"))
*  (defun cq6 () (interactive) (ee-cq-windows \"24\" \"1\" \"GA\"))
** (defun cq2 () (interactive) (ee-cq-windows \"23\" \"2\" \"C2\"))
** (defun cq3 () (interactive) (ee-cq-windows \"23\" \"2\" \"C3\"))
** (defun cq4 () (interactive) (ee-cq-windows \"23\" \"1\" \"C4\"))
** (defun cq5 () (interactive) (ee-cq-windows \"23\" \"1\" \"ES\"))
** (defun cq7 () (interactive) (ee-cq-windows \"23\" \"1\" \"LA\"))
**
** (find-termux-links)
**
** (setq ange-ftp-generate-anonymous-password nil)
** (find-2a '(find-dcimcamerafile \"\") '(find-fline \"/tmp/phone-camera/\"))
** (find-fline \"/tmp/phone-camera/\")
** (find-angg \".emacs\" \"switftp\")
**
** (find-mtp-links \"Phone/DCIM/Camera/\" \"/tmp/phone-camera/\")
")
       )
     pos-spec-list)))

;; (ee-cq-split-filename "/tmp/phone-camera/20230404_155202.jpg")
;; (ee-cq-split-filename "/tmp/phone-camera/20230404_155202-C2-1.jpg")
;; (ee-cq-filename-to-f  "/tmp/phone-camera/20230404_155202.jpg")
;; (ee-cq-filename-to-f  "/tmp/phone-camera/20230404_155202-C2-1.jpg")
;;
(defun ee-cq-split-filename (fname)
  (setq fname (file-name-nondirectory fname))
  (string-match "^\\(........\\)_\\(......\\)\\(.*\\).jpg$" fname)
  (list (match-string 1 fname)
	(match-string 2 fname)
	(match-string 3 fname)))

(defun ee-cq-filename-to-f (fname)
  (seq-let (date time rest)
      (ee-cq-split-filename fname)
    (format "#T f %s_%s%s %s%s\n" date time rest date rest)))
  
(defun ee-cq-fs ()
  (mapconcat
   'ee-cq-filename-to-f
   (if (eq major-mode 'dired-mode)
       (dired-get-marked-files))))

(defun ee-cq-windows (yy s MM)
  (find-wset "123_o_o3_o_o"
	     '(find-fline "/tmp/phone-camera/")
	     `(find-fline ,(ee-template0 "~/20{yy}.{s}-quadros/"))
	     '(find-estring (ee-cq-fs))
	     `(find-fline ,(ee-template0 "~/20{yy}.{s}-{MM}/Makefile"))
	     ))


;; «find-gmail-links»  (to ".find-gmail-links")
;; Skel: (find-find-links-links-new "gmail" "hash" "")
;; Test: (find-gmail-links "KtbxLrjVjnGXBssLpnZKBXnSRTHhJjgxtg")
;;
(defun find-gmail-links (&optional hash &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for gmail."
  (interactive (list (ee-stuff-around-point "-0-9A-Za-z_")))
  (setq hash (or hash "{hash}"))
  (apply
   'find-elinks
   `((find-gmail-links ,hash ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-gmail-links)
     ""
     ,(ee-template0 "\
https://mail.google.com/mail/u/0/#inbox/{hash}
https://mail.google.com/mail/u/0/#sent/{hash}

after:2018/6/10 before:2018/6/14 
")
     )
   pos-spec-list))



;; «find-class-links»  (to ".find-class-links")
;; Skel: (find-find-links-links-new "class" "name" "bigname")
;; See:  (to "class")
;; Test: (find-class-links)
;;       (find-class-links "MkTable")
;;
(defun find-class-links (&optional name &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for class."
  (interactive)
  (setq name (or name "{name}"))
  (let* ((bigname (figlet-string-with "-- " name)))
    (apply
     'find-elinks
     `((find-class-links ,name ,@pos-spec-list)
       ;; Convention: the first sexp always regenerates the buffer.
       (find-efunction 'find-class-links)
       ""
       ,(ee-template0 "\
# (find-angg \".emacs\" \"figlet\")
# (setq figlet-cmd \"figlet -f standard | gsub.lua '' '-- %1'\")

{bigname}\
-- «.{name}»	(to \"{name}\")
-- «{name}»  (to \".{name}\")

{name} = Class {<}
  type    = \"{name}\",
  __index = {<}
  {>},
{>}

-- «.{name}-tests»	(to \"{name}-tests\")
-- «{name}-tests»  (to \".{name}-tests\")
")
       )
     pos-spec-list)))




;; «find-expands-links»  (to ".find-expands-links")
;; Skel: (find-find-links-links-new "expands" "fstem var words" "word1")
;; Test: (find-expands-links "find-luademo-scp" "fname" "LUA/foo LUA/bar")
;;       (find-expands-links)
;;
(defun find-expands-links (&optional fstem var words &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for expands."
  (interactive)
  (setq fstem (or fstem "{fstem}"))
  (setq var (or var "{var}"))
  (setq words (or words "{words}"))
  (let* ((word1 (car (ee-split words))))
    (apply
     'find-elinks-elisp
     `((find-expands-links ,fstem ,var ,words ,@pos-spec-list)
       ;; Convention: the first sexp always regenerates the buffer.
       (find-efunction 'find-expands-links)
       ""
       ,(ee-template0 "\
;; Skel: (find-expands-links \"{fstem}\" \"{var}\" \"{words}\")
;; Tests: (find-estring (ee-{fstem}1 \"{word1}\"))
;;        (find-estring (ee-{fstem}s \"{words}\"))
;;
\(defun ee-{fstem}1 ({var})
  (ee-template0 \":{<}{var}{>}:\\n\"))

\(defun ee-{fstem}s (bigstr)
  (mapconcat 'ee-{fstem}1 (ee-split bigstr)))
")
       )
     pos-spec-list)))



;; «code-etv2»  (to ".code-etv2")
;; Moved to: (find-eev "eev-tlinks.el" "code-etv2")





;; «find-editeevsubtitles-links»  (to ".find-editeevsubtitles-links")
;; Skel: (find-find-links-links-new "editeevsubtitles" "c mp4stem hash length" "")
;; Tests: (find-editeevsubtitles-links-1 "2022pict2elua")
;;        (find-editeevsubtitles-links "2022pict2elua" "2022-pict2e-lua" "hiHsUhGVLGM")
;;        (find-editeevsubtitles-links "c2m211somas1d" "2021-1-C2-somas-1-dicas" "pCD1p9FZYdI" "18:18")
;;
(defun find-editeevsubtitles-links-1 (c)
  (let* ((yt      (ee-1stclassvideos-field c :yt))
	 (mp4stem (ee-1stclassvideos-mp4stem c))
	 (hash    (ee-1stclassvideos-hash c))
	 (length  (ee-1stclassvideos-field c :length)))
    (find-editeevsubtitles-links c mp4stem hash length)))

(defun find-editeevsubtitles-links (&optional c mp4stem hash length &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for editeevsubtitles."
  (interactive)
  (setq c (or c "{c}"))
  (setq mp4stem (or mp4stem "{mp4stem}"))
  (setq hash (or hash "{hash}"))
  (setq length (or length "{length}"))
  (apply
   'find-elinks
   `((find-editeevsubtitles-links ,c ,mp4stem ,hash ,length ,@pos-spec-list)
     (find-editeevsubtitles-links-1 ,c)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-editeevsubtitles-links)
     ""
     (find-blogme3-legendas-links ,c ,mp4stem ,hash)
     ""
     ,(ee-template0 "\

# (kill-new \"  SUBTITLES/{mp4stem}.lua\")
# (find-blogme3 \"anggmake.lua\" \"anggtranslate\")
# (find-blogme3 \"anggmake.lua\" \"anggtranslate\" \"SUBTITLES/\")

# (ee-copy-rest 2 '(find-fline \"~/SUBTITLES/{mp4stem}.lua\"))
# (ee-copy-rest0 1 nil)

-- This file:
--   http://anggtwu.net/SUBTITLES/{mp4stem}.lua.html
--   http://anggtwu.net/SUBTITLES/{mp4stem}.lua
--          (find-angg \"SUBTITLES/{mp4stem}.lua\")
-- Author: Eduardo Ochs <eduardoochs@gmail.com>
--
-- (defun l () (interactive) (find-angg \"SUBTITLES/{mp4stem}.lua\"))
-- (defun b () (interactive) (find-TH             \"{mp4stem}\"))
-- (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-editeevsubtitles-links-1 \"{c}\")
--       (find-efunction 'find-editeevsubtitles-links-1)
-- Yttr: (find-yttranscript-links       \"{c}\" \"{hash}\")
-- Info: (find-1stclassvideo-links      \"{c}\")
-- Play: (find-{c}video \"0:00\")
--
-- I use the code below to generate the subtitles in .vtt.
--

ee_dofile \"~/LUA/Subtitles.lua\" -- (find-angg \"LUA/Subtitles.lua\")

--[[
-- (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 \"{mp4stem}.lua\"
sts = Subtitles.fromsexps(subs_bigstr):addtime(\"{length}\")
-- sts.lang = \"pt-BR\"
= sts
outfname = \"$S/http/anggtwu.net/eev-videos/{mp4stem}.vtt\"
outfname =                           \"/tmp/{mp4stem}.vtt\"
out = sts:vtt()..\"\\n\\n\"
ee_writefile(outfname, out)
-- (find-fline                       \"/tmp/{mp4stem}.vtt\")

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

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

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

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

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

--]]

--[[
* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)
dofile \"{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-{c}video \"00:00\" \" \")
]==]

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

-- Local Variables:
-- coding:  utf-8-unix
-- End:
")
     )
   pos-spec-list))




;; «find-blogme3-legendas-links»  (to ".find-blogme3-legendas-links")
;; Skel: (find-find-links-links-new "blogme3-legendas" "short stem hash pagestem" "")
;; Test: (find-blogme3-legendas-links)
;;
(defun find-blogme3-legendas-links (&optional short stem hash pagestem &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for blogme3-legendas."
  (interactive)
  (setq short (or short "{short}"))
  (setq stem (or stem "{stem}"))
  (setq hash (or hash "{hash}"))
  (setq pagestem (or pagestem "{pagestem}"))
  (apply
   'find-elinks
   `((find-blogme3-legendas-links ,short ,stem ,hash ,pagestem ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-blogme3-legendas-links)
     (find-efunction 'find-blogme3-links)
     (find-efunction 'find-blogme3-links ,stem)
     ""
     (kill-new ,stem)
     (find-blogme3 "anggmake.lua" "blogmestems" "2023-caepro0")
     (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}\"))
(defun u () (interactive) (find-blogme3-st-up-links \"{stem}\"))
(defun l () (interactive) (find-angg \"SUBTITLES/{stem}.lua\"))
(defun b () (interactive) (find-TH \"{stem}\"))
(defun p () (interactive) (find-TH \"{pagestem}\"))
;;     http://anggtwu.net/{pagestem}.html
;;     http://anggtwu.net/{stem}.html
;; file:///home/edrx/TH/L/{stem}.html
;;
;; (find-blogme3-legendas-links \"{short}\" \"{stem}\" \"{hash}\")
#]
[lua:
  require \"defs-2022\"    -- (find-blogme3 \"defs-2022.lua\")
  load_caepro2()         -- (find-blogme3 \"defs-2022.lua\" \"load_caepro2\")
  short_:add [[
    caepro      => (find-TH \"2023-caepro\")
    caepro      ->           2023-caepro.html

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

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

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

[P Mais informações aqui:
[BR] [_ caepro Sobre as reclamações do CAEPRO].
[BR] Pra assistir o vídeo clique ou no thumbnail abaixo
[BR] ou nas marcas de tempo nas legendas.
[BR] O título original deste vídeo era: \"[_ {short}-mp4 \"Isso muda alguma coisa?\" (Sobre as reclamações do CAEPRO)]\".
[BR] As legendas dele em Lua estão [_ {short}-lua aqui].
[BR] O PDF dele está [_ {short}-pdf aqui].
]

[NARROW
[PLEFT
  [FIG [__ {short}-video]
          IMAGES/{stem}-small.png]
]
]

[br]

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

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

]
]


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



;; «find-blogme3-st-up-links»  (to ".find-blogme3-st-up-links")
;; Skel: (find-find-links-links-new "blogme3-st-up" "stem" "")
;; Test: (find-blogme3-st-up-links "2023-visual-vs-auditivo")
;;
(defun find-blogme3-st-up-links (&optional stem &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for blogme3-st-up."
  (interactive)
  (setq stem (or stem "{stem}"))
  (let ((ee-buffer-name (or ee-buffer-name "*find-blogme3-st-up-links*")))
    (apply
     'find-elinks
     `((find-blogme3-st-up-links ,stem ,@pos-spec-list)
       ;; Convention: the first sexp always regenerates the buffer.
       (find-efunction 'find-blogme3-st-up-links)
       ""
       ,(ee-template0 "\
# (defun u () (interactive) (find-blogme3-st-up-links \"{stem}\"))
# (find-angg \"SUBTITLES/{stem}.lua\")
# (find-TH \"{stem}\")

* (sh-mode)
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
touch    ~/SUBTITLES/{stem}.lua
touch           ~/TH/{stem}.blogme
makeL1     SUBTITLES/{stem}.lua.html \\
                     {stem}.html

# file:///home/edrx/TH/L/{stem}.html

makeR1     SUBTITLES/{stem}.lua.html \\
                     {stem}.html

makeL
makeR
scp        SUBTITLES/{stem}.lua.html $LINP/SUBTITLES/{stem}.lua.html
scp                  {stem}.html               $LINP/{stem}.html
# http://anggtwu.net/{stem}.html
")
       )
     pos-spec-list)))



;; «find-cp-LUA-links»  (to ".find-cp-LUA-links")
;; Skel: (find-find-links-links-new "cp-LUA" "all" "first")
;; Test: (find-cp-LUA-links)
;;       (find-cp-LUA-links "Caepro4")
;;       (find-cp-LUA-links "ELpeg-cme1")
;;       (find-cp-LUA-links "ELpeg-cme1  ELpeg1 Globals1 PCall1 Show2 Subst1 Tree1")
;;       (find-cp-LUA-links "Caepro4  ELpeg1 Globals1 PCall1 Show2 Subst1 Tree1")
;; See:  (find-angg  "LUA/Deps1.lua")
;; Try:  (find-sh0 "~/LUA/Deps1.lua -runcps  Caepro4")
;;       (find-sh0 "~/LUA/Deps1.lua -runcps 'Caepro4 ELpeg-cme1'")
;;
(defun find-cp-LUA-links (&optional all &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for cp-LUA."
  (interactive)
  (setq all (or all "{all}"))
  (let* ((first (car (ee-split all))))
    (apply
     'find-elinks
     `((find-cp-LUA-links ,all ,@pos-spec-list)
       ;; Convention: the first sexp always regenerates the buffer.
       (find-efunction 'find-cp-LUA-links)
       ""
       (find-angg "LUA/Deps1.lua")
       ""
       ,(ee-template0 "\
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd ~/LUA/
for i in {all}; do cp -v $i.lua ~/LATEX/; done

# (find-sh0 \"cd ~/LUA/; for i in {all}; do cp -v $i.lua ~/LATEX/; done\")

* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)
  s0 = Set.from(keys(package.loaded))
  Path.prependtopath \"~/LUA/?.lua\"
  require \"{first}\"
  s1 = Set.from(split(\"{first} lpeg\"))
  s2 = Set.from(keys(package.loaded))
= s0:ksc(\" \")
= s2:ksc(\" \")
= (s2-s0):ksc(\" \")

= s1:ksc(\" \")
= (s2-s1-s0):ksc(\" \")
= \"{all}\"
")
       )
     pos-spec-list)))



;; «find-Deps1-links»  (to ".find-Deps1-links")
;; Skel: (find-find-links-links-new "Deps1" "mains" "")
;; See:  (find-angg "LUA/Deps1.lua")
;; Test: (find-Deps1-links)
;;       (find-Deps1-links "Caepro4 Estatistica1")
;;       (find-Deps1-cps   "Caepro4 Estatistica1")
;;       (find-Deps1-anggs "Caepro4 Estatistica1")
;;
(defun find-Deps1-links (&optional mains &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for Deps1."
  (interactive)
  (setq mains (or mains "{mains}"))
  (apply
   'find-elinks-elisp
   `((find-Deps1-links ,mains ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-Deps1-links)
     ""
     (find-Deps1-links "Caepro4 Estatistica1")
     (find-angg "LUA/Deps1.lua")
     ""
     ,(ee-template0 "\
(find-Deps1-links \"{mains}\")
(find-Deps1-cps   \"{mains}\")
(find-Deps1-anggs \"{mains}\")
(find-sh0 \"~/LUA/Deps1.lua -runcps '{mains}'\")
(defun cps () (interactive) (find-sh0 \"~/LUA/Deps1.lua -runcps '{mains}'\"))
")
     )
   pos-spec-list))

(defun find-Deps1-cps (mains)
  (find-sh0 (format "~/LUA/Deps1.lua -runcps '%s'" mains)))

(defun find-Deps1-list (mains)
  (find-sh0 (format "~/LUA/Deps1.lua -listfiles '%s'" mains)))

(defun find-Deps1-anggs (mains)
  (find-estring (find-sh0 (format "~/LUA/Deps1.lua -findanggs '%s'" mains))))




;;;      _                   ____  
;;;  ___| |__   _____      _|___ \ 
;;; / __| '_ \ / _ \ \ /\ / / __) |
;;; \__ \ | | | (_) \ V  V / / __/ 
;;; |___/_| |_|\___/ \_/\_/ |_____|
;;;                                
;; Moved to: (find-eev "eev-tlinks.el" "find-show2-links")
;; Moved to: (find-eev "eev-tlinks.el" "show2")



;; «find-godotref-links»  (to ".find-godotref-links")
;; Skel: (find-find-links-links-new "godotref" "Class Method" "class method")
;; Test: (find-godotref-links)
;;       (find-godotref-links "Expression" "parse")
;;
(defun find-godotref-links (&optional Class Method &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for godotref."
  (interactive)
  (setq Class (or Class "{Class}"))
  (setq Method (or Method "{Method}"))
  (let* ((class (downcase Class))
         (method (replace-regexp-in-string
		  "_" "-" (replace-regexp-in-string "^_" "" (downcase Method)))))
    (apply
     'find-elinks
     `((find-godotref-links ,Class ,Method ,@pos-spec-list)
       ;; Convention: the first sexp always regenerates the buffer.
       (find-efunction 'find-godotref-links)
       ""
       ,(ee-template0 "\
# (find-gd3docrfile \".files.rst\")
# (find-gd3docrsh \"grep    {Class} .files.rst\")
# (find-gd3docrsh \"grep -i {Class} .files.rst\")
# (find-gd3docrsh \"grep    {Method} .files.rst\")
# (find-gd3docrsh \"grep -i {Method} .files.rst\")
# (find-gd3docrgrep \"grep --color=auto -nH  --null -e {Class} $(cat .files.rst)\")
# (find-gd3docrgrep \"grep --color=auto -niH --null -e {Class} $(cat .files.rst)\")
# (find-gd3docrgrep \"grep --color=auto -nH  --null -e {Method} $(cat .files.rst)\")
# (find-gd3docrgrep \"grep --color=auto -niH --null -e {Method} $(cat .files.rst)\")
# (find-gd3docr \"classes/class_{class}\")
# (find-gd3doc \"classes/class_{class}\")
# (find-gd3doc \"classes/class_{class}#class-{class}-method-{method}\")
")
       )
     pos-spec-list)))



;; «find-defhydra-links»  (to ".find-defhydra-links")
;; Skel: (find-find-links-links-new "defhydra" "stem short" "")
;; Test: (find-defhydra-links)
;;
(defun find-defhydra-links (&optional stem short &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for defhydra."
  (interactive)
  (setq stem (or stem "{stem}"))
  (setq short (or short "{short}"))
  (apply
   'find-elinks-elisp
   `((find-defhydra-links ,stem ,short ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-defhydra-links)
     ""
     ,(ee-template0 "\
(defhydra hydra-{stem} (:hint nil)
  \"
_q_uit        _r_edir
 _a_rchive   _d_elorig
^^            _c_lear fbclids
\"
  (\"r\" (progn (eek \"C-a\") (ee-read-redir)))
  (\"d\" (eek \"C-a <up> C-a C-k C-k\"))
  ;;
  (\"<down>\"   (eek \"<down>\"))
  ;;
  (\"q\" nil)
  )

(defun {short} ()
  (interactive)
  (hydra-{stem}/body))
")
     )
   pos-spec-list))



;; «find-rsynccamera-links»  (to ".find-rsynccamera-links")
;; Skel:     (find-find-links-links-new "rsynccamera" "localdir yyyy mm dd" "")
;; Based on: (find-efunction 'find-mtp-links)
;; Used by:  (find-efunction 'find-copy-quadros-links)
;; Test:     (find-rsynccamera-links)
;;
(defun find-rsynccamera-links (&optional localdir yyyy mm dd &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for rsynccamera."
  (interactive)
  (setq localdir (or localdir "/tmp/phone-camera/"))
  (setq yyyy (or yyyy (format-time-string "%Y")))
  (setq mm   (or mm   (format-time-string "%m")))
  (setq dd   (or dd   (format-time-string "%d")))
  (apply
   'find-elinks
   `((find-rsynccamera-links ,localdir ,yyyy ,mm ,dd ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-rsynccamera-links)
     (find-angg ".zshrc" "termux")
     ""
     ,(ee-template0 "\
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# (find-fline \"{localdir}\")
mkdir -p {localdir}
cd       {localdir}
exporttermuxvars
exporttermuxvars echo
echo rsync -avv -e \"$TERMUXE\" \"$TERMUXCAMERA/{yyyy}{mm}{dd}*.jpg\" .
     rsync -avv -e \"$TERMUXE\" \"$TERMUXCAMERA/{yyyy}{mm}{dd}*.jpg\" .
")
     )
   pos-spec-list))



;; «find-eev-new-el-file-links»  (to ".find-eev-new-el-file-links")
;; Skel: (find-find-links-links-new "eev-new-el-file" "stem" "")
;; Test: (find-eev-new-el-file-links "eev-lean4")
;;
(defun find-eev-new-el-file-links (&optional stem &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for eev-new-el-file."
  (interactive)
  (setq stem (or stem "{stem}"))
  (apply
   'find-elinks-elisp
   `((find-eev-new-el-file-links ,stem ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-eev-new-el-file-links)
     ""
     ,(ee-template0 "\
;; (kill-new \"  eev-current/{stem}.el\")
;; (find-blogme3file \"anggmake.lua\" \"eev-current/eev-blinks.el\")
;; (find-eev \"{stem}.el\")

;; (kill-new \"(require '{stem})  ; (find-eev \\\"{stem}.el\\\")\")
;; (find-eev \"eev-load.el\" \"load-the-main-modules\" \"eev-kla\")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd /tmp/eev-g/
cp -v ~/eev-current/{stem}.el .
git add {stem}.el
# (magit-status \"/tmp/eev-g/\")


;; (ee-copy-rest 1 '(find-eev \"{stem}.el\"))

;;; {stem}.el -- ???.  -*- lexical-binding: nil; -*-

;; Copyright (C) 2022-2023 Free Software Foundation, Inc.
;;
;; This file is part of GNU eev.
;;
;; GNU eev is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;;
;; GNU eev is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;; GNU General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
;;
;; Author:     Eduardo Ochs <eduardoochs@gmail.com>
;; Maintainer: Eduardo Ochs <eduardoochs@gmail.com>
;; Version:    20231202
;; Keywords:   e-scripts
;;
;; Latest version: <http://anggtwu.net/eev-current/{stem}.el>
;;       htmlized: <http://anggtwu.net/eev-current/{stem}.el.html>
;;       See also: <http://anggtwu.net/eev-current/eev-beginner.el.html>
;;                 <http://anggtwu.net/eev-intros/find-kla-intro.html>
;;                                               (find-kla-intro)

;;; Comment:

;;

(provide '{stem})

;; Local Variables:
;; coding:            utf-8-unix
;; no-byte-compile:   t
;; End:
")
     )
   pos-spec-list))



;; «find-tikz2-links»  (to ".find-tikz2-links")
;; Skel: (find-find-links-links-new "tikz2" "" "")
;; Test: (find-tikz2-links)
;;
(defun find-tikz2-links (&rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for tikz2."
  (interactive)
  (apply
   'find-elinks
   `((find-tikz2-links ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-tikz2-links)
     ""
     ,(ee-template0 "\
** (find-angg \"LUA/Tikz2.lua\")
** (find-angg \"LUA/Show2.lua\" \"texbody\")
* (show2-use \"~/LATEX/Show2.tex\")
* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)
loadtikz2()

-- usetikzlibraries.positioning = \"positioning\"
-- tikzoptions.place = [[ place/.style={<}circle,draw=blue!50,fill=blue!20,thick{>} ]]

tikzbody = Dang.from [[
  \\draw[thick,rounded corners=8pt]
  (0,0)--(0,2)--(1,3.25)--(2,2)--(2,0)--(0,2)--(2,2)--(0,0)--(2,0);
]]

= show00()
= show0()
= show()
* (etv)

= Show.bigstr
= Show.log

")
     )
   pos-spec-list))

(defun tikz2 ()
  (interactive)
  (find-2a nil '(find-tikz2-links)))



;; «find-screenkey-links»  (to ".find-screenkey-links")
;; Skel: (find-find-links-links-new "screenkey" "" "")
;; Test: (find-screenkey-links)
;;
(defun find-screenkey-links (&rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for screenkey."
  (interactive)
  (apply
   'find-elinks
   `((find-screenkey-links ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-screenkey-links)
     ""
     ,(ee-template0 "\
# (find-es \"screencasts\" \"screenkey\")
# (find-debpkg-links \"screenkey\")
# (find-status   \"screenkey\")
# (find-vldifile \"screenkey.list\")
# (find-udfile   \"screenkey/\")
# (code-c-d \"screenkey\" \"/usr/lib/python3/dist-packages/Screenkey/\")
# (find-screenkeyfile \"\")
# (find-man \"1 screenkey\")
# (find-sh \"screenkey --help\")
# (find-sh \"screenkey --help\" \"--font-size\")
# (find-sh \"screenkey --help\" \"--font-size\" \"--opacity OPACITY\")

* (eepitch-shell3)
* (eepitch-kill)
* (eepitch-shell3)
screenkey -s small --mods-mode emacs --opacity 0.2 --timeout 0.5 &
killall screenkey

* (eepitch-shell3)
killall screenkey
")
     )
   pos-spec-list))



;; «find-tikzsearch2-links»  (to ".find-tikzsearch2-links")
;; Skel: (find-find-links-links-new "tikzsearch2" "page string" "string-")
;; Test: (find-tikzsearch2-links)
;;
(defun find-tikzsearch2-links (&optional page string &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for tikzsearch2."
  (interactive)
  (setq page (or page "{page}"))
  (setq string (or string "{string}"))
  (let* ((string- (replace-regexp-in-string "^[0-9. ]*" "" string)))
    (apply
     'find-elinks
     `((find-tikzsearch2-links ,page ,string ,@pos-spec-list)
       ;; Convention: the first sexp always regenerates the buffer.
       (find-efunction 'find-tikzsearch2-links)
       ""
       ,(ee-template0 "\
# (find-tikzmanpage {page} \"{string}\")
# (find-tikzmantext {page} \"{string}\")
# (find-tikzmangrep \"grep --color=auto -nRH --null -e '{string-}' *.tex\")

# (find-tikzmanpage 3 \"Contents\")
# (find-tikzmantext 3 \"Contents\")
# (find-tikzmanpage 3 \"Contents\" \"{string}\")
# (find-tikzmantext 3 \"Contents\" \"{string}\")
# (find-tikzmanpage 3 \"Contents\" \"{string-}\")
# (find-tikzmantext 3 \"Contents\" \"{string-}\")

# (find-angg \".emacs.papers\" \"tikz\")
# (find-angg \".emacs.papers\" \"tikz\" \"{string}\")
# (kill-new \"{string}\")
# (find-tikzmanpage 3 \"Contents\")
# (find-tikzmantext 3 \"Contents\")
# (find-tikzmanpage 3 \"Contents\" \"{string-}\")
# (find-tikzmantext 3 \"Contents\" \"{string-}\")
# (find-tikzmanpage 3 \"Contents\" \"{string}\")
# (find-tikzmantext 3 \"Contents\" \"{string}\")
# (find-tikzmanpage 1235 \"Index\")
# (find-tikzmantext 1235 \"Index\")
# (find-tikzmanpage 1235 \"Index\" \"{string}\")
# (find-tikzmantext 1235 \"Index\" \"{string}\")
# (find-tikzgitfile \"\")
# (find-tikzmanfile \"\")
# (find-tikzgittgpfile \"\")
# (find-tikzgitgrep \"grep --color=auto -nRH --null -e '{string-}' *\")
# (find-tikzmangrep \"grep --color=auto -nRH --null -e '{string-}' *.tex\")
# (find-tikzgittgpgrep \"grep --color=auto -nRH --null -e '{string-}' *\")
# https://github.com/pgf-tikz/pgf
# https://github.com/pgf-tikz/pgf/tree/master/
")
       )
     pos-spec-list)))

;; See: (find-angg "elisp/klapt.el")
(defun ee-sexp-eol-nth (n)
  (ee-goto-eol)
  (nth n (read (ee-last-sexp))))

(defun tiks2 ()
  (interactive)
  (find-tikzsearch2-links
   (eval (ee-sexp-eol-nth 1))
   (ee-sexp-eol-nth 2)))


;; <find-luareset-links>
;; Skel: (find-find-links-links-new "luareset" "" "")
;; Test: (find-luareset-links)
;;
(defun find-luareset-links (&rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for luareset."
  (interactive)
  (apply
   'find-elinks
   `((find-luareset-links ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-luareset-links)
     ""
     ,(ee-template0 "\
* (setenv \"LUA_INIT\" \"@/home/edrx/LUA/lua50init.lua\")
* (setenv \"LUA_PATH\"  \"/home/edrx/LUA/?.lua;;\")
* (setenv \"LUA_PATH\" nil)
")
     )
   pos-spec-list))

(defalias 'luareset 'find-luareset-links)

;; «find-luaso-links»  (to ".find-luaso-links")
;; Moved to: (find-eev "eev-tlinks.el" "find-luaso-links")

;; «find-let*-macro-links»  (to ".find-let*-macro-links")
;; Moved to: (find-eev "eev-tlinks.el" "find-let*-macro-links")





;; «find-luawget-links»  (to ".find-luawget-links")
;; See:   (to "find-luademo-links")
;; Skel:  (find-find-links-links-new "luawget" "stems" "stemsc wgets Main main")
;; Tests: (find-luawget-links "Dang1 CLua1")
;;        (find-luawget-links "Tos3")
;;
(defun find-luawget-links (&optional stems &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for luawget."
  (interactive)
  (setq stems (or stems "{stems}"))
  (let* ((stemsc (replace-regexp-in-string " " "," stems))
         (wgets (mapconcat
		 (lambda (stem) (format "wget http://anggtwu.net/LUA/%s.lua\n" stem))
		 (ee-split stems)))
         (Main (car (reverse (ee-split stems))))
         (main (downcase Main)))
    (apply
     'find-elinks
     `((find-luawget-links ,stems ,@pos-spec-list)
       ;; Convention: the first sexp always regenerates the buffer.
       (find-efunction 'find-luawget-links)
       ""
       ,(ee-adjust-red-stars (ee-template0 "\
* (ee-use-red-stars)
* (ee-use-red-bullets)
** (find-Deps1-cps   \"{Main}\")
** (find-Deps1-anggs \"{Main}\")
** (find-Deps1-cps   \"{stems}\")
** (find-Deps1-anggs \"{stems}\")
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd ~/LUA/
scp {<}lua50init,{stemsc}{>}.lua $LINP/LUA/



* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
rm -Rfv /tmp/{main}/
mkdir   /tmp/{main}/
cd      /tmp/{main}/
cp -v ~/LUA/{<}lua50init,{stemsc}{>}.lua .
wget http://anggtwu.net/LUA/lua50init.lua
{wgets}\

** Make `find-{main}', LUA_INIT and LUA_PATH point to /tmp/{main}/:
* (code-c-d \"{main}\"    \"/tmp/{main}/\" :anchor)
* (setenv \"LUA_INIT\" \"@/tmp/{main}/lua50init.lua\")
* (setenv \"LUA_PATH\"  \"/tmp/{main}/?.lua;;\")

** If you know how to use test blocks, try these ones:
** (find-{main} \"{Main}.lua\")

** A test \"from the outside\":
* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)
require \"{Main}\"   -- (find-{main} \"{Main}.lua\")



** (luareset)
** (find-blogme3-links \"{Main}\")
** (find-TH \"{Main}\")
** (find-sshot-links \"5\" \"2024-{Main}\")

"))
       )
     pos-spec-list)))



;; «eewrap-require»  (to ".eewrap-require")
;; Skel: (find-eewrap-links "U" "require" "stem")
;; Test: (find-eewraptest-links "require" "ELpeg1")
;;
(defun  eewrap-require () (interactive)
  (ee-this-line-wrapn 1 'ee-wrap-require))
(defun ee-wrap-require (stem)
  "An internal function used by `eewrap-require'."
  (ee-template0 "\
Path.addLUAtopath()
require \"{stem}\"    -- (find-angg \"LUA/{stem}.lua\")"))


;; «find-termux-links»  (to ".find-termux-links")
;; Skel: (find-find-links-links-new "termux" "ip yyyy mm dd" "")
;; Test: (find-termux-links)
;;  See: (find-angg ".emacs" "eepitch-termux")
;;       (find-angg ".zshrc" "termux")
;;
(defun find-termux-links (&optional ip yyyy mm dd &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for termux."
  (interactive)
  (setq ip   (or ip   "{ip}"))
  (setq yyyy (or yyyy (format-time-string "%Y")))
  (setq mm   (or mm   (format-time-string "%m")))
  (setq dd   (or dd   (format-time-string "%d")))
  (apply
   'find-elinks
   `((find-termux-links ,ip ,yyyy ,mm ,dd ,@pos-spec-list)
     (find-termux-links ,(getenv "TERMUXIP") ,yyyy ,mm ,dd ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-termux-links)
     (find-es "termux" "rsync-phonecamera")
     (find-es "termux" "rsync-wpvideos")
     (find-es "termux" "rsync-wpimages")
     (find-efunction 'find-mtp-links)
     ""
     ,(ee-template0 "\
 rmnet5: (find-termux-links \"10.5.248.220\")
 rndis0: (find-termux-links \"192.168.42.129\")
 wlan0:  (find-termux-links \"192.168.1.3\")

* (tm-setenv \"TERMUXIP\" \"{ip}\")
* (tm-setenv \"TERMUXUSER\" \"u0_a037\")
* (tm-setenv \"TERMUXE\"    \"ssh -l [TERMUXUSER] -p 8022\")
* (tm-setenv \"TERMUXSSH\"  \"ssh://[TERMUXUSER]@[TERMUXIP]:8022\")
*
* (tm-setenv \"TMTRAMP\"      \"/scp:[TERMUXUSER]@[TERMUXIP]#8022:\")
* (tm-setenv \"TMTRAMPCAM\"   \"[TMTRAMP]/storage/emulated/0/DCIM/Camera\")
* (tm-setenv \"TMTRAMPSCR\"   \"[TMTRAMP]/storage/emulated/0/DCIM/Screenshots\")
* (tm-setenv \"TMTRAMPWP\"    \"[TMTRAMP]/storage/emulated/0/Android/media/com.whatsapp/Whatsapp\")
* (tm-setenv \"TMTRAMPWPI\"   \"[TMTRAMPWP]/Media/WhatsApp Images\")
* (tm-setenv \"TMTRAMPWPV\"   \"[TMTRAMPWP]/Media/WhatsApp Video\")
* (tm-setenv \"TMTRAMPHOME\"  \"[TMTRAMP]/data/data/com.termux/files/home\")
* (code-c-d  \"tmtrampcam\"   (tm-expand \"[TMTRAMPCAM]/\"))
* (code-c-d  \"tmtrampscr\"   (tm-expand \"[TMTRAMPSCR]/\"))
* (code-c-d  \"tmtrampwpi\"   (tm-expand \"[TMTRAMPWPI]/\"))
* (code-c-d  \"tmtrampwpv\"   (tm-expand \"[TMTRAMPWPV]/\"))
* (code-c-d  \"tmtramphome\"  (tm-expand \"[TMTRAMPHOME]/\"))
** (find-tmtrampcamfile \"\")
** (find-tmtrampscrfile \"\")
** (find-tmtrampwpifile \"\")
** (find-tmtrampwpvfile \"\")
** (find-tmtramphomefile \"\")
** (find-tmtramphomefile \".bashrc\")
**
** (find-fline \"$TMTRAMPCAM\")
** (find-fline \"$TMTRAMPSCR\")
** (find-fline \"$TMTRAMPWPI\")
** (find-fline \"$TMTRAMPWPV\")
** (find-fline \"$TMTRAMPHOME\")
*
* (tm-setenv \"TMRSYNC\"      \"[TERMUXIP]\")
* (tm-setenv \"TMRSYNSSH\"    \"ssh -l [TERMUXUSER] -p 8022\")
* (tm-setenv \"TMRSYNCCAM\"   \"[TMRSYNC]:/storage/emulated/0/DCIM/Camera\")
* (tm-setenv \"TMRSYNCSCR\"   \"[TMRSYNC]:/storage/emulated/0/DCIM/Screenshots\")
* (tm-setenv \"TMRSYNCWP\"    \"[TMRSYNC]:/storage/emulated/0/Android/media/com.whatsapp/Whatsapp\")
* (tm-setenv \"TMRSYNCWPI\"   \"[TMRSYNCWP]/Media/WhatsApp\\\\ Images\")
* (tm-setenv \"TMRSYNCWPV\"   \"[TMRSYNCWP]/Media/WhatsApp\\\\ Video\")

edrx

(find-es \"termux\" \"rsync-phonecamera\")
(find-es \"termux\" \"rsync-wpvideos\")
(find-es \"termux\" \"rsync-wpimages\")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
** (find-tmtrampcamfile \"\")
** (find-tmtrampcamfile \"\" \"{yyyy}{mm}{dd}\")
# (find-fline \"/tmp/phone-camera/\" \"{yyyy}{mm}{dd}\")
mkdir -p       /tmp/phone-camera/
cd             /tmp/phone-camera/
echo rsync -avv -e \"$TERMUXE\" \"$TMRSYNCCAM/{yyyy}{mm}{dd}*.jpg\" .
     rsync -avv -e \"$TERMUXE\" \"$TMRSYNCCAM/{yyyy}{mm}{dd}*.jpg\" .

# (find-fline \"/sda1/home/phone-backup/camera-videos/\")
cd             /sda1/home/phone-backup/camera-videos/
     rsync -avv -e \"$TERMUXE\" \"$TMRSYNCCAM/{yyyy}{mm}{dd}*.mp4\" .

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
** (find-tmtrampwpvfile \"\")
** (find-tmtrampwpvfile \"\" \"{yyyy}{mm}{dd}\")
# (find-fline \"/sda1/home/phone-backup/whatsapp-video/\")
# (find-fline \"/sda1/home/phone-backup/whatsapp-video/\" \"{yyyy}{mm}{dd}\")
cd             /sda1/home/phone-backup/whatsapp-video/
echo rsync -avv -e \"$TERMUXE\" \"$TMRSYNCWPV/VID-{yyyy}{mm}{dd}*\" .
     rsync -avv -e \"$TERMUXE\" \"$TMRSYNCWPV/VID-{yyyy}{mm}{dd}*\" .

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
** (find-tmtrampwpifile \"\")
** (find-tmtrampwpifile \"\" \"{yyyy}{mm}{dd}\")
# (find-fline \"/sda1/home/phone-backup/whatsapp-images/\")
# (find-fline \"/sda1/home/phone-backup/whatsapp-images/\" \"{yyyy}{mm}{dd}\")
cd             /sda1/home/phone-backup/whatsapp-images/
echo rsync -avv -e \"$TERMUXE\" \"$TMRSYNCWPI/IMG-{yyyy}{mm}{dd}*\" .
     rsync -avv -e \"$TERMUXE\" \"$TMRSYNCWPI/IMG-{yyyy}{mm}{dd}*\" .

")
     )
   pos-spec-list))

;; «tm-expand»  (to ".tm-expand")
;; «tm-setenv»  (to ".tm-setenv")
;; (tm-setenv   "FOO" "_[HOME]_")
;; (tm-setenv   "FOO" "_${HOME}_")
;; (tm-regexp)
;; (tm-expand "_[HOME]_${HOME}_")
;;
(defun tm-regexp () (rx  "[" (* (not (any "[]"))) "]"))

(defun tm-expand (str)
  (replace-regexp-in-string
   (tm-regexp)
   (lambda (s) (or (getenv (substring s 1 -1)) ""))
   str 'fixedcase 'literal))

(defun tm-setenv (variable value)
  (setenv variable (tm-expand value)))

;; (defun ee-termux-replace (str)
;;   (replace-regexp-in-string
;;    (tm-regexp)
;;    (lambda (s) (or (getenv (substring s 1 -1)) ""))
;;    str 'fixedcase 'literal))



;; «find-npm-links»  (to ".find-npm-links")
;; Skel: (find-find-links-links-new "npm" "pkg" "")
;; Test: (find-npm-links)
;;
(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)
     ""
     ,(ee-template0 "\
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# (find-sh \"find node_modules | sort\")
npm uninstall {pkg}
npm   install {pkg}
npm ls
npm      view {pkg}

* (eepitch-nodejs)
* (eepitch-kill)
* (eepitch-nodejs)
ohmjs = require('{pkg}');
require.resolve('{pkg}');
require;
")
     )
   pos-spec-list))



;; «find-my-mode-links»  (to ".find-my-mode-links")
;; Skel: (find-find-links-links-new "my-mode" "" "")
;; Test: (find-my-mode-links)
;;  See: (find-angg ".emacs" "my-mode")
;;
(defun find-my-mode-links (&rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for my-mode."
  (interactive)
  (apply
   'find-elinks-elisp
   `((find-my-mode-links ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-my-mode-links)
     ""
     (define-key my-mode-map (kbd "M-,") 'ee-compose-pair)
     (define-key my-mode-map (kbd "M-,") nil)
     ""
     (find-eaproposf "my-mode")
     (find-eaproposv "my-mode")
     (find-efunction 'my-mode)
     (find-angg ".emacs" "my-mode")
     (find-eaproposf "keymap")
     (find-eminorkeymapdescr 'my-mode)
     (find-eminorkeymapdescr 'eev-mode)
     (find-angg ".emacs" "eev-compose-hash")
     ""
     ,(ee-template0 "\
")
     )
   pos-spec-list))

(defalias 'mym 'find-my-mode-links)



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

(defun ee-find-show2-use-links (&optional fname)
  (setq fname (or fname "{fname}"))
  `((find-efunction 'find-show2-use-links)
    (find-efunction 'ee-find-show2-use-links)
    (find-show2-intro "3. Show2.lua")
    (find-show2-intro "3.1. A minimal example")
    (find-angg "LUA/lua50init.lua" "loadshow2")
    (find-angg "LUA/Show2.lua")
    (find-angg "LUA/Show2.lua" "usepackages")
    "
* (show2-use \"/tmp/Show2.tex\")
* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)
loadshow2()
body = [[ HELLO ]]
= body:show()
* (etv)
"))




;; «find-etv-links»  (to ".find-etv-links")
;; Skel: (find-find-links-links-new "etv" "" "")
;; Test: (find-etv-links)
;;
(defun find-etv-links (&rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for etv."
  (interactive)
  (apply
   'find-elinks
   `((find-etv-links ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-etv-links)
     ""
     ,@(ee-find-etv-links)
     )
   pos-spec-list))

(defun ee-find-etv-links (&rest rest)
  `((find-efunction 'find-etv-links)
    (find-efunction 'ee-find-etv-links)
    (find-show2-intro "3.1. A minimal example")
    (find-show2-use "/tmp/Show2.tex")
    (find-show2-use "/tmp/Show2.tex" 2 "defun etv")
    "
= outertexbody
= outertexbody.bigstr
= Show.bigstr
= Show.log
* (etv)
"))


;; «find-luatree-links»  (to ".find-luatree-links")
;; Skel: (find-find-links-links-new "luatree" "" "")
;; Test: (find-luatree-links)
;;
(defun find-luatree-links (&rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for luatree."
  (interactive)
  (apply
   'find-elinks
   `((find-luatree-links ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-luatree-links)
     ""
     (find-es "maxima" "luatree")
     ""
     ,(ee-template0 "\
* (eepitch-maxima)
* (eepitch-kill)
* (eepitch-maxima)
** (find-angg \"luatree/luatree.mac\")
load       (\"~/luatree/luatree.mac\");
MV2 : 'integrate(fp(g(x))*gp(x), x, a, b) = 'integrate(fp(u), u, g(a), g(b));
luatree  (MV2);
luatree1d(luatree1d);
luatree  (luatree1d);
          luatree1d;
luatree  (luatree);
          luatree;

:lisp #$MV2$
")
     )
   pos-spec-list))



;; «find-lean-links»  (to ".find-lean-links")
;; Skel: (find-find-links-links-new "lean" "str" "")
;; Test: (find-lean-links)
;;       (find-lean-links "Quantifiers and Equality")
;;
(defalias 'fll 'find-lean-links)

(defun find-lean-links (&optional secname &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for lean."
  (interactive)
  (setq secname (or secname "{secname}"))
  (apply
   'find-elinks
   `((find-lean-links ,secname ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-lean-links)
     ""
     (find-angg ".emacs" "lean4")
     (find-angg ".emacs.papers" "fplean4")
     (find-angg ".emacs.papers" "tpinlean4" ,secname)
     (find-es "lean" ,secname)
     ,(ee-template0 "
# (find-es \"lean\" \"tpinlean4\")
# (find-leanbook-links 'leanmeta {(ee-S secname)})
# (find-leanbook-links 'fplean4 \"{secname}\")
# (find-leanbook-links 'lean4 \"{secname}\")
# (find-leanbook-links 'tpil4 \"{secname}\")
# (find-ebuffer \"*lean4-lsp::stderr*\")

# Functional Programming in Lean4:
# (find-eev \"eev-lean4.el\" \"ee-leandoc-:fplean4\")

# Lean manual:
# (find-eev \"eev-lean4.el\" \"ee-leandoc-:lean4\")

# Metaprogramming in Lean4:
# (find-eev \"eev-lean4.el\" \"ee-leandoc-:leanmeta\")

# Prelude (and other libraries):
# (find-lean4prefile \"\")
# (find-lean4presh \"find * | sort\")
# (find-lean4pregrep \"grep --color=auto -nRH --null -e '{secname}' *\")
# (find-lean4pregrep \"grep --color=auto -nRH --null -e '\\\" {secname} \\\"' *\")

# Theorem Proving in Lean4:
# (find-eev \"eev-lean4.el\" \"ee-leandoc-:tpil4\")
# (find-tpil4docrgrep \"grep --color=auto -nRH --null -e '{secname}' *\")
")
     )
   pos-spec-list))


;; «find-twitter-links»  (to ".find-twitter-links")
;; Skel: (find-find-links-links-new "twitter" "str" "qstr")
;; Test: (find-twitter-links)
;;       (find-twitter-links "@sairasameerarao saddest")
;;
(defun find-twitter-links (&optional str &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for twitter."
  (interactive)
  (setq str (or str "{str}"))
  (let* ((qstr (url-hexify-string str)))
    (apply
     'find-elinks
     `((find-twitter-links ,str ,@pos-spec-list)
       ;; Convention: the first sexp always regenerates the buffer.
       (find-efunction 'find-twitter-links)
       ""
       ,(ee-template0 "\
# https://twitter.com/search?q={qstr}&src=typed_query
")
       )
     pos-spec-list)))



;; «find-pdfanim-links»  (to ".find-pdfanim-links")
;; Skel: (find-find-links-links-new "pdfanim" "dir prefix all delay density" "fulldir")
;; Test: (find-pdfanim-links)
;;       (find-pdfanim-links "/tmp/qdraw/" "a_" "all")
;;
(defun find-pdfanim-links (&optional dir prefix all delay density &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for pdfanim."
  (interactive)
  (setq dir (or dir "{dir}"))
  (setq prefix (or prefix "{prefix}"))
  (setq all (or all "{all}"))
  (setq delay (or delay 50))
  (setq density (or density 75))
  (let* ((fulldir (ee-expand dir)))
    (apply
     'find-elinks
     `((find-pdfanim-links ,dir ,prefix ,all ,delay ,density ,@pos-spec-list)
       (find-pdfanim-links ,dir ,prefix ,all "{delay}" "{density}" ,@pos-spec-list)
       ;; Convention: the first sexp always regenerates the buffer.
       (find-efunction 'find-pdfanim-links)
       ""
       (find-anggfile "LUA/QPDFMerge.lua" "qpdf --empty --pages")
       (find-es "imagemagick" "pdf-to-animated-gif")
       (find-es "maxima" "log-constants-anim")
       (find-fline ,dir)
       ""
       ,(ee-template0 "\
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# (find-fline \"{dir}\")

laf {dir}
cd  {dir}
                       for i in {prefix}*.pdf; do echo $i 1-z; done
qpdf --empty --pages $(for i in {prefix}*.pdf; do echo $i 1-z; done) -- {all}.pdf
laf
convert -alpha deactivate -verbose -delay {delay} -loop 0 -density {density} \\
  {all}.pdf {all}.gif
laf

# (find-fline    \"/tmp/qdraw/\" \"all.pdf\")
# (find-pdf-page \"/tmp/qdraw/all.pdf\")
# file://{fulldir}{all}.gif
")
       )
     pos-spec-list)))




;; «find-qrencode-links»  (to ".find-qrencode-links")
;; Skel: (find-find-links-links-new "qrencode" "urls" "")
;; Test: (find-qrencode-links)
;; Test: (find-qrencode-links "http://anggtwu.net/2023-precisamos-de-mais-slogans.html")
;;
(defun find-qrencode-links (&optional url &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for qrencode."
  (interactive)
  (setq url (or url "{url}"))
  (apply
   'find-elinks
   `((find-qrencode-links ,url ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-qrencode-links)
     ""
     (find-es "qrcode" "qrencode")
     ""
     ,(ee-template0 "\
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
qrencode           -s 8 -o /tmp/q1.png {url}
qrencode      -m 4 -s 8 -o /tmp/q2.png {url}
qrencode -l H -m 4 -s 8 -o /tmp/q3.png {url}

* (ee-kill-buffer \"q1.png\")
* (ee-kill-buffer \"q2.png\")
* (ee-kill-buffer \"q3.png\")
* (find-2a nil '(find-fline \"/tmp/q1.png\"))
* (find-2a nil '(find-fline \"/tmp/q2.png\"))
* (find-2a nil '(find-fline \"/tmp/q3.png\"))

(find-wset \"13o2_o_o\"
  ' (find-fline \"/tmp/q1.png\")
  ' (find-fline \"/tmp/q2.png\")
  ' (find-fline \"/tmp/q3.png\")
  )
")
     )
   pos-spec-list))



;;;  _                           _      _            
;;; | | ___  __ _ _ __  _ __ ___| |_ __| | ___   ___ 
;;; | |/ _ \/ _` | '_ \| '__/ __| __/ _` |/ _ \ / __|
;;; | |  __/ (_| | | | | |  \__ \ || (_| | (_) | (__ 
;;; |_|\___|\__,_|_| |_|_|  |___/\__\__,_|\___/ \___|
;;;                                                  
;; «find-leanrstdoc-links»  (to ".find-leanrstdoc-links")
;; Moved to: (find-eev "eev-lean4.el" "find-leanrstdoc-links")



;;;  _                  _     _             _ 
;;; | | ___  __ _ _ __ | |__ | |_ _ __ ___ | |
;;; | |/ _ \/ _` | '_ \| '_ \| __| '_ ` _ \| |
;;; | |  __/ (_| | | | | | | | |_| | | | | | |
;;; |_|\___|\__,_|_| |_|_| |_|\__|_| |_| |_|_|
;;;                                           
;; «find-leanhtml-links»  (to ".find-leanhtml-links")
;; Skel: (find-find-links-links-new "leanhtml" "fname" "fname- localurl")
;; Test: (find-leanhtml-links)
;;
(defun find-leanhtml-links (&optional fname &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for leanhtml."
  (interactive)
  (setq fname (or fname (buffer-file-name) "{fname}"))
  (let* ((fname- (replace-regexp-in-string "/home/edrx/" "" (ee-expand fname)))
         (localurl (ee-fname-to-url fname)))
    (apply
     'find-elinks
     `((find-leanhtml-links ,fname ,@pos-spec-list)
       (find-leanhtml-links "~/LEAN/luatree2.lean")
       ;; Convention: the first sexp always regenerates the buffer.
       (find-efunction 'find-leanhtml-links)
       ""
       ,(ee-template0 "\
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
pygmentize -O full \\
  -o {fname}.pyg.html \\
     {fname}
laf  {fname}*

# {localurl}.pyg.html
# (brg \"{localurl}.pyg.html\")
# (find-fline \"{fname}\")

scp -v {fname}.pyg.html $LINP/{fname-}.pyg.html
scp -v {fname}.pyg.html $LINS/{fname-}.pyg.html
# http://anggtwu.net/{fname-}.pyg.html

")
       )
     pos-spec-list)))



;;;                    _     _             _ 
;;;  _ __  _   _  __ _| |__ | |_ _ __ ___ | |
;;; | '_ \| | | |/ _` | '_ \| __| '_ ` _ \| |
;;; | |_) | |_| | (_| | | | | |_| | | | | | |
;;; | .__/ \__, |\__, |_| |_|\__|_| |_| |_|_|
;;; |_|    |___/ |___/                       
;;
;; «find-pyghtml-links»  (to ".find-pyghtml-links")
;; Skel: (find-find-links-links-new "pyghtml" "fname" "fname- localurl")
;; Test: (find-pyghtml-links)
;;
(defun find-pyghtml-links (&optional fname &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for pyghtml."
  (interactive)
  (setq fname (or fname (buffer-file-name) "{fname}"))
  (let* ((fname- (replace-regexp-in-string "/home/edrx/" "" (ee-expand fname)))
         (localurl (ee-fname-to-url fname)))
    (apply
     'find-elinks
     `((find-pyghtml-links ,fname ,@pos-spec-list)
       (find-pyghtml-links "~/LEAN/luatree2.lean")
       ;; Convention: the first sexp always regenerates the buffer.
       (find-efunction 'find-pyghtml-links)
       ""
       ,(ee-template0 "\
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
pygmentize -O full \\
  -o {fname}.pyg.html \\
     {fname}
laf  {fname}*

# {localurl}.pyg.html
# (brg \"{localurl}.pyg.html\")
# (find-fline \"{fname}\")

scp -v {fname}.pyg.html $LINP/{fname-}.pyg.html
scp -v {fname}.pyg.html $LINS/{fname-}.pyg.html
# http://anggtwu.net/{fname-}.pyg.html
")
       )
     pos-spec-list)))




;; «find-leanbook-links»  (to ".find-leanbook-links")
;; Moved to: (find-eev "eev-lean4.el" "find-leanbook-links")




;; «find-leanquestion-links»  (to ".find-leanquestion-links")
;; Skel: (find-find-links-links-new "leanquestion" "url title titl" "date")
;; Test: (find-leanquestion-links)
;;
(defun find-leanquestion-links (&optional url title titl &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for leanquestion."
  (interactive)
  (setq url (or url "{url}"))
  (setq title (or title "{title}"))
  (setq titl (or titl "{titl}"))
  (let* ((date (date-as-string)))
    (apply
     'find-elinks
     `((find-leanquestion-links ,url ,title ,titl ,@pos-spec-list)
       ;; Convention: the first sexp always regenerates the buffer.
       (find-efunction 'find-leanquestion-links)
       ""
       ,(ee-template0 "\

(find-leanquestion-links
  \"https://leanprover.zulipchat.com/#narrow/stream/113489-new-members/topic/A.20minimal.20state.20monad.3F/near/446269145\"
  \"A minimal state monad?\"
  \"minimal-state-monad\")

(find-2a nil '(find-TH \"eev-lean4\"))
(find-2a nil '(find-TH \"eev-lean4\" \"questions\"))

    question-{titl}-e          => (find-es \"lean\" \"checksyntax\")
    question-{titl}-z          -> {url}

  [J [ze {titl}]
     ({date}) {title}
  ]


")
       )
     pos-spec-list)))




;; «find-wrap-links»  (to ".find-wrap-links")
;; Skel: (find-find-links-links-new "wrap" "" "")
;; Test: (find-wrap-links)
;;
(defun find-wrap-links (&rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for wrap."
  (interactive)
  (apply
   'find-elinks
   `((find-wrap-links ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-wrap-links)
     ""
     (find-es "emacs" "buffer-local")
     (find-angg ".emacs" "wrap")
     ""
     (setq-default truncate-lines t)
     (setq-default truncate-lines nil)
     ""
     (default-value truncate-lines)
     (default-toplevel-value truncate-lines)
     ""
     ,(ee-template0 "\
")
     )
   pos-spec-list))




;; «find-machinectl-tar-links»  (to ".find-machinectl-tar-links")
;; Skel: (find-find-links-links-new "machinectl-tar" "debian n" "")
;; Test: (find-machinectl-tar-links)
;;  See: (find-es "debootstrap" "debian-basic-setup")
;;
(defun find-machinectl-tar-links (&optional debian n &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for machinectl-tar."
  (interactive)
  (setq debian (or debian "{debian}"))
  (setq n (or n "{n}"))
  (apply
   'find-elinks
   `((find-machinectl-tar-links ,debian ,n ,@pos-spec-list)
     (find-machinectl-tar-links "debian" "0")
     (find-machinectl-tar-links "debian" "1")
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-machinectl-tar-links)
     ""
     (find-es "mmdebstrap" "create-debian0.tar")
     (find-es "mmdebstrap" "systemd-container")
     ""
     ,(ee-template0 "\
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
     machinectl list
sudo machinectl start    {debian}
     machinectl list
sudo machinectl stop     {debian}
sudo machinectl stop     {debian}
     machinectl list

** Save /var/lib/machines/{debian}/ into {debian}{n}.tar.
** This is very quick.
sudo ls -lAFh /var/lib/machines/
sudo du -ch   /var/lib/machines/
sudo machinectl export-tar {debian} /var/lib/machines/{debian}{n}.tar
sudo ls -lAFh /var/lib/machines/


** Restore /var/lib/machines/{debian}/ from {debian}{n}.tar.
** This is very quick.
sudo rm -Rf                /var/lib/machines/{debian}/
sudo ls -lAFh              /var/lib/machines/
sudo machinectl import-tar /var/lib/machines/{debian}{n}.tar {debian}
sudo ls -lAFh              /var/lib/machines/
sudo du -ch                /var/lib/machines/{debian}/
")
     )
   pos-spec-list))




;; «find-lakefile-links»  (to ".find-lakefile-links")
;; Skel: (find-find-links-links-new "lakefile" "" "")
;; Test: (find-lakefile-links)
;;
(defun find-lakefile-links (&rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for lakefile."
  (interactive)
  (apply
   'find-elinks-elisp
   `((find-lakefile-links ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-lakefile-links)
     ""
     (find-es "lsp" "persist")
     (find-fline "~/.emacs.d/" ".lsp-session-v1")
     (find-fline "~/.emacs.d/.lsp-session-v1")
     ""
     ,(ee-template0 "\
;; (ee-copy-rest-3 nil \";;--end\" \"/tmp/lakefile.lean\")
-- (lsp-describe-session)
import Lake
open   Lake DSL
package None
;;--end
")
     )
   pos-spec-list))




;; «find-leanwgetr-links»  (to ".find-leanwgetr-links")
;; Skel: (find-find-links-links-new "leanwgetr" "url" "url0")
;; Test: (find-leanwgetr-links "lean-lang.org/functional_programming_in_lean/")
;;  See: (find-es "lean" "5-manuals-tgz")
;;
(defun find-leanwgetr-links (&optional url &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for leanwgetr."
  (interactive)
  (setq url (or url "{url}"))
  (let* ((url0 (replace-regexp-in-string "^https://" "" url)))
    (apply
     'find-elinks
     `((find-leanwgetr-links ,url ,@pos-spec-list)
       ;; Convention: the first sexp always regenerates the buffer.
       (find-efunction 'find-leanwgetr-links)
       ""
       ,(ee-template0 "\
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
#rm -Rfv /tmp/snarf/https/
mkdir -p /tmp/snarf/https/

rm -Rv /tmp/wget-recursive.tar
rm -Rv /tmp/wget-recursive/
mkdir  /tmp/wget-recursive/
cd     /tmp/wget-recursive/

wget --recursive --no-parent --no-verbose \\
  https://{url0}
find | sort
du -ch

# (find-fline     \"/tmp/wget-recursive/\")
# (find-sh-at-dir \"/tmp/wget-recursive/\" \"find * | sort\")

cd     /tmp/wget-recursive/
tar                 -cvf /tmp/wget-recursive.tar .
tar -C $TMPS/https/ -xvf /tmp/wget-recursive.tar

cp -v     $S/https/{url0}print.pdf \\
       $TMPS/https/{url0}
cp -v     $S/https/{url0}print.txt \\
       $TMPS/https/{url0}

du -ch $TMPS/https/{url0}

")
       )
     pos-spec-list)))





;; «find-subtitles3-links»  (to ".find-subtitles3-links")
;; Skel: (find-find-links-links-new "subtitles3" "c stem hash" "")
;; Test: (find-subtitles3-links "2024lean4of0" "2024-lean4-oficina-0" "vBkxGIrv2Q0")
;;
(defun find-subtitles3-links (&optional c stem hash &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for subtitles3."
  (interactive (list nil nil (ee-youtubedl-hash-around-point)))
  (setq c (or c "{c}"))
  (setq stem (or stem "{stem}"))
  (setq hash (or hash "{hash}"))
  (apply
   'find-elinks
   `((find-subtitles3-links ,c ,stem ,hash ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-subtitles3-links)
     (find-angg "LUA/Subtitles3.lua")
     ""
     ,(ee-template0 "\
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
URL=https://youtu.be/{hash}
URL=\"http://www.youtube.com/watch?v={hash}\"
# (find-sh \"youtube-dl -f worst --list-subs https://youtu.be/{hash}\")

# (find-fline \"/tmp/subs/\")
rm -Rv /tmp/subs/
mkdir  /tmp/subs/
cd     /tmp/subs/
youtube-dl --write-auto-sub --skip-download --sub-format=json3 --sub-lang=pt $URL
cp -v *.pt.json3 subs.json3

# (find-fline \"/tmp/subs/\" \"subs.json3\")
# (find-fline \"/tmp/subs/subs.json3\")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
~/LUA/Subtitles3.lua -c {c} -json3 /tmp/subs/subs.json3 -print
# (find-angg \"LUA/Subtitles3.lua\")




* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)
Path.addLUAtopath()
require \"Subtitles3\"   -- (find-angg \"LUA/Subtitles3.lua\")
bigstr = ee_readfile \"/tmp/subs/subs.json3\"
o = json.decode.decode(bigstr)
jss = JsonSubs {}
= jss:finds(o.events, \"{c}\")

")
     )
   pos-spec-list))




;; «kla-tex»  (to ".kla-tex")
;; (find-eev "eev-kla.el" "kill-sexps")
;; (find-eev "eev-kla.el" "generate-sexps")
;; (find-estring (kla-tex-str))
;; Example: (c3m241p2p 2 "links")
;;          (c3m241p2a   "links")

(defun kla-tex  () (interactive) (kill-new (kla-tex-str)))
(defun kla-tex0 () (interactive) (kill-new (kla-tex0-str)))

(defun kla-tex0-str ()
  (let* ((find-c (ee-kl-find-c))
	 (fname0 (ee-kl-fname))
	 (fname  (replace-regexp-in-string "^/home/edrx/" "" fname0))
	 (sfname (ee-kl-shorterfname)))
    (ee-template0 "\
% ({find-c} \"{sfname}\")
{<}\\footnotesize
\\par \\url{http://anggtwu.net/{fname}.html}
\\par \\texttt{<}({find-c} \"{sfname}\")}
\\par
{>}
")))

(defun kla-tex-str ()
  (let* ((find-c (ee-kl-find-c))
	 (fname0 (ee-kl-fname))
	 (fname  (replace-regexp-in-string "^/home/edrx/" "" fname0))
	 (sfname (ee-kl-shorterfname))
	 (anchor (ee-kl-anchor)))
    (ee-template0 "\
% ({find-c} \"{sfname}\" \"{anchor}\")
{<}\\footnotesize
\\par \\url{http://anggtwu.net/{fname}.html\\#{anchor}}
\\par \\texttt{<}({find-c} \"{sfname}\" \"{anchor}\")}
\\par
{>}
")))



;; «find-instagram-links»  (to ".find-instagram-links")
;; Skel: (find-find-links-links-new "instagram" "name hash" "")
;; Test: (find-instagram-links)
;;
(defun find-instagram-links (&optional name hash &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for instagram."
  (interactive)
  (setq name (or name "{name}"))
  (setq hash (or hash "{hash}"))
  (apply
   'find-elinks
   `((find-instagram-links ,name ,hash ,@pos-spec-list)
     (find-instagram-links "wesmarx" "C4ItDcFuD-n" "Wicked Game")
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-instagram-links)
     ""
     ,(ee-template0 "\
https://www.instagram.com/{name}/
https://www.instagram.com/p/{hash}/

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
mkdir -p /tmp/ig/
cd       /tmp/ig/
yt-dlp https://www.instagram.com/reel/{hash}/

# (find-fline \"/tmp/ig/\")

")
     )
   pos-spec-list))



;; «find-htmlpdf-links»  (to ".find-htmlpdf-links")
;; Skel: (find-find-links-links-new "htmlpdf" "c url" "localurl localdir")
;; Test: (find-htmlpdf-links "gm15" "https://gigamonkeys.com/book/practical-a-portable-pathname-library.html")
;;       (find-htmlpdf-links "agdarew" "https://agda.readthedocs.io/en/latest/language/rewriting.html")
;;
(defun find-htmlpdf-links (&optional c url &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for htmlpdf."
  (interactive)
  (setq c (or c "{c}"))
  (setq url (or url "{url}"))
  (let* ((localurl (ee-url-to-fname0 url))
         (localdir (file-name-directory localurl)))
    (apply
     'find-elinks
     `((find-htmlpdf-links ,c ,url ,@pos-spec-list)
       ;; Convention: the first sexp always regenerates the buffer.
       (find-efunction 'find-htmlpdf-links)
       ""
       ,(ee-template0 "\
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
mkdir -p {localdir}
cd       {localdir}

# Way 1: use princexml:
cat > /tmp/print.css <<'%%%'
  body {<} font-size: 12pt {>}
  @page {<} @bottom-center {<} content: counter(page); {>} {>}
%%%
prince -s /tmp/print.css \\
       -o {localurl}.pdf \\
           {url}

# Way 2: open this url in the browser and \"C-p\"rint to /tmp/print.pdf:
# {url}
# then:
cp -v /tmp/print.pdf {localurl}.pdf

# (find-fline     \"{localdir}\")
# (find-pdf-page  \"{localurl}.pdf\")
# (find-pdf-text8 \"{localurl}.pdf\")

;; <{c}>
;; {url}
;; (find-fline \"{localdir}\")
\(code-pdf-page  \"{c}\" \"{localurl}.pdf\")
\(code-pdf-text8 \"{c}\" \"{localurl}.pdf\")
;; (find-{c}page)
;; (find-{c}text)
")
       )
     pos-spec-list)))



;; «find-sbcl-links»  (to ".find-sbcl-links")


;; «find-dednat7debug-links»  (to ".find-dednat7debug-links")
;; Skel: (find-find-links-links-new "dednat7debug" "fname" "ee-hyperlink-prefix dir fname0")
;; Test: (find-dednat7debug-links)
;;
(defun find-dednat7debug-links (&optional fname &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for dednat7debug."
  (interactive (list buffer-file-name))
  (if fname (setq fname (ee-shorten-file-name fname)))
  (setq fname (or fname "{fname}"))
  (let* ((dir (file-name-directory fname))
         (fname0 (file-name-nondirectory fname))
	 (ee-hyperlink-prefix "-- ")
	 )
    (apply
     'find-elinks
     `((find-dednat7debug-links ,fname ,@pos-spec-list)
       ;; Convention: the first sexp always regenerates the buffer.
       (find-dednat7debug-links "~/LATEX/2024-1-C2-carro.tex")
       (find-fline ,fname)
       (find-efunction 'find-dednat7debug-links)
       ""
       ,(ee-template0 "\
* (find-Deps1-cps \"dednat7load\")
*
* (lua-mode)
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cp -v ~/LUA/Dednat7oldheads.lua ~/LATEX/
cd {dir} && lualatex {fname0}
pu(#tf)
pu(#tf)

* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)
chdir \"{dir}\"
require \"dednat7load\"  -- (find-angg \"LUA/dednat7load.lua\")
run_repl3_now()        -- (find-angg \"LUA/lua50init.lua\" \"Repl3.lua\")

dednat6dir = ee_expand(\"~/LATEX/dednat6/\")
require \"Dednat7oldheads\"   -- (find-LATEX \"Dednat7oldheads.lua\")
dednat7oldheads()

tf = TeXFile.read(\"{fname0}\")
texlines = tf
pu(#tf)
= thisblock
= tf.blocks

loaded = VTable(keys(package.loaded))
= Set.from(loaded)
= Set.from(loaded):ksc()
= require(\"abbrevs\")

= tf:lastblock()
= tf:lastblock(-1)
= tf:lastblock()  :untabifys(3, nil, \"\\n\")
= tf:lastblock(-1):untabifys(3, nil, \"\\n\")

= tf.blocks[#tf.blocks-1]:untabifys(3, \"\", \"\\n\")
= tf.blocks[#tf.blocks  ]:untabifys(3, \"\", \"\\n\")
")
       )
     pos-spec-list)))


;; «eewrap-maximamsg»  (to ".eewrap-maximamsg")
;; Skel: (find-eewrap-links "M" "maximamsg" "url")
;; Test: (find-eewraptest-links "maximamsg" "http://_23456_")
;;
(defun  eewrap-maximamsg () (interactive)
  (ee-this-line-wrapn 1 'ee-wrap-maximamsg))
(defun ee-wrap-maximamsg (url)
  "An internal function used by `eewrap-maximamsg'."
  (let* ((msgnumber (replace-regexp-in-string "[^0-9]" "" url))
	 (yyyymm (format-time-string "%Y%m"))
	 (day    (format-time-string "%d")))
    (ee-template0 "\
{url}
# (find-maximamsg \"{msgnumber} {yyyymm} {day}\" \"\")")))

(defalias 'tomm 'eewrap-maximamsg)




;;;  _              _ _   
;;; | |_ _ __ _   _(_) |_ 
;;; | __| '__| | | | | __|
;;; | |_| |  | |_| | | |_ 
;;;  \__|_|   \__, |_|\__|
;;;           |___/       
;;
;; «find-tryit-links»  (to ".find-tryit-links")
;; Skel:  (find-find-links-links-new "tryit" "config sexp" "body")
;; Tests: (find-tryit-links)
;;        (find-tryit-links nil ' (find-2a '(find-eev-quick-intro "\n2.") '(find-elisp-intro "1.")) )
;;        (find-tryit-links nil '(find-eev-quick-intro "2."))
;;        (find-tryit-links nil '(find-eev-quick-intro "6.1."))
;;        (find-tryit-links nil '(find-multiwindow-intro "2."))
;;
;;
(defun find-tryit-links (&optional config sexp &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for tryit."
  (interactive (list nil (progn (ee-goto-eol) (read (ee-last-sexp)))))
  ;; (interactive (list "1i" '(+ 1 2)))
  (setq config (or config "ire 1ire"))
  (setq sexp (or sexp '(find-eev-quick-intro "6.1.")))
  ;; (message "%S%S" config sexp)
  (let* ((body (ee-tryit config sexp)))
    (apply
     'find-elinks-elisp
     `((find-tryit-links ,config ',sexp)
       (find-tryit-links "irue 1irue" ',sexp)
       (find-tryit-links "_ 1" ',sexp)
       (find-tryit-links "s S" ',sexp)
       (find-tryit-links "s S s1 S1" ',sexp)
       ;; Convention: the first sexp always regenerates the buffer.
       (find-efunction 'find-tryit-links)
       ""
       ,(ee-template0 "\
;; {(ee-S sexp)}
;; https://bpa.st/

{body}
")
       )
     pos-spec-list)))

;; Tests for the internal functions:
;; (ee-tryit "1"     '(+ 1 2))
;; (ee-tryit "ire1"  '(+ 1 2))
;; (ee-tryit "ire1"  "(+ 1 2)")
;; (ee-tryit "ire"   '(find-eev-quick-intro "6.1."))
;; (ee-tryit "ire 1" '(find-eev-quick-intro "6.1."))
;; (ee-tryit "S s"   '(find-eev-quick-intro "6.1."))
;;
(defun ee-tryit-has  (c)     (string-match c config))
(defun ee-tryit-has  (c)     (let ((case-fold-search nil)) (string-match c config)))
(defun ee-tryit-s    ()      (if (ee-tryit-has "1") " " "\n  "))
(defun ee-tryit-adds (str)   (concat str (ee-tryit-s)))
(defun ee-tryit-if   (c str) (if (ee-tryit-has c) (ee-tryit-adds str) ""))

(defun ee-tryit-1 (config sexp0)
  (let* ((s     (ee-tryit-s))
	 (pis   (ee-tryit-if "i" "(package-initialize)"))
         (melpa (ee-tryit-if "m" 
                 "(add-to-list 'package-archives '(\"melpa\" . \"https://melpa.org/packages/\")"))
	 (prcs  (ee-tryit-if "r" "(package-refresh-contents)"))
	 (pies  (ee-tryit-if "e" "(package-install 'eev)"))
	 (pue   (ee-tryit-if "u" "(package-upgrade 'eev)"))
	 (selpa (ee-tryit-if "s" "(straight-use-package 'eev)"))
	 (sgit  (ee-tryit-if "S" (format "(straight-use-package %s)"
					 "'(eev :type git :host github :repo \"edrx/eev\")")))
	 (ebs   (ee-tryit-adds "(eev-beginner)"))
	 (sexp  (if (stringp sexp0) sexp0 (ee-pp0 sexp0))))
   (ee-template0 "(progn{s}{pis}{melpa}{prcs}{pies}{pue}{selpa}{sgit}{ebs}{sexp})")))

(defun ee-tryit (configs sexp0)
  (cl-loop for config in (ee-split configs)
	   concat (ee-tryit-1 config sexp0)
	   concat "\n\n"))





;; «find-subs-links»  (to ".find-subs-links")
;; Moved to: (find-angg "elisp/find-subs-links.el")
(load "~/elisp/find-subs-links.el")







;;
;; Local Variables:
;; mode:                 emacs-lisp
;; coding:               utf-8-unix
;; ee-comment-prefix:    ";;"
;; End: