Warning: this is an htmlized version!
The original is here, and
the conversion rules are here.
;; This file:
;;   http://anggtwu.net/.emacs.html
;;   http://anggtwu.net/.emacs
;;          (find-angg ".emacs")
;; Author: Eduardo Ochs <eduardoochs@gmail.com>
;;
;; Edrx's .emacs
;; 2024oct19
;; ^ don't trust the date above

;; (getenv "HOME")
;; default-directory
;; (setenv "HOME" default-directory)

;; (find-sh "grep -n '«.*»' ~/.emacs")

;; «.autoloads»		(to "autoloads")
;; «.add-to-alist»	(to "add-to-alist")
;; «.seen»		(to "seen")
;; «.find-seen-links»	(to "find-seen-links")
;; «.seen2»		(to "seen2")
;; «.auto-mode-alist»	(to "auto-mode-alist")
;; «.mode-variables»	(to "mode-variables")
;; «.8th-bit-is-meta»	(to "8th-bit-is-meta")
;; «.auctex»		(to "auctex")
;; «.ee-rstdoc-:py»	(to "ee-rstdoc-:py")
;; «.w3m-el»		(to "w3m-el")
;; «.same-window-buffer-names»	(to "same-window-buffer-names")

;; «.emacs-cvs»			(to "emacs-cvs")
;; «.debian-startup»		(to "debian-startup")
;; «.my-mode»			(to "my-mode")
;; «.eev»			(to "eev")
;; «.eev-block»			(to "eev-block")
;; «.eev-pdflike-aliases»	(to "eev-pdflike-aliases")
;; «.code-pdf-text8»		(to "code-pdf-text8")
;; «.1c-and-1cl»		(to "1c-and-1cl")
;; «.eev-glyphs»		(to "eev-glyphs")
;; «.eev-compose-hash»		(to "eev-compose-hash")
;; «.eev-kla-fossils»		(to "eev-kla-fossils")
;; «.klapt»			(to "klapt")
;; «.eepitch-preprocess-line»	(to "eepitch-preprocess-line")
;; «.eepitch-preprocess-regexp»	(to "eepitch-preprocess-regexp")
;; «.eepitch-password-prompt»	(to "eepitch-password-prompt")
;; «.ee-rstdoc-:ghcug»		(to "ee-rstdoc-:ghcug")
;; «.ee-rstdoc-:h98»		(to "ee-rstdoc-:h98")
;; «.ee-rstdoc-:h98t»		(to "ee-rstdoc-:h98t")
;; «.ee-rstdoc-:pexpect»	(to "ee-rstdoc-:pexpect")
;; «.ee-rstdoc-:pillow»		(to "ee-rstdoc-:pillow")
;; «.ee-rstdoc-:fennel»		(to "ee-rstdoc-:fennel")
;; «.ee-rstdoc-:clhs»		(to "ee-rstdoc-:clhs")
;;   «.clhs»			(to "clhs")
;; «.ee-rstdoc-:gd3»		(to "ee-rstdoc-:gd3")
;; «.ee-rstdoc-:manim»		(to "ee-rstdoc-:manim")
;; «.ee-rstdoc-:J»		(to "ee-rstdoc-:J")
;; «.ee-rstdoc-:penlight»	(to "ee-rstdoc-:penlight")
;; «.ee-rstdoc-:nodejs»		(to "ee-rstdoc-:nodejs")
;; «.ee-rstdoc-:pygame»		(to "ee-rstdoc-:pygame")
;; «.ee-rstdoc-:postgres»	(to "ee-rstdoc-:postgres")
;; «.ee-rstdoc-:sqlite3»	(to "ee-rstdoc-:sqlite3")
;; Lean:
;;   «.ee-rstdoc-:lean4doc»	(to "ee-rstdoc-:lean4doc")
;;   «.ee-rstdoc-:lean4»	(to "ee-rstdoc-:lean4")
;;   «.ee-rstdoc-:leanref»	(to "ee-rstdoc-:leanref")
;;   «.ee-rstdoc-:leanmeta»	(to "ee-rstdoc-:leanmeta")
;;   «.ee-rstdoc-:leanmaths»	(to "ee-rstdoc-:leanmaths")
;;   «.ee-rstdoc-:leantpil»	(to "ee-rstdoc-:leantpil")
;;   «.ee-rstdoc-:fplean4»	(to "ee-rstdoc-:fplean4")
;; «.show-conses»		(to "show-conses")
;; «.lisptree»			(to "lisptree")
;; «.myqdraw»			(to "myqdraw")
;; «.code-etex-tla»		(to "code-etex-tla")
;; «.tikz»			(to "tikz")
;; «.tikzgit»			(to "tikzgit")
;; «.eev-package»		(to "eev-package")
;; «.fvwm»			(to "fvwm")
;; «.mplayer-options»		(to "mplayer-options")
;; «.eepitch-shell»		(to "eepitch-shell")
;; «.favourite-modes»		(to "favourite-modes")
;; «.modes-safe-local»		(to "modes-safe-local")
;; «.square-brackets»		(to "square-brackets")
;; «.woman»			(to "woman")
;; «.find-woman»		(to "find-woman")
;; «.M-e-in-c-mode»		(to "M-e-in-c-mode")
;; «.find-eimage»		(to "find-eimage")
;; «.find-w3m»			(to "find-w3m")
;; «.dired-find-w3m»		(to "dired-find-w3m")
;; «.wdired»			(to "wdired")
;; «.ee-isearch»		(to "ee-isearch")
;; «.ee-to-protected»		(to "ee-to-protected")
;; «.to-shadow»			(to "to-shadow")
;; «.find-fline-ov»		(to "find-fline-ov")
;; «.find-dict»			(to "find-dict")
;; «.browse-url»		(to "browse-url")
;; «.brwl-and-friends»		(to "brwl-and-friends")
;; «.find-ie»			(to "find-ie")
;; «.brie»			(to "brie")
;; «.brmd»			(to "brmd")
;; «.brgvd»			(to "brgvd")

;; «.syntax-tables»	(to "syntax-tables")
;; «.noerr»		(to "noerr")
;; «.code-c-d_e»	(to "code-c-d_e")
;; «.calc»		(to "calc")
;; «.eieio»		(to "eieio")
;; «.find-es»		(to "find-es")

;; «.tramp»		(to "tramp")
;; «.remote-machines»	(to "remote-machines")
;; «.tramp-twu»		(to "tramp-twu")
;; «.linode»		(to "linode")
;; «.upload-changes»	(to "upload-changes")
;; «.ee-remove-prefix»	(to "ee-remove-prefix")
;; «.upload-this»	(to "upload-this")

;; «.code-c-ds»		(to "code-c-ds")
;; «.k22»		(to "k22")

;; Lua:
;; «.lua-manual»		(to "lua-manual")
;; «.find-lua51manual»		(to "find-lua51manual")
;; «.find-lua52manual»		(to "find-lua52manual")
;; «.find-lua53manual»		(to "find-lua53manual")
;; «.ee-lua-set-init-file»	(to "ee-lua-set-init-file")
;; «.lpegrex»			(to "lpegrex")

;; Lua (obsolete):
;; «.lua-5.2»			(to "lua-5.2")
;; «.lua5.2-debian»		(to "lua5.2-debian")
;; «.luamanual»			(to "luamanual")
;; «.luamanual-51»		(to "luamanual-51")
;; «.find-luamanual-ff»		(to "find-luamanual-ff")
;; «.lua50»			(to "lua50")

;; «.eevt_twu»		(to "eevt_twu")
;; «.papers»		(to "papers")
;; «.icon»		(to "icon")
;; «.iconbook»		(to "iconbook")
;; «.icongrbook»	(to "icongrbook")
;; «.tclbook»		(to "tclbook")
;; «.find-iconbooktext»	(to "find-iconbooktext")
;; «.kd»		(to "kd")
;; «.dkey»		(to "dkey")
;; «.wrap»		(to "wrap")
;; «.fooi»		(to "fooi")
;; «.fooi-re»		(to "fooi-re")
;; «.fooi-t»		(to "fooi-t")
;; «.fooi-a»		(to "fooi-a")
;; «.fooi-fb»		(to "fooi-fb")

;; «.key_bindings»	(to "key_bindings")
;; «.ibuffer»		(to "ibuffer")
;; «.C-x-spc»		(to "C-x-spc")
;; «.gnuserv»		(to "gnuserv")
;; «.X»			(to "X")
;; «.set-input-mode»	(to "set-input-mode")

;; «.ascstr»		(to "ascstr")
;; «.ee-insert»		(to "ee-insert")
;; «.to-codes»		(to "to-codes")
;; «.to-ranges»		(to "to-ranges")
;; «..emacs.local»	(to ".emacs.local")
;; «.emacs-wiki»	(to "emacs-wiki")
;; «.emacs-wiki-edrx»	(to "emacs-wiki-edrx")
;; «.find-planner»	(to "find-planner")
;; «.find-string-ow»	(to "find-string-ow")
;; «.find-progoutput-ow»  (to "find-progoutput-ow")
;; «.ee-set-region-face»	(to "ee-set-region-face")
;; «.isearch-faces»	(to "isearch-faces")

;; «..emacs.custom»	(to ".emacs.custom")
;; «..emacs.unibyte»	(to ".emacs.unibyte")
;; «..emacs.u8»		(to ".emacs.u8")
;; «..emacs.hydras»	(to ".emacs.hydras")
;; «..emacs.private»	(to ".emacs.private")
;; «..emacs.papers»	(to ".emacs.papers")
;; «..emacs.templates»	(to ".emacs.templates")
;; «..emacs.audios»	(to ".emacs.audios")
;; «..emacs-tex.el»	(to ".emacs-tex.el")

;; «.obsolete»		(to "obsolete")
;; «.php-old»		(to "php-old")
;; «.php»		(to "php")

;; «.guest_users»	(to "guest_users")
;; «.info-path»		(to "info-path")
;; «.passwds-tcl-get»	(to "passwds-tcl-get")
;; «.eechannel-send-passwd»  (to "eechannel-send-passwd")
;; «.erc»		(to "erc")
;; «.find-erclibera»	(to "find-erclibera")

;; «.lforth»		(to "lforth")
;; «.eepdj»		(to "eepdj")
;; «.ee-el»		(to "ee-el")

;; «.htmlize»		(to "htmlize")

;; «.fundcomp-menu»	(to "fundcomp-menu")
;; «.menu-bar»		(to "menu-bar")
;; «.tool-bar»		(to "tool-bar")
;; «.show-as-image»	(to "show-as-image")

;; «.ptexts»		(to "ptexts")
;; «.underline-as-green»  (to "underline-as-green")
;; «.r0r2»		(to "r0r2")
;; «.find-ebuffer+»	(to "find-ebuffer+")
;; «.hippie-expand»	(to "hippie-expand")
;; «.dfs»		(to "dfs")
;; «.eesteps»		(to "eesteps")
;; «.my-ins»		(to "my-ins")
;; «.chowns»		(to "chowns")

;; «.find-zsh»			(to "find-zsh")
;; «.upload»			(to "upload")
;; «.eev-current-make-htmls»	(to "eev-current-make-htmls")
;; «.eesteps-insert-longkey»	(to "eesteps-insert-longkey")
;; «.my-screenshot»		(to "my-screenshot")
;; «.emacs-ascii-screenshots»	(to "emacs-ascii-screenshots")
;; «.find-mode-line-links»	(to "find-mode-line-links")
;; «.ee-svg-screenshot»		(to "ee-svg-screenshot")
;; «.find-svg-screenshot-links»	(to "find-svg-screenshot-links")
;; «.sshot-run»			(to "sshot-run")
;; «.find-svgbuffer»		(to "find-svgbuffer")
;; «.my-modes»			(to "my-modes")
;; «.my-screenshot»		(to "my-screenshot")
;; «.linuxconfvar»		(to "linuxconfvar")
;; «.code-c-d-linux26»		(to "code-c-d-linux26")
;; «.intermail»			(to "intermail")
;; «.eechannel-TWU»		(to "eechannel-TWU")
;; «.remove-from-keymap»	(to "remove-from-keymap")
;; «.tex-insert-quote»		(to "tex-insert-quote")

;; «.hscroll-keys-mode»	(to "hscroll-keys-mode")
;; «.unquote-printable»	(to "unquote-printable")
;; «.date»		(to "date")
;; «.yank-first-line»	(to "yank-first-line")
;; «.myip»		(to "myip")
;; «.eeblogme»		(to "eeblogme")
;; «.eeblogme-now»	(to "eeblogme-now")
;; «.blogme-mode-syntax-table»	(to "blogme-mode-syntax-table")
;; «.blogme-mode»	(to "blogme-mode")
;; «.blogme4»		(to "blogme4")
;; «.dednat5»		(to "dednat5")

;; «.eevnow»		(to "eevnow")
;; «.find-w3m-links»	(to "find-w3m-links")
;; «.safe-local-variable»  (to "safe-local-variable")

;; «.latexbase»		(to "latexbase")
;; «.classes»		(to "classes")
;; «.classes.dtx»	(to "classes.dtx")
;; «.source2e»		(to "source2e")
;; «.find-source2epage»	(to "find-source2epage")
;; «.find-texbookpage-old»  (to "find-texbookpage-old")
;; «.find-texbookpage»	(to "find-texbookpage")
;; «.find-amsmathpage»	(to "find-amsmathpage")

;; «.wdg»		(to "wdg")
;; «.howm»		(to "howm")
;; «.howm-create-named-file»  (to "howm-create-named-file")
;; «.iheader»		(to "iheader")
;; «.hm»		(to "hm")
;; «.find-edrxhowm»	(to "find-edrxhowm")
;; «.dednat4»		(to "dednat4")
;; «.dednat4-setup»	(to "dednat4-setup")
;; «.eedn4-51»		(to "eedn4-51")
;; «.eedn4a»		(to "eedn4a")
;; «.rcirc»		(to "rcirc")
;; «.rcirc-save-buffer»	(to "rcirc-save-buffer")
;; «.rcirc-channels»	(to "rcirc-channels")
;; «.rcirc-spotchat»	(to "rcirc-spotchat")
;; «.circe»		(to "circe")

;; «.find-xkbprint»	(to "find-xkbprint")
;; «.prep-X»		(to "prep-X")
;; «.prep-all»		(to "prep-all")
;; «.prep-X-kbdmap»	(to "prep-X-kbdmap")
;; «.prep-X-kbdrate»	(to "prep-X-kbdrate")
;; «.prep-X-font»	(to "prep-X-font")
;; «.gnus»		(to "gnus")
;; «.gnus-quimby»	(to "gnus-quimby")
;; «.lists.gnu.org»	(to "lists.gnu.org")
;; «.gnu.emacs.bugs»	(to "gnu.emacs.bugs")
;; «.gnu.emacs.devel»	(to "gnu.emacs.devel")
;; «.gnu.emacs.sources»	(to "gnu.emacs.sources")
;; «.gmane.emacs.eev.devel»  (to "gmane.emacs.eev.devel")
;; «.comp.lang.forth»	(to "comp.lang.forth")
;; «.super-key»		(to "super-key")
;; «.hh»		(to "hh")
;; «.find-eunicode»	(to "find-eunicode")
;; «.find-eunicodeucs»	(to "find-eunicodeucs")
;; «.diagxy»		(to "diagxy")
;; «.diaxydoc-and-barrdoc»	(to "diaxydoc-and-barrdoc")
;; «.libgtk-docs»	(to "libgtk-docs")
;; «.find-firefox-bg»	(to "find-firefox-bg")
;; «.squeak»		(to "squeak")
;; «.smalltalk»		(to "smalltalk")
;; «.visualworks»	(to "visualworks")
;; «.color-theme»	(to "color-theme")
;; «.my-make-face»	(to "my-make-face")
;; «.myxpm»		(to "myxpm")
;; «.find-xpm»		(to "find-xpm")
;; «.terminus»		(to "terminus")
;; «.find-sidebyside»	(to "find-sidebyside")
;; «.eejump-define»	(to "eejump-define")
;; «.eejump-plists»	(to "eejump-plists")
;; «.eejump»		(to "eejump")
;; «.find-tkdiff»	(to "find-tkdiff")
;; «.eekill»		(to "eekill")
;; «.eepitch»		(to "eepitch")
;; «.eepitch-kill»	(to "eepitch-kill")
;; «.reload»		(to "reload")
;; «.no-mode-line»	(to "no-mode-line")
;; «.ee-comint»		(to "ee-comint")
;; «.ee-telnet»		(to "ee-telnet")
;; «.miniforth»		(to "miniforth")
;; «.ruby»		(to "ruby")
;; «.ruby-pragmatic»	(to "ruby-pragmatic")
;; «.titan»		(to "titan")
;; «.titand-docs-text»	(to "titand-docs-text")
;; «.postgres»		(to "postgres")
;; «.find-C-links»	(to "find-C-links")
;; «.find-postgres-links»	(to "find-postgres-links")
;; «.find-grep-links»		(to "find-grep-links")
;; «.swig»			(to "swig")
;; «.eea2ps»			(to "eea2ps")
;; «.eea2ps-meta»		(to "eea2ps-meta")
;; «.eea2pswide»		(to "eea2pswide")
;; «.fill-rcirc-paragraph»	(to "fill-rcirc-paragraph")
;; «.find-rcirc-channel-sexps»	(to "find-rcirc-channel-sexps")
;; «.display-time-mode»		(to "display-time-mode")
;; «.eemklinks-yank-w3m-anchor»	(to "eemklinks-yank-w3m-anchor")
;; «.find-C-x»			(to "find-C-x")
;; «.find-ebuffer-links»	(to "find-ebuffer-links")
;; «.freedb-rename»		(to "freedb-rename")
;; «.find-pdfpage-pdftotext»	(to "find-pdfpage-pdftotext")
;; «.find-xxxtkdiff»		(to "find-xxxtkdiff")
;; «.find-cdecl»		(to "find-cdecl")
;; «.eetcc»			(to "eetcc")
;; «.figlet»			(to "figlet")
;; «.eshell»			(to "eshell")
;; «.unaccent»			(to "unaccent")
;; «.flip-psne-ness»		(to "flip-psne-ness")
;; «.find-other-debian-links»	(to "find-other-debian-links")
;; «.find-ekbmacro-links»	(to "find-ekbmacro-links")
;; «.find-dpkg-build-escript»	(to "find-dpkg-build-escript")
;; «.find-file-links»		(to "find-file-links")
;; «.find-bgprocess»		(to "find-bgprocess")
;; «.defalias-hard-maybe»	(to "defalias-hard-maybe")
;; «.ee-kill-this-buffer»	(to "ee-kill-this-buffer")
;; «.golisp»			(to "golisp")
;; «.sshot»			(to "sshot")
;; «.find-cat-to-lp0-script»	(to "find-cat-to-lp0-script")
;; «.find-bigdvdcopy-script»	(to "find-bigdvdcopy-script")
;; «.cltl»			(to "cltl")
;; «.find-template-untgz»	(to "find-template-untgz")
;; «.bruntgz»			(to "bruntgz")
;; «.find-code-ps-url-links»	(to "find-code-ps-url-links")
;; «.brcps»			(to "brcps")
;; «.find-pspage-links»		(to "find-pspage-links")
;; «.find-jstor-links»		(to "find-jstor-links")
;; «.wikit-edit»		(to "wikit-edit")
;; «.find-eepitch-links»	(to "find-eepitch-links")
;; «.find-eevarticle-links»	(to "find-eevarticle-links")
;; «.find-anggrumidiff-links»	(to "find-anggrumidiff-links")
;; «.ee-shrink-hyperlink-at-eol»  (to "ee-shrink-hyperlink-at-eol")
;; «.find-setq-links»  		(to "find-setq-links")
;; «.ee-choosecolor»		(to "ee-choosecolor")
;; «.find-ecolor-links»		(to "find-ecolor-links")
;; «.find-eface»		(to "find-eface")
;; «.find-eface-links»		(to "find-eface-links")
;; «.digirati»			(to "digirati")
;; «.mysql»			(to "mysql")
;; «.find-anggupload-links»	(to "find-anggupload-links")
;; «.find-unpack-chm-links»	(to "find-unpack-chm-links")
;; «.eepic»			(to "eepic")
;; «.esrpic»			(to "esrpic")
;; «.find-adduser-links»	(to "find-adduser-links")
;; «.find-osmio-template»	(to "find-osmio-template")
;; «.find-template-svnadm»	(to "find-template-svnadm")
;; «.find-copydvdtohd-script»	(to "find-copydvdtohd-script")
;; «.davinci»			(to "davinci")
;; «.eepitch-gdb»		(to "eepitch-gdb")
;; «.eepitch-gdb-lua»		(to "eepitch-gdb-lua")
;; «.eepitch-gdb-scite»		(to "eepitch-gdb-scite")
;; «.tcl-tk»			(to "tcl-tk")
;; «.ee-meta-S»			(to "ee-meta-S")
;; «.org-mode»			(to "org-mode")
;; «.auto-mode-alist-tecmake»	(to "auto-mode-alist-tecmake")
;; «.code-c-d-new»		(to "code-c-d-new")
;; «.ee-sexp-remote»		(to "ee-sexp-remote")
;; «.ee-make-frame»		(to "ee-make-frame")
;; «.ee-sexp-remote-demo»	(to "ee-sexp-remote-demo")
;; «.rename-track»		(to "rename-track")
;; «.firefox»			(to "firefox")
;; «.mozrepl»			(to "mozrepl")
;; «.eepitch-moz»		(to "eepitch-moz")
;; «.espresso-mode»		(to "espresso-mode")
;; «.find-emode-links»		(to "find-emode-links")
;; «.find-sshot-links»		(to "find-sshot-links")
;; «.find-glyphashtml-links»	(to "find-glyphashtml-links")
;; «.find-TH»			(to "find-TH")
;; «.blogme3»			(to "blogme3")
;; «.mksec»			(to "mksec")
;; «.startup-screen»		(to "startup-screen")
;; «.dednat6.el»		(to "dednat6.el")
;; «.dednat6-ftch»		(to "dednat6-ftch")
;; «.dednat6-vbt»		(to "dednat6-vbt")
;; «.find-wget»			(to "find-wget")
;; «.brwget»			(to "brwget")
;; «.find-epalette»		(to "find-epalette")
;; «.tgt»			(to "tgt")
;; «.column-marker»		(to "column-marker")
;; «.find-psne-links»		(to "find-psne-links")
;; «.brep»			(to "brep")
;; «.ee-cp»			(to "ee-cp")
;; «.find-ecp0»			(to "find-ecp0")
;; «.find-mbox»			(to "find-mbox")
;; «.find-urlretrieve-old»	(to "find-urlretrieve-old")
;; «.eshell-url-retrieve»	(to "eshell-url-retrieve")
;; «.ee-wrap»			(to "ee-wrap")
;; «.caramelo»			(to "caramelo")
;; «.zumbi»			(to "zumbi")
;; «.zumbiwikicvs»		(to "zumbiwikicvs")
;; «.dekooning»			(to "dekooning")
;; «.persephone»		(to "persephone")
;; «.sisrot»			(to "sisrot")
;; «.sisrotpdsw»		(to "sisrotpdsw")
;; «.sisrot-pdsw-etc»		(to "sisrot-pdsw-etc")
;; «.sisrot-cameras»		(to "sisrot-cameras")
;; «.noronha»			(to "noronha")
;; «.telemedidastestes»		(to "telemedidastestes")
;; «.find-omnisys-links»	(to "find-omnisys-links")
;; «.telemedidas»		(to "telemedidas")
;; «.find-netbsdman»		(to "find-netbsdman")
;; «.find-edrx-update-links»	(to "find-edrx-update-links")
;; «.eev-traffic-light-glyphs»	(to "eev-traffic-light-glyphs")
;; «.no-super-key»		(to "no-super-key")
;; «.eepitch-sisrotlua»		(to "eepitch-sisrotlua")
;; «.qt»			(to "qt")
;; «.maut»			(to "maut")
;; «.brecp»			(to "brecp")
;; «.lilypond»			(to "lilypond")
;; «.lilypond-info»		(to "lilypond-info")
;; «.lilypond-2.18»		(to "lilypond-2.18")
;; «.lilypond-manuals-pdf»	(to "lilypond-manuals-pdf")
;; «.lilypond-repl»		(to "lilypond-repl")
;; «.metalua»			(to "metalua")
;; «.texinfo»			(to "texinfo")
;; «.ee-unglyph»		(to "ee-unglyph")
;; «.eev-math-glyphs-new»	(to "eev-math-glyphs-new")
;; «.my-faces-sort»		(to "my-faces-sort")
;; «.doc-view-mode»		(to "doc-view-mode")
;; «.sqlite»			(to "sqlite")
;;   «.find-lsqlite3wiki»	(to "find-lsqlite3wiki")
;; «.deact»			(to "deact")
;; «.deactivate-mark»		(to "deactivate-mark")
;; «.find-pen-links»		(to "find-pen-links")
;; «.find-hde-links»		(to "find-hde-links")
;; «.find-dn4tex-links»		(to "find-dn4tex-links")
;; «.find-euboutput»		(to "find-euboutput")
;; «.ee-compilation-buffer»	(to "ee-compilation-buffer")
;; «.ee-code-c-d-:SH»		(to "ee-code-c-d-:SH")
;; «.verbatim»			(to "verbatim")
;; «.find-printindex»		(to "find-printindex")
;; «.find-fontset-links»	(to "find-fontset-links")
;; «.ee-font-unalias»		(to "ee-font-unalias")
;; «.ee-set-frame-font»		(to "ee-set-frame-font")
;; «.:dvi»			(to ":dvi")
;; «.find-LTX»			(to "find-LTX")
;; «.find-testfont»		(to "find-testfont")
;; «.find-dvifonts»		(to "find-dvifonts")
;; «.ee-env-normalize»		(to "ee-env-normalize")
;; «.ee-with-env»		(to "ee-with-env")
;; «.eepitch-makeinfo»		(to "eepitch-makeinfo")
;; «.tmpdn4»			(to "tmpdn4")
;; «.luatex»			(to "luatex")
;; «.luatexref»			(to "luatexref")
;; «.luatex-src»		(to "luatex-src")
;; «.luatex-0.95.0»		(to "luatex-0.95.0")
;; «.luacode»			(to "luacode")
;; «.lua-repl»			(to "lua-repl")
;; «.luatex-repl»		(to "luatex-repl")
;; «.lualatex-repl»		(to "lualatex-repl")
;; «.ee-replace-regexp»		(to "ee-replace-regexp")
;; «.ee-demo-4»			(to "ee-demo-4")
;; «.coq»			(to "coq")
;; «.proof-general»		(to "proof-general")
;; «.std-to-dnc»		(to "std-to-dnc")
;; «.dnc-to-std»		(to "dnc-to-std")
;; «.dn4-block»			(to "dn4-block")
;; «.save-this-block-as»	(to "save-this-block-as")
;; «.anchors-in-latin-1»	(to "anchors-in-latin-1")
;; «.hpprint»			(to "hpprint")
;; «.hjbc1»			(to "hjbc1")
;; «.hjbc2»			(to "hjbc2")
;; «.perl»			(to "perl")
;; «.python»			(to "python")
;; «.matplotlib-examples»	(to "matplotlib-examples")
;; «.ipython»			(to "ipython")
;; «.pylab»			(to "pylab")
;; «.sympy»			(to "sympy")
;; «.sympydoc»			(to "sympydoc")
;;   «.find-sympydoc»		(to "find-sympydoc")
;;   «.find-pydoc»		(to "find-pydoc")
;; «.pip3»			(to "pip3")
;; «.maxima»			(to "maxima")
;; «.oldmaxima»			(to "oldmaxima")
;; «.maxima-mode»		(to "maxima-mode")
;; «.maxima-git»		(to "maxima-git")
;; «.maxima-cvs»		(to "maxima-cvs")
;; «.maxima-gpdraw»		(to "maxima-gpdraw")
;; «.emaxima»			(to "emaxima")
;; «.emaxima-conv»		(to "emaxima-conv")
;; «.imaxima»			(to "imaxima")
;; «.eepitch-region»		(to "eepitch-region")
;; «.code-filetext»		(to "code-filetext")
;; «.debian-devel-docs»		(to "debian-devel-docs")
;; «.vcaa»			(to "vcaa")
;; «.no-mouse-mode»		(to "no-mouse-mode")
;; «.openoffice»		(to "openoffice")
;; «.mm:ss»			(to "mm:ss")
;; «.find-mplayer»		(to "find-mplayer")
;; «.code-mplayer»		(to "code-mplayer")
;; «.code-Mplayer»		(to "code-Mplayer")
;; «.ict-quimica»		(to "ict-quimica")
;; «.find-minicatsvideo»	(to "find-minicatsvideo")
;; «.find-minicatsframe»	(to "find-minicatsframe")
;; «.luajit»			(to "luajit")
;; «.love2d»			(to "love2d")
;; «.caderno»			(to "caderno")
;; «.unilog-2010»		(to "unilog-2010")
;; «.gdb»			(to "gdb")
;; «.bash»			(to "bash")
;; «.dash»			(to "dash")
;; «.ksh»			(to "ksh")
;; «.tcsh»			(to "tcsh")
;; «.zsh»			(to "zsh")
;; «.guile»			(to "guile")
;; «.mit-scheme»		(to "mit-scheme")
;; «.scsh»			(to "scsh")
;; «.haskell»			(to "haskell")
;;  «.haskell-docs»		(to "haskell-docs")
;;  «.haskell-mode»		(to "haskell-mode")
;;  «.hoogle»			(to "hoogle")
;;  «.ghc»			(to "ghc")
;;  «.hugs»			(to "hugs")
;; «.ocaml»			(to "ocaml")
;; «.plzoo»			(to "plzoo")
;; «.levy»			(to "levy")
;; «.picolisp»			(to "picolisp")
;; «.clcookbook»		(to "clcookbook")
;; «.ee-backup-lua-locals»	(to "ee-backup-lua-locals")
;; «.xmonad»			(to "xmonad")
;; «.unilog-current»		(to "unilog-current")
;; «.idct»			(to "idct")
;; «.minicats»			(to "minicats")
;; «.eblslides»			(to "eblslides")
;; «.eblsheaves»		(to "eblsheaves")
;; «.sheavesforchildren»	(to "sheavesforchildren")
;; «.find-2»			(to "find-2")
;; «.chaui»			(to "chaui")
;; «.metapost»			(to "metapost")
;; «.projeto»			(to "projeto")
;; «.find-luac»			(to "find-luac")
;; «.find-lua51ev»		(to "find-lua51ev")
;; «.gs»			(to "gs")
;; «.gforth»			(to "gforth")
;; «.erlang»			(to "erlang")
;; «.google-dns»		(to "google-dns")
;; «.google»			(to "google")
;; «.fv»			(to "fv")
;; «.scan»			(to "scan")
;; «.rotate»			(to "rotate")
;; «.tex-def-many»		(to "tex-def-many")
;; «.process-coding-system»	(to "process-coding-system")
;; «.agda»			(to "agda")
;; «.agda-cabal»		(to "agda-cabal")
;; «.agda-stack»		(to "agda-stack")
;; «.agda-plfa»			(to "agda-plfa")
;; «.idris»			(to "idris")
;; «.idris2»			(to "idris2")
;; «.idris-ct»			(to "idris-ct")
;; «.idris-bradytdd»		(to "idris-bradytdd")
;; «.idris2-tutorial»		(to "idris2-tutorial")
;; «.idris2-mode»		(to "idris2-mode")
;; «.racket»			(to "racket")
;; «.cabal-path»		(to "cabal-path")
;; «.luarocks»			(to "luarocks")
;; «.ltcltk»			(to "ltcltk")
;; «.inkscape»			(to "inkscape")
;; «.pulseaudio»		(to "pulseaudio")
;; «.tramp-2.1.9»		(to "tramp-2.1.9")
;; «.varda»			(to "varda")
;; «.find-newhost-links»	(to "find-newhost-links")
;; «.apt-cacher»		(to "apt-cacher")
;; «.blogme4-texi»		(to "blogme4-texi")
;; «.olympus»			(to "olympus")
;; «.quadro»			(to "quadro")

;; «.rubyforth»			(to "rubyforth")
;; «.pythonforth»		(to "pythonforth")
;; «.eepitch-rubyforth»		(to "eepitch-rubyforth")
;; «.eepitch-dednat4»		(to "eepitch-dednat4")
;; «.duoforths»			(to "duoforths")
;; «.rubyforth»			(to "rubyforth")
;; «.dflua»			(to "dflua")
;; «.zbforth»			(to "zbforth")

;; «.scala»			(to "scala")
;; «.clojure»			(to "clojure")
;; «.J»				(to "J")
;; «.R»				(to "R")
;; «.joy»			(to "joy")
;; «.octave»			(to "octave")
;; «.cc-mode»			(to "cc-mode")
;; «.eevbuild»			(to "eevbuild")
;; «.eev-puro»			(to "eev-puro")
;; «.eev-puro-deb»		(to "eev-puro-deb")
;; «.LR-and-RE-and-RR»		(to "LR-and-RE-and-RR")
;; «.ee-tramp-proxy»		(to "ee-tramp-proxy")
;; «.ee-splitn»			(to "ee-splitn")
;; «.ee-wrapt»			(to "ee-wrapt")
;; «.ee-wrapc»			(to "ee-wrapc")
;; «.binutils»			(to "binutils")
;; «.wget»			(to "wget")
;; «.ee-popup»			(to "ee-popup")
;; «.find-wset»			(to "find-wset")
;; «.inet-addr»			(to "inet-addr")
;; «.cleanindex»		(to "cleanindex")
;; «.virtualbox»		(to "virtualbox")
;; «.gab»			(to "gab")
;; «.find-rawcat»		(to "find-rawcat")
;; «.estagios»			(to "estagios")
;; «.ict12sep20»		(to "ict12sep20")
;; «.chomsky»			(to "chomsky")
;; «.ee-rmprefix»		(to "ee-rmprefix")
;; «.ee-killurl»		(to "ee-killurl")
;; «.cow-and-mow»		(to "cow-and-mow")
;; «.cuow»			(to "cuow")
;; «.tramp-no-remote-shells»	(to "tramp-no-remote-shells")
;; «.screencasts»		(to "screencasts")
;; «.git»			(to "git")
;; «.git-internals»		(to "git-internals")
;; «.magit»			(to "magit")
;; «.pro-git»			(to "pro-git")
;; «.find-gitdiag»		(to "find-gitdiag")
;; «.OP-1»			(to "OP-1")
;; «.find-eev2-links»		(to "find-eev2-links")
;; «.diags»			(to "diags")
;; «.tags-mode»			(to "tags-mode")
;; «.tags-mode-chars»		(to "tags-mode-chars")
;; «.quadradinho»		(to "quadradinho")
;; «.youtube-dl»		(to "youtube-dl")
;;   «.ee-youtubedl-dirs»	(to "ee-youtubedl-dirs")
;;   «.ee-youtubedl-command»	(to "ee-youtubedl-command")
;; «.youtube-title»		(to "youtube-title")
;;   «.yt»			(to "yt")
;; «.youtube-db.lua»		(to "youtube-db.lua")
;; «.find-screenshot-links»	(to "find-screenshot-links")
;; «.idarct»			(to "idarct")
;; «.idarct-preprint»		(to "idarct-preprint")
;; «.eww»			(to "eww")
;; «.find-freenode0»		(to "find-freenode0")
;; «.scast»			(to "scast")
;; «.android»			(to "android")
;; «.android-adb»		(to "android-adb")
;; «.eev-videos»		(to "eev-videos")
;; «.packages»			(to "packages")
;; «.packages-melpa»		(to "packages-melpa")
;; «.mplayer»			(to "mplayer")
;; «.mplayer-screenshots»	(to "mplayer-screenshots")
;; «.lua-mode»			(to "lua-mode")
;; «.contact»			(to "contact")
;; «.find-1|3»			(to "find-1|3")
;; «.find-GA-links»		(to "find-GA-links")
;; «.dired-sort»		(to "dired-sort")
;; «.ee-dired-marked»		(to "ee-dired-marked")
;; «.find-cp-to-angg-links»	(to "find-cp-to-angg-links")
;; «.2013-rfm-rcn»		(to "2013-rfm-rcn")
;; «.rst-mode»			(to "rst-mode")
;; «.ee-shell-quote»		(to "ee-shell-quote")
;; «.eecd»			(to "eecd")
;; «.lyrics»			(to "lyrics")
;; «.djview»			(to "djview")
;; «.tikz»			(to "tikz")
;; «.insert-n»			(to "insert-n")
;; «.beamer»			(to "beamer")
;; «.netsurf»			(to "netsurf")
;; «.ee-read-redirect»		(to "ee-read-redirect")
;; «.ee-read-urltitle»		(to "ee-read-urltitle")
;; «.youtube-db»		(to "youtube-db")
;; «.youtube-db-play»		(to "youtube-db-play")
;; «.yeetube»			(to "yeetube")
;; «.pyfb»			(to "pyfb")
;; «.faceutils»			(to "faceutils")
;; «.facepy»			(to "facepy")
;; «.fbcache»			(to "fbcache")
;; «.2014.2-GA»			(to "2014.2-GA")
;; «.2015.1-GA»			(to "2015.1-GA")
;; «.cheese»			(to "cheese")
;; «.ee-wrap-eejump»		(to "ee-wrap-eejump")
;; «.ex»			(to "ex")
;; «.q-and-qc»			(to "q-and-qc")
;; «.find-dired-eek»		(to "find-dired-eek")
;; «.find-dired-re»		(to "find-dired-re")
;; «.istanbul»			(to "istanbul")
;; «.code-etex»			(to "code-etex")
;; «.code-etex-dednat6»		(to "code-etex-dednat6")
;; «.find-etex-links»		(to "find-etex-links")
;; «.code-quadro»		(to "code-quadro")
;; «.rrj»			(to "rrj")
;; «.falta-misandria»		(to "falta-misandria")
;; «.lynx»			(to "lynx")
;; «.luakit»			(to "luakit")
;; «.lae»			(to "lae")
;; «.gae»			(to "gae")
;; «.gale»			(to "gale")
;; «.c2»			(to "c2")
;; «.c2-2019-1»			(to "c2-2019-1")
;; «.c2-2019-2»			(to "c2-2019-2")
;; «.c3-2019-1»			(to "c3-2019-1")
;; «.c3-2019-2»			(to "c3-2019-2")
;; «.c2-2020-1»			(to "c2-2020-1")
;; «.c2-2020-1-telegram»	(to "c2-2020-1-telegram")
;; «.c3-2019-2»			(to "c3-2019-2")
;; «.c3-2020-1»			(to "c3-2020-1")
;; «.c3-2020-1-telegram»	(to "c3-2020-1-telegram")
;; «.c2-2020-2»			(to "c2-2020-2")
;; «.c3-2020-2»			(to "c3-2020-2")
;; «.c2-2020-2-telegram»	(to "c2-2020-2-telegram")
;; «.c3-2020-2-telegram»	(to "c3-2020-2-telegram")
;; «.c2-2021-1»			(to "c2-2021-1")
;; «.c2-2021-1-telegram»	(to "c2-2021-1-telegram")
;; «.c3-2021-1»			(to "c3-2021-1")
;; «.c3-2021-1-telegram»	(to "c3-2021-1-telegram")
;; «.c2-2021-2»			(to "c2-2021-2")
;; «.c2-2021-2-telegram»	(to "c2-2021-2-telegram")
;; «.c3-2021-2»			(to "c3-2021-2")
;; «.c3-2021-2-telegram»	(to "c3-2021-2-telegram")
;; «.c2-2022-1»			(to "c2-2022-1")
;; «.c2q221»			(to "c2q221")
;; «.c2-2022-1-quadros»		(to "c2-2022-1-quadros")
;; «.c2-2022-1-telegram»	(to "c2-2022-1-telegram")
;; «.c3-2022-1»			(to "c3-2022-1")
;; «.c3q221»			(to "c3q221")
;; «.c3-2022-1-quadros»		(to "c3-2022-1-quadros")
;; «.c3-2022-1-telegram»	(to "c3-2022-1-telegram")
;; «.c2-2022-2»			(to "c2-2022-2")
;; «.c2-2022-2-quadros»		(to "c2-2022-2-quadros")
;; «.c2q222»			(to "c2q222")
;; «.c3-2022-2»			(to "c3-2022-2")
;; «.c3-2022-2-quadros»		(to "c3-2022-2-quadros")
;; «.c3q222»			(to "c3q222")
;;
;; «.c2-2023-1»			(to "c2-2023-1")
;; «.c2-2023-1-quadros»		(to "c2-2023-1-quadros")
;; «.c2q231»			(to "c2q231")
;; «.c3-2023-1»			(to "c3-2023-1")
;; «.c3-2023-1-quadros»		(to "c3-2023-1-quadros")
;; «.c3q231»			(to "c3q231")
;; «.c4-2023-1»			(to "c4-2023-1")
;; «.c4-2023-1-quadros»		(to "c4-2023-1-quadros")
;; «.c4q231»			(to "c4q231")
;; «.es-2023-1»			(to "es-2023-1")
;; «.es-2023-1-quadros»		(to "es-2023-1-quadros")
;; «.esq231»			(to "esq231")
;; «.la-2023-1»			(to "la-2023-1")
;; «.la-2023-1-quadros»		(to "la-2023-1-quadros")
;; «.laq231»			(to "laq231")

;; «.c2-2023-2»			(to "c2-2023-2")
;; «.c2-2023-2-quadros»		(to "c2-2023-2-quadros")
;; «.c2q232»			(to "c2q232")
;; «.c3-2023-2»			(to "c3-2023-2")
;; «.c3-2023-2-quadros»		(to "c3-2023-2-quadros")
;; «.c3q232»			(to "c3q232")

;; «.c2-2024-1»			(to "c2-2024-1")
;; «.c2-2024-1-quadros»		(to "c2-2024-1-quadros")
;; «.c2q241»			(to "c2q241")
;; «.c3-2024-1»			(to "c3-2024-1")
;; «.c3-2024-1-quadros»		(to "c3-2024-1-quadros")
;; «.c3q241»			(to "c3q241")
;;
;; «.c2-2024-2»			(to "c2-2024-2")
;; «.c2-2024-2-quadros»		(to "c2-2024-2-quadros")
;; «.c2q242»			(to "c2q242")
;; «.c3-2024-2»			(to "c3-2024-2")
;; «.c3-2024-2-quadros»		(to "c3-2024-2-quadros")
;; «.c3q242»			(to "c3q242")
;;
;; «.c2q»			(to "c2q")
;; «.c2q152»			(to "c2q152")
;; «.c2q161»			(to "c2q161")
;; «.c2q162»			(to "c2q162")
;; «.c2q171»			(to "c2q171")
;; «.c2q172»			(to "c2q172")
;; «.c2q181»			(to "c2q181")
;; «.c2q182»			(to "c2q182")
;; «.c2q191»			(to "c2q191")
;; «.c2q192»			(to "c2q192")
;; «.c3q191»			(to "c3q191")
;; «.c3q192»			(to "c3q192")
;; «.gaq161»			(to "gaq161")
;; «.gaq162»			(to "gaq162")
;; «.gaq171»			(to "gaq171")
;; «.gaq172»			(to "gaq172")
;; «.gaq181»			(to "gaq181")
;; «.mdq182»			(to "mdq182")
;; «.laq162»			(to "laq162")
;; «.laq171»			(to "laq171")
;; «.laq172»			(to "laq172")
;; «.laq181»			(to "laq181")
;; «.size»			(to "size")
;; «.ee-calendar-generate»	(to "ee-calendar-generate")
;; «.find-planarhas»		(to "find-planarhas")
;; «.ebl2019»			(to "ebl2019")
;; «.texlive»			(to "texlive")
;; «.tugboat»			(to "tugboat")
;; «.ee-find-djvu-cleanup»	(to "ee-find-djvu-cleanup")
;; «.ee-add-find-to-head»	(to "ee-add-find-to-head")
;; «.autoconf»			(to "autoconf")
;; «.bibtex»			(to "bibtex")
;; «.eewrap-mypsection»		(to "eewrap-mypsection")
;; «.bat»			(to "bat")
;; «.getinscritos»		(to "getinscritos")
;; «.dednat6-tugboat»		(to "dednat6-tugboat")
;; «.find-intro-source»		(to "find-intro-source")
;; «.grub»			(to "grub")
;; «.find-git-eev-links»	(to "find-git-eev-links")
;; «.find-echars-around»	(to "find-echars-around")
;; «.scheinerman-esquemas»	(to "scheinerman-esquemas")
;; «.find-quadros-links»	(to "find-quadros-links")
;; «.find-cabecalho-links»	(to "find-cabecalho-links")
;; «.ee-with-this-and-prev»	(to "ee-with-this-and-prev")
;; «.ee-anchor-back»		(to "ee-anchor-back")
;; «.ee-tla-link»		(to "ee-tla-link")
;; «.sexptotarget»		(to "sexptotarget")
;; «.find-font-links»		(to "find-font-links")
;; «.clg»			(to "clg")
;; «.show-paren-mode»		(to "show-paren-mode")
;; «.pdf-tools»			(to "pdf-tools")
;; «.2020-1-slides-aulas»	(to "2020-1-slides-aulas")
;; «.rexx»			(to "rexx")
;;   «.eepitch-oorexx»		(to "eepitch-oorexx")
;;   «.oorexx-test-blocks»	(to "oorexx-test-blocks")
;;   «.rexx-sc»			(to "rexx-sc")
;;   «.oorexx-docs»		(to "oorexx-docs")
;;   «.srf»			(to "srf")
;; «.ff-search»			(to "ff-search")
;; «.ee-pdftotext-replace-bad-ffs»  (to "ee-pdftotext-replace-bad-ffs")
;; «.tipografia-digital»	(to "tipografia-digital")
;; «.book-index»		(to "book-index")
;; «.find-tl-links»		(to "find-tl-links")
;; «.find-pdft-page»		(to "find-pdft-page")
;; «.ee-pdftools-revert-all»	(to "ee-pdftools-revert-all")
;; «.find-dednat6-links»	(to "find-dednat6-links")
;; «.fde»			(to "fde")
;; «.find-three-main-keys-intro»  (to "find-three-main-keys-intro")
;; «.key-chord»			(to "key-chord")
;; «.ee-tag-re»			(to "ee-tag-re")
;; «.eval-print-arrow-color»	(to "eval-print-arrow-color")
;; «.emacs27-adjust-faces»	(to "emacs27-adjust-faces")
;; «.eetikz»			(to "eetikz")
;; «.asymptote»			(to "asymptote")
;; «.ee-insert-test-asy-mode»	(to "ee-insert-test-asy-mode")
;; «.fennel»			(to "fennel")
;; «.find-mpv90-video»		(to "find-mpv90-video")
;; «.bsl»			(to "bsl")
;; «.hydra-r»			(to "hydra-r")
;; «.hydra-ei»			(to "hydra-ei")
;; «.ei»			(to "ei")
;; «.ee-mononoki»		(to "ee-mononoki")
;; «.vterm»			(to "vterm")
;; «.0x0»			(to "0x0")
;; «.subed»			(to "subed")
;; «.gnuplot»			(to "gnuplot")
;; «.slime»			(to "slime")
;; «.sly»			(to "sly")
;; «.quicklisp»			(to "quicklisp")
;; «.ee-cpb»			(to "ee-cpb")
;; «.emojis»			(to "emojis")
;; «.emlua»			(to "emlua")
;; «.cols»			(to "cols")
;; «.my/version»		(to "my/version")
;; «.derawify»			(to "derawify")
;; «.ee-protected-buffer»	(to "ee-protected-buffer")
;; «.fullscreen»		(to "fullscreen")
;; «.ee-set-fullscreen»		(to "ee-set-fullscreen")
;; «.make»			(to "make")
;; «.qunzip»			(to "qunzip")
;; «.ee-insert-test-raku-mode»	(to "ee-insert-test-raku-mode")
;; «.ee-eval-defun-test»	(to "ee-eval-defun-test")
;; «.find-einspector»		(to "find-einspector")
;; «.find-calceasyvideo»	(to "find-calceasyvideo")
;; «.find-luatb»		(to "find-luatb")
;; «.name0»			(to "name0")
;; «.telega»			(to "telega")
;; «.switftp»			(to "switftp")
;; «.ee-recompile-SUBTITLES»	(to "ee-recompile-SUBTITLES")
;; «.termux»			(to "termux")
;; «.eepitch-termux»		(to "eepitch-termux")
;; «.find-git-shows»		(to "find-git-shows")
;; «.lean4»			(to "lean4")
;; «.lean4-mode»		(to "lean4-mode")
;; «.tudos-tex»			(to "tudos-tex")
;; «.caepro2»			(to "caepro2")
;; «.caepro3»			(to "caepro3")
;; «.caepro4»			(to "caepro4")
;; «.caepro5»			(to "caepro5")
;; «.comissao1»			(to "comissao1")
;; «.logs-pdfizados»		(to "logs-pdfizados")
;; «.caepro-arounds»		(to "caepro-arounds")
;;   «.find-arounds»		(to "find-arounds")
;; «.ee-setxkbmap-show»		(to "ee-setxkbmap-show")
;; «.ei3»			(to "ei3")
;; «.e13»			(to "e13")





;;;;;
;;
;; «autoloads»  (to ".autoloads")
;;
;;;;;

(autoload 'Info-goto-node "info")
(autoload 'browse-url-interactive-arg "browse-url")
(autoload 'find-function-read "find-func")
(autoload 'icon-mode "icon" nil t)
(autoload 'lua-mode "lua-mode" nil t)
(autoload 'pp-to-string "pp")
(autoload 'emacs-wiki-maybe "emacs-wiki")
(autoload 'htmlize-buffer "htmlize")
(autoload 'erc-select "erc" nil t)
(autoload 'Man-fontify-manpage "man" nil t)
(autoload 'facemenu-remove-all "facemenu" nil t)

;; (find-eev "Makefile" "htmlize.el")
;; (find-eev "htmlize.el")
(autoload 'htmlize-file "htmlize" nil t)

;; (find-efile "generic-x.el")
(setq generic-use-find-file-hook nil)
(autoload 'fvwm-generic-mode "generic-x" nil t)

;; (find-angg "elisp/tprops.el")
(autoload 'tp-r0-mode "tprops" nil t)
(autoload 'tp-r2-mode "tprops" nil t)

;; (find-epp 'load-path)
;; (find-elinks-elisp (mapcar 'ee-S load-path))
;;
;; (add-to-list 'load-path "~/eev-current") ; do I need these here?
(add-to-list 'load-path "~/elisp/")
;;
;; (find-eev "htmlize-eev.el")
;; (find-eev "htmlize-eev.el" "htmlize-eev-files")
(autoload 'htmlize-eev-files "htmlize-eev" nil t)
(autoload 'htmlize-eev-files-then-quit "htmlize-eev" nil t)





;;;;;
;;
;; «add-to-alist»  (to ".add-to-alist")
;;
;;;;;

;; See: (to "add-to-list")
;;      (find-es "emacs" "add-to-list")
;;
;; From:
;; <http://lists.gnu.org/archive/html/bug-gnu-emacs/2001-02/msg00066.html>,
;; slightly changed.
;;
;; (setq my-alist '(("1" . "One") ("2" . "Two") ("3". "Three")))
;; (assoc "2" my-alist)
;; my-alist
;; (add-to-alist 'my-alist '("2" . "Dois"))
;; (add-to-alist 'my-alist '("4" . "Quatro"))

;; (find-elnode "Association Lists")
(defun add-to-alist (alist-var elt-cons &optional no-replace)
  "Add to the value of ALIST-VAR an element ELT-CONS if it isn't there yet.
If an element with the same car as the car of ELT-CONS is already present,
replace it with ELT-CONS unless NO-REPLACE is non-nil; if a matching
element is not already present, add ELT-CONS to the front of the alist.
The test for presence of the car of ELT-CONS is done with `equal'."
  (let ((existing-element (assoc (car elt-cons) (symbol-value alist-var))))
    (if existing-element
        (or no-replace
            (rplacd existing-element (cdr elt-cons)))
      (set alist-var (cons elt-cons (symbol-value alist-var)))))
  (symbol-value alist-var))



;;;                      
;;;  ___  ___  ___ _ __  
;;; / __|/ _ \/ _ \ '_ \ 
;;; \__ \  __/  __/ | | |
;;; |___/\___|\___|_| |_|
;;;                      
;; «seen»  (to ".seen")
;; (find-es "emacs" "seen")
;; (find-angg "elisp/seen2.el")
;; (find-node "(efaq)Debugging a customization file")
;; (find-bgprocess "emacs-default-x --debug-init")
;; (find-angggrep "grep --color=auto -nH --null -e '(seen ' .emacs")
;;
(setq seen ())

;; Test: (seen 'show)
(defun seen (&optional arg)
  (interactive (list 'show))
  (if (eq arg 'show)
      (find-seen-links) ;; Was: (describe-variable 'seen)
    (if (equal (format "%S" arg)
	       (getenv "SEEN_STOP_AT"))
	(throw 'seen-stop-at 42)
      (setq seen (cons arg seen)))))

(seen 461)

(defun insert-seen ()
  (interactive)
  (insert (format "(seen %d)\n" (line-number-at-pos))))



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

;; Test: (find-eppp (ee-find-seen-links))
(defun ee-find-seen-links ()
  (cl-loop for s in seen
           collect `(find-fline
		     "~/.emacs"
		     ,(format "(seen %s)" s))))



;; «seen2»  (to ".seen2")
;; (find-es "emacs" "catch-and-throw")





;;;;;
;;
;; «auto-mode-alist»  (to ".auto-mode-alist")
;;
;;;;;

;; (find-es "emacs" "auto-mode-alist")

(add-to-alist 'auto-mode-alist '("\\.icn$"  . icon-mode))
(add-to-alist 'auto-mode-alist '("\\.th$"   . indented-text-mode))
(add-to-alist 'auto-mode-alist '("\\.st\\'" . smalltalk-mode))
(add-to-alist 'auto-mode-alist '("\\.lua$"  . lua-mode))
(add-to-alist 'auto-mode-alist '("\\.fs$"   . forth-mode))
(add-to-alist 'auto-mode-alist '("\\.mac$"  . maxima-mode))
(add-to-alist 'auto-mode-alist '("\\.m$"    . octave-mode))
;; (find-es "arduino" "debian-examples")
(add-to-alist 'auto-mode-alist '("\\.ino$"  . c++-mode))
(add-to-alist 'auto-mode-alist '("\\.ino$"  . c++-mode))

(add-to-alist 'auto-mode-alist '("\\.rst\\.txt\\'" . rst-mode))

(add-to-alist 'auto-mode-alist '("\\.gnuplot$"  . gnuplot-mode))

;; This is for OpenOffice files, but is not working:
;; (add-to-alist 'auto-mode-alist '("\\.sxw$" . archive-mode))

;; (add-to-list 'auto-mode-alist '("\\.cls\\'"   . oorexx-mode))
(add-to-list 'auto-mode-alist '("\\.rexx?\\'" . oorexx-mode))
(add-to-list 'auto-mode-alist '("\\.orx\\'"   . oorexx-mode))
(add-to-list 'interpreter-mode-alist '("rexx" . oorexx-mode))
;;
;; (require 'oorexx-mode)
;; (find-angg "elisp/oorexx-mode.el")
;; (autoload 'oorexx-mode "oorexx-mode" "OOREXX mode" nil t)

;; (find-es "fvwm" "adoc-mode")
(add-to-list 'auto-mode-alist '("\\.ad\\'"   . adoc-mode))
(add-to-list 'auto-mode-alist '("\\.adoc\\'" . adoc-mode))

;; (find-es "emacs" "nov.el")
(add-to-list 'auto-mode-alist '("\\.epub\\'" . nov-mode))





;;;;;
;;
;; «mode-variables»  (to ".mode-variables")
;;
;;;;;

;; (find-elnode "Defining Variables")
;; (find-e20node "Init Examples")

;; For Emacs21 (pre-21.1 at least),
;; where errors on C-x C-e invoke the debugger:
;; (find-efunction 'eval-last-sexp)
;; (find-evariable 'eval-expression-debug-on-error)
(setq eval-expression-debug-on-error nil)

;; And because I don't grok CVS at all:
(setq version-control 'never)

;; Make some things behave as in Emacs20:
;; (find-node "(elisp)The Echo Area" "message-truncate-lines")
;; (find-eevfile "demo/.emacs")
(setq next-line-add-newlines t)
(setq message-truncate-lines t)

;; «8th-bit-is-meta»  (to ".8th-bit-is-meta")
;; (find-elnode "Input Modes" "converts characters with the 8th bit")
;; (find-angg ".emacs.local.bsd")
;; (8th-bit-is-meta)
;; (8-bit-clean)
;;
(defun 8th-bit-is-meta () (interactive)
  (set-input-mode (car (current-input-mode)) (nth 1 (current-input-mode)) t))
(defun 8-bit-clean () (interactive)
  (set-input-mode (car (current-input-mode)) (nth 1 (current-input-mode)) 0))

(8-bit-clean)

;; (find-efunction 'mouse-yank-at-click)
(setq mouse-yank-at-point t)

;; (find-elnode "Disabling Commands")
(put 'narrow-to-region 'disabled nil)

;; (find-es "emacs" "C_indentation")
(setq c-indent-level 4
      c-label-offset 2)
;; (find-e20file "progmodes/icon.el")
(setq icon-indent-level 2
      icon-continued-statement-offset 2)
;; (find-e20file "progmodes/tcl-mode.el")
(setq tcl-indent-level 2)


;; (setq ange-ftp-default-user "edrx")
;; (setq ange-ftp-default-user "anonymous")
;; (setq ange-ftp-generate-anonymous-password "edrx@mat.puc-rio.br")

;; «w3m-el»  (to ".w3m-el")
;; (find-es "emacs" "w3")
;; (setq w3-default-homepage (substitute-in-file-name "$HOME/TH/L/index.html"))
;; (setq w3-home-page (substitute-in-file-name "$HOME/TH/L/index.html"))
;; (setq w3-use-terminal-glyphs t)
(setq w3-reuse-buffers 'yes)

;; (find-evardescr 'w3m-key-binding)
(setq w3m-key-binding 'info)
(setq w3m-async-exec nil)

;; «same-window-buffer-names»  (to ".same-window-buffer-names")
;; (find-elnode "The Zen of Buffer Display")
;; (find-elnode "Choosing Window Options")
;; (find-evardescr 'same-window-buffer-names)
(setq same-window-buffer-names
      (append '("*Help*" "*compilation*" "*Occur*")
	      same-window-buffer-names))

;; (find-elnode "Buffer Display Action Functions")
(setq pop-up-windows nil)

;; (setq planner-use-other-window nil)

;; (find-efacedescr 'default)
;; (find-angg ".Xdefaults")
;; (set-face-background face bg)
;; (set-face-foreground face bg)


(seen 667)

;; (find-es "emacs" "ispell-menu-map-needed")
(setq ispell-menu-map-needed nil)




;; «emacs-cvs»      (to ".emacs-cvs")
;; «debian-startup» (to ".debian-startup")
;; (find-es "emacs" "debian-startup")
;;
;; This makes emacs-cvs aware of all the add-on -el packages in my debian box.
;; To do: update this to git emacs.
;; (find-angg ".zshrc" "emacs-cvs")

;; (find-efile "startup.el")
;; (find-sh "locate debian-startup.el")
;; (find-sh "locate startup | grep -i emacs")
;; (find-fline "/usr/share/emacs24/site-lisp/")
;; (find-fline "/usr/share/emacs24/site-lisp/debian-startup.el")
;; (find-fline "/usr/share/emacs/site-lisp/")
;; (find-fline "/usr/share/emacs/site-lisp/debian-startup.el")
;; (find-fline "/etc/" "emacs")
;; (find-fline "/etc/emacs/site-start.d/")
;; (find-fline "/etc/emacs24/site-start.d/")

;; (find-sitelispfile "")
;; (find-sitelispfile "debian-startup.el")
;; (find-sitelispfile "debian-startup.el" "(defun debian-startup (flavor)")
;; (find-sitelispfile "debian-startup.el" "(defconst debian-emacs-flavor ")
;; (find-sitelispfile "debian-startup.el" "(debian-run-directories ")
;; debian-emacs-flavor
;; common-dir: (find-fline "/etc/emacs/site-start.d/")
;; flavor-dir: (find-fline "/etc/emacs24/site-start.d/")

;; (find-fline "/etc/" "emacs")
;; (my-debian-emacs-flavor)
;;   --> emacs24
(defun my-debian-emacs-flavor ()
  (cond ((file-accessible-directory-p
	  "/etc/emacs24/site-start.d/") 'emacs24)
	((file-accessible-directory-p
	  "/etc/emacs23/site-start.d/") 'emacs23)
	((file-accessible-directory-p
	  "/etc/emacs22/site-start.d/") 'emacs22)))

(seen 925)

;; If we have the startup file but not BOTH of:
;;       the `debian-startup' function and
;;       the `debian-emacs-flavor' variable
;; then: load the startup-file,
;;       set `debian-emacs-flavor',
;;       run (debian-startup debian-emacs-flavor),
;;       add all subdirs of (find-fline "/usr/share/emacs/site-lisp/")
;;       to load-path.
;;
'
(let ((startup-file "/usr/share/emacs/site-lisp/debian-startup.el"))
  (if (and (or (not (fboundp 'debian-startup))
	       (not (boundp  'debian-emacs-flavor)))
	   (file-readable-p startup-file))
      (progn
	(load-file startup-file)
	(setq debian-emacs-flavor (my-debian-emacs-flavor))
	(debian-startup debian-emacs-flavor)
	(mapcar '(lambda (f)
		   (and (not (string= (substring f -3) "/.."))
			(file-directory-p f)
			(add-to-list 'load-path f)))
		(directory-files "/usr/share/emacs/site-lisp" t)))))



(seen 1039)


;; «my-mode»  (to ".my-mode")
;; (find-es "emacs" "my-mode")
;; (find-angg ".emacs.mini" "my-mode")
;; (find-angg ".emacs.templates" "find-my-mode-links")
;; I *think* that minor modes defined later have precedence in the
;; key->action translation; eegud-keys-mode also defines M-s, so let
;; me try to define my-mode before eev-mode and eegud-keys-mode get
;; created...

;; (find-ekeymapdescr my-mode-map)
;; (find-efunctiondescr 'my-mode)

(setq my-mode-map (make-sparse-keymap))
(define-key my-mode-map "\M-i" 'find-file-this-line)
(define-minor-mode my-mode "Makes the keymap `my-mode-map' active."
  :init-value t :global t)

(define-key my-mode-map (kbd "M-C-<up>")
  (lambda () (interactive) (scroll-down 1)))
(define-key my-mode-map (kbd "M-C-<down>")
  (lambda () (interactive) (scroll-up 1)))

;; (global-set-key "\M-o" 'other-window)

;; (find-esetkey-links (kbd "M-o") 'other-window)
(define-key my-mode-map    "\M-o"  'other-window)

;; (define-key my-mode-map "\M-a"
;;   (lambda () (interactive) (eek "C-a") (insert ";;;###autoload\n")))

;; (find-sh "locate snarf | grep jpg | grep -v xvpics | sort")


(seen 1073)




;;;;;
;;
;; «eev»  (to ".eev")
;;
;;;;;

(setq ee-delimiter-hash "\n#*\n")
(setq ee-delimiter-percent "\n%*\n")
;; (setq ee-anchor-format "«%s»")
(setq eelatex-eevscript "cd $EEVTMPDIR; latex tmp.tex && rexdvi tmp.dvi")

(standard-display-8bit 160 254)

;; (setq debug-on-error t)

;; «eev-block»  (to ".eev-block")
;; (find-eevfile "eev.el" "define-minor-mode eev-mode")
;; (find-eevfile "eev.el" "define-minor-mode eev-mode\n")
;;(setq eev-mode-lighter nil)


;; Load eev.
;; Generated by: (find-eev-install-links "~/eev-current/" "~/eev" "#")
;;        Check: (find-fline "~/eev-current/")
;;          See: (find-eev-install-intro "3. Changing your .emacs")
;;
(add-to-list 'load-path "~/eev-current")
(require 'eev-load)                 ; (find-eev "eev-load.el")
(require 'eev-aliases)              ; (find-eev "eev-aliases.el")
(eev-mode 1)                        ; (find-eev "eev-mode.el")
;;
(seen 1188)

;; From: (find-templates-intro "4. Adding meat")
' (require 'eev-qrl)                  ; (find-eev "eev-qrl.el")
' (require 'eev-kl-here)              ; (find-eev "eev-kl-here.el")
' (require 'eev-strange-functions)    ; (find-eev "eev-strange-functions.el")
;;
(require 'eev-prepared)             ; (find-eev "eev-prepared.el")
(require 'eev-bounded)              ; (find-eev "eev-bounded.el")

;; (find-lean4-intro)
;; (find-angg ".emacs.lean.el")
(load "~/.emacs.lean.el")
(defun ele () (interactive) (find-angg ".emacs.lean.el"))
(defun el4 () (interactive) (find-eev "eev-lean4.el"))
(defun fli () (interactive) (find-lean4-intro))
(require 'eev-lean4)                ; (find-eev "eev-lean4.el")

;; (find-psne-intro         "6. `ee-flip-psne-ness'")
(define-key eev-mode-map "\M-s" 'ee-flip-psne-ness)
;; (find-wrap-intro "The bindings for `M-Z' and `M-#'")
(define-key eev-mode-map "\M-#" 'eewrap-two-eepitches)

;; «eev-pdflike-aliases» (to ".eev-pdflike-aliases")
;; (find-eev "eev-pdflike.el" "aliases")
(defalias 'code-pstotext   'code-pdftotext)
(defalias 'code-djvutotext 'code-djvu-text)
(defalias 'code-badpdf     'code-xpdf)

;; ;; «code-pdf-text8»  (to ".code-pdf-text8")
;; ;; See: (find-eev "eev-pdflike.el" "find-pdftotext-text")
;; (defun ee-find-pdf-text8 (fname &rest rest)
;;   `(,ee-pdftotext-program "-layout" ,(ee-expand fname) "-"))
;; 
;; ;; (find-code-pdftextbackend "pdf-text8")
;;         (code-pdftextbackend "pdf-text8")
;; 
;; (code-brfile 'find-pdf-text8
;; 	     :local         'brpdftxt8l
;; 	     :dired         'brpdftxt8d)

;; «1c-and-1cl»  (to ".1c-and-1cl")
;; From: (find-eev "eev-tlinks.el" "1c")
(defalias '1c  'find-1stclassvideos)
(defalias '1cl 'find-1stclassvideo-links)

;; «eev-glyphs»  (to ".eev-glyphs")
;; (find-eev "eepitch.el" "glyphs")
;; (find-eev "eepitch.el" "set-glyphs")
;; (find-eevfile "eev-glyphs.el" "(defun eev-set-default-glyphs")
;;
;; Compare:
;;   (eev-set-glyph     ?\^O ?* 'eev-glyph-face-red)
;;   (eepitch-set-glyph ?\^O ?* 'eepitch-star-face)
;;
(require 'eev-glyphs)          ; (find-eev "eev-glyphs.el")
(eev-set-glyph    8 32 'eev-glyph-face-bluebg)
(eev-set-glyph   12 ?L 'eev-glyph-face-yellow-on-red)
(eev-set-glyph   13 ?M 'eev-glyph-face-blue)

(seen 1227)

' (					

;; See: (find-eev "eepitch.el" "glyphs")
;; This will make formfeeds appear as yellow "L"s on a red background.
;;
(defface eev-glyph-face-yellow-on-red
  '((t (:foreground "yellow" :background "red")))
  "Face used for the formfeed glyph (char 12).")

(eepitch-set-glyph   12 ?L 'eev-glyph-face-yellow-on-red)

)

;; (find-eev "eev-compose.el")
;; (require 'eev-compose)         ; (find-eev "eev-compose.el")
;; (define-key eev-mode-map [?\C-,] 'eev-compose-two-keys)     ; X only
;; (define-key eev-mode-map [?\M-,] 'eev-compose-two-keys)

;; «eev-compose-hash»  (to ".eev-compose-hash")
;; (find-eev "eev-compose-hash.el")
;; (find-my-mode-links)
(when (fboundp 'rx-let)
  (require 'eev-compose-hash)
  (ee-composes-do ee-composes-bigstr-accents)
  (ee-composes-do ee-composes-bigstr-otheriso)
  (ee-composes-do ee-composes-bigstr-math)
  (define-key my-mode-map (kbd "M-,") 'ee-compose-pair)
  )

;; «eev-kla-fossils»  (to ".eev-kla-fossils")
;; (find-eev "eev-kla.el" "simple-defaults")
;; (find-eev "eev-kla.el" "other-defaults")
;; (find-eev "eev-kla.el" "other-defaults" "ee-kl-shorterfname")
;; (find-eev "eev-kla.el" "generate-sexps")
;; (ee-kl-shortfname   :c "es" :fname "/home/edrx/e/emacs.e")
;; (ee-kl-shorterfname :c "es" :fname "/home/edrx/e/emacs.e")
;; (ee-kl-shorterfname :c "es" :fname "~/e/emacs.e")
;; (ee-kl-shorterfname :c "TH" :fname "~/TH/2021aulas-por-telegram.blogme")

(put 'ee-preferred-c 'safe-local-variable #'string-or-null-p)

(setq ee-kl-format1 "%s\n")

;; Overrides this:
;; (find-eev "eev-kla.el" "shorter-fnames")
;;
(cl-defun ee-kl-shorterfname (&key fname c r)
  (setq fname (or fname (ee-kl-fname))
	c     (or c     (ee-kl-c :fname fname))
	r     (or r     (ee-kl-r :fname fname)))
  (cond ((equal c "es") (replace-regexp-in-string "\\.e$" "" r))
	((equal c "TH") (replace-regexp-in-string "\\.blogme$" "" r))
	(t r)))

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

;; «eepitch-preprocess-line»    (to ".eepitch-preprocess-line")
;; «eepitch-preprocess-regexp»  (to ".eepitch-preprocess-regexp")
;; See: (find-eepitch-intro "3.3. `eepitch-preprocess-line'")
(defvar eepitch-preprocess-regexp "^")
(setq   eepitch-preprocess-regexp "^")
(defun eepitch-preprocess-line (line)
  (replace-regexp-in-string eepitch-preprocess-regexp "" line))

;; «eepitch-password-prompt»  (to ".eepitch-password-prompt")
;; (eepitch-password-prompt 'yes)
;; (eepitch-password-prompt 'no)
;; (find-es "emacs" "comint-password")
(require 'comint)

(defun eepitch-password-prompt-yes ()
  (setq comint-password-prompt-regexp
	(default-value 'comint-password-prompt-regexp))
  "comint-password-prompt turned on")

(defun eepitch-password-prompt-no ()
  (setq comint-password-prompt-regexp (rx unmatchable))
  "comint-password-prompt turned off")

(defun eepitch-password-prompt (yes/no)
  (cond ((eq yes/no 'yes) (eepitch-password-prompt-yes))
	((eq yes/no 'no)  (eepitch-password-prompt-no))
	((t (error "Arg must be 'yes or 'no")))))

;; (find-eev "eev-pdflike.el" "change-default-viewer")
(defun ee-use-xpdf () (interactive) (defalias 'find-pdf-page 'find-xpdf-page))
(defun ee-use-pdfr () (interactive) (defalias 'find-pdf-page 'find-pdftoolsr-page))

;; (find-eev "eev-bounded.el")
;; (define-key eev-mode-map [f3] 'ee-bounded-function)

(defalias      'code-pdftotext      'code-pdf-text)
(defalias 'find-code-pdftotext 'find-code-pdf-text)
(defalias      'code-ps             'code-xpdf)
(defalias 'find-code-ps        'find-code-xpdf)

(require 'eev-channels)        ; (find-eev "eev-channels.el")
(define-key eev-mode-map [f9]   'eechannel-this-line)

(seen 1334)

;; Original: (find-eev "eev-tlinks.el" "find-1stclassvideoindex")
;; Local version that uses find-angg instead of find-anggwgeta-elisp
(defun find-1stclassvideoindex (c &rest pos-spec-list)
  (interactive (list (ee-1stclassvideo-around-point-ask)))
  (apply 'find-angg ".emacs.videos" c pos-spec-list))

;; Original: (find-eev "eev-tlinks.el" "find-1stclassvideolsubs")
;; Test: (find-1stclassvideolsubs "eev2021")
(defun find-1stclassvideolsubs (c &rest pos-spec-list)
  (interactive (list (ee-1stclassvideo-around-point-ask)))
  (let ((mp4stem (ee-1stclassvideos-mp4stem c)))
    (apply 'find-anggfile (format "SUBTITLES/%s.lua" mp4stem)
	   pos-spec-list)))


;; «auctex»  (to ".auctex")
;; (find-es "auctex")
(code-c-d "auctex" "~/.emacs.d/elpa/auctex-14.0.3/" "auctex")
;; (find-auctexfile "")
;; (find-auctexnode "")

;; (find-e20file "textmodes/tex-mode.el")
(setq tex-open-quote "\""
      tex-close-quote "\""
      tex-default-mode 'latex-mode
      latex-block-names '("align" "align*"))
;; AUCTeX needs separate defs, it seems.
;; (find-es "tex" "auctex")
(setq TeX-open-quote "\""
      TeX-close-quote "\"")
(setq sentence-end-double-space nil)
;; https://practicaltypography.com/are-two-spaces-better-than-one.html





;; (find-eev "eev-rstdoc.el")
;; (find-eev "eev-rstdoc.el" "default-defuns")
;;(require 'eev-rstdoc)
(ee-rstdoc-default-defuns)


;; «ee-rstdoc-:py»  (to ".ee-rstdoc-:py")
;; Based on: (find-eev "eev-rstdoc.el" "ee-rstdoc-:py")
;; But this uses python3.9 instead of python3.11.
(setq ee-rstdoc-:py
      '(:base      "index"
        :base-web  "https://docs.python.org/3/"
        :base-html "file:///usr/share/doc/python3.9-doc/html/"
        :base-rst  "/usr/share/doc/python3.9/html/_sources/"
        :rst       ".rst.txt"
        :res       ("#.*$" "\\?.*$" ".html$" ".txt$" ".rst$" "^file://"
                    "^https://docs.python.org/3/"
                    "^/usr/share/doc/python[0-9.]*-doc/html/"
                    "^/usr/share/doc/python[0-9.]*/html/_sources/")
        :kill      pdk
	))

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

;; «ee-rstdoc-:ghcug»  (to ".ee-rstdoc-:ghcug")
;; Skel: (find-rstdoc-links :ghcug)
(setq ee-rstdoc-:ghcug
      '(:base      "index"
        :base-web  "https://downloads.haskell.org/ghc/latest/docs/users_guide/"
        :base-html "file:///home/edrx/bigsrc/ghc-8.10.3/docs/users_guide/build-html/users_guide/"
        :base-rst  "/home/edrx/bigsrc/ghc-8.10.3/docs/users_guide/"
        :rst       ".rst"
        :res       ("#.*$" "\\?.*$" ".html$" ".txt$" ".rst$" "^file://"
                    "^https://downloads.haskell.org/ghc/latest/docs/users_guide/"
                    "^/home/edrx/bigsrc/ghc-8.10.3/docs/users_guide/build-html/users_guide/"
                    "^/home/edrx/bigsrc/ghc-8.10.3/docs/users_guide/")
        :kill      guk
	))

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

;; «ee-rstdoc-:h98»  (to ".ee-rstdoc-:h98")
;; (find-es "haskell" "haskell-docs")
;; Skel: (find-rstdoc-links :h98)
(setq ee-rstdoc-:h98
      '(:base      "index"
        :base-web  "https://www.haskell.org/onlinereport/"
        :base-html "file:///usr/share/doc/haskell98-report/html/haskell98-report-html/"
        :base-rst  "NOTYET/"
        :rst       ".rst"
        :res       ("#.*$" "\\?.*$" ".html$" ".txt$" ".rst$" "^file://"
                    "^https://www.haskell.org/onlinereport/"
                    "^/usr/share/doc/haskell98-report/html/haskell98-report-html/"
                    "^NOTYET/")
        :kill      h98k
	))

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

;; «ee-rstdoc-:h98t»  (to ".ee-rstdoc-:h98t")
;; (find-es "haskell" "haskell-docs")
;; Skel: (find-rstdoc-links :h98t)
(setq ee-rstdoc-:h98t
      '(:base      "index"
        :base-web  "https://www.haskell.org/tutorial/"
        :base-html "file:///usr/share/doc/haskell98-tutorial/html/"
        :base-rst  "NOTYET/"
        :rst       ".rst"
        :res       ("#.*$" "\\?.*$" ".html$" ".txt$" ".rst$" "^file://"
                    "^https://www.haskell.org/tutorial/"
                    "^/usr/share/doc/haskell98-tutorial/html/"
                    "^NOTYET/")
        :kill      h98tk
	))
;; (find-code-rstdoc :h98t)
        (code-rstdoc :h98t)

;; «ee-rstdoc-:pexpect»  (to ".ee-rstdoc-:pexpect")
;; (find-es "python" "pexpect")
(setq ee-rstdoc-:pexpect
      '(:base      "index"
        :base-web  "https://pexpect.readthedocs.io/en/stable/"
        :base-html "file:///home/edrx/usrc/pexpect/doc/_build/html/"
        :base-rst  "/home/edrx/usrc/pexpect/doc/"
        :rst       ".rst"
        :res       ("#.*$" "\\?.*$" ".html$" ".txt$" ".rst$" "^file://"
                    "^https://pexpect.readthedocs.io/en/stable/"
                    "^/home/edrx/usrc/pexpect/doc/")
        :kill      pexk
	))

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

;; «ee-rstdoc-:pillow»  (to ".ee-rstdoc-:pillow")
;; Skel: (find-rstdoc-links :pillow)
(setq ee-rstdoc-:pillow
      '(:base      "index"
        :base-web  "https://pillow.readthedocs.io/en/stable/"
        :base-html "file:////usr/share/doc/python-pil-doc/html/"
        :base-rst  "/usr/share/doc/python-pil-doc/html/_sources/"
        :rst       ".rst.txt"
        :res       ("#.*$" "\\?.*$" ".html$" ".txt$" ".rst$" "^file://"
                    "^https://pillow.readthedocs.io/en/stable/"
                    "^//usr/share/doc/python-pil-doc/html/"
                    "^/usr/share/doc/python-pil-doc/html/_sources/")
        :kill      pilk
	))

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

;; «ee-rstdoc-:fennel»  (to ".ee-rstdoc-:fennel")
;; (find-es "fennel" "fennel-lang.git")
(setq ee-rstdoc-:fennel
      '(:base      "index"
        :base-web  "https://fennel-lang.org/"
        :base-html "file:///home/edrx/usrc/fennel-lang.org/"
        :base-rst  "~/NOTYET/"
        :rst       ".rst"
        :res       ("#.*$" "\\?.*$" ".html$" ".txt$" ".rst$" "^file://"
                    "^https://fennel-lang.org/")
        :kill      fek
	))

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

;; «ee-rstdoc-:clhs»  (to ".ee-rstdoc-:clhs")
;; (find-eev "eev-rstdoc.el" "ee-rstdoc-:clhs")
;; (find-code-rstdoc :clhs)
        (code-rstdoc :clhs)




;; «clhs»  (to ".clhs")
;; (find-eev "eev-plinks.el" "find-clhsdoci")
;; See:  (find-es "lisp" "clhs")
;;       (find-status   "hyperspec")
;;       (find-vldifile "hyperspec.list")
;;       (find-udfile   "hyperspec/")
;;       (find-evardescr 'clhs-root)
;;       (find-evariable 'clhs-root)
;;       (find-ehashtable clhs-symbols)
;; Test: (find-clhsdoci "loop")
;;       (find-clhsdoc "Body/m_loop")
;;
(setq    clhs-root "file:///usr/share/doc/hyperspec/")
(setq ee-clhs-root "file:///usr/share/doc/hyperspec/")
(code-c-d "clhsroot"      "/usr/share/doc/hyperspec/")

(code-c-d "h98"  "/usr/share/doc/haskell98-report/html/haskell98-report-html/")
(code-c-d "h98t" "/usr/share/doc/haskell98-tutorial/html/")
;; (find-h98file  "")
;; (find-h98tfile "")


;; «ee-rstdoc-:gd3»  (to ".ee-rstdoc-:gd3")
;; Skel: (find-rstdoc-links :gd3)
;;  See: (find-es "godot" "godot-docs")
(setq ee-rstdoc-:gd3
      '(:base      "index"
        :base-web  "https://docs.godotengine.org/en/3.5/"
        :base-html "file:///home/edrx/bigsrc/godot-docs/_build/html/"
        :base-rst  "/home/edrx/bigsrc/godot-docs/"
        :rst       ".rst"
        :res       ("#.*$" "\\?.*$" ".html$" ".txt$" ".rst$" "^file://"
                    "^https://docs.godotengine.org/en/3.5/"
                    "^/home/edrx/bigsrc/godot-docs/"
		    "^_build/html/"
		    "^_sources/"
		    )
        :kill      gd3k
	))

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


;; «ee-rstdoc-:manim»  (to ".ee-rstdoc-:manim")
;; Skel: (find-rstdoc-links :manim)
(setq ee-rstdoc-:manim
      '(:base      "index"
        :base-web  "https://docs.manim.community/en/stable/"
        :base-html "file:///home/edrx/usrc/manim/docs/build/html/"
        :base-rst  "/home/edrx/usrc/manim/docs/source/"
        :rst       ".rst"
        :res       ("#.*$" "\\?.*$" ".html$" ".txt$" ".rst$" "^file://"
                    "^https://docs.manim.community/en/stable/"
                    "^/home/edrx/usrc/manim/docs/build/html/"
                    "^/home/edrx/usrc/manim/docs/source/")
        :kill      manimk
	))

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

;; «ee-rstdoc-:J»  (to ".ee-rstdoc-:J")
;; Skel: (find-rstdoc-links :J)
;; (find-es "apl" "J-help")
;; (to "J")
(setq ee-rstdoc-:J
      '(:base      "index"
        :base-web  "https://www.jsoftware.com/help/"
        :base-html "file:////home/edrx/snarf/https/www.jsoftware.com/help/"
        :base-rst  "/home/edrx/snarf/https/www.jsoftware.com/help/"
        :htm       ".htm"
        :rst       ".rst"
        :res       ("#.*$" "\\?.*$" ".htm$" ".txt$" ".rst$" "^file://"
                    "^https://www.jsoftware.com/help/"
                    "^/home/edrx/snarf/https/www.jsoftware.com/help/")
        :kill      Jk
	))

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


;; «ee-rstdoc-:penlight»  (to ".ee-rstdoc-:penlight")
;; Skel: (find-rstdoc-links :penlight)
;; (find-es "lua5" "penlight-git")
(setq ee-rstdoc-:penlight
      '(:base      "index"
        :base-web  "https://lunarmodules.github.io/Penlight/"
        :base-html "file:///home/edrx/usrc/Penlight/docs/"
        :base-rst  "/BASE-RST/"
        :rst       ".rst"
        :res       ("#.*$" "\\?.*$" ".html$" ".txt$" ".rst$" "^file://"
                    "^https://lunarmodules.github.io/Penlight/"
                    "^/home/edrx/usrc/Penlight/docs/"
                    "^/BASE-RST/")
        :kill      plk
	))

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


;; «ee-rstdoc-:nodejs»  (to ".ee-rstdoc-:nodejs")
;; Skel: (find-rstdoc-links :nodejs)
;; (find-es "js" "nodejs-docs")
(setq ee-rstdoc-:nodejs
      '(:base      "index"
        :base-web  "https://nodejs.org/dist/latest-v20.x/docs/api/"
        :base-html "file:///usr/share/doc/nodejs/api/"
        :base-rst  "/usr/share/doc/nodejs/api/"
        :rst       ".md"
        :res       ("#.*$" "\\?.*$" ".html$" ".txt$" ".gz$" ".md$" "^file://"
                    "dist/latest-v20.x/docs/" "api/"
                    "^https://nodejs.org/"
                    "^https://nodejs.org/dist/latest-v20.x/docs/api/"
                    "^/usr/share/doc/nodejs/")
        :kill      nodek
	))

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


;; «ee-rstdoc-:pygame»  (to ".ee-rstdoc-:pygame")
;; Skel: (find-rstdoc-links :pygame)
(setq ee-rstdoc-:pygame
      '(:base      "index"
        :base-web  "https://www.pygame.org/docs/"
        :base-html "file:///usr/share/doc/python-pygame-doc/html/"
        :base-rst  "/BASE-RST/"
        :rst       ".rst"
        :res       ("#.*$" "\\?.*$" ".html$" ".txt$" ".rst$" "^file://"
                    "^https://www.pygame.org/docs/"
                    "^/usr/share/doc/python-pygame-doc/html/")
        :kill      pgk
	))

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

;; «ee-rstdoc-:postgres»  (to ".ee-rstdoc-:postgres")
;; Skel: (find-rstdoc-links :postgres)
(setq ee-rstdoc-:postgres
      '(:base      "index"
        :base-web  "https://www.postgresql.org/docs/current/"
        :base-html "file:///usr/share/doc/postgresql-doc-13/html/"
        :base-rst  "/BASE-RST/"
        :rst       ".rst"
        :res       ("#.*$" "\\?.*$" ".html$" ".txt$" ".rst$" "^file://"
                    "^https://www.postgresql.org/docs/current/"
                    "^file:///usr/share/doc/postgresql-doc-13/html/"
                    "^/BASE-RST/")
        :kill      pgk
	))

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


;; «ee-rstdoc-:sqlite3»  (to ".ee-rstdoc-:sqlite3")
;; Test: (find-code-rstdoc :sqlite3)
;;  See: (find-eev "eev-rstdoc.el" "ee-rstdoc-:sqlite3")
;;       (find-eev "eev-rstdoc.el" "default-defuns")

;; «ee-rstdoc-:lean4doc»  (to ".ee-rstdoc-:lean4doc")
;; «ee-rstdoc-:lean4»     (to ".ee-rstdoc-:lean4")
;; Moved to: (find-angg ".emacs.lean.el" "ee-rstdoc-:lean4")

;; «ee-rstdoc-:leanref»  (to ".ee-rstdoc-:leanref")
;; Moved to: (find-angg ".emacs.lean.el" "ee-rstdoc-:leanref")

;; «ee-rstdoc-:leanmeta»  (to ".ee-rstdoc-:leanmeta")
;; Moved to: (find-angg ".emacs.lean.el" "ee-rstdoc-:leanmeta")

;; «ee-rstdoc-:leanmaths»  (to ".ee-rstdoc-:leanmaths")
;; Moved to: (find-angg ".emacs.lean.el" "ee-rstdoc-:leanmaths")

;; «ee-rstdoc-:leantpil»  (to ".ee-rstdoc-:leantpil")
;; Moved to: (find-angg ".emacs.lean.el" "ee-rstdoc-:tpil4")

;; «ee-rstdoc-:fplean4»  (to ".ee-rstdoc-:fplean4")
;; Moved to: (find-angg ".emacs.lean.el" "ee-rstdoc-:fplean4")



;; «show-conses»  (to ".show-conses")
;; (find-showconses "show-conses.el" "code-c-d")
(add-to-list 'load-path "~/show-conses/")
(require 'show-conses)

;; «lisptree»  (to ".lisptree")
;; (find-lisptree "")
(add-to-list 'load-path "~/lisptree/")
(require 'lisptree)
(code-c-d "lisptree" "~/lisptree/" :anchor)
(defun ltd () (interactive) (find-lisptree ""))

;; «myqdraw»  (to ".myqdraw")
;; (find-myqdrawfile "")
(code-c-d "myqdraw" "~/myqdraw/" :anchor)



;; «code-etex-tla»  (to ".code-etex-tla")
(require 'eev-tla)  ; (find-eev "eev-tla.el")

;; Skel: (find-code-xxx-links "etex-tla" "tla stem" "")
;; Tests:      (code-etex-tla "ph1"         "2017planar-has-1")
;;        (find-code-etex-tla "ph1"         "2017planar-has-1")
;;        (find-code-tla      "ph1" "~/LATEX/2017planar-has-1.tex")
;;                       (find-ph1p 3)
;;
(defun      code-etex-tla (tla stem)
  (eval (ee-read      (ee-code-etex-tla tla stem))))
(defun find-code-etex-tla (tla stem)
  (find-estring-elisp (ee-code-etex-tla tla stem)))
(defun   ee-code-etex-tla (tla stem)
  (let* ((fname (format "~/LATEX/%s.tex" stem))
	 (body (ee-code-tla tla fname)))
    (ee-template0 "\
;; (find-code-etex-tla \"C\" \"FNAME\")
;;      (code-etex-tla \"C\" \"FNAME\")
;; (find-angg \".emacs\" \"code-etex-tla\")

;; Test: (find-{tla}p 1)
(defun find-{tla}p (page &rest rest)
  (find-estring (ee-code-latexpdfurlstuff \"{tla}\" \"{stem}\" page)))

;; Everything below this point was generated by `ee-code-tla'.


{body}
")))



;; «tikz»  (to ".tikz")
;; (find-angg ".emacs.papers" "tikz")
;; (find-angg "LUA/tikz1.el")
;; (find-angg "LUA/tikz1.el" "find-tikz-links")
;; (find-angg "LUA/tikz1.el" "tik")
(load "~/LUA/tikz1.el")
(defalias 'ts 'tikz-send-links-to-pdf-to-other-window)
(defun tikz-send-links-to-pdf-to-other-window () (interactive)
  (eek "C-SPC C-e
        M-w M-h M-p 10*<down> C-SPC 2*<down> M-w M-K
        M-o C-y M-o"))
;;
;; «tikzgit»  (to ".tikzgit")
;; (find-es "tikz" "tikz-git")
(code-c-d "tikzgit"    "~/usrc/pgf/")
(code-c-d "tikzgittgp" "~/usrc/pgf/tex/generic/pgf/")
(code-c-d "tikzman"    "~/usrc/pgf/doc/generic/pgf/")
;;
;; (find-es "tikz" "c_tikzref")
(code-pdf-page "ctikzref" "$S/http/www-groups.mcs.st-and.ac.uk/~alanc/pub/c_tikzref/c_tikzref.pdf")
(code-pdf-text "ctikzref" "$S/http/www-groups.mcs.st-and.ac.uk/~alanc/pub/c_tikzref/c_tikzref.pdf")



;; «eev-package» (to ".eev-package")
;; (find-es "eev" "eev-emacs-package")
;; (find-epackages)
;; (find-epackage 'eev)
;; (find-eevfile "eev-pkg.el")
;; (find-fline "~/usrc/eev-20141011/")
;;(code-c-d "eevpkg" "~/.emacs.d/elpa/eev-20141011/")
;; (find-eevpkgfile "")
;; (find-eevpkgfile "eev-autoloads.el")


;; «fvwm» (to ".fvwm")
;; (find-es "fvwm" "fvwm3-git")
;; (find-angg ".emacs.fvwm")
(load "~/.emacs.fvwm" 'noerror)

;; (find-eev "eev-langs.el" "fvwm")
(defvar ee-file-fvwm "~/.fvwm/ee.fvwm"  "See `eefvwm0'.")

(defun eefvwm (s &optional e) (interactive "r")
  (ee-write-with-nl s e "" "" ee-file-fvwm)
  (format "eefvwm: wrote %s" ee-file-fvwm))
(defun eefvwm0 (s &optional e) (interactive "r")
  (eefvwm s e)
  (find-sh0 "FvwmCommand ee"))

(defun find-fvwm0 (str) (eefvwm str) (find-sh0 "FvwmCommand ee"))





;; «mplayer-options»  (to ".mplayer-options")
;; (find-eev "eev-audiovideo.el" "find-mplayer")
;; (find-es "fvwm" "fullscreen")
;; (find-es "mplayer" "-zoom")
;; (find-man "1 mplayer2")
;; (find-man "1 mplayer2" "-nokeepaspect")
;; (setq ee-mplayer-options '("-fs"                            "-osdlevel" "2"))
(setq ee-mplayer-options '("-fs" "-title" "mplayer-fullscreen" "-osdlevel" "2"))
(setq ee-mplayer-options '("-fs" "-title" "mplayer-fullscreen" "-osdlevel" "2" "-zoom"))
(setq ee-mplayer-options '("-fs" "-title" "mplayer-fullscreen" "-osdlevel" "2" "-zoom" "-vo" "x11"))
(setq ee-mplayer-options '("-fs" "-title" "mplayer-fullscreen" "-osdlevel" "2" "-zoom" "-vo" "x11" "-sws" "0" "-quiet"))
;; (find-fline "/sda5/videos/")
;; (find-video "/sda5/videos/J_S_Bach_6th_Cello_Suite_transcribed_for_viola_-_Courante-QJjOM7SpbhM.flv")
;; (find-mplayer  "/sda5/videos/Transgender_Love_Story_-_Life_After_Surgery-hRKQJCC_RSM.mp4")
;; (find-mplayer  "/sda5/videos/Transgender_Love_Story_-_Life_After_Surgery-hRKQJCC_RSM.mp4" "1:02")

;; 2013oct03
(setq ee-mplayer-video-options-geometry '("-geometry" "500x400+512+20"))
(setq ee-mplayer-video-options-geometry '("-fs" "-title" "mplayer-fullscreen"))
(setq ee-mplayer-video-options-hardware '("-zoom" "-vo" "x11" "-sws" "0"))
(setq ee-mplayer-video-options-screenshot '("-vf" "screenshot"))
(setq ee-mplayer-video-options-screenshot '())
(setq ee-mplayer-video-options-other    '( "-osdlevel" "2" "-quiet"))
(defun ee-mplayer-video-options ()
  (append
   ee-mplayer-video-options-geometry
   ee-mplayer-video-options-hardware
   ee-mplayer-video-options-screenshot
   ee-mplayer-video-options-other))

(setq ee-termplayer-options '("-novideo"))

(defun find-mplayer0 (&rest rest)
  (let ((ee-mplayer-options
	 '("-fs" "-title" "mplayer-fullscreen" "-osdlevel" "0")))
    (apply 'find-mplayer rest)))


(seen 1498)

(autoload 'eev-math-glyphs-edrx "eev-math-glyphs" nil t)
;; (eev-math-glyphs-edrx)
;; (find-eev "eev-math-glyphs.el")

;; «eepitch-shell»  (to ".eepitch-shell")
;; See: (find-eepitch-select-shell-links)
;;
;; 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*")))

;; Broken with zsh:
;; (defun eepitch-shell  () (interactive) (eepitch '(shell)))
;; (defun eepitch-shell2 () (interactive) (eepitch '(shell "*shell 2*")))
;; (defun eepitch-shell3 () (interactive) (eepitch '(shell "*shell 3*")))
;; (defun eepitch-shell  () (interactive) (eepitch-vterm '(shell)))
;; (defun eepitch-shell2 () (interactive) (eepitch-vterm '(shell "*shell 2*")))
;; (defun eepitch-shell3 () (interactive) (eepitch-vterm '(shell "*shell 3*")))


(code-brurl 'browse-url-firefox
	    :remote 'brm :local 'brml :dired 'brmd)

;; (find-eev "eev-brxxx.el")
(defun find-gimp (fname) (find-bgprocess `("gimp" ,fname)))

(code-brfile 'find-gimp                :local 'brgimpl :dired 'brgimpd)

;; (defun find-chrome (url) (find-bgprocess `("google-chrome" ,url)))
;; (code-brurl  'find-chrome :remote 'brg :local 'brgl    :dired 'brgd)



;; (find-efile "mouse.el")
;; (find-evariable 'x-fixed-font-alist "Font menu")



;; «modes-safe-local»  (to ".modes-safe-local")
;; (find-eevfile "htmlize-eev.el" "modes-safe-local")
;; I should use `favourite-modes-allowed', but I'm lazy...
;;
(put 'modes 'safe-local-variable 'listp)

;;-------------------------------------------
;; «favourite-modes»  (to ".favourite-modes")
;; M-m -> `favourite-modes' -> cycle through the list of favourite modes
;;
(defun favourite-modes (arg)
  "Cycle through the list of favourite modes for this buffer."
  (interactive "P")
  (make-local-variable 'favourite-modes)
  (if (not (boundp 'favourite-modes))
      (setq favourite-modes nil))
  (put 'favourite-modes 'permanent-local t)
  (if (and arg (<= arg 0))
      (setq favourite-modes (remove major-mode favourite-modes)))
  (if (null favourite-modes)
      (setq favourite-modes (or modes (list major-mode))))
  (if (and arg (>= arg 1))
      (add-to-list 'favourite-modes major-mode 'append))
  (setq favourite-modes
	(append (cdr favourite-modes) (list (car favourite-modes))))
  (funcall (car favourite-modes))
  (message "favourite-modes = %S" favourite-modes))

(global-set-key "\M-m" 'favourite-modes)

(defun my-normal-mode ()
  "Like `normal-mode', but with a hack to reload the list of favourite modes."
  (interactive)
  ;; (put 'favourite-modes 'permanent-local nil)
  (makunbound 'modes)
  (makunbound 'favourite-modes)
  (normal-mode))

(setq favourite-modes-allowed '(
  fundamental-mode
  emacs-lisp-mode
  lua-mode
  org-mode
  sh-mode
  makefile-mode
  ))

;; Unfinished:
;; (favourite-modes-unkown '(emacs-lisp-mode foo sh-mode))
;; (apply 'or (favourite-modes-unkown '(emacs-lisp-mode foo sh-mode)))
;; (apply 'or '(nil foo nil))
;;
(defun favourite-modes-unkown (ml)
  (let* ((f (lambda (m) (if (member m favourite-modes-allowed) nil m)))
	 (mlu (mapcar f ml)))
    mlu))



(seen 820)


(put 'ee-charset-indicator 'safe-local-variable 'stringp) ;; obsolete

(seen 980)


;; «woman»  (to ".woman")
;; (find-efunction 'woman-dired-find-file)
;; (find-ekeymapdescr dired-mode-map "woman-dired-find-file")
;; (find-efile "woman.el")
(setq woman-use-own-frame nil)
;;
;; (find-womannode "Introduction")
(seen 993)

;; (code-c-d "woman" (ee-efile "") "woman")

(seen 997)


;; Hey, shouldn't this be an "eval-after-load"?
;; (find-egrep "grep -nH -e woman-dired-find-file $(find * -name '*.el')")
' (add-hook 'dired-mode-hook
	    (lambda ()
	      (define-key dired-mode-map "W" 'woman-dired-find-file)))


(seen 993)


;; «find-woman»  (to ".find-woman")
;; (woman-find-file (ee-fvwmfile "fvwm/fvwm.1"))
;; (find-woman (ee-fvwmfile "fvwm/fvwm.1"))
;; (find-woman (ee-fvwmfile "fvwm/fvwm.1") "ModulePath path")
;; (find-woman (ee-fvwmfile "fvwm/fvwm.1") "FVWM_MODULEDIR")
;; (find-womanfile "")

(defun find-woman0 (manfile &rest rest)
  (woman-find-file manfile)
  (apply 'ee-goto-position rest))

(defun ee-code-c-d-:woman (c d &rest rest)
 (concat (ee-template0 "
   (defun find-{c}woman (manfile &rest pos-spec-list)
     (apply 'find-woman0 (ee-{c}file manfile) pos-spec-list))
   ") (ee-code-c-d-rest c d rest)))

;; (find-evariable 'code-c-d-keywords-new)
;; (add-to-alist 'code-c-d-keywords-new '(:woman . ee-code-c-d-:woman))

(defun ee-code-c-d-:ffox (c d &rest rest)
 (concat (ee-template0 "
   (defun find-{c}ffox (semiurl &rest pos-spec-list)
     (find-firefox (ee-{c}url semiurl)))
   ") (ee-code-c-d-rest c d rest)))

;; (find-evariable 'code-c-d-keywords-new)
;; (add-to-alist 'code-c-d-keywords-new '(:ffox . ee-code-c-d-:ffox))

(seen 1039)



;; «square-brackets»  (to ".square-brackets")
;; Square brackets (rubikitch)
;; (find-eoutput '(insert 300006 300007))
;; (find-eoutput '(insert 300006 300007) "" '(switch-to-buffer (htmlize-buffer)))
;; (find-eoutput '(insert 332731 332736))
;; (find-eoutput '(insert 332731 332736) "" '(switch-to-buffer (htmlize-buffer)))
;; (find-eleimfile "quail/sgml-input.el")
;; (find-eleimfile "quail/latin-ltx.el")
;; (find-eleimfile "quail/latin-ltx.el" "llbracket")
;; (find-echarsetchars 'mule-unicode-0100-24ff)
;; (find-echarsetchars 'mule-unicode-2500-33ff "276x")
(when (eq window-system 'x)
  (eev-set-glyph ?\^Q 300006 'eev-glyph-face-green)
  (eev-set-glyph ?\^P 300007 'eev-glyph-face-green)
  (when (fboundp 'make-glyph-code)
    (eev-set-glyph ?\^Q 10214 'eev-glyph-face-green)
    (eev-set-glyph ?\^P 10215 'eev-glyph-face-green)))

;; (eev-set-glyph ?\^Q nil)
;; (eev-set-glyph ?\^P nil)
;; (find-es "blogme" "square-brackets")



;; «M-e-in-c-mode»  (to ".M-e-in-c-mode")
;; (find-es "emacs" "c-mode-M-e")

;; `eev-invasive' binds M-e to `ee-eval-sexp-eol' and I want eev's
;; binding to be universal. C-mode will try to set M-e to
;; `c-end-of-statement'; don't let that override my binding.
;;
;;(eval-after-load "cc-mode"
;;  '(define-key c-mode-base-map "\ee" nil))





;; «find-w3m» (to ".find-w3m")
;; (find-eevgrep "grep -nH -e find-w3m *.el")
;; (find-eev "eev.el" "find-w3m")
;; (find-eev "eev-blinks.el" "find-w3m")

;; «dired-find-w3m»  (to ".dired-find-w3m")

;; Add a binding "w" -> `dired-find-w3m' to dired
(defun dired-find-w3m () (interactive)
  "In dired, visit (with find-w3m) the file named on this line."
  (find-w3m (file-name-sans-versions (dired-get-filename) t)))

;; (defun dired-find-planner () (interactive)
;;   "In dired, visit (with find-planner) the file named on this line."
;;   (find-planner (dired-get-filename 'localp)))
;; (defun dired-find-eimage () (interactive)
;;   "In dired, visit (with find-image) the file named on this line."
;;   (find-eimage (file-name-sans-versions (dired-get-filename) t)))
;;
;; (eval-after-load "dired"
;;   '(progn (define-key dired-mode-map "w" 'dired-find-w3m)
;;           (define-key dired-mode-map "W" 'woman-dired-find-file)
;;           ;; (define-key dired-mode-map "\M-p" 'dired-find-planner)
;;           ;; (define-key dired-mode-map "I" 'dired-find-eimage)
;;           ))

;; «wdired»  (to ".wdired")
;; (find-evardescr 'dired-load-hook)
;; (find-efile "wdired.el")
;; (find-es "emacs" "wdired")
(autoload 'wdired-change-to-wdired-mode "wdired")
(require 'dired)
(define-key dired-mode-map "r" 'wdired-change-to-wdired-mode)

;; (add-hook 'dired-load-hook
;;           '(lambda ()
;;              (define-key dired-mode-map "r" 'wdired-change-to-wdired-mode)
;;              (define-key dired-mode-map
;;                [menu-bar immediate wdired-change-to-wdired-mode]
;;                '("Edit File Names" . wdired-change-to-wdired-mode))))

(seen 1109)



;; «ee-isearch»  (to ".ee-isearch")
;; (find-es "emacs" "ee-isearch-regexp")
;; (find-es "emacs" "ee-isearch")
(defun ee-isearch (string &optional isregexp)
  (isearch-update-ring string isregexp)
  (isearch-mode t isregexp nil nil)
  (isearch-repeat-forward))
(defun ee-isearch-regexp (string) (ee-isearch string t))
(defun ee-isearch-re     (string) (ee-isearch string t))

;; «ee-to-protected»  (to ".ee-to-protected")
;; (defun ee-to-protected (anchor &rest rest)
;;   (interactive "sAnchor: ")
;;   (let ((beforejump (point)))
;;     (goto-char (point-min))
;;     (if (search-forward (format ee-anchor-format anchor) nil 'noerror)
;;        (ee-goto-rest rest)
;;         (goto-char beforejump)
;;         (error "Anchor not found"))))

;; (defalias 'to 'ee-to-protected)

;; «to-shadow»  (to ".to-shadow")
(defun to-shadow (&rest rest)
  (interactive "sAnchor: ")
  (apply 'find-anchor ee-shadow-file rest))

;; «find-fline-ov»  (to ".find-fline-ov")
;; Links to text files with ^H-underlining and overstriking
;; (find-efile "man.el" "defun Man-fontify-manpage")
(defun find-fline-ov (fname &rest pos-spec-list)
  (find-file (ee-substitute-in-file-name fname))
  (Man-fontify-manpage)
  (apply 'ee-goto-position pos-spec-list))





;;-------------------------------
;; «find-dict»  (to ".find-dict")
;; Never worked very well.
;; (find-elnode "Syntax Tables")
;; (find-elnode "Motion and Syntax")
;; (find-elnode "Syntax Table Functions")
;; (find-efile "emacs-lisp/lisp-mode.el" "defvar emacs-lisp-mode-syntax-table")
;; (describe-function 'modify-syntax-entry)
;; (find-elnode "Using Interactive")
;; (find-efile "calendar/cal-move.el" "(interactive (list (calendar-read-date")
;; (find-efile "calendar/calendar.el" "(defun calendar-read")
;;   cd /usr/share/emacs/21.2/lisp/
;;   grep '(interactive ' $(find * -name '*.el' | sort) | l -S
;;
(setq ee-dict-syntax-table
  (let ((table (make-syntax-table))
	(i))
    (setq i ?A)
    (while (< i ?Z)
      (modify-syntax-entry i "w   " table)
      (setq i (1+ i)))
    (setq i ?a)
    (while (< i ?z)
      (modify-syntax-entry i "w   " table)
      (setq i (1+ i)))
    (modify-syntax-entry ?- "_   " table)
    table))

(defun ee-dict-word-around-point () (interactive)
  (with-syntax-table ee-dict-syntax-table
    (message
     (let ((p1 (save-excursion (skip-syntax-backward "w_") (point)))
	   (p2 (save-excursion (skip-syntax-forward "w_") (point))))
       (buffer-substring p1 p2)))))

;; (find-man "dict")
;; (find-eev "eev-links.el" "find-progoutput")
;; (find-progoutput "dict -P- stand-up" 0)
;; (find-dict "stand-up")
;;
(defun find-dict (word)
  (interactive (let ((word (ee-dict-word-around-point)))
		 (list (read-string (if (equal word "") "Word: "
				      (format "Word: (default %s) " word))
				    word))))
  (find-progoutput (format "dict -P - %s" word) 0))

;; (global-set-key "\M-D" 'find-dict)




(seen 1204)


;;-------------------------------------------
;; «passwds-tcl-get»  (to ".passwds-tcl-get")
;; (find-anggfile ".passwds.tcl-")
;; (find-anggfile ".passwds.tcl")
;; (passwds-tcl-get "bitlbee")
(defun passwds-tcl-get (str)
  (find-sh0 (format "grep %s ~/.passwds.tcl | awk '{print $3}'" str)))

;; «eechannel-send-passwd»  (to ".eechannel-send-passwd")
(defun eechannel-send-passwd (machine)
  (eechannel-send nil (format "%s\n" (passwds-tcl-get machine))))



;;-------------------
;; «erc»  (to ".erc")
;; «find-erclibera»  (to ".find-erclibera")
;; (find-es "erc" "erc-ssl")
;; (find-es "emacs" "erc")
;; (find-es "emacs" "rcirc")

;; (find-angg ".emacs.erc")
(load       "~/.emacs.erc")

(defun find-erclibera ()
  (interactive)
  (require 'erc)
  (erc-ssl :server    "irc.libera.chat"
           :full-name "Eduardo Ochs"
           :password  (find-sh0 "~/.passwds.sh libera")
           :port      6697))




;;;;;
;;
;; «browse-url»  (to ".browse-url")
;;
;;;;;


;;;;;
;;
;; «brwl-and-friends»  (to ".brwl-and-friends")
;;
;;;;;

(defun eepsne (url &rest ignore)
  (interactive (browse-url-interactive-arg "psne "))
  (eev (format "psne '%s'" url)))

(defun eetmpwget (url &rest ignore)
  (interactive (browse-url-interactive-arg "cd /tmp; wget "))
  (eev (concat "cd /tmp\nwget " url)))

;; (brml "http://www.emacswiki.org/cgi-bin/wiki/PlannerModeQuickStart")
;; http://www.emacswiki.org/cgi-bin/wiki/PlannerModeQuickStart

;; «find-ie»  (to ".find-ie")
;; «brie»  (to ".brie")
;; (find-angg ".emacs")
;; (find-angg ".emacs" "brwl-and-friends")

(autoload 'browse-url-default-windows-browser "browse-url")

(defun find-ie (url &rest ignore)
  (interactive (browse-url-interactive-arg "URL: "))
  (browse-url-default-windows-browser url))

(defalias 'brie 'find-ie)

;; For W$:
;; (defalias 'brw  'find-ie)
;; (defalias 'find-w3m 'find-ie)

;; (my-def-browse-url-local-remote briel brie find-ie)

;; 2006jul14
;; «brmd»  (to ".brmd")
;; «brgvd»  (to ".brgvd")
;; find-pspage-gv find-pspage-xdvi
;; (find-rubymanualfile "")

;; ;; «find-firefox-bg»  (to ".find-firefox-bg")
;; (defun find-firefox-bg (url &optional rest)
;;   (interactive "sURL: ")
;;   (start-process "firefox" "*Messages*" "firefox" url)
;;   url)
;; 
;; (defun find-firefox (url &optional rest)
;;   (interactive "sURL: ")
;;   (start-process "firefox" "*Messages*" "firefox" url)
;;   url)


;; (find-eev "eev-browse-url.el")
;; (require 'eev-browse-url)







;;;;;
;;
;; «syntax-tables»  (to ".syntax-tables")
;;
;;;;;

;; This is because picture-mode-exit in Emacs21 was mutilating files
;; with glyph chars in the ranges 1..7, 11, 14..31, 128..159.

;; (find-es "emacs" "trailing-whitespace-bug")

(defun fix-syntax-table-low (sdescr &optional table) (interactive)
  (mapcar (lambda (i) (modify-syntax-entry i sdescr table))
	  '(1 2 3 4 5 6 7
	    11 12
	    14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31)))

(defun fix-syntax-table-high (sdescr &optional table) (interactive)
  (let ((i 128))
    (while (< i 160)
      (modify-syntax-entry i sdescr table)
      (setq i (1+ i)))))

(defun fix-syntax-table (sdescr &optional table) (interactive)
  (fix-syntax-table-low  sdescr table)
  (fix-syntax-table-high sdescr table))

(fix-syntax-table-low "w" (standard-syntax-table))
(fix-syntax-table-low "w" text-mode-syntax-table)
(fix-syntax-table-low "w" emacs-lisp-mode-syntax-table)

;; (fix-syntax-table "w" (standard-syntax-table))
;; (fix-syntax-table "w" text-mode-syntax-table)
;; (fix-syntax-table "w" emacs-lisp-mode-syntax-table)

;; (with-syntax-table (standard-syntax-table)      (describe-syntax))
;; (with-syntax-table text-mode-syntax-table       (describe-syntax))
;; (with-syntax-table emacs-lisp-mode-syntax-table (describe-syntax))




;; «noerr»  (to ".noerr")
;; (find-es "emacs" "ignoring_errors")
;; (find-efunction 'ignore-errors)
(defmacro noerr     (body) (list 'condition-case nil body '(error nil)))


;;;;;
;;;;; «debugging»
;;;;;

;; SAR: "show and run" - an ugly macro.
;; These two sexps will behave the same,
;;       (+ (* 2 3) (* 4 5))
;;   (SAR + (* 2 3) (* 4 5))
;; except that the second will do a `(message "(+ 6 20)")' before
;; executing `(+ 6 20)'.
;; (find-es "emacs" "SAR")
;;
(defmacro SAR (&rest rest)
  (insert (format "%S\n" rest))
  rest)

(defmacro SHOWCALL (head &rest rest)
  (let ((expandedrest (eval (cons 'list rest))))
    (message "%S" (cons head expandedrest))
    ))

;; (SAR + (+ 1 2) (+ 3 4))
;;     (+ (+ 1 2) (+ 3 4))
;; (SAR describe-function 'next-line)
;;     (describe-function 'next-line)
;; (switch-to-buffer "*Messages*")







;; Basic `code-c-d's
;; «code-c-d_e»  (to ".code-c-d_e")

;; Moved to: (find-eev "eev-code.el" "code-c-d-s")
;;
'(

(setq ee-emacs-lisp-directory
  (or (file-name-directory (locate-library "loadup.el"))
      (format "/usr/share/emacs/%d.%d/lisp/"
	      emacs-major-version emacs-minor-version)))

;; (find-fline ee-emacs-lisp-directory)
(code-c-d "e" ee-emacs-lisp-directory "emacs")
(code-c-d "el" ee-emacs-lisp-directory "elisp")
(code-c-d "eli" ee-emacs-lisp-directory "emacs-lisp-intro")

(setq ee-emacs-leim-directory
      (if (locate-library "leim-list.el")
	  (file-name-directory (locate-library "leim-list.el"))
	(format "/usr/share/emacs/%d.%d/leim/"
		emacs-major-version emacs-minor-version)))

(code-c-d "eleim" ee-emacs-leim-directory)
;; (find-eleimfile "")
;; (find-eleimfile "quail/")

)

;; «calc»  (to ".calc")
;; (find-calcfile "")
;; (find-calcnode "")
(code-c-d "calc" (concat ee-emacs-lisp-directory "calc/") "calc")

;; «eieio»  (to ".eieio")
;; (find-es "emacs" "eieio")
;; (find-eieiofile "" "eieio")
;; (find-eieionode "")
(code-c-d "eieio" (concat ee-emacs-lisp-directory "emacs-lisp/") "eieio")



;; (code-c-d-anchor "eevold"    "~/eev/")
;; (code-c-d-anchor "eevnew"    "~/eev-current/")
;; (code-c-d "eev"      "~/eev-current/" :anchor)

;; (code-c-d-old "eevslides" "~/eev-current/slides/" :gv)
(code-c-d "angg"      "~/" :anchor :grep)

;; «find-es»  (to ".find-es")
;; This is a fossil - from about 1996, I guess.
;; `find-es' adds a ".e" to its stem.
;;
;; See: (find-anggwget-links)
;;
(code-c-d  "es" "$ES/")
(defun find-es (file &rest rest)
  "A hyperlink function that points to anchor strings in e-script files."
  (apply 'find-anchor (ee-esfile (concat file ".e")) rest))

(code-c-d "dednat4" "~/dednat4/" :anchor)
(code-c-d "dn4"     "~/dednat4/" :anchor)
(code-c-d "dn4ex"   "~/dednat4/examples/" :anchor)
(code-c-d "vtutil4" "~/vtutil4/" :anchor)


(defun find-flua (fname &optional anchor)
  (find-anchor (ee-fluafile fname) anchor))
;; (defun find-miniforth (fname &optional anchor)
;;   (find-anchor (ee-miniforthfile fname) anchor))




;; (find-status "eev")
;; (find-vldifile "eev.list")
;; (find-fline "/usr/doc/eev/")
;; (find-fline "/etc/emacs/site-start.d/50eev.el")
;; (find-sitelispfile "eev/")
;; (add-to-list 'load-path "/usr/share/emacs/site-lisp/")
;;
;; (find-eevfile "debian/50eev.el")
;; (find-eevfile "")

;; (if (equal (getenv "TERM") "linux")
;;   (glyphs-set-string disptable-string-latin
;; 		     ?\^O 131 "31" ; small red square (instead of "*")
;; 		     ))



;; (find-node "(elisp)Handling Errors")
;; (condition-case nil <code that may contain errors>)



;; «tramp» (to ".tramp")
;; (find-es "emacs" "tramp")
;; (find-es "emacs" "tramp-from-git")
;; (find-elnode "Library Search")
;;(add-to-list 'load-path "/usr/src/tramp/lisp")
;;(require 'tramp)
;;(add-to-list 'Info-default-directory-list "/usr/src/tramp/texi/")
;; (find-angg ".zshrc" "ASROOT")

(setenv   "ASROOT" "/sudo:root@localhost:")
(code-c-d "asroot" "/sudo:root@localhost:")
;; (find-asrootfile "/var/log/")
;; (find-asrootfile "/var/log/" "auth.log")
;; (find-fline "/sudo::/")



;;;;;
;;
;; «remote-machines»  (to ".remote-machines")
;;
;;;;;

;; eev to some remote machines, using ange-ftp or other tricks:
;; (find-enode "Remote Files")

(defun eevpuc (s &optional e) (interactive "r")
  (eev "Scp $EEVTMPDIR/ee-puc.sh edrx@${SUCURI}:eev-0.94/ee.sh")
  (eev s e "$EEVTMPDIR/ee-puc.sh")
  "Wrote $EEVTMPDIR/ee-puc.sh and $EE; run `ee' to upload")

;; (eeb-define 'eevpuc-bounded 'eevpuc 'ee-delimiter-hash nil t t)

;; Old, probably broken
;; (code-c-d "twur" "/angg.twu.net:/")
;; (code-c-d "twu" "/angg.twu.net:/home2/edrx/")
(code-c-d "twu" "/anggtwu.net:")
(defun eevt (s e) (interactive "r")
  (eev s e (ee-twufile "bin/ee.sh")))

;; «tramp-twu»  (to ".tramp-twu")
;; (find-angg ".zshrc" "TWUS-and-TWUP")
;; (code-c-d "twu"  "/ftp:edrx@anggtwu.net:")
;; (code-c-d "twup" "/ftp:edrx@anggtwu.net:public_html/")
;; (code-c-d "twu"  "/scp:edrx@anggtwu.net:")
;; (code-c-d "twup" "/scp:edrx@anggtwu.net:public_html/")
(code-c-d "twu"  "/scp:edrx@anggtwu.net:/home/edrx/")
(code-c-d "twup" "/scp:edrx@anggtwu.net:/home/edrx/public_html/")
(code-c-d "twus" "/scp:edrx@anggtwu.net:/home/edrx/slow_html/")
;; (find-twufile "")
;; (find-twupfile "")
;; (find-twupfile "tmp/")
;; (find-twusfile "")

;; (getenv "MYPAGEDIR")
;; (getenv "MYPAGEURL")
;; (setenv "MYPAGEDIR" "/scp:edrx@anggtwu.net:public_html")
;; (setenv "MYPAGEURL"    "http://anggtwu.net")

;; «linode»  (to ".linode")
;; (find-angg ".zshrc" "Lins-and-Linp")
(defun eepitch-linode  () (interactive) (eepitch-comint "ssh edrx@linode" "ssh edrx@linode"))
(defun eepitch-linoder () (interactive) (eepitch-comint "ssh root@linode" "ssh root@linode"))
(code-c-d "linode"  "/scp:edrx@linode:/home/edrx/")
(code-c-d "linodep" "/scp:edrx@linode:/home/edrx/public_html/")
(code-c-d "linodes" "/scp:edrx@linode:/home/edrx/slow_html/")
(code-c-d "linode"  "/scp:edrx@linode:~/")
(code-c-d "linodep" "/scp:edrx@linode:~/public_html/")
(code-c-d "linodes" "/scp:edrx@linode:~/slow_html/")
(code-c-d "linp"    "/scp:edrx@linode:~/public_html/")
(code-c-d "lins"    "/scp:edrx@linode:~/slow_html/")
;; (find-linodefile "")



;; «upload-changes»  (to ".upload-changes")
(defun upload-changes () (interactive) (find-es "page" "upload-rsync"))

;; «ee-remove-prefix»  (to ".ee-remove-prefix")
;; Moved to: (find-eevfile "eev-elinks.el" "(defun ee-remove-prefix")
;; Test:     (ee-remove-prefix "/home/foo/" "/home/foo/bar")

(defun angg-url-of-this-file (&optional arg)
  (interactive "P")
  (let* ((anchor (if arg (eeb-string "«" "»")))
	 (suffix (if anchor (concat "#" anchor) ""))
	 (fname (ee-remove-prefix (ee-expand "~/")
				  (ee-expand (buffer-file-name))))
	 (url (concat "http://anggtwu.net/" fname ".html" suffix)))
    (kill-new url)
    (message url)))

(defun ee-dired-file-name ()
  (if (eq major-mode 'dired-mode)
      (file-name-sans-versions (dired-get-filename) t)))

(defun find-urls-for-this-file (&optional bfname)
  (interactive)
  (setq bfname (or bfname (ee-dired-file-name) buffer-file-name
		   default-directory))
  (let* ((myip (myip-as-string))
	 (stem-home  (ee-remove-prefix "/home/edrx/" bfname))
	 (stem-homeL (ee-remove-prefix "/home/edrx/TH/L/" bfname))
	 (stem-vw    (ee-remove-prefix "/var/www/" bfname)))
    (find-elinks-old
     (list ;; (list '(find-efunction 'find-urls-for-this-file))
           (if stem-home
	       (list (format "http://%s/L/%s"         myip stem-home)
		     (format "http://%s/L/%s.html"    myip stem-home)
		     (format "http://persephone/L/%s"      stem-home)
		     (format "http://persephone/L/%s.html" stem-home)
		     (format "http://anggtwu.net/%s"      stem-home)
		     (format "http://anggtwu.net/%s.html" stem-home)))
	   (if stem-homeL
	       (list (format "http://%s/L/%s"         myip stem-homeL)
		     (format "http://%s/L/%s.html"    myip stem-homeL)
		     (format "http://anggtwu.net/%s"      stem-homeL)
		     (format "http://anggtwu.net/%s.html" stem-homeL)))
	   (if stem-vw
	       (list (format "http://persephone/%s"      stem-vw)
		     (format "http://persephone/%s.html" stem-vw)
		     (format "http://%s/%s"         myip stem-vw)
		     (format "http://%s/%s.html"    myip stem-vw)))
	   bfname
	   ))))

(define-key eev-mode-map "\M-h\M-u" 'find-urls-for-this-file)

;; (defun ee-upload-this-scp-command ())



;; «upload-this»  (to ".upload-this")
;;
(defun ee-strip-prefix-and-suffix (prefix suffix str)
  (let* ((p1 (length prefix))
	 (p2 (- (length str) (length suffix)))
	 (prefix-ok (compare-strings str nil p1 prefix nil nil))
	 (suffix-ok (compare-strings str p2 nil suffix nil nil))
	 (middlestuff (substring str p1 p2)))
    (if (and prefix-ok suffix-ok) middlestuff)))

;; Old, probably broken
(defun upload-this () (interactive)
  (let ((fname-stem (ee-strip-prefix-and-suffix
		     (ee-expand "$HOME/") ""
		     buffer-file-name)))
    (save-buffer)
    (eev (format
	  "cat > ~/eev/ee-rmt.sh <<'---'
cd ~/public_html/; make -f TH/Makefile htmls
---
cd; anonftp angg.twu.net 'put %s public_html/%s' \\
  'put eev/ee-rmt.sh eev/ee.sh' 'quit'"
	  fname-stem fname-stem))
    (message "Do `ee' here and on twu to update http://angg.twu.net/%s.html"
	     fname-stem)))




;;
(defun TODO () (interactive) (find-fline "~/TODO"))
(defun tele () (interactive) (find-fline "~/AGENDA/telefones"))
;; (find-evariable 'completion-ignored-extensions)
;; (find-elnode "File Name Completion")
(defun psne-log () (interactive) (find-fline "~/.psne.log"))
(defun plog-log () (interactive) (find-fline "~/.plog"))



;; Links to sections of huge manpages and info nodes
(defun find-expcommand (str &rest rest)
  (interactive "sExpect command: ")
  (apply 'find-man "1 expect" "\nCOMMANDS"
	 (format "\n       %s" str) rest))

;; (find-es "netbsd" "netbsd-manpages")
;; (find-angg "bin/netbsdman")
;; (find-netbsdman "ktrace")
;; (find-man       "ktrace")
;;
(defun find-netbsdman (&rest rest)
  (let ((manual-program "netbsdman")) (apply 'find-man rest)))


(defun find-zshbuiltin (name &rest rest)
  (interactive "sZsh builtin: ")
  (apply 'find-zshnode "Shell Builtin Commands" (format "\n%s" name) rest))

(defun find-zshcomplex (name &rest rest)
  (interactive "sZsh complex command: ")
  (apply 'find-zshnode "Complex Commands" (format "\n%s" name) rest))

(defun find-tcshbuiltin (str &rest rest)
  (interactive "sTcsh builtin: ")
  (apply 'find-man "1 tcsh" "\n   Builtin commands"
         (format "\n       %s" str) rest))




;; «mkto»  (to ".mkto")
;; (find-es "emacs" "mkto")
;; Superseded by: (eek "M-h M-k  M-A  ;; eewrap-anchor")

;; (defun mkto () (interactive)
;;   (let (beg end) (end-of-line) (setq end (point))
;;        (beginning-of-line) (setq beg (point))
;;        (save-restriction
;;          (narrow-to-region beg end)
;;          (replace-regexp "^\\(.+ \\)«\\([!-~]+\\)»$"
;;                          "# «.\\2»\t(to \"\\2\")\n\\\&  (to \".\\2\")"))
;;        (beginning-of-line)))

(defun ee-replace-line (fun)
  (let* ((line (buffer-substring (ee-bol) (ee-eol)))
	 (new (funcall fun line)))
    (if new (progn (delete-region (ee-bol) (ee-eol))
		   (insert new)))
    (beginning-of-line)
    (forward-line 1)))

(defun ee-replace-line-2 (from-pat to-pat)
  (ee-replace-line
   `(lambda (str) (replace-regexp-in-string
		   ,from-pat ,to-pat
		   str 'fixedcase))))

(defun mkto () (interactive)
  (ee-replace-line-2 "^\\(.+ \\)<\\([!-~]+\\)>$"
		     (concat "\\1«.\\2»\t(to \"\\2\")\n"
			     "\\1«\\2»  (to \".\\2\")")))



(setq mkto-pattern     "^\\(.+ \\)«\\([!-~]+\\)»$")
(setq mkto-pattern     "^\\(.+ \\)<\\([!-~]+\\)>$")
(setq mkto-replacement "\\1«.\\2»\t(to \"\\2\")\n\\&  (to \".\\2\")")
(setq mkto-replacement "\\1«.\\2»\t(to \"\\2\")\n\\1«\\2»  (to \".\\2\")")

;; (find-es "emacs" "emacs-cvs-mkto-bug")
;; (setq mkto-pattern (string-to-multibyte mkto-pattern))

(defun mkto () (interactive)
  (ee-replace-line
   (lambda (str)
     (replace-regexp-in-string
      mkto-pattern mkto-replacement
      str
      'fixedcase))))

;; «mksec»  (to ".mksec")
;; (find-efunction 'mkto)
(defun mksec () (interactive)
  (ee-replace-line
   (lambda (str)
     (replace-regexp-in-string
      "^\\(.*\\)«\\([!-~]+\\)»\\(.*\\)$"
      " # «.\\2»\t(to \"\\2\")\n\\1«\\2»  (to \".\\2\")"
      str 'fixedcase))))



(seen 1943)



;;;;;
;;;;; «code-c-ds»  (to ".code-c-ds")
;;;;; A horde of "code-c-d"s, some new, some old.
;;;;;

; (find-angg "eev.el" "code-c-d-explan1")
; (find-angg "eev.el" "code-c-d-explan2")
;
; TeX:
;(code-c-d "texmfsrcgen" "/usr/share/texmf/source/generic/")
;(code-c-d "texmftexgen" "/usr/share/texmf/tex/generic/")
;(code-c-d "xypic" "/usr/share/texmf/source/generic/xypic/src/")
;(code-c-d "xy36" "/usr/src/xy-3.6/src/")
;(code-c-d "web2c" "/usr/src/teTeX-0.9/texk/web2c/")
;(code-c-d "knuth" "$SCTAN/systems/knuth/")
;(code-c-d "amslmath" "/usr/share/texmf-tetex/source/latex/amslatex/math/")
;(code-c-d "amslmath" "/usr/share/doc/texlive-doc/latex/amsmath/")
;; (code-c-d "plainsrc" "/usr/share/texmf-tetex/tex/plain/base/")
;; (code-c-d "lsrc"     "/usr/share/texmf-tetex/source/latex/")
;(code-c-d "lsrc" "/usr/share/texmf-texlive/tex/latex/")

;; (find-fline "/usr/local/texlive/2019/texmf-dist/tex/latex/" "base")
;; (find-fline "/usr/local/texlive/2019/texmf-dist/source/latex/" "base")
(code-c-d "lsrc" "/usr/local/texlive/2019/texmf-dist/tex/latex/")
(code-c-d "ldtx" "/usr/local/texlive/2019/texmf-dist/source/latex/")

(code-c-d "plainsrc" "/usr/share/texmf-texlive/tex/plain/base/")
;(code-c-d "mp" "/usr/lib/texmf/texmf/doc/metapost/")
;(code-c-d "pst" "$SCTAN/graphics/pstricks/")
;(code-c-d "pt" "/snarf/ftp/ftp.dcs.qmw.ac.uk/pub/tex/contrib/pt/")
;(code-c-d "amsl" "/usr/lib/texmf/doc/ams/amslatex/")
;(code-c-d "lsh" "/usr/lib/texmf/source/latex/lshort/")
;(code-c-d "lgui" "/usr/lib/texmf/source/latex/guide/")
;(code-c-d "xfig" "/usr/src/redhat/BUILD/xfig.3.1.4/")
;(code-c-d "xdvi" "/usr/src/redhat/BUILD/xdvi-21/")
;(code-c-d "th" "/dl/tex/texhax/")
;(code-c-d "lily" "/usr/src/lilypond-1.0.19.uu3/")
;(code-c-d "l" "~/LATEX/")
;(code-c-d "diagxy" "$usr_src/diagxy/")
(code-c-d  "diagxy" "~/usrc/diagxy/")
(code-xdvi "diagxy" "~/usrc/diaxydoc.dvi")
;
; PostScript:
;(code-c-d "gs5" "/usr/src/gs-5.10/")
;(code-c-d "gs" "/usr/src/gs-6.53/")
;(code-c-d "gv" "/usr/src/gv-3.5.8/")
;(code-c-d "gsshare" "/usr/share/gs/6.53/")
;(code-c-d "psfirstg" "/hda6/snarf/http/www.cs.indiana.edu/docproject/programming/postscript/")
;
; net / browsers:
;(code-c-d "wg" "/usr/src/wget-1.5.3/" "wget")
;(code-c-d "sn" "/dl/www/snarf-1.22/")
;(code-c-d "lynx" "/usr/src/lynx-2.8.3/")
;(code-c-d "grail" "/usr/src/grail-0.3/")
;(code-c-d "tcpd" "/dl/sniffer/tcpdump-3.3.1a2/")
;(code-c-d "A" "/usr/src/redhat/BUILD/WWW/Arena-0.3.24/")
;(code-c-d "sendm" "$RBU/sendmail-8.8.4/")
;(code-c-d "apa" "/usr/src/apache-1.3.0/")
;
; Emacs:
;(code-c-d "eev" "~/eev/")
;(code-c-d "eevnew" "~/eev-new/")
;(code-c-d "e" "/usr/share/emacs/20.5/lisp/" "emacs-e20")
;(code-c-d "e" "/usr/share/emacs/19.34/lisp/" "emacs-19/emacs")
;(code-c-d "el" "/usr/share/emacs/19.34/lisp/" "elisp")
;(code-c-d "eli" "/usr/src/emacs-lisp-intro-1.05/" "emacs-lisp-intro")
;(code-c-d "e20" "/usr/share/emacs/20.7/lisp/" "emacs-e20")
;(code-c-d "e20src" "/usr/src/emacs20-20.7/" "emacs-e20")
;(code-c-d "efaq" "http://www.lerner.co.il/emacs/" "emacs-faq")
(code-c-d "efaq" "$S/http/www.lerner.co.il/emacs/" "efaq")
;(code-c-d "w3el" "/usr/share/w3-el/" "w3")
;(code-c-d "w3c" "/home/root/AX/w3/")
;(code-c-d "texi" "/usr/src/texinfo-4.0/" "texinfo")
(code-c-d "sitelisp" "/usr/share/emacs/site-lisp/")
(code-c-d "sitelisp24" "/usr/share/emacs24/site-lisp/")
;(code-c-d "e21src" "/usr/src/emacs21-21.1/")
;(code-c-d "e21" "/usr/src/emacs21-21.1/")
;(code-c-d "e21l" "/usr/src/emacs21-21.1/lisp/")
;(code-c-d "xe" "/usr/lib/xemacs-21.1.10/lisp/" "xemacs-21.1.10/xemacs")
;(code-c-d "xel" "/usr/lib/xemacs-21.1.10/lisp/" "xemacs-21.1.10/lispref")
;(code-c-d "xei" "/usr/lib/xemacs-21.1.10/lisp/" "xemacs-21.1.10/internals")
;(code-c-d "xefaq" "/usr/lib/xemacs-21.1.10/lisp/" "xemacs-21.1.10/xemacs-faq")
(code-c-d "viper" (ee-efile "emulation/") "viper")
(code-c-d "erc" "~/usrc/erc-5.0/")
(code-c-d "rcirc" "~/usrc/rcirc/")
(code-c-d "emacscvs" "~/bigsrc/emacs/")
(code-c-d "ecvs" "~/bigsrc/emacs/")
(code-c-d "ecvssrc" "~/bigsrc/emacs/src/")
;(code-c-d "eetc" data-directory)

(seen 2030)

;
; Linux:
; «k22»  (to ".k22")
;(code-c-d "k" "/usr/src/linux-1.2.13/")
;(code-c-d "k2" "/usr/src/linux-2.0/")
;(code-c-d "k22" "/usr/src/linux-2.2/")
;(code-c-d "k24" "/usr/src/linux-2.4/")
(code-c-d "kpatches" "/usr/src/kernel-patches/")
;(code-c-d "k" "/usr/src/linux/")
;(code-c-d "tlk" "/usr/src/tlk/")
;(code-c-d "khg" "/dl/LDP/khg-0.6/")
;(code-c-d "shkpkg" "/usr/share/kernel-package/")
;
; (find-es "hardware" "find-k22configoption")
;(code-c-d-linux "k22" "/hdd7/tmp/kernel-source-2.2.20/")
' (code-c-d-linux "k24"    "~/bigsrc/kernel-source-2.4.26/")
' (code-c-d-linux "k24doc" "~/bigsrc/kernel-source-2.4.26/Documentation/")
;; (code-c-d-linux "k26" "~/bigsrc/kernel-source-2.6.8/")
;; (code-c-d "k26" "~/bigsrc/kernel-source-2.6.8/" :linux :grep)
' (code-c-d-linux "k26doc" "~/bigsrc/kernel-source-2.6.8/Documentation/")

;
; Hurd:
;(code-c-d "hurd" "/usr/src/hurd-20011016/" "hurd")
;(code-c-d "gnumach" "/usr/src/gnumach-20011013/")
;(code-c-d "oskmach" "/usr/src/oskit-mach/")
;(code-c-d "hurddebs" "$SDEBIAN/dists/sid/main/binary-hurd-i386/")
;(code-c-d "dcrossdoc" "/usr/doc/dpkg-cross/")
;(code-c-d "gvldi" "/gnu/var/lib/dpkg/info/")
;(code-c-d "HIG" "/usr/src/hurd-installation-guide/" "hurd-install-guide")
;(defun find-gnustatus (package &rest rest)
;  (apply 'find-Package "/gnu/var/lib/dpkg/status" package rest))
;(defun find-gnuavailable (package &rest rest)
;  (apply 'find-Package "/gnu/var/lib/dpkg/available" package rest))

;
; gcc / low-level things
;(code-c-d "xd" "/usr/src/xduel-2.14/")
(code-c-d "gcc" "/usr/lib/gcc/i486-linux-gnu/4.1.2/include/" "gcc-10")
;(code-c-d "ldso" "/usr/src/ld.so-1.9.11/")
;(code-c-d "libvfw" "/usr/src/libvforkwrap-0.1/")
;
; games:
;(code-c-d "mame" "/usr/src/xmame-0.30.1/")
;(code-c-d "mame356" "/usr/src/xmame-0.35b6.1/")
;(code-c-d "xast" "/usr/src/xaster-1.00/")
;(code-c-d "ste" "/usr/src/stella-0.7/")
;
; Tcl:
;(code-c-d "tcl" "/usr/src/tcl8.3-8.3.1/")
;(code-c-d "tcl7" "/usr/src/tcl7.6-7.6p2/")
;(code-c-d "cgitcl" "/usr/src/cgi.tcl-0.7/")
;(code-c-d "mta" "/usr/src/mktclapp-3.9/")
;(code-c-d "tkex" "/usr/share/doc/tk8.4/examples/")
;(code-c-d "exp" "/usr/src/expect5.31-5.31.2/" "expect")
;(code-c-d "plp" "/usr/src/plplot-4.99j/")
;(code-c-d "tuba" "/usr/src/tuba-2.5.b1/")
;(code-c-d "et" "/usr/src/et-80b2/")
;(code-c-d "sd" "/usr/src/scripdoc/")
;(code-c-d "wiscri" "~/wiki/scripts/")
;(code-c-d "wiscri" "~/WIKIS/tclscripts/")
;(code-c-d "swige" "/usr/doc/swig/examples/")
;(code-c-d "expman" "~/EXPECT/MAN/TXT/")
;(code-c-d "tclers" "/snarf/http/mini.net/cgi-bin/wikit/")
;
; Lua:
(code-c-d "flua" "~/LUA/flua-0.02/")
;; (code-c-d "miniforth" "~/miniforth/")
;(code-c-d "lua" "/usr/src/lua-4.0/" "~/lua-4.0/doc/lua")
(code-c-d "lua" "/usr/src/lua-4.0/" "lua")
;(code-c-d "lua3.2" "/usr/src/lua3.2-3.2/")
;(code-c-d "luall" "/usr/src/loadlib/")
;(code-c-d "tolua" "/usr/src/tolua/")
;(code-c-d "tklua" "/usr/src/tklua/")
(code-c-d "lua511" "~/usrc/lua-5.1.1/" :grep)
(code-c-d "lua512" "~/usrc/lua-5.1.2/" :grep)
(code-c-d "lua51"  "~/usrc/lua-5.1.2/" :grep)
(code-c-d "lua51"  "~/usrc/lua-5.1.5/" :grep :tags)
(code-c-d "lua51src" "~/usrc/lua-5.1.4/src/" :grep :anchor)
(code-c-d "compat51" "~/usrc/compat-5.1r4/")
;; (find-es "lpeg")
(code-c-d "lpeg" "~/usrc/lpeg-1.1.0/" :tags)
(code-c-d "lpeg" "/usr/share/doc/lua-lpeg-dev/")
;; (find-lpegfile "")
;; (find-lpegfile "")
;; (find-lpegw3m "lpeg.html")
;; (find-lpegw3m "lpeg.html#captures")
;; (find-lpegw3m "lpeg.html#cap-arg")
(code-c-d "luaftp" "$S/http/www.lua.org/ftp/")
(code-c-d "luaman" "/usr/share/doc/lua50-doc/manual/")
(code-c-d "luasocket" "~/usrc/luasocket-2.0.1/" :grep)
(code-c-d "lposix" "~/usrc/posix/" :grep)
;
; etc:
(code-c-d "iconipl" "~/usrc/ipl/" :grep)
;(code-c-d "icon" "/usr/src/icon-9.3.2/")
;(code-c-d "ipl" "/usr/src/icon/ipl/")
;(code-c-d "iproc" "/usr/src/icon/ipl/procs/")
;(code-c-d "bf" "/usr/src/bigforth/")
;(code-c-d "paysan" "/home/root/PAYSAN/")
;(code-c-d "gforth" "/usr/share/gforth/0.5.0/" "gforth")
;(code-c-d "gf"     "/usr/share/gforth/0.5.0/" "gforth")
;(code-c-d "zsh" "/usr/src/zsh-3.1.4/" "zsh")
;(code-c-d "zsh" "/usr/src/zsh-3.1.2/" "zsh")
;(code-c-d "tea" "/dl/teapot-0.9/")
;(code-c-d "txl" "/usr/src/TXL7.4/")
;(code-c-d "gimp" "/usr/src/gimp-1.0.0/")
;(code-c-d "repletc" "~/replace/etc/")
;(code-c-d "p5l" "/usr/lib/perl5/")
(code-c-d "pl5" "/usr/lib/perl5/")
;(code-c-d "pl5pod" "/usr/lib/perl5/5.004/pod/")
;(code-c-d "pl5lin" "/usr/lib/perl5/i386-linux/5.004/")
;(code-c-d "pl5src" "/usr/src/perl-5.004.04/")
;(code-c-d "CPAN" "$SCPAN/")
;(code-c-d "pl55i" "/usr/lib/perl5/5.005/i386-linux/")
;(code-c-d "ptut" "/snarf/http/agora.leeds.ac.uk/Perl/")
;(code-c-d "pg" "/usr/src/postgresql-6.3.2/")
;(code-c-d "g4" "/usr/share/gforth/0.4.0/" "gforth")
;(code-c-d "xf" "/usr/src/xfree86-3.3.2.2/")
;(code-c-d "glib" "/usr/src/glib1.1.12-1.1.12/")
;(code-c-d "gtk+" "/usr/src/gtk+1.1.12-1.1.12/")
(code-c-d "vldi" "/var/lib/dpkg/info/" :grep)
;(code-c-d "latte" "/usr/src/latte-1.1/")
;(code-c-d "php3" "/usr/src/php3-3.0.16/")
;(code-c-d "lsof" "/usr/src/lsof-4.37/")
;(code-c-d "fm" "$S/http/www.freshmeat.net/news/")
;(code-c-d "pf" "/usr/src/pforth-21/")
;(code-c-d "groff" "/usr/src/groff-1.11a/")
;(code-c-d "grof" "/usr/src/groff-1.11a/")
;(code-c-d "mimelite" "/usr/src/MIME-Lite-1.135/")
;(code-c-d "ts2" "/usr/src/ts2/")
;(code-c-d "ssh" "/usr/src/ssh-1.2.26/")
;(code-c-d "cf" "/usr/src/cfengine-1.4.12/" "cfengine")
;(code-c-d "octal" "/usr/src/octal-alpha/")
;(code-c-d "php3h" "/usr/doc/php3-doc/html/")
;(code-c-d "bsd8" "/hdd12/share/doc/en_US.ISO_8859-1/")
;(code-c-d "ldnav" "~/LD/NAVEGACAO/")
;(code-c-d "xc" "/usr/src/xfree86-1-3.3.6/build-tree/xc/")
;(code-c-d "isa" "/usr/src/Isabelle99-1/")
;(code-c-d "isalog" "/usr/src/Isabelle99-1/heaps/smlnj-110_x86-linux/log/")
;(code-c-d "shu" "/usr/src/shellutils-2.0/" "sh-utils")
;(code-c-d "pamh" "/usr/doc/libpam-doc/html/")
;(code-c-d "pams" "/usr/doc/libpam-doc/sgml/")
;(code-c-d "pamt" "/usr/doc/libpam-doc/txt/")
;(code-c-d "THL" "~/TH/L/")
;(code-c-d "ncurs" "/usr/src/ncurses-5.0/")
;(code-c-d "ncursdoc" "/usr/doc/libncurses5-dev/")
;(code-c-d "gst" "~/usrc/smalltalk-1.95.3/" "~/usrc/smalltalk-1.95.3/doc/gst")
;
(code-c-d "gawk" "/usr/share/doc/gawk/" "gawk")

;(code-c-d "planner" "/usr/share/emacs/site-lisp/planner-el/")
;(code-c-d "emacswiki" "/usr/share/emacs/site-lisp/emacs-wiki/")

(code-c-d "htet" "/usr/share/doc/HOWTO/en-txt/")
(code-c-d "rfc" "$S/http/www.ietf.org/rfc/")




;;;  _                
;;; | |   _   _  __ _ 
;;; | |  | | | |/ _` |
;;; | |__| |_| | (_| |
;;; |_____\__,_|\__,_|
;;;                   

;; For the lua manual
;; «lua-manual»  (to ".lua-manual")
;; «find-lua51manual» (to ".find-lua51manual")
;; «find-lua52manual» (to ".find-lua52manual")
;; «find-lua53manual» (to ".find-lua53manual")
;; (find-es "lua5" "lua5.2-doc")
;; (find-es "lua5" "lua5.3-doc")
;; (find-es "lua5" "lua5.4-doc")
;; (find-fline "/usr/share/doc/lua5.1-doc/doc/" "manual.html")
;; (find-fline "/usr/share/doc/lua5.2-doc/"     "manual.html")
;; (find-lua51manual "#pdf-select")
;; (find-lua52manual "#pdf-select")
;; (find-lua53manual "#pdf-select")
;; (find-lua54manual "#pdf-select")
;; (find-lpegmanual "#f-match")
;; (find-lpegremanual)
;; (find-lpegremanual "#basic")
;; http://www.inf.puc-rio.br/~roberto/lpeg/lpeg.html#cap-g
;; file:///usr/share/doc/lua-lpeg-dev/lpeg.html#cap-g

;; See: (find-eev "eev-tlinks.el" "code-brappend")
(code-brappend "lua51manual"  "file:///usr/share/doc/lua5.1-doc/doc/manual.html")
(code-brappend "lua52manual"  "file:///usr/share/doc/lua5.2-doc/manual.html")
(code-brappend "lua53manual"  "https://www.lua.org/manual/5.3/manual.html" 'brgl)
(code-brappend "lua54manual"  "https://www.lua.org/manual/5.4/manual.html" 'brgl)
(code-brappend "lpegmanual"   "http://www.inf.puc-rio.br/~roberto/lpeg/lpeg.html" 'brgl)
(code-brappend "lpegmanual"   "file:///usr/share/doc/lua-lpeg-dev/lpeg.html")
(code-brappend "lpegremanual" "file:///usr/share/doc/lua-lpeg-dev/re.html")

(defun find-pilw3m (&optional anchor &rest rest)
  (interactive)
  (brg (format "https://www.lua.org/pil/%s" (or anchor ""))))

;; «ee-lua-set-init-file»  (to ".ee-lua-set-init-file")
;; See: (find-lua51manual "#6" "LUA_INIT")
;;      (find-lua52manual "#7" "LUA_INIT")
;;      (find-lua53manual "#7" "LUA_INIT")
;;      (find-lua54manual "#7" "LUA_INIT")
;;      (find-angg "LUA/lua50init.lua")
;;      (find-es "lua5" "lua-init-from-emacs")
;; Tests: (ee-lua-set-init-file nil)
;;        (ee-lua-set-init-file "~/foo")
;;        (ee-lua-set-init-file t)
;;
(defun ee-lua-set-init-file (fname)
  "Set the environment variable $LUA_INIT according to FNAME.
If FNAME is nil, unset LUA_INIT, i.e., remove it from the environment.
If FNAME is, say, $HOME/foo/bar.lua, then use ee-expand to convert
that to /home/edrx/foo/bar.lua, then set LUA_INIT to @/home/edrx/foo/bar.lua.
If FNAME is t then pretend that it was ~/LUA/lua50init.lua."
  (interactive (list t))
  (if (eq fname nil)
      (setenv "LUA_INIT" nil)
    (if (eq fname t)
	(setq fname "~/LUA/lua50init.lua"))
    (setenv "LUA_INIT" (concat "@" (ee-expand fname)))))

;; «lpegrex»  (to ".lpegrex")
;; (find-es "lpeg" "lpegrex")
(code-pdf-page "lpegrex" "~/tmp/lpegrex.pdf")
(code-pdf-text "lpegrex" "~/tmp/lpegrex.pdf")
(code-c-d      "lpegrex" "~/usrc/lpegrex/")
;;
;; (find-es "lpeg" "lpeglabel")
(code-pdf-page "lpeglabel" "~/tmp/lpeglabel.pdf")
(code-pdf-text "lpeglabel" "~/tmp/lpeglabel.pdf")
(code-c-d      "lpeglabel" "~/usrc/lpeglabel/")




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

;; «lua-5.2»  (to ".lua-5.2")
;; (find-es "lua5" "install-5.2")
(code-c-d "lua52" "~/usrc/lua-5.2.0/")
;; (find-efunction 'eepitch-lua51)
;; (find-angg ".emacs" "luamanual")
;; (code-c-d "lua51manual" (ee-lua51file "doc/manual.html"))
;; (find-lua51manualw3m "")

;; «lua5.2-debian» (to ".lua5.2-debian")
;; (find-es "lua5" "lua5.2-debian")
;; (code-c-d "lua52manual" (ee-lua52file "doc/manual.html"))
;; (code-c-d "lua52manual" "/usr/share/doc/lua5.2-doc/manual.html")
;; (find-lua52manualw3m "")
;; (find-lua52manualw3m "#pdf-bit32")
;; (find-lua52manualw3m "#pdf-bit")
;; (find-lua52manualw3m "#3.2" "_ENV")
;; (find-lua52w3m "doc/readme.html")

;; «luamanual»  (to ".luamanual")
(code-c-d "luamanual" "/usr/share/doc/lua50-doc/manual/manual.html")
(if (file-exists-p (ee-luafile "doc/manual2.html"))
    (code-c-d "luamanual" (ee-luafile "doc/manual2.html"))
  )
;; (find-luamanualw3m "")
;; (find-luamanualw3m "#pm")
;; (find-luamanualw3m "#pdf-string.len")

;; «luamanual-51»  (to ".luamanual-51")
;; (find-lua51file "doc/")
(code-c-d "luamanual" (ee-lua51file "doc/manual.html"))

;; (defun find-luamanualw3m+ (&optional tag &rest rest)
;;   (interactive (list (read-string "Section (anchor) of the Lua manual: "
;;                                   (ee-stuff-around-point "0-9A-Za-z_.:"))))
;;   (apply 'find-luamanualw3m
;;          (if (equal tag "") "" (concat "#" tag))
;;          rest))

;; (ee-luamanual-url)
;; (ee-luamanual-url "")
;; (ee-luamanual-url "3.14")
(defun ee-luamanual-url (&optional tag)
  (if (equal tag "") (setq tag nil))
  (format "file://%s%s" ee-luamanualdir (if tag (concat "#" tag) "")))

(defun find-luamanualw3m+ (&optional tag &rest rest)
  (interactive (list (read-string "Section (anchor) of the Lua manual: "
				  (ee-stuff-around-point "0-9A-Za-z_.:"))))
  (apply 'find-w3m (ee-luamanual-url tag) rest))

;; «find-luamanual-ff»  (to ".find-luamanual-ff")
;; (find-luamanual-ff "3.14")
(defun find-luamanual-ff (&optional tag)
  (interactive (list (read-string "Section (anchor) of the Lua manual: "
				  (ee-stuff-around-point "0-9A-Za-z_.:"))))
  (find-firefox-bg (ee-luamanual-url tag)))

;; (find-esetkey-links (kbd "M-h M-l") 'find-luamanualw3m+)
;; (find-esetkey-links (kbd "M-h M-L") 'find-luamanual-ff)
' (define-key eev-mode-map "\M-h\M-l" 'find-luamanualw3m+)
' (define-key eev-mode-map "\M-h\M-L" 'find-luamanual-ff)


;; «lua50»  (to ".lua50")
;; (find-es "lua5" "install-5.0.2")
(code-c-d "lua50"       "~/usrc/lua-5.0.3/")
(code-c-d "lua50manual" (ee-lua50file "doc/manual.html"))
(defun eepitch-lua50 () (interactive) (eepitch-comint "lua50" "lua50"))
;; (find-lua50file "")
;; (find-lua50w3m "doc/manual.html")
;; (find-lua50w3m "doc/manual.html#vararg")
;; (find-lua50manualw3m "")
;; (find-lua50manualw3m "#vararg" "arg={2, 3; n=2}")

(code-c-d "lua40"       "~/usrc/lua-4.0.1/")
(code-c-d "lua40manual" (ee-lua40file "doc/manual.html"))
(defun eepitch-lua40 () (interactive) (eepitch-comint "lua40" "lua40"))

;; (code-ps "lua50" "$S/http/www.lua.org/ftp/refman-5.0.ps.gz")
(defun find-lua50ref (&rest rest) (interactive)
  (apply 'find-anchor "~/LUA/lua50ref.e" rest))
(defun to-luaref (&rest rest) (interactive)
  (apply 'find-lua50ref rest))
;;
;; (find-lua50ref "For Statement")


(defun foo-lua-section () (interactive)
  (beginning-of-line)
  (assert (looking-at "\\([0-9.]+\\) - \\(.+\\)"))
  (insert (format "*%s*\n*%s*\n" (match-string 1) (match-string 2)))
  (next-line))

(defun foo-lua-region (s e) (interactive "r")
  (let ((str (buffer-substring s e)))
    (beginning-of-line)
    (insert (format "*%s*\n" str))
    (forward-line 1)))

(defun tp-make-w3m-faces () (interactive)
  (make-face           'w3m-anchor-face)
  (set-face-foreground 'w3m-anchor-face "cyan")
  (make-face           'w3m-bold-face)
  (set-face-bold-p     'w3m-bold-face t)
  (make-face           'w3m-header-line-location-content-face)
  (set-face-foreground 'w3m-header-line-location-content-face "LightGoldenrod")
  (set-face-background 'w3m-header-line-location-content-face "Gray20")
  (make-face           'w3m-header-line-location-title-face)
  (set-face-foreground 'w3m-header-line-location-title-face "cyan")
  (set-face-background 'w3m-header-line-location-title-face "Gray20")
  (make-face           'w3m-anchor-face)
  (set-face-foreground 'w3m-anchor-face "cyan"))









(seen 2266)

;; (defun find-texbookpage (n &rest comments)
;;   (find-dvipage "~/usrc/texbook/texbook.dvi" n))

;; «papers»  (to ".papers")
;; (find-angg ".emacs.papers")

;; (find-es "math" "SGA1" "sga1-corrected")
;; (find-sga1page 10)
(code-xdvi "sga1" "~/tmp/sga1-corrected.dvi")



;; «icon»  (to ".icon")
;; (find-angg "ICON/tron.icn")
;; (find-es "icon" "tron.icn")
(code-c-d "ipl" "/usr/lib/icon-ipl/")

;; «iconbook»  (to ".iconbook")
;; Griswold, Grisworld: "The Icon Programming Language, Third Edition"
;;   http://www.cs.arizona.edu/icon/books.htm
;;   http://www.cs.arizona.edu/icon/lb3.htm
;;   http://www.cs.arizona.edu/icon/ftp/doc/lb1up.pdf
(code-xpdf      "iconbook" "$S/http/www.cs.arizona.edu/icon/ftp/doc/lb1up.pdf")
(code-pdftotext "iconbook" "$S/http/www.cs.arizona.edu/icon/ftp/doc/lb1up.pdf")
;; (find-iconbookpage         5  "Contents")
;; (find-iconbooktext          "\nContents")
;; (find-iconbookpage (+ 22 143) "An Overview of Graphics")
;; (find-iconbooktext     "\n     An Overview of Graphics")
;; (find-iconbookpage (+ 22 273) "Language Reference Manual")
;; (find-iconbooktext          "\nLanguage Reference Manual")
;; (find-iconbookpage (+ 22 373) "Index")
;; (find-iconbooktext "\f         Index")

;; «icongrbook»  (to ".icongrbook")
;; Griswold, Jeffery, Townsend: "Graphics Programming in Icon"
;;   http://www.cs.arizona.edu/icon/books.htm
;;   http://www.cs.arizona.edu/icon/gb/index.htm
;;   http://www.cs.arizona.edu/icon/ftp/doc/gb1up.pdf
(code-xpdf "icongrbook" "$S/http/www.cs.arizona.edu/icon/ftp/doc/gb1up.pdf")
;; (find-icongrbookpage         5  "Contents")
;; (find-icongrbookpage (+ 24 495) "Index")
;; (find-icongrbookpage (+ 24 183) "Events")
;; (find-iconbooktext)

;; Griswold and Griswold: "The Implementation of the Icon Programming Language"
;; http://www.cs.arizona.edu/icon/ftp/doc/ib1up.pdf
(code-xpdf "iconimp" "$S/http/www.cs.arizona.edu/icon/ftp/doc/ib1up.pdf")
;; (find-iconimppage        3  "Contents")
;; (find-iconimppage (+ 6 329) "Index")

;; Alan D. Corré: "Icon Programming for Humanists"
;; http://www2.cs.uidaho.edu/~jeffery/icon/humanists/humanist.pdf
(code-xpdf      "iconhum" "$S/http/www2.cs.uidaho.edu/~jeffery/icon/humanists/humanist.pdf")
(code-pdftotext "iconhum" "$S/http/www2.cs.uidaho.edu/~jeffery/icon/humanists/humanist.pdf")
;; (find-iconhumpage         9  "Contents")
;; (find-iconhumpage (+ 14 123) "Index")
;; (find-iconhumtext "")

;; Thomas W. Christopher: "Icon Programming Language Handbook"
;; http://www.tools-of-computing.com/tc/CS/iconprog.pdf
(code-xpdf      "iconhandbook" "$S/http/www.tools-of-computing.com/tc/CS/iconprog.pdf")
(code-pdftotext "iconhandbook" "$S/http/www.tools-of-computing.com/tc/CS/iconprog.pdf")
;; (find-iconhandbookpage        5  "Contents")
;; (find-iconhandbookpage       11  "List of Figures")
;; (find-iconhandbookpage       13  "List of Tables")
;; (find-iconhandbookpage (+ 0  35) "Generators")
;; (find-iconhandbookpage (+ 0 151) "Windows and Graphics")
;; (find-iconhandbooktext "")




;; «tclbook»  (to ".tclbook")
;; (find-es "tcl" "tclbook")
;;http://web.archive.org/web/*/http://www.cica.indiana.edu/cica/faq/tcl/tcl.html
;; http://wwwcs.upb.de/cs/ag-szwillus/lehre/ws96_97/bss/tcltk.html
;; http://wwwcs.upb.de/cs/ag-szwillus/lehre/ws96_97/bss/book/p1.ps.gz
;; http://wwwcs.upb.de/cs/ag-szwillus/lehre/ws96_97/bss/book/p2.ps.gz
;; http://wwwcs.upb.de/cs/ag-szwillus/lehre/ws96_97/bss/book/p3.ps.gz
;; http://wwwcs.upb.de/cs/ag-szwillus/lehre/ws96_97/bss/book/p4.ps.gz
(code-c-d "tclbook"
	  "$S/http/wwwcs.upb.de/cs/ag-szwillus/lehre/ws96_97/bss/book/")
;; (code-ps  "tclbook1" (ee-tclbookfile "p1.ps.gz"))
;; (code-ps  "tclbook2" (ee-tclbookfile "p2.ps.gz"))
;; (code-ps  "tclbook3" (ee-tclbookfile "p3.ps.gz"))
;; (code-ps  "tclbook4" (ee-tclbookfile "p4.ps.gz"))
;; (find-tclbook1page 1)
;; (find-tclbook2page 1)
;; (find-tclbook3page 1)
;; (find-tclbook4page 1)

(defun find-tclbookfiletext (file &rest rest)
  (apply 'find-sh (format "zcat %s | pstotext" (ee-tclbookfile file)) rest))
(defun find-tclbook1text (&rest rest)
  (interactive) (apply 'find-tclbookfiletext "p1.ps.gz" rest))
(defun find-tclbook2text (&rest rest)
  (interactive) (apply 'find-tclbookfiletext "p2.ps.gz" rest))
(defun find-tclbook3text (&rest rest)
  (interactive) (apply 'find-tclbookfiletext "p3.ps.gz" rest))
(defun find-tclbook4text (&rest rest)
  (interactive) (apply 'find-tclbookfiletext "p4.ps.gz" rest))
;; (find-tclbook1text)
;; (find-tclbook2text)
;; (find-tclbook3text)
;; (find-tclbook4text)

;; http://hegel.ittc.ku.edu/topics/tcltk/book.examples
;; http://wwwcs.upb.de/cs/ag-szwillus/lehre/ws96_97/bss/book/examples.gz


;; «find-iconbooktext»  (to ".find-iconbooktext")
;; http://www.cs.arizona.edu/icon/ftp/doc/lb1up.pdf
;; (find-fline "$S/http/www.cs.arizona.edu/icon/ftp/doc/")
(code-pdf-page "iconbook" "$S/http/www.cs.arizona.edu/icon/ftp/doc/lb1up.pdf")
(code-pdf-text "iconbook" "$S/http/www.cs.arizona.edu/icon/ftp/doc/lb1up.pdf" 22)
;; (find-iconbookpage)
;; (find-iconbooktext)
;; (find-iconbookpage (+ 22 378) "Event(), 155-156")
;; (find-iconbooktext (+ 22 378) "Event(), 155-156")
;; (find-iconbookpage (+ 22 155) "EVENTS")
;; (find-iconbooktext (+ 22 155) "EVENTS")
;; (find-iconbookpage (+ 22 156) "case Event() of")
;; (find-iconbooktext (+ 22 156) "case Event() of")
;; (find-iconbookpage (+ 22 203) "queens")
;; (find-iconbooktext (+ 22 203) "queens")



;; (defun find-hurdPackage (&rest rest)
;;   (apply 'find-Package "$SSIDMB/Packages" rest))
;; (defun find-hurdalphaPackage (&rest rest)
;;   (apply 'find-Package "$SALPHASIDMB/Packages" rest))


(seen 2583)


;; (find-efile "jka-compr.el" "gzip")
;; (find-efile "jka-compr.el" "defun jka-compr-install")
;; (find-efile "jka-compr.el" "defun jka-compr-uninstall")
;; (find-efile "jka-compr.el")
(load-library "jka-compr")
(if (fboundp 'auto-compression-mode)	; needed on Emacs21
    (auto-compression-mode 1))

;; How do I tell jka-compr that `.dz' files (for dict) are in reality `.gz's?
;; (setq auto-mode-alist (cons '("\\.dz$" nil jka-compr) auto-mode-alist))

;; (find-fline "/usr/share/dictd/jargon.dict.dz")

;; (describe-variable 'auto-mode-alist)
;; (describe-variable 'jka-compr-compression-info-list)
;; (find-efile "jka-compr.el")


;; «gnuserv»  (to ".gnuserv")
;; (find-es "emacs" "gnuserv")
;; (find-efunctiondescr 'server-start)
;; (gnuserv-start)

' (if (fboundp 'gnuserv-start)
      (if (equal (getenv "GNUCLIENT") "no") nil
        (gnuserv-start)))


;; «info-path»  (to ".info-path")
;; (describe-variable 'Info-additional-directory-list)
;; (describe-variable 'Info-directory-list)
;; (find-evariable 'Info-additional-directory-list)
;; (find-evariable 'Info-directory-list)
;; (setq Info-additional-directory-list '("~/info"))
;; mkdir ~/info/; cp -v ~/tmp/lua-4.0/doc/lua.info* ~/info/
;; (find-fline "~/info/")
;; (find-node "(lua)Top")
;;
(if (not (boundp 'Info-additional-directory-list))
    (setq Info-additional-directory-list nil))

(add-to-list 'Info-additional-directory-list "~/info")
;; (add-to-list 'Info-additional-directory-list "~/eev-current/doc")
;; (find-node "(eev)Top")

;; (setq Info-additional-directory-list
;;       (append (if (boundp 'Info-additional-directory-list)
;; 		  Info-additional-directory-list)
;; 	      '("~/info")))

;; Info mode doesn't like having in its path dirs that don't exist
(or (file-exists-p "~/info") (make-directory "~/info"))
' (or (file-exists-p  "~/eev-current/doc")
      (make-directory "~/eev-current/doc" "-p"))




;; (find-elnode "Defining Functions" "Function: defalias")
;; (find-efunctiondescr 'defalias)
;; (find-es "emacs" "indented-text-mode")
;; (defalias 'indented-text-mode 'paragraph-indent-text-mode)
;; (find-efaqnode "Turning on syntax highlighting")
(defalias 'indented-text-mode 'text-mode)
(defalias 'flm 'font-lock-mode)
(defalias 'spm 'show-paren-mode)

;; (add-hook 'awk-mode-hook        'turn-on-font-lock)
;; (add-hook 'c-mode-hook          'turn-on-font-lock)
;; (add-hook 'change-log-mode-hook 'turn-on-font-lock)
;; (add-hook 'dired-mode-hook      'turn-on-font-lock)
;; (add-hook 'emacs-lisp-mode-hook 'turn-on-font-lock)
;; (add-hook 'generic-mode         'turn-on-font-lock)
;; ;; (add-hook 'lua-mode          'turn-on-font-lock)   ;; hook doesn't exist?
;; ;; (add-hook 'perl-mode         'turn-on-font-lock)   ;; hook doesn't exist?
;; (remove-hook 'ruby-mode-hook    'turn-on-font-lock)
;; (add-hook 'ruby-mode-hook       'turn-on-font-lock 'append)
;; (add-hook 'sh-mode-hook         'turn-on-font-lock)
;; (add-hook 'tcl-mode-hook        'turn-on-font-lock)
;; (add-hook 'texinfo-mode-hook    'turn-on-font-lock)
;; 
;; (add-hook 'makefile-mode-hook   'turn-on-font-lock)



;;;;;
;;
;; «key_bindings»  (to ".key_bindings")
;;
;;;;;
;
; (find-enode "Rebinding")
; (find-elnode "Key Binding Commands")
; (find-elnode "Changing Key Bindings")
; (find-elnode "Changing Key Bindings" "Function: define-key")
; (find-elnode "Translating Input")
; (find-elnode "Translating Input" "Variable: function-key-map")
; (find-elnode "Character Type")
; (find-elnode "Terminal-Specific")
; (find-efile "term/")
; (find-efile "term/vt220.el")
; (find-efile "term/internal.el" "function-key-map")
; (describe-variable 'function-key-map)
; (describe-key "\e[")
; (describe-key "\e[7")
; (describe-key "\e[7^")
; (describe-key [C-home])
; (define-key function-key-map "\e[7^" [C-home])
; (define-key function-key-map [C-home] "\e[7^")
; ^ Not working yet.
; 2000oct26: [f6] now toggles picture mode instead of only entering it.
; (find-etag "picture-mode")

;; (require 'picture)
;; (find-efunction 'picture-mode-exit)
;; (find-efunction 'delete-trailing-whitespace)
;;
(defun toggle-picture-mode ()
  (interactive)
  (if (eq major-mode 'picture-mode)
      (picture-mode-exit)
    (picture-mode)))

;(put 'eval-expression 'disabled nil)	; Emacs' most useful command (C-x C-e)

;; «ibuffer»  (to ".ibuffer")
;; (find-efunctiondescr 'ibuffer)
;; (find-efunction      'ibuffer)
;; (find-efunctiondescr 'ibuffer-mode)
;; (find-efunctiondescr 'ibuffer-mode "Sorting commands:")
;; (find-efunction      'ibuffer-mode)
;; (find-hfunction      'ibuffer-mode)
(if (locate-library     "ibuffer")
    (global-set-key [f1] 'ibuffer)
  (global-set-key   [f1] 'buffer-menu))

(setq ibuffer-default-sorting-mode 'major-mode)

;; (find-enode "Basic Keyboard Macro")
;; (find-enode "Basic Keyboard Macro" "<F3>")
;; (keymap-unset eev-mode-map "<f3>" 'remove)

;; (global-set-key [f4] 'redraw-display)

;; (find-enode "Keyboard Macros")
;; (find-enode "Basic Keyboard Macro" "C-x (")
;; (find-esetkey-links (kbd "<f5>") 'call-last-kbd-macro)
(global-set-key        (kbd "<f5>") 'call-last-kbd-macro)

;(global-set-key [f6] 'picture-mode)
(global-set-key [f6] 'toggle-picture-mode)
(global-set-key "\e[1~" 'beginning-of-line)
(global-set-key "\e[4~" 'end-of-line)
(global-set-key "\e[2~" 'overwrite-mode)
(global-set-key "\M-o" 'other-window)
(global-set-key "\M-O" 'other-frame)
(global-set-key "\M-+" 'enlarge-window)
(global-set-key "\M-_" 'shrink-window)
; (find-enode "Non-Window Terminals")
;(defun shrink-window1 () (interactive) (enlarge-window -1))
;	shift	alt	keycode  12 = Meta_underscore
;	shift	alt	keycode  13 = Meta_plus

;(global-set-key "\M->" 'end-of-buffer)
;(global-set-key "\M-<" 'beginning-of-buffer)

; Some gdbk-ish keys that are convenient in source buffers
(global-set-key "\M-B" 'gud-break)
(global-set-key "\M-T" 'gud-tbreak)

; «C-x-spc»  (to ".C-x-spc")
(global-set-key "\C-x " 'set-mark-command) ; for buggy "expect"s or "screen"s

(global-set-key [insertchar] 'overwrite-mode) ; for BSDs
(global-set-key [delete] 'delete-char)	; for X; do I still need this?




;; ;; «kd»  (to ".kd")
;; (defun kd (key)
;;   "Prints key and binding in a format suitable for quick refs"
;;   (interactive "kCommand: ")
;;   (princ (format "%s\t-- %s\n" (key-description key) (key-binding key))
;;          (current-buffer)))

;; «dkey»  (to ".dkey")
(defun dkey (key)
  "Execute a key sequence with debugging turned on"
  (interactive "kKey sequence: ")
  (debug)
  (call-interactively (key-binding key)))

;; (define-key global-map "\M-g" 'kd)
;; (define-key global-map "\M-g" 'dkey)


;; «wrap»  (to ".wrap")
;; (find-esetkey-links (kbd "s-w") 'wrap)
;; (global-set-key     (kbd "s-w") 'wrap)
;; (find-enode "Line Truncation")
;;
(defun wrap (p) (interactive "P") "Toggle truncate-lines"
  (if p (setq truncate-lines (eq p 0))
    (setq truncate-lines (not truncate-lines))))

;; (setq truncate-partial-width-windows t)
;; (setq truncate-partial-width-windows nil)
;; https://www.emacswiki.org/emacs/TruncateLines



;; «fooi»  (to ".fooi")
;; (find-es "emacs" "query-replace")
;; TODO: use isearch instead of query-replace.
;;
(defun fooi (&rest rest)
  "Narrow to region then run query-replace on each of the pairs in REST."
  ;; (setq rest (straighten rest))
  (save-excursion
    (save-restriction
      (narrow-to-region (point) (mark))
      (while rest
	(goto-char (point-min))
	(query-replace (car rest) (car (cdr rest)))
;	(query-replace-regexp (regexp-quote (car rest)) (car (cdr rest)))
	(setq rest (cdr (cdr rest)))))))

;; «fooi-re»  (to ".fooi-re")
;; (find-es "emacs" "regexp-syntax")
;;
(defun fooi-re (&rest rest)
  "Narrow to region then run query-replace-regexp on each of the pairs in REST."
  ;; (setq rest (straighten rest))
  (save-excursion
    (save-restriction
      (narrow-to-region (point) (mark))
      (while rest
	(goto-char (point-min))
;	(query-replace (car rest) (car (cdr rest)))
	(query-replace-regexp (car rest) (car (cdr rest)))
	(setq rest (cdr (cdr rest)))))))

;; «fooi-t»  (to ".fooi-t")
;; For templates
;;
(defun fooi-t (&rest pairs) (interactive)
  (apply 'fooi (append pairs '("\\" "\\\\" "\"" "\\\""
			       "\n(" "\n\\(" "\n[" "\n\\["))))

;; «fooi-a» (to ".fooi-a")
;; For audios
;;
(defun fooi-a (&rest pairs) (interactive)
  (apply 'fooi-re (append pairs '("\")" "" "\" \"" " "
				  ";; (find-[-A-Za-z0-9]+ +\"" ""))))


;; «fooi-fb» (to ".fooi-fb")
;; For things copied from FB and other sites with cut & paste
;;
(defun fooi-fb () (interactive)
  (fooi "" "'" "" "\"" "" "\"" "" " - " "" " - "))




;; «ascstr»  (to ".ascstr")
;;
;; (defun ascstr (i lasti)
;;   (while (<= i lasti)
;;     (princ (format "%c" i) (current-buffer))
;;     (setq i (+ i 1))))
(defun ascstr (i lasti)
  (while (<= i lasti)
    (if (char-valid-p i) (insert i))
    (setq i (+ i 1))))
;;
;; (ascstr 0 255)
;; (ascstr 32 126)
;;
(defun ascstr32 (i lasti)
  (while (<= i lasti)
    (insert (format "%x %d: " i i))
    (let ((j i)
	  (lastj (+ i 32)))
      (while (< j lastj)
	(condition-case nil
	    (insert-char j 1)
	  (error nil))
	(setq j (+ j 1))))
    (setq i (+ i 32))
    (insert "\n")))
;;
;; (ascstr32 0 2047)

;; «ee-insert»  (to ".ee-insert")
;; (find-eoutput '(ee-insert '(0 8000)))
;; (find-eoutput '(ee-insert '(8000 12000)))
;; (find-eevfile "eev.el" "find-einsert")
;; (find-eev "eev.el" "find-einsert")

;; «to-codes»  (to ".to-codes")
;; Braille:
;; <delYsid> t = 2345 o = 135 u = 136 c = 14 h = 125 m = 134 e = 15
;; (find-echarsetchars 'mule-unicode-2500-33ff "282x")
;; (find-eoutput '(insert 300094 300085 300101 300073 300083 32 300077 300081))
;;
;; Classical Greek:
;; (find-echarsetchars 'mule-unicode-0100-24ff "702x")
;;
;; Triangle:
;; (find-eoutput '(insert 342435))
;; (find-echarsetchars 'mule-unicode-0100-24ff "732x")
;;
;; Interrobang:
;; (find-echarsetchars 'mule-unicode-0100-24ff "733x")
;; (find-eoutput '(insert 342461))
;;
;; [[, ]], \big[, \big], <<, >>:
;; (find-eoutput '(insert 300006 300007 300008 300009 300010 300011))
;;
;; http://anggtwu.net/eev-current/eev.el.html#find-echarsetchars
;; http://anggtwu.net/eev-current/eev.el.html#find-eoutput
;;
(defun to-codes (s e)
  "Convert the chars in the region to an equivalent (insert ...) sexp.
Here's an example; the \"insert\" sexp below was generated with `to-codes'.
\(find-echarsetchars 'mule-unicode-2500-33ff \"282x\")
\(find-eoutput '(insert 300094 300085 300101 300073 300083 32 300077 300081))"
  (interactive "r")
  (let ((str (buffer-substring s e)))
    (delete-region s e)
    (save-excursion
      (goto-char s)
      (insert (format "%S" (cons 'insert (mapcar 'identity str)))))))

;; «to-ranges»  (to ".to-ranges")
;; (ranges '(0 1 2 3 4 77 40 41 42))
;;   -> ((0 4) (77 77) (40 42))
;;
(defun ranges (list)
  (let ((rest list) first now last answer)
    (while rest
      (setq first (car rest))
      (setq last (car rest))
      (setq rest (cdr rest))
      (while (and rest (= (car rest) (1+ last)))
	(setq last (1+ last))
	(setq rest (cdr rest)))
      (setq answer `((,first ,last) . ,answer)))
    (nreverse answer)))

(defun to-ranges (s e)
  (interactive "r")
  (let* ((str (buffer-substring s e))
	 ;; (list (mapcar 'identity str))
	 (list (ranges (mapcar 'identity str))))
    (delete-region s e)
    (save-excursion
      (goto-char s)
      (insert (format "%S" list)))))



;; «.emacs.local»  (to "..emacs.local")
; (find-elnode "Testing Accessibility" "file-exists-p")
(if (file-exists-p "~/.emacs.local")
    (load-library  "~/.emacs.local"))



;;;;;
;;
;; «obsolete»  (to ".obsolete")
;;
;;;;;

(defun set-window-height (n)
  (enlarge-window (- n (- (window-height) 1))))
;;
(defun set-windows0 (nlines cursorline expr &rest rest)
  (eval expr)
  (if rest (split-window))
  (if rest (if (numberp nlines) (set-window-height nlines)))
  (recenter (or cursorline 0))
  (if rest (other-window 1))
  (if rest (apply 'set-windows0 rest)))
;;
(defun set-windows (&rest rest)
  (delete-other-windows)
  (apply 'set-windows0 rest))



;; «php-old» (to ".php-old")
;; (find-es "php" "php-doc")
;; (find-es "php" "php-raphael-0")
(code-c-d "phpdoc" "/usr/share/doc/php-doc/html/")
(code-c-d "phplang" "/usr/share/doc/php-doc/html/language.")
(code-c-d "phpfunc" "/usr/share/doc/php-doc/html/function.")
;; (find-phpdocfile "")
;; (find-phpdocw3m "index.html")
;; (find-phpdocw3m "langref.html")
;; (find-phplangw3m "types.array.html")
;; (find-phplangw3m "basic-syntax.html")
;; (find-phplangw3m "basic-syntax.comments.html")



;; Obsolete stuff:
' (

;; (find-php3hw3 "language.basic-syntax.html")
;; (find-php3fun "echo")
(defun find-php3fun (funname &rest rest)
  (if (eq ee-arg 3) (find-anchor "~/tmp/ophpfunctions" funname)
    (apply 'find-php3hw3 (format "function.%s.html" funname) rest)))
(defun find-phpdocpage (page &rest rest)
  (interactive (list "index"))
  (eev (format "lynx /usr/share/doc/phpdoc/html/%s.html" page)))
(defun find-phplangpage (page &rest rest)
  (eev (format "lynx /usr/share/doc/phpdoc/html/language.%s.html" page)))
(defun find-phpfuncpage (page &rest rest)
  (eev (format "lynx /usr/share/doc/phpdoc/html/function.%s.html" page)))
;; (find-phpdocpage "index")
;; (find-phplangpage "variables.external")
;; (find-phpfuncpage "import-request-variables")

(defun eep (s e) (interactive "r")
  (write-ee s e "<?\n" "\n?>\n" "/var/www/tmp.php3")
  (write-ee-string "wget -q -O - http://127.0.0.1/tmp.php3$1 $*[2,-1]"))
(defun eep-bounded () (interactive)
  (ee-fstrbounded 'eep-bounded
		  'eep "\n#\n" "\n#\n"))

)


;; «php»  (to ".php")
;; (code-c-d "fbphp" "~/usrc/facebook-php-sdk-v4-4.0-dev/__")

;; (find-fline "~/usrc/facebook-php-sdk-v4-4.0-dev/")
;; (find-fline "~/usrc/facebook-php-sdk-v4-4.0-dev/src/Facebook/")
(code-c-d "phpfb"    "~/usrc/facebook-php-sdk-v4-4.0-dev/")
(code-c-d "phpfbsrc" "~/usrc/facebook-php-sdk-v4-4.0-dev/src/Facebook/")
;; (find-phpfbfile "")
;; (find-phpfbfile "docs/")
;; (find-phpfbsrcfile "")
;; (find-phpfbsrcsh "find * -type f | sort")

;; (find-es "facebook" "fbcmd2")
(code-c-d "fbcmd" "/usr/local/lib/fbcmd/")
;; (find-fbcmdfile "")








(defun fill-text-field (cols n)
  (let ((fill-column cols))
    (fill-region-as-paragraph
      (search-forward "texto {\n")
      (- (search-forward "}") 1)))
  (if n (if (> n 1) (fill-text-field cols (- n 1)))))

(defun text72 (n) (interactive "P") (fill-text-field 72 n))
(defun textlong (n) (interactive "P") (fill-text-field 5000 n))

;; (find-elnode "Searching and Matching")
;; (find-elnode "Regexp Search" "Function: string-match")
;; (find-elnode "Simple Match Data" "Function: match-string")

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

(defun unquote-printable-1 () (interactive)
  (if (re-search-forward "=\\([0-9A-Fa-f][0-9A-Fa-f]\\)")
      (replace-match
       (format "%c" (read (concat "?\\x" (match-string 1))))
       'fixedcase)))

;; «guest_users»  (to ".guest_users")
;; (find-angg ".zshrc" "inix-lea")
;; (find-efile "enriched.el")
;; (find-eetcfile "enriched.doc")

(when (equal (getenv "GUEST_USER") "lea")
  (if (fboundp 'menu-bar-mode) (menu-bar-mode t))
  (if (fboundp 'tool-bar-mode) (tool-bar-mode t))
  (find-fline "~/LEA/help")
  (find-fline "~/LEA/notas-enriched")
  (find-fline "~/LEA/notas")
  (find-fline "~/LEA/notas2")
  (setq inhibit-startup-message t)
  )

' (defun linetoeshell () (interactive)
    (if (not (eq major-mode 'eshell-mode))
	(progn (beginning-of-line)
	       (setq linetoeshell
		     (buffer-substring (point)
				       (save-excursion (end-of-line) (point))))
	       (next-line 1)
	       (eshell)
	       (insert linetoeshell))
      (if linetoeshell
	  (progn (eshell-send-input)
		 (setq linetoeshell nil))
	(switch-to-buffer nil))))

;; (global-set-key [S-f3] 'linetoeshell)






;; (find-fline "eev-extras.el" "defun cs")
;; (find-angg "eev-extras.el" "glyphs_du_jour")
;; Latinmath:
;(let ((disptables-to-set (list disptable-latinmath)))
;  (setglyphs
;   ?\^O "31"      ?*	; small red square
;   ))
;(if (not window-system) (setq standard-display-table disptable-latinmath))


;; (find-elnode "Change Hooks" "after-change-function")
;; (eev "e20glimpse after-change-function | l -S")

;; Try to bypass a xemacs bug:
;; (find-angg "eev.el" "to_and_back")
;; (set-default 'ee-back-list nil)




;; «isearch-faces»  (to ".isearch-faces")
;; (find-es "emacs" "customization-buffers")
;; (find-efunction 'defface)
;; (find-efunction 'custom-declare-face)
;; (customize-group 'isearch-faces)

;; «.emacs.custom»  (to "..emacs.custom")
;; (find-angg ".emacs.custom")
;; (find-es "emacs" "custom-file")
(setq custom-file "~/.emacs.custom")
(load custom-file)

;; «.emacs.unibyte»  (to "..emacs.unibyte")
;; (find-angg ".emacs.unibyte")
;; (find-angg ".emacs.unibyte" "ee-tag-re")
(load "~/.emacs.unibyte")

;; «.emacs.u8»  (to "..emacs.u8")
;; (find-angg ".emacs.u8")
(load "~/.emacs.u8")

;; «.emacs.hydras»  (to "..emacs.hydras")
;; (find-angg ".emacs.hydras")
;; (find-eev "eev-hydras.el" "ee-edit-index-hydra")
;;
(if (require 'hydra nil 'no-error)
    (progn (load "eev-hydras.el")
	   (load "~/.emacs.hydras"))
  ;;
  ;; If we can't load hydra.el:
  (defun ei () (interactive) (error "Can't load hydra.el"))
  (defun r  () (interactive) (error "Can't load hydra.el"))
  (message "Can't load hydra.el - not loading .emacs.hydras"))

;; «.emacs.private»  (to "..emacs.private")
;; (setq ee-passwords ())
;; (setq ee-passwords (ee-aset ee-passwords "beth" "beth"))
;; (defun eesendpassword (account)
;;   (interactive "sPassword for: ")
;;   (eech (concat (ee-aref ee-passwords account) "\n")))
; (find-fline "~/.emacs.private")
(if (file-readable-p "~/.emacs.private")
    (load            "~/.emacs.private"))

;; «.emacs.papers»  (to "..emacs.papers")
;; (find-angg ".emacs.papers")
(load       "~/.emacs.papers")

;; «.emacs.templates»  (to "..emacs.templates")
;; (find-angg ".emacs.templates")
(load       "~/.emacs.templates")

;; «.emacs.audios»  (to "..emacs.audios")
;; (find-angg ".emacs.audios")
(load       "~/.emacs.audios")

;; «.emacs.videos»  (to "..emacs.videos")
;; (find-angg ".emacs.videos")
(load       "~/.emacs.videos")

;; «.emacs-tex.el»  (to "..emacs-tex.el")
;; (find-angg   ".emacs-tex.el")
(load          "~/.emacs-tex.el")

(seen 3431)



;; (find-elnode "Disabling Commands")
(put 'downcase-region 'disabled nil)



;; «lforth»  (to ".lforth")
;; (find-eev "eev-misc.el" "shortcut-find-xxxs")
(code-c-d "lforth" "~/LFORTH/")
(defun find-lforth (file &rest rest)
  "A hyperlink function to anchors in files in ~/LFORTH/."
  (apply 'find-anchor (concat "~/LFORTH/" file) rest))

;; «eepdj»  (to ".eepdj")
;; (find-angg "LATEX/Makefile" ".pdj")
(defun eepdj (s &optional e) (interactive "r")
  (ee-write s e "" "" "~/o")
  (eev "cd
a2ps -=p2isol o
regv o.ps
make -f ~/LATEX/Makefile /tmp/o.pdj
laf ~/o ~/o.ps /tmp/o.pdj"))






(defun find-ewikipage (&optional pagename)
  (let* ((path (if pagename (concat "cgi-bin/wiki\\?" pagename) ""))
	(base "http://www.emacswiki.org/")
	(command (concat "lynx " base path)))
    (eev command)
    command))

;; (find-ewikipage "CategoryEshell")
;; (find-ewikipage nil)


(make-variable-buffer-local 'ee-imenu-index-alist)

(defun ee-imenu-create-index ()
  (goto-char (point-min))
  (let ((search-re (or ee-imenu-re
		       (format ee-anchor-format "\\(.+\\)")))
        a p alist)
    (while (re-search-forward search-re nil t)
      (setq a (match-string 1)
            p (match-beginning 0))
      (unless (string= a "%s")
        (push (cons a p) alist)))
    (setq ee-imenu-index-alist (nreverse alist))))

(defun ee-imenu ()
  (interactive)
  (let ((imenu-create-index-function 'ee-imenu-create-index)
        (imenu-index-alist ee-imenu-index-alist))
    (call-interactively 'imenu)))

(define-key ctl-x-map "E" 'ee-imenu)

;; (find-efunction 'imenu)




;; (find-elnode "Process Information")
;;
(defun find-eprocesses (&rest rest)
  (interactive)
  (list-processes)
  (apply 'ee-goto-position rest))


;; (find-dmissing "wiki")

(defun ee-read-stuff-around-point (prompt chars)
  (read-string prompt (ee-stuff-around-point chars)))

(defun find-dmissing (str &rest rest)
  (interactive (list (ee-read-stuff-around-point "dmissing " "-+0-9A-Za-z_./")))
  (apply 'find-zsh (format "dmissing %s" str) rest))

;; (defun find-w (str &rest rest)
;;   (interactive (list (ee-read-stuff-around-point "w " "-+0-9A-Za-z_")))
;;   (apply 'find-zsh (format "w %s" str) rest))

(defun find-locate (str &rest rest)
  (interactive "slocate ")
  (apply 'find-sh (format "locate %s" str) rest))




;;;;;
;;
;; «emacs-wiki»  (to ".emacs-wiki")
;;
;;;;;

;; (add-to-list 'load-path "~/usrc/sacha-dev/emacs-wiki/")
;; (add-to-list 'load-path "~/usrc/sacha-dev/planner/")
;; (add-to-list 'load-path "~/usrc/sacha-dev/remember/")

(code-c-d "emacswiki" "~/usrc/sacha-dev/emacs-wiki/" "emacs-wiki")
(code-c-d "planner"   "~/usrc/sacha-dev/planner/"    "planner-el")
(code-c-d "remember"  "~/usrc/sacha-dev/remember/"   "remember-el")


;; (find-emacswikifile "")
;; (find-emacswikinode "Top")
;; (find-plannerfile "")
;; (find-plannernode "Top")
;; (find-rememberfile "")
;; (find-remembernode "Top")

;; (code-c-d "muse" "~/usrc/sachac/muse/")
;; (find-musefile "")

;; (defun find-planner (pagename &rest rest)
;;   (planner-goto pagename)
;;   (apply 'ee-goto-position rest))

;; (defun planner-main () (interactive) (find-planner "MainTasksPage"))
;; (defun planner-main () (interactive) (find-planner "MainPage"))

;; (defun to-muse () (interactive) (find-fline "~/eev-0.94/Notes/Muse"))

;; «emacs-wiki-edrx»  (to ".emacs-wiki-edrx")
;; (find-es "ewiki" "emacs-wiki-edrx")
;; (find-angg "elisp/emacs-wiki-edrx.el")

;; (add-to-list 'load-path "~/elisp/")

;; (eval-after-load "emacs-wiki"
;;   '(load-library "emacs-wiki-edrx"))

;; (code-c-d "eevnotes" "~/eev-0.94/Notes/")
;;
;; (defun find-eevnotes (pagename &rest rest)
;;   (find-fline (ee-eevnotesfile pagename))
;;   ;; (emacs-wiki-maybe)
;;   ;; (muse-mode-maybe)
;;   (apply 'ee-goto-position rest))

;; (find-eevnotes "MainPage")




;;;;;
;;
;; find-stringbuffer, find-evalread, and another find-etpat
;; 2004apr02
;;
;;;;;

;; (find-elnode "Temporary Displays")
;; (find-elnode "Temporary Displays" "cial Form: with-output-to-temp-buffer")

(defun find-stringbuffer-new (buffername string &rest rest)
  (ee-same-window buffername
		  (with-output-to-temp-buffer buffername
		    (princ string)))
  (apply 'ee-goto-position rest))

(defun find-eevalread (sexpstr &rest rest)
  (interactive "sEval: ")
  (apply 'find-stringbuffer-new
	 (format "*%s*" sexpstr)
	 (format "%s\n   ==>\n\%s\n"
		 sexpstr (pp-to-string (eval (read sexpstr))))
	 rest))



;; «find-string-ow»  (to ".find-string-ow")
;; «find-progoutput-ow»  (to ".find-progoutput-ow")
;; 2004aug04
;;
(defun find-string-ow (string buffername &rest pos-spec-list)
  (if (null buffername) (error))
  (save-selected-window
    (let ((pop-up-windows t))
      (pop-to-buffer buffername)
      (if buffer-file-name
	  (error "Buffer %s is not a scratch buffer" buffer-file-name))
      (delete-region (point-min) (point-max))
      (insert string)
      (goto-char (point-min))
      (apply 'ee-goto-position pos-spec-list))))

(defun find-progoutput-ow (command &optional title &rest pos-spec-list)
  (apply 'find-string-ow
	 (shell-command-to-string command)
	 (or title (format "*%s*" command))
	 pos-spec-list))


;; (find-elnode "Output Variables")
;; (ee-pp-to-string-compact '(a [foo] "\n\r"))
;; (ee-pp-to-string-compact '(a [foo] "\n\r") 'tick)
;; (ee-pp-to-string-compact '(defun f (x) `(1 2 ,x 'a)) 'tick)

;; (defalias 'ee-pp1 'pp-to-string)

;; (defalias 'ee-format-%S 'ee-pp0)
;; (defalias 'ee-pp-to-string-compact 'ee-pp0)

;; (defun find-ekeypp (key &rest rest)
;;   (interactive "kDescribe key: ")
;;   (let* ((codestr (format "(symbol-function (key-binding %s))"
;;                           (ee-pp-to-string-compact key 'tick))))
;;     (apply 'find-eevalread codestr rest)))





;; «ee-set-region-face»  (to ".ee-set-region-face")
;; (find-es "emacs" "propertize")
;;
(defun ee-set-region-face (start end face)
  (put-text-property start end 'face face))

(defun ee-set-region-fg (start end fg)
  (put-text-property start end 'face `(:foreground ,fg)))




;;;;;
;;
;; «htmlize»  (to ".htmlize")
;; 2004jul17
;;
;;;;;

;; Moved to: (find-eev "htmlize-eev.el")

;; See also:
;; http://rtfm.etla.org/emacs/htmlfontify/src/htmlfontify.el.html

;; http://fly.srk.fer.hr/~hniksic/emacs/htmlize.el
;; cp -iv $S/http/fly.srk.fer.hr/~hniksic/emacs/htmlize.el ~/elisp/

;; (find-efile "fast-lock.el")
;; (find-efile "font-lock.el")
;; (find-efile "jit-lock.el")
;; (find-efile "lazy-lock.el")
;; (customize-option 'font-lont-support-mode)

;; (find-eev "META" "htmlize")
;; (load-library "~/elisp/htmlize.el")
;; (find-fline "~/elisp/htmlize.el")
;; (find-elnode "Changing Properties")
;; (find-elnode "Narrowing" "save-restriction")

;; (glyphs-faceglyph-to-facechar (aref "*" 0))
;; (glyphs-replace-by-facechars (- (point) 30) (point) "*«»")
;; (eev "rm -v /tmp/stuff.*; cp -v ~/.emacs /tmp/stuff.el")
;; (glyphs-htmlize-file "/tmp/stuff.el")

;; (find-fline "~/elisp/htmlize.el" "defun htmlize-make-hyperlinks")

(defvar glyphs-to-replace-by-facechars "\r*«»")

(defun glyphs-faceglyph-to-facechar (pos)
  (let* ((n (aref (aref standard-display-table pos) 0))
	 (faceid (ash n -19))
	 (face (ee-faceid-to-face faceid (face-list)))
	 (char (logand n 524287))
	 (charstr (format "%c" char)))
    (add-text-properties 0 1 (list 'face face) charstr)
    charstr))

(defun glyphs-replace-by-facechars (start end glyphsstr)
  (save-restriction
    (narrow-to-region start end)
    (let ((i 0) char code replacement)
      (while (< i (length glyphsstr))
	(setq char (substring glyphsstr i (1+ i)))
	(setq code (aref glyphsstr i))
	(setq replacement (glyphs-faceglyph-to-facechar code))
	(save-excursion
	  (goto-char (point-min))
	  (while (search-forward char nil t)
	    (replace-match replacement nil t)))
	(setq i (1+ i))))))

(defun glyphs-htmlize-this-buffer-1 (name-orig)
  (let* ((contents (buffer-substring (point-min) (point-max)))
	 (name-htmlized (concat name-orig " (htmlized)"))
	 (name-html (concat name-orig ".html")))
    (pop-to-buffer name-htmlized)
    (delete-region (point-min) (point-max))
    (insert contents)
    (glyphs-replace-by-facechars (point-min) (point-max)
				 glyphs-to-replace-by-facechars)
    (switch-to-buffer (htmlize-buffer))
    (rename-buffer name-html)))

(defun glyphs-htmlize-file (fname)
  (find-file fname)
  (font-lock-mode 1)
  (jit-lock-fontify-now (point-min) (point-max))
  (glyphs-htmlize-this-buffer-1 (file-name-nondirectory fname))
  (write-file (concat fname ".html")))



;; «fundcomp-menu»  (to ".fundcomp-menu")
'
(easy-menu-define
 fundcomp-menu global-map
 "FundComp menu."
 '("FundComp"
   ["c:/FundComp/lab/"              (find-fline "$LAB/") t]
   "--"
   ["scheme.txt"                    (find-fline "$LAB/scheme.txt") t]
   ["leitao.txt"                    (find-fline "$LAB/leitao.txt") t]
   ["eng-por.dict"                  (find-fline "$LAB/eng-por.dict") t]
   ["keys.e"                        (find-eevfile "keys.e") t]
   "--"
   ["(info \"(emacs)Top\")"         (info "(emacs)Top") t]
   ["(info \"(elisp)Top\")"         (info "(elisp)Top") t]
   ["(info \"(eintr)Top\")"         (info "(eintr)Top") t]
   ))

;; «menu-bar»  (to ".menu-bar")
;; «tool-bar»  (to ".tool-bar")
;; (find-enode "Menu Bars")
;; (find-enode "Tool Bars")
;; (find-enode "Scroll Bars")
(if (fboundp 'menu-bar-mode)   (menu-bar-mode 0))
(if (fboundp 'tool-bar-mode)   (tool-bar-mode 0))
(if (fboundp 'scroll-bar-mode) (scroll-bar-mode -1))

;; (find-efunction 'toggle-horizontal-scroll-bar)
(if (fboundp 'horizontal-scroll-bar-mode)
    (horizontal-scroll-bar-mode 0))

;; 2011nov28: Commented out:
;;   (if (fboundp 'auto-image-file-mode) (auto-image-file-mode 1))
;; On recent Emacsen auto-image-file-mode is on by default, but
;; running (auto-image-file-mode 1) explicitly is bad, as it triggers
;; a bug - on big images <left> and <right> will scroll horizontally
;; too much. Curiously, this doesn't happen for images in zip files or
;; tarballs.



;; «show-as-image»  (to ".show-as-image")
;; (find-es "emacs" "keymap-property")
;; (find-es "emacs" "display-property")
;; (find-node "(elisp)Image Descriptors")
;; (show-as-png "~/IMAGES/kaoya.png")
;;
(setq show-as-image-keymap
      '(keymap (?q . show-as-image-unshow))) ; `q' makes the image text again

(defun show-as-image-unshow (&optional s e)
  (interactive)
  (setq s (or s (previous-single-property-change (1+ (point)) 'display)
	      (point-min)))
  (setq e (or e (next-single-property-change (point) 'display) (point-max)))
  (remove-text-properties s e '(display keymap)))

(defun show-as-image (type fname &optional s e)
  (if (not s) (save-excursion
		(setq s (eek-backward-sexp))
		(setq e (eek-forward-sexp))))
  (let* ((image-data (with-temp-buffer
		       (set-buffer-multibyte nil)
		       (insert-file-contents-literally fname)
		       (buffer-string))))
    (add-text-properties s e
      `(display (image :type ,type :data ,image-data)
	keymap ,show-as-image-keymap))))

(defun show-as-png (fname &optional s e)
  (show-as-image 'png fname s e))



;; «ptexts»  (to ".ptexts")
;; (find-elnode "Output Variables" "print-escape-newlines")
;; (find-elnode "Formatting Strings" "with quoting")

(defun ptexts-build-alist (f pos posmax)
  (let ((nextpos (next-property-change pos)))
    (if nextpos
        (cons (funcall f pos nextpos)
	      (ptexts-build-alist f nextpos posmax))
      (funcall f pos posmax))))

(defun ptexts (&optional pos posmax)
  (ptexts-build-alist
   (lambda (start end)
     (cons (buffer-substring-no-properties start end)
	   (text-properties-at start)))
   (or pos (point-min))
   (or posmax (point-max))))

(defun ptexts-as-string (&optional pos posmax)
  (mapconcat (lambda (ptext) (format "%S\n" ptext))
	     (ptexts pos posmax)
	     ""))

;; (setq ptexts (ptexts (point) (mark)))
;; (find-evardescr 'ptexts)





(setq outline-minor-mode-prefix "\C-c")
;; (find-eevfile "eev-dev.el")


;; «underline-as-green»  (to ".underline-as-green")
;; (find-angg ".zshrc" "underline_as_green")
;; (find-man "4 console_codes" "Set color n as the underline color")
;; (set-face-foreground 'underline "green")
;; (set-face-foreground 'underline nil)
;; (find-efacedescr 'underline)
;;
(if (equal (getenv "TERM") "linux")
    (set-face-foreground 'underline "green"))

(defun eeapti (packages)
  (interactive (list (ee-debpkgname-ask)))
  (eev (format "apti %s" packages)))


;; «r0r2»  (to ".r0r2")
;; (defun tp-find-file-r2-then-r0 (r2-fname r0-fname)
;;   (find-fline r2-fname)

(setq lua50ref-r0-file "~/LUA/lua50ref.r0")
(setq lua50ref-r2-file "~/LUA/lua50ref.r2")

;; Obsolete:
' (defun find-lua50ref (&rest rest)
    (interactive)
    (if (not (file-exists-p lua50ref-r0-file))
	(progn (find-fline lua50ref-r2-file)
	       (tp-r2-write-r0-file)))
    (apply 'find-anchor lua50ref-r0-file rest))

;; «find-ebuffer+»  (to ".find-ebuffer+")

(defun read-file-as-sexp (fname)
  (with-temp-buffer
    (insert-file-contents fname)
    (read (buffer-substring (point-min) (point-max)))))

(defun my-insert-str-props (str-props)
  (if (cdr str-props) (insert (apply 'propertize str-props))
    (insert (car str-props))))

(defun find-ebuffer+ (bufname &rest pos-spec-list)
  "Like `find-ebuffer', but for buffers that are constructed in special ways.
See `find-ebuffer+-alist'."
  (if (get-buffer bufname)
      (apply 'find-ebuffer bufname pos-spec-list)
    (find-ebuffer bufname)
    (let ((a (assoc bufname find-ebuffer+-alist)))
      (if (not a) (error "Not in `find-ebuffer+-alist': %S" bufname))
      (let ((buffer-undo-list t))
	(eval (cons 'progn (cdr a))))
      (set-buffer-modified-p nil)
      (apply 'ee-goto-position pos-spec-list))))

(defvar find-ebuffer+-alist nil)

(setq find-ebuffer+-alist
      '(("Lua50ref"
	 (mapc 'my-insert-str-props
	       (let ((coding-system-for-read 'utf-8-unix))
		 (read-file-as-sexp "~/LUA/lua50ref.r2")))
	 (normal-mode))
	("UserModeLinux-HOWTO"
	 (insert-file-contents
	  (ee-udfile "user-mode-linux-doc/html/UserModeLinux-HOWTO.txt.gz"))
	 (Man-fontify-manpage))
	("MuttManual"
	 (insert-file-contents
	  (ee-udfile "mutt/manual.txt.gz"))
	 (Man-fontify-manpage))
	))

(defun find-Lua50ref (&rest pos-spec-list)
  (interactive)
  (apply 'find-ebuffer+ "Lua50ref" pos-spec-list))

;; (find-epp (assoc "Lua50ref" find-ebuffer+-alist))
;; (find-Lua50ref)
;; (find-ebuffer+ "UserModeLinux-HOWTO")




;; (pc-selection-mode)

;; «hippie-expand»  (to ".hippie-expand")
;; (find-es "emacs" "hippie-expand")
;; (find-node "(autotype)Hippie Expand")
;; (find-efile "hippie-exp.el")
;;
(global-set-key [f11] 'hippie-expand)
(setq hippie-expand-try-functions-list
  '(try-complete-file-name-partially
    try-complete-file-name
    try-complete-lisp-symbol-partially
    try-complete-lisp-symbol
    try-expand-all-abbrevs
    try-expand-list
    try-expand-line
    try-expand-dabbrev
    try-expand-dabbrev-all-buffers
    try-expand-dabbrev-from-kill
    ))



;; (find-sh0 "echo foo >&2 > /dev/null")


;; Obsolete thanks to tramp and $ASROOT
' (defun sudoemacs (fname)
    (interactive (list (read-file-name "sudo emacs ")))
    (eev (format "sudo emacs %s &" fname)))

' (defun sudoemacs-nw (fname)
    (interactive (list (read-file-name "sudo emacs -nw ")))
    (eev (format "sudo emacs -nw %s" fname)))

' (defun whoami ()
    (interactive)
    (message (shell-command-to-string
              "echo \"$(whoami) (HOME=$HOME)\"")))




;; «dfs»  (to ".dfs")
;; (find-sh "cd /var/lib/dpkg/info/; 'ls' -X | awk -F . '{print $NF}' | uniq")
;; (ee-dfss "#" "less")
;;
;; (setq ee-dfs-extensions
;;       (mapcar 'symbol-name
;; 	      '(preinst postinst prerm postrm
;; 		conffiles config templates
;; 		md5sums shlibs)))
;;
;; (defun ee-dfs (N)
;;   (interactive "p")
;;   (dotimes (i N)
;;     (let* ((bol (save-excursion (beginning-of-line) (point)))
;; 	   (eol (save-excursion (end-of-line) (point)))
;; 	   (pkgname (buffer-substring bol eol))
;; 	   (prefix (ee-comment-prefix))
;; 	   (links (ee-dfss prefix pkgname ee-dfs-extensions)))
;;       (if (not links)
;; 	  (error "Not an installed package: %s" pkgname))
;;       (delete-and-extract-region bol (1+ eol))
;;       (insert links))))
;;
;; (defalias 'dfs 'ee-dfs)



;; «eesteps»  (to ".eesteps")
;;
;; (defun eesteps-set (list)
;;   (setq eesteps-pos 0)
;;   (setq eesteps-list list))
;;
;; (defun eesteps-do-step ()
;;   (interactive)
;;   (if (>= eesteps-pos (length eesteps-list))
;;       (error "No more steps"))
;;   (eval (nth eesteps-pos eesteps-list))
;;   (setq eesteps-pos (1+ eesteps-pos)))
;;
;; (global-set-key [f12] 'eesteps-do-step)

;; A test:
;; (eesteps-set '((insert "foobar") (backward-char 3) (insert "!")))

;; «my-ins»  (to ".my-ins")
;; (find-elnode "Markers")
;; (find-elnode "Marker Insertion Types")
;;

(defun ins-here ()
  (setq ins-marker (make-marker))
  (set-marker-insertion-type ins-marker t)
  (set-marker ins-marker (point)))

(defun ins (&rest stuff)
  (with-current-buffer
      (or (marker-buffer ins-marker)
	  (error "ins-marker points nowhere"))
    (save-excursion
      (goto-char ins-marker)
      (apply 'insert stuff))))

(defun ins-expr (expr) (ins (format "%S\n" expr)) expr)


(defun my-set-marker ()
  (setq my-marker (make-marker))
  (set-marker-insertion-type my-marker t)
  (set-marker my-marker (point)))

(defun my-ins (&rest stuff)
  (save-excursion
    (set-buffer (or (marker-buffer my-marker)
		    (error "my-marker points nowhere")))
    (goto-char my-marker)
    (apply 'insert stuff)))

;; a demo:
' (eesteps-set '(
    (next-line 2) (ins-here) (next-line 2)
    (ins "a") (ins "b") (ins "c")
    ))


;; «chowns»  (to ".chowns")
;; A test: (eesteps-set '((find-fline "/etc/fstab") (chowns)))

(defun chowns-string (fname)
  (shell-command-to-string (concat "FNAME=" fname "
function sudolink () { echo \"# (find-sh0 \\\"sudo chown $1 $2\\\")\"; }
sudolink $(stat -c %U:%G $FNAME) $FNAME
sudolink $(id -gn):$(id -un)     $FNAME")))

(defun chowns (&optional fname) (interactive)
  "Insert in the kill ring two hyperlinks to toggle the ownership of this file"
  (let ((result (chowns-string (or fname (buffer-file-name))))
	(message-truncate-lines nil))
    (kill-new result)
    (message "%s" (substring result 0 -1))))

;; (find-find-links-links "{k}" "chown" "fname")
;; (find-chown-links "/etc/hosts")
;;
(defun find-chown-links (&optional fname &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for foo."
  (interactive (list (or (buffer-file-name) default-directory)))
  (setq fname (or fname "{fname}"))
  (apply 'find-elinks
   `((find-chown-links ,fname ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-chown-links)
     ""
     (find-fline ,(file-name-directory fname)
		 ,(format " %s" (file-name-nondirectory fname)))
     (find-sh0 ,(format "sudo chown -v edrx. %s" fname))
     (find-sh0 ,(format "sudo chmod 666      %s" fname))
     (find-sh0 ,(format "sudo chmod 777      %s" fname))
     )
   pos-spec-list))


(code-brfile 'find-chown-links  :dired 'chown)




;; «find-eimage»  (to ".find-eimage")
;; obsolete: see (find-efunction 'auto-image-file-mode)
;; ' (defun find-eimage (fname)
;;     (let ((buffername (format "*image %s*" fname))
;;           (substitutedfname (ee-expand fname)))
;;       (switch-to-buffer buffername)
;;       (delete-region (point-min) (point-max))
;;       (cd (file-name-directory substitutedfname))
;;       (insert-image (create-image substitutedfname))))




;; «to-netbotanic-test»  (find-angg ".zshrc" "to-netbotanic-test")
(defun to-netbotanic-test () (interactive)
  (find-angg ".zshrc" "to-netbotanic-test"))

;; «to-install-beth»  (find-eev "examples/eev-tests.e" "to-install-beth")
(defun to-install-beth () (interactive)
  (find-eev "examples/eev-tests.e" "to-install-beth"))

;; «to-eev-current»  (find-angg ".zshrc" "to-eev-current")
(defun to-eev-current () (interactive)
  (find-angg ".zshrc" "to-eev-current"))

;; (find-dpkg-l)
(defun find-dpkg-l (&rest rest)
  (interactive)
  (apply 'find-sh "dpkg -l" rest))

;; «find-zsh»  (to ".find-zsh")
;; (find-zsh "alias")
;; (find-zsh "set")

(defun find-zsh00 (command)
  (find-callprocess00
   `("zsh" "-c" ,(format "export TERM=emacs\n. ~/.zshrc\n%s" command))))

;; 2007dec13: bad news: the clean solution above does not work for
;; aliases, I need some hack... like the two below.
;; (find-zsh "installeddebs")

(defun find-zsh00 (command)
  (eev command nil "$EEVTMPDIR/ee.zsh")
  (find-callprocess00
   `("zsh" "-c" ,(format "export TERM=emacs\n. ~/.zshrc\n%s"
			 ". $EEVTMPDIR/ee.zsh"))))

(defun find-zsh00 (command)
  (eev command nil "$EEVTMPDIR/ee.zsh")
  (find-callprocess00
   `("zsh" "-c" ,(format "export TERM=emacs\n. ~/.zshrc\n%s"
			 "eval \"$(cat $EEVTMPDIR/ee.zsh)\""))))

(defun find-zsh0 (command)
  (ee-no-trailing-nl (find-zsh00 command)))

(defun find-zsh (command &rest rest)
  (apply 'find-eoutput-reuse
         (or ee-buffer-name (format "zsh: %s" command))
         `(insert (find-zsh00 ,command))
         rest))

;; (defun find-zsh (command &rest rest)
;;   (interactive "MCommand: ")
;;   (ee-write command nil ". ~/.zshrc\n" "" "$EEVTMPDIR/ee.zsh")
;;   (apply 'find-sh "TERM=emacs zsh $EEVTMPDIR/ee.zsh" rest))
;;
;; (defun find-zsh0 (command)
;;   (interactive "MCommand: ")
;;   (ee-write command nil ". ~/.zshrc\n" "" "$EEVTMPDIR/ee.zsh")
;;   (find-sh0 "TERM=emacs zsh $EEVTMPDIR/ee.zsh"))

;; «upload»  (to ".upload")
;; (find-angg ".zshrc" "upload")
(defun upload (fname)
  (interactive "fFile name: ")
  (setq fname (ee-expand (or fname (buffer-file-name))))
  (eev (format "upload %s" fname)))




;; «eev-current-make-htmls»  (to ".eev-current-make-htmls")
;; (find-angg ".zshrc" "eev-current")
;; (eev "eev-current-upload")
;; (eev-current-make-htmls)
;;
;; (find-eevexfile "eev-make.e" "make-htmls")
;; (find-eevexfile "tools.el")


(defun ee-info-page-url (book+ node)
  (let ((book- (file-name-nondirectory book+)))
    (cond ((equal book- "emacs")
	   (format "http://www.fsf.org/software/emacs/manual/html_node/%s.html"
		   (replace-regexp-in-string "[ /]" "-" node)))
	  ((or (equal book- "emacs-lisp-intro")
	       (equal book- "elintro")
	   (format "http://www.fsf.org/software/emacs/emacs-lisp-intro/html_node/%s.html"
		   (replace-regexp-in-string "[ /]" "-" node))))
	  )))

(defun ee-sexp-to-url (sexp)
  (let ((first (car sexp))
	(second (cadr sexp)))
    (cond ((member first '(info find-node))
	   (if (string-match "^(\\([^()]*\\))\\(.*\\)" second)
	       (ee-info-page-url (match-string 1 second)
				 (match-string 2 second))))
	  ((eq first 'find-enode)   (ee-info-page-url "emacs" second))
	  ((eq first 'find-elnode)  (ee-info-page-url "elisp" second))
	  ((eq first 'find-elinode) (ee-info-page-url "elintro" second))
	  )))

;; (ee-info-page-url "emacs" "Calendar/Diary")
;; (ee-sexp-to-url '(find-enode "Calendar/Diary"))

;;---------------------------------------------------------
;; «eesteps-insert-longkey»  (to ".eesteps-insert-longkey")
;; (find-estring "" "" '(eesteps-insert-longkey+ (kbd "M-h M-k")))
;;
(defun eesteps-insert-longkey (key)
  (interactive "kInsert longkey: ")
  (insert (ee-pp0 (format-kbd-macro key))))

(defun eesteps-insert-longkey+ (key)
  (interactive "kInsert longkey with comment: ")
  (insert (ee-pp0 (replace-regexp-in-string
		   "[ \t][ \t]+" "  "
		   (format-kbd-macro key t)))))

' (define-key eev-mode-map [f7] 'eesteps-insert-longkey)
' (define-key eev-mode-map [f8] 'eesteps-insert-longkey+)



;;---------------------------------------
;; «my-screenshot»  (to ".my-screenshot")
;; «emacs-ascii-screenshots»  (to ".emacs-ascii-screenshots")
;; Moved to:
;;   (find-eev "eev-tlinks.el" "find-escreenshot-links")

;; (find-node "(elisp)Emulating Mode Line")
;; TODO: change the prefix "my-" (to "shot-", maybe?)
;;       use (format-mode-line nil nil t)
;; (my-2uple-to-string  '("foo" "/") 7)
;; (my-2uples-to-rect   '(("foo" "/") ("b" ".")) 5)
;; (my-max-width-2uples '(("foo" "/") ("b" ".")))
;; (my-max-width        '("foo" "b"))

(defun my-untabify-string (string)
  (with-temp-buffer
    (insert string)
    (untabify 0 (point-max))
    (buffer-substring 0 (point-max))))

(defun my-max-width (strings)
  (apply 'max 0 (mapcar 'length strings)))

(defun my-max-width-2uples (2uples)
  (my-max-width (mapcar 'first 2uples)))

(defun my-2uple-to-string (2uple targetwidth)
  (let* ((s    (nth 0 2uple))
	 (fill (nth 1 2uple))
	 (code (aref fill 0))		; ascii code of the first char of fill
	 (slen (length s)))
    (concat s (make-string (- targetwidth slen) code))))

(defun my-2uples-to-rect (2uples width)
  (mapcar (lambda (2uple) (my-2uple-to-string 2uple width)) 2uples))

(defun my-2uples-to-rect+ (2uples extra)
  (let ((width (+ (my-max-width-2uples 2uples) extra)))
    (my-2uples-to-rect 2uples width)))

(defun my-add-walls-to-rect (rect pre post &optional pre0 post0)
  (if pre0 (cons (concat pre0 (car rect) post0)
		 (my-add-walls-to-rect (cdr rect) pre post))
    (mapcar (lambda (str) (concat pre str post)) rect)))

(defun my-window-to-2uples (top strs modeline minibuffer)
  (let ((2uples (append (mapcar (lambda (str) (list str " ")) strs)
			`((,modeline "-")))))
    (if top (setq 2uples (append '(("" "_")) 2uples)))
    (if minibuffer (setq 2uples (append 2uples `((,minibuffer "_")))))
    2uples))

(defun my-window-to-shot-rect (prepre strs modeline minibuffer extra fixed)
  (let* ((pre0 (concat prepre " ")) (post0 " ")
	 (pre  (concat prepre "|")) (post  "|")
	 (2uples (my-window-to-2uples t strs modeline minibuffer))
	 (rect (if extra (my-2uples-to-rect+ 2uples extra)
		 (my-2uples-to-rect 2uples fixed))))
    (my-add-walls-to-rect rect pre post pre0 post0)))

(defun my-concat-lines (rect)
  (apply 'concat (mapcar (lambda (s) (concat s "\n")) rect)))

;; A demo:
' (find-estring
   (my-concat-lines
    (my-window-to-shot-rect
     ";; "
     (split-string "foo\nbar\n" "\n")
     "-:**-F1  TODO  (Emacs-Lisp)--L706--79%--"
     "M-x foo"
     2
     nil)))

(defvar my-screenshot-prefix "  ")

;; «my-screenshot»  (to ".my-screenshot")
(defun my-screenshot (extra)
  (interactive "P")
  (find-estring
   (my-concat-lines
    (my-window-to-shot-rect
     my-screenshot-prefix
     (split-string (buffer-substring (point) (mark)) "\n")
     (format-mode-line mode-line-format 0)
     ""
     (or extra 6)
     nil))))


;; «find-mode-line-links» (to ".find-mode-line-links")
(defun find-mode-line-links (&rest pos-spec-list)
"Visit a temporary buffer containing an skeleton for an ascii screenshot."
  (interactive)
  (apply 'find-elinks
   `((find-mode-line-links  ,@pos-spec-list)
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-mode-line-links)
     (define-key eev-mode-map "\M-U" 'eewrap-screenshot)
     (setq ee-screenshot-width ,ee-screenshot-width) ; current value
     ""
     (find-elnode "Emulating Mode Line")
     (find-epp (format-mode-line mode-line-format))
     (find-epp (format-mode-line mode-line-format 'header-line))
     (ee-no-properties (format-mode-line mode-line-format))
     ""
     "   ________________________________________________________"
     "  |                                                        |"
     "  |                                                        |"
     "  |                                                        |"
     ;; "  |"
     ;; "  |"
     ,(format "  |%s|" (ee-no-properties (format-mode-line mode-line-format)))
     "  |________________________________________________________|"
     )
   pos-spec-list))

;; (key "\M-U")

;; Test: (find-mode-line-links)

(defvar ee-screenshot-width 70)
(defun  ee-screenshot-width () (interactive)
  (find-elinks
   `((ee-screenshot-width)
     ;; Convention: the first sexp always regenerates the buffer.
     (setq ee-screenshot-width ,ee-screenshot-width) ; current value
     ""
     (setq ee-screenshot-width 70)
     )))

(defun ee-to-screenshot-line (&optional str width)
  (setq width (or width ee-screenshot-width))
  (setq str (replace-regexp-in-string "^ *|\\(.*?\\) *| *$" "\\1" str))
  (let* ((len   (length str))
	 (needs (- width (length str)))
	 (spaces (make-string (max 0 needs) 32)))
    (format "  |%s%s|" str spaces)))

(defun eewrap-screenshot () (interactive)
  (ee-this-line-wrapn 1 'ee-to-screenshot-line))

;; (ee-to-screenshot-line " abcd ")
;; (ee-to-screenshot-line " abcd " 4)
;; (ee-to-screenshot-line " | abcd | " 4)
;; (find-elnode "Creating Strings" "Function: make-string")



;; «ee-svg-screenshot»  (to ".ee-svg-screenshot")
;; (find-es "emacs" "screenshot-svg")
;; (find-esetkey-links   (kbd "<f12>") 'ee-svg-screenshot)
' (define-key eev-mode-map (kbd "<f12>") 'ee-svg-screenshot)

(defun ee-svg-screenshot (&optional fname)
  (interactive)
  (ee-write-string
   (x-export-frames nil 'svg)
   (or fname "/tmp/screenshot.svg"))
  (find-svg-screenshot-links))

;; «find-svg-screenshot-links»  (to ".find-svg-screenshot-links")
;; Skel: (find-find-links-links-new "svg-screenshot" "stem" "")
;; Test: (find-svg-screenshot-links "foo")
;;
(defun find-svg-screenshot-links (&optional stem &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for svg-screenshot."
  (interactive)
  (setq stem (or stem "{stem}"))
  (apply
   'find-elinks
   `((find-svg-screenshot-links ,stem ,@pos-spec-list)
     (find-svg-screenshot-links "test")
     ;; Convention: the first sexp always regenerates the buffer.
     (find-efunction 'find-svg-screenshot-links)
     ""
     ,(ee-template0 "\
(find-fline \"/tmp/screenshot.svg\")
(find-fline \"~/INKSCAPE/\")
(find-fline \"~/INKSCAPE/\" \"{stem}.svg\")
(find-sh0 \"cp -v /tmp/screenshot.svg ~/INKSCAPE/{stem}.svg\")
(find-bgprocess            \"inkscape ~/INKSCAPE/{stem}.svg\")
")
     )
   pos-spec-list))

;; «sshot-run»  (to ".sshot-run")
;; (find-angg ".emacs.templates" "find-sshot-links")
;; (find-ekeymapdescr eev-mode-map)
;; (define-key eev-mode-map (kbd "<f11>") nil)
(define-key eev-mode-map (kbd "<f12>") 'sshot-run)
;;
(defun sshot-run ()
  (interactive)
  (find-bgprocess '("sh" "-c" "sleep 5 && scrot -o --select /tmp/sshot.png"))
  (sshot)
  (message "Running: sleep 5 && scrot -o --select /tmp/sshot.png"))



;; «find-svgbuffer»  (to ".find-svgbuffer")
;; (find-es "svg" "demo-1")
;;
(defun find-svgbuffer (bufname svgobject)
  (if (get-buffer bufname)
      (find-ebuffer bufname)
    (find-ebuffer bufname)
    (svg-insert-image svgobject)
    (setq cursor-type nil)))

(defun ee-xml-to-string (xml)
  (with-temp-buffer
    (xml-print xml)
    (buffer-substring (point-min) (point-max))))








;; «my-modes»  (to ".my-modes")
;; (find-fvwmhelp "")
(defun fvwm-sloppy-focus   () (interactive) (find-fvwm0 "Style * SloppyFocus"))
(defun fvwm-click-to-focus () (interactive) (find-fvwm0 "Style * ClickToFocus"))

(setq my-modes-table
      '((:no-scroll-bar (scroll-bar-mode -1))
	(:scroll-bar    (scroll-bar-mode 1))
	(:no-blink      (blink-cursor-mode 0))
	(:blink         (blink-cursor-mode 1))
	(:no-erc-track  (erc-track-disable))
        (:erc-track     (erc-track-enable))
        (:no-pager      (find-fvwm0 "KillModule FvwmPager"))
	(:pager         (find-fvwm0 "Module FvwmPager"))
	(:no-fringe     (fringe-mode '(0)))
	(:fringe        (fringe-mode '(nil)))
	(:width80       (set-frame-width nil 80))
	(:long-flash    (setq ee-highlight-spec  '(highlight 7)
			      eeb-highlight-spec '(highlight 7)
			      eek-highlight-spec '(region    7)))
	(:normal-flash  (setq ee-highlight-spec  '(highlight 0.75)
			      eeb-highlight-spec '(highlight 0.5)
			      eek-highlight-spec '(region    0.75)))
	))

(defun my-modes (&rest args)
  (while args
    (let* ((keyword (car args))
	   (assoc (assoc keyword my-modes-table)))
      (setq args (cdr args))
      (if assoc (eval (cons 'progn (cdr assoc)))
	(error "Keyword %S not in my-modes-table" keyword)))))

;; (require 'erc)
;; (my-modes :scroll-bar    :pager    :erc-track    :fringe    :width80)
;; (my-modes :no-scroll-bar :no-pager :no-erc-track :no-fringe :width80)
;; (my-modes :long-flash   :no-blink)
;; (my-modes :normal-flash :blink)


;; «linuxconfvar»  (to ".linuxconfvar")
;; «code-c-d-linux26»  (to ".code-c-d-linux26")

(defun ee-linuxconfvarname-around-point (&optional show-it)
  (interactive "p")
  (ee-stuff-around-point "A-Z0-9_" show-it))

(defun ee-linuxconfvarname-ask (&optional prompt show-it)
  (interactive (list nil t))
  (ee-maybe-showing-it
   (read-string (or prompt "Linux confvar (usually CONFIG_xxx): ")
		(ee-linuxconfvarname-around-point))))

'(
(defun code-c-d-linux26 (c d)
  (code-c-d c d)
  (ee-eval-read-format "
    (defun find-%sconfvar (var &rest rest)
      (interactive (list (ee-linuxconfvarname-ask)))
      (apply 'find-%sfile \".Configure.help\"
	     (concat \"\\n\" var \"\\n\") rest))" c c))

(code-c-d-linux26 "k26" "~/bigsrc/kernel-source-2.6.8/")
(code-c-d-linux26 "linux26" "~/bigsrc/kernel-source-2.6.8/")
)

;; (find-es "kernel" "k26.Configure.help")
;; (find-k26confvar "CONFIG_BLK_DEV_LOOP")
;; (find-fline "~/LINUX/2.6.28-persephone1.conf")



(setq ee-file-html (ee-expand "$EEVTMPDIR/ee.html"))
(setq ee-file-html "/tmp/ee.html")

;; (eeurl "http://www.cs.utah.edu/dept/old/texinfo/emacs18/emacs_21.html")

;; (find-enode "Variable Index" "* large-file-warning-threshold:")
;; (find-evariable                'large-file-warning-threshold)
(setq large-file-warning-threshold 15000000)


;; «intermail»  (to ".intermail")
;; (find-angg ".zshrc" "intermail")
;; (find-angg "bin/intermail")
;; (find-fline "~/INTERMAIL/")
;;
;; (setq sendmail-program "~/bin/intermail")
;; (setq sendmail-program "/usr/lib/sendmail")
;; (setq sendmail-program "/usr/sbin/sendmail")
;; (makunbound 'sendmail-program)
;;
;; (setq sendmail-program "~/bin/intermail")

;; (defun eebgPUC ()
;;   (interactive)
;;   (eebg-channel-xterm "PUC" "Sucuri")
;;   (eechannel "PUC"))
;;
;; (defun eebgTWU ()
;;   (interactive)
;;   (eebg-channel-xterm "TWU" "Twu")
;;   (eechannel "TWU"))
;;
;; (defun eechannel-PUC () (interactive) (eechannel-xterm "PUC" "Sucuri"))
;; (defun eechannel-TWU () (interactive) (eechannel-xterm "TWU" "Twu"))
;; (defalias 'eebgPUC 'eechannel-PUC)
;; (defalias 'eebgTWU 'eechannel-TWU)
;;
;; (defun eebgLua () (interactive) (eechannel-xterm "Lua" "lua50"))

;; «eechannel-TWU» (to ".eechannel-TWU")
(defun eechannel-TWU () (interactive)
  (eechannel-xterm "TWU"
    "~/EXPECT/autopasswd ssh edrx@angg.twu.net"
    "-geometry +785+0"))


;;-------------------------------------------------
;; «remove-from-keymap»  (to ".remove-from-keymap")
;;
(defun remove-from-keymap (keymap key-to-remove)
  (unless (eq (car keymap) 'keymap) (error "Not a sparse keymap"))
  (setcdr keymap (remq (assoc key-to-remove keymap)
		       (cdr keymap))))

;; «tex-insert-quote»  (to ".tex-insert-quote")
;; (find-es "emacs" "eval-after-load")
;; (find-evariable 'tex-mode-map "tex-insert-quote")
;; (find-evardescr 'tex-mode-map)
;;
(eval-after-load "tex-mode"
  '(remove-from-keymap tex-mode-map ?\"))




;; (find-eetcfile "NEWS" "undo-outer-limit")
;; (setq undo-outer-limit-function 'undo-outer-limit-truncate)
;; Always accept truncation of undo data, never ask:
;;
(defun undo-outer-limit-my-truncate (&rest rest) t)
(setq undo-outer-limit-function 'undo-outer-limit-my-truncate)

(setq ee-hyperlink-prefix "# ")
(setq add-log-full-name "Eduardo Ochs")
(setq add-log-mailing-address "eduardoochs@gmail.com")
;; (setq add-log-mailing-address "edrx@mat.puc-rio.br")

;; (find-efile "")
;; (find-efile "progmodes/tcl.el")
;;
(setq tcl-proc-list
  '("proc" "method" "itcl_class" "body" "configbody" "class"
    "pseudoproc"))
;; (tcl-set-proc-regexp)
;; (tcl-set-font-lock-keywords)



;; For zsh:
;;   (setq-default comint-process-echoes t)
;; The default is:
;;   (setq-default comint-process-echoes nil)
;; 2011nov03: I discovered that
;;   (setq-default comint-process-echoes t)
;; was the cause of a long-standing bug...
;;   (find-es "emacs" "comint-gets-stuck")
;;   (find-es "emacs" "comint-process-echoes")




;; (find-sitelispfile "debian-el/deb-view.el")
(autoload 'deb-find            "deb-view" "Debian Archive File Finder" t)
(autoload 'deb-view-mode       "deb-view" "Debian Archive File Mode" t)
(autoload 'deb-view            "deb-view" "Debian Archive File Viewer" t)
(autoload 'deb-view-dired-view "deb-view" "Debian Archive File Viewer" t)
(setq auto-mode-alist (append '(("\\.deb$" . deb-view-mode)) auto-mode-alist))
;; (define-key dired-mode-map     "\C-d"     'deb-view-dired-view)


(add-hook 'dired-load-hook
          '(lambda ()
	     (define-key dired-mode-map     "\C-d"     'deb-view-dired-view)))



;;-----------------------------------------------
;; «hscroll-keys-mode»  (to ".hscroll-keys-mode")
;; (find-eevnewfile "eev-dev.el" "define-minor-mode eegud-keys-mode")
;; (hscroll-keys-mode)
;;
(define-minor-mode hscroll-keys-mode
  "Use M-> and M-< for horizontal scrolling."
  :global nil
  :lighter " hscr-k"
  '(("\M->" . (lambda (arg) (interactive "p") (scroll-left (or arg 1))))
    ("\M-<" . (lambda (arg) (interactive "p") (scroll-right (or arg 1))))))

;; Or:
' (global-set-key (kbd "s-.")
    (lambda (arg) (interactive "p") (scroll-left (or arg 1))))
' (global-set-key (kbd "s-,")
    (lambda (arg) (interactive "p") (scroll-right (or arg 1))))



;;-----------------------------------------------
;; «unquote-printable»  (to ".unquote-printable")
(defun unquote-printable () (interactive)
  (while (and (re-search-forward "=\\([0-9A-Fa-f][0-9A-Fa-f]\\|\n\\)"
				 (mark) t)
	      (y-or-n-p "Unquote this? ")
	      (let ((q (match-string 1)))
		(if (equal q "\n")
		    (replace-match "")
		  (replace-match
		   (format "%c" (read (concat "?\\x" q)))
		   'fixedcase))
		t))))



;;---------------------
;; «date»  (to ".date")
;; (find-enode "Single Shell")
;; (describe-function 'shell-command-on-region)
;; (date)
;; (date+time)
;; (format-time-string "%Y%b%d")
;; (find-elnode "Time Parsing")
;; (find-sh "date")
;; (find-sh "date --help")
;; (find-sh "date +%d/%b/%Y | tr A-Z a-z")
;;
;; This version runs both on *nix and on M$. 2005nov16
(defun date-as-string (&optional arg) (interactive "P")
  "Return the current date as a string; ARG determines the format."
  (cond ((eq arg 1) (downcase (format-time-string "%Y%b%d %k:%M")))
	((eq arg 2) (format-time-string "%Y%b%d %k:%M"))
	((eq arg 3) (format-time-string "%Y%m%d55555")) ; for makecdrdaotoc
	((eq arg 4) (format-time-string "%k:%M:%S "))
	((eq arg 5) (format-time-string "%Y%m%d"))      ; for eev.deb
	((eq arg 7) (format-time-string "%02H:%M"))
	((eq arg 8) (format-time-string "%Y-%m-%d"))
	((eq arg 9) (downcase (format-time-string "%d/%b/%Y %k:%M")))
	((eq arg 99) (downcase (format-time-string "%Y%b%d %a")))
	(t          (downcase (format-time-string "%Y%b%d")))))

(defun date (&optional arg) (interactive "P")
  "Insert the current date."
  (insert (date-as-string arg)))

;; (eev "dpkg-reconfigure locales")
;; (find-node "(gawk)String Functions")
;; (find-node "(coreutils)Padding and other flags")
;; (find-node "(coreutils)Relative items in date strings")
;; (find-node "(libc)Locale Categories")
;;
(defun Data (&optional yesterday)
  (interactive "P")
  (insert (shell-command-to-string
           (format "LC_ALL=pt_BR \\
                    date -d '%d days' '+%%A, %%-e de %%B, %%Y' \\
                      | awk '{print toupper(substr($0,1,1)) substr($0,2)}'"
		   (if yesterday -1 0)))))

(define-key eev-mode-map "\M-d"  'date)
;; (global-set-key "\M-d" 'date)




;;-------------------------------------------
;; «yank-first-line»  (to ".yank-first-line")
;;
(defun yank-first-line () (interactive)
  "Yanks the first line of the killed text and does a RET.
Insert the first line from the latest kill-ring entry and run the
action associated to the RET key.  The kill-ring entry is then altered
so that subsequent calls of yank-first-line will return successive
lines."
  (let ((bigstr (car kill-ring)))
    (cond ((string-match "^\\([^\n]*\\)\n" bigstr)
	   (let ((firstline (match-string 1 bigstr))
		 (rest (substring bigstr (match-end 0))))
	     (insert firstline)
	     (call-interactively (key-binding "\r"))
	     (setcar kill-ring rest)))
	  ((equal bigstr ""))
	  (t (insert bigstr)
	     (call-interactively (key-binding "\r"))
	     (setcar kill-ring "")))))

;; (global-set-key "\M-P" 'yank-first-line)
;; (find-elongkey-links "M-P  ;; eewrap-pdflike")




;;---------------------
;; «myip»  (to ".myip")
;; (find-angg ".zshrc" "myip-ppp0")
;; (find-sh  "sudo ifconfig")
;; (find-sh "/sbin/ifconfig")
;; (defun myip () (interactive) (insert (find-zsh0 "myip-ppp0")))
;; (defun myip-as-string ()
;;   (find-sh0 "ifconfig ppp0 | awk 'NR==2' | tr : ' ' | awk '{print $3}'"))
(defun myip-ppp0-as-string ()
  (find-sh0 "ifconfig ppp0 | awk 'NR==2' | tr : ' ' | awk '{print $3}'"))
(defun myip-ppp1-as-string ()
  (find-sh0 "ifconfig ppp1 | awk 'NR==2' | tr : ' ' | awk '{print $3}'"))
(defun myip-eth0-as-string ()
  (find-sh0 "ifconfig eth0 | awk 'NR==2' | tr : ' ' | awk '{print $3}'"))
(defun myip-ppp0 () (interactive) (insert (myip-ppp0-as-string)))
(defun myip-eth0 () (interactive) (insert (myip-eth0-as-string)))

;; (find-efunction 'network-interface-info)
;; (network-interface-info "eth0")
;; (network-interface-info "lo")
;; (network-interface-info "ppp0")
;; (network-interface-info "ppp1")
;; (interface-ip "ppp0")
;; (interface-ip "ppp1")
;;
(defun interface-ip (ifname)
  (let* ((ifinfo (network-interface-info ifname)))
    (if (and ifinfo (car ifinfo))
	(let* ((addr (car ifinfo))
	       (a0 (aref addr 0))
	       (a1 (aref addr 1))
	       (a2 (aref addr 2))
	       (a3 (aref addr 3)))
	  (format "%d.%d.%d.%d" a0 a1 a2 a3)))))

(defun myip-ppp0-or-ppp1-as-string ()
  (or (interface-ip "ppp0") (interface-ip "ppp1")))

(defun myip-as-string () (myip-ppp0-as-string))
(defun myip-as-string () (myip-ppp1-as-string))
(defun myip-as-string () (myip-ppp0-or-ppp1-as-string))
(defun myip () (interactive) (insert (myip-as-string)))

(defun myip-persephone-as-sexp ()
  `(progn (kill-new ,(format "%s persephone" (myip-as-string)))
	  (find-fline "$ASROOT/etc/hosts")))

(defun myip-persephone ()
  (interactive)
  (insert (format "%S" (myip-persephone-as-sexp))))

;; (myip-persephone-as-sexp)
;; (myip-persephone)


(seen 4179)


;;-----------------------------
;; «eeblogme»  (to ".eeblogme")
;;
;; (find-blogmefile "")
(code-c-d "blogme"  "~/blogme/"  :anchor)
(code-c-d "blogme3" "~/blogme3/" :anchor :grep)
(code-c-d "blogme4" "~/blogme4/" "blogme4" :anchor :grep)
(setq ee-file-html   "/tmp/ee.html")

(setq ee-file-blogme "/tmp/ee.blogme")
(setq ee-blogme-prog  "~/blogme/blogme2.lua")
(setq ee-blogme-command
      (format "%s -o %s -i %s" ee-blogme-prog ee-file-html ee-file-blogme))
(setq ee-blogme3-prog "lua51 ~/blogme3/blogme3.lua")
(setq ee-blogme-command
      (format "%s -o %s -i %s" ee-blogme3-prog ee-file-html ee-file-blogme))
(setq ee-blogme-header (format "[htmlize %s\n" ee-file-blogme))
(setq ee-blogme-footer "\n]\n\n[#
 # Local Variables:
 # coding: raw-text-unix
 # modes: (fundamental-mode blogme-mode)
 # End:
 #
 #]
")

;; Check the footer: (eeblogme-now "[ERR]")

;; «eeblogme-now»  (to ".eeblogme-now")
;;
(defun eeblogme (s &optional e)
  (interactive "r")
  (ee-write s e ee-blogme-header ee-blogme-footer ee-file-blogme))

(defun eeblogme-now (s &optional e)
  (interactive "r")
  (eeblogme s e)
  (let ((output (find-sh0 ee-blogme-command)))
    (eev (format "firefox %s" ee-file-html))
    (if (string= output "") (message "ok") (find-estring output))))

;; (eeb-define 'eeblogme-bounded     'eeblogme     'ee-delimiter-hash nil t t)
;; (eeb-define 'eeblogme-now-bounded 'eeblogme-now 'ee-delimiter-hash nil t t)



;;-------------------------------------------------------------
;; «blogme-mode-syntax-table»  (to ".blogme-mode-syntax-table")
;; «blogme-mode»  (to ".blogme-mode")
;; (find-elnode "Syntax Table Functions")
;; (find-eapropos "syntax-table")
;; (with-syntax-table blogme-mode-syntax-table (describe-syntax))
;;
(setq blogme-mode-syntax-table
	(copy-syntax-table text-mode-syntax-table))
(modify-syntax-entry ?\( "." blogme-mode-syntax-table)
(modify-syntax-entry ?\) "." blogme-mode-syntax-table)
(modify-syntax-entry ?{  "." blogme-mode-syntax-table)
(modify-syntax-entry ?}  "." blogme-mode-syntax-table)

;; (find-angg "elisp/hisex.el")
(autoload 'hisex-mode "hisex")
(defface hisex-face '((t :background "red4"))
  "The face used to highlight sexps.")

(defun hisex-mode-off () (interactive) (hisex-mode 0))

;; (find-node "(elisp)Major Mode Basics")
;; (find-efunction 'generic-mode-internal)
(defun blogme-mode ()
  (interactive)
  (kill-all-local-variables)
  (setq major-mode 'blogme-mode)
  (setq mode-name "Blogme")
  (setq font-lock-defaults '())
  (set-syntax-table blogme-mode-syntax-table)
  (add-hook 'change-major-mode-hook 'hisex-mode-off nil 'local)
  (hisex-mode 1))

;;------------------------------------------------/

;; «blogme4»  (to ".blogme4")

;; eepitch-comint-at is defined at:
;; (find-eev "eepitch.el")
;; (find-eev "eepitch.el" "eepitch-comint-at")
;; (find-eev "eepitch.el" nil "eepitch-comint-at")

;; (code-c-d "blogme4" "~/blogme4/" "blogme4" :anchor :grep)
(code-c-d "blogme4" "~/blogme4/" "blogme4" :anchor)
(defun eepitch-blogme4 () (interactive)
  (eepitch-comint-at "~/blogme4/" "blogme4" "lua5.1 -l blogme4 -i"))

;; «dednat5»  (to ".dednat5")
;; (find-dn5 "")
;; (find-dn5 "build.lua")
;; (find-dn5 "options.lua")
;; (find-dn5 "repl.lua")
;; (find-angg "bin/dednat5")
(code-c-d "dn5" "~/dednat5/" :anchor)
(code-c-d "dn6" "~/LATEX/dednat6/" :anchor)
(code-c-d "dednat6"    "~/dednat6/" :anchor)
(code-c-d "dednat6lua" "~/dednat6/dednat6/" :anchor)
;; (defun eepitch-dednat5 () (interactive)
;;   '(eepitch-comint-at "~/dednat5/" "dednat5" "lua5.1 -l dednat5 -i"))
(defun eepitch-dednat5 () (interactive)
  (eepitch-comint "dednat5" "dednat5 -e repl()"))
(defun eepitch-dn5 () (interactive)
  (eepitch-comint "dednat5" "dednat5 -e repl()"))


;;------------------------------------------------/


(defun u8-to-l1 (s e)
  (interactive "r")
  (shell-command-on-region s e "recode u8..l1" nil t))
(defun l1-to-u8 (s e)
  (interactive "r")
  (shell-command-on-region s e "recode l1..u8" nil t))

(defalias 'u8   'u8-to-l1)
(defalias 'u8l1 'u8-to-l1)
(defalias 'l1   'l1-to-u8)
(defalias 'l1u8 'l1-to-u8)

(defun find-file-this-line () (interactive)
  (find-fline (ee-url-to-fname (buffer-substring (ee-bol) (ee-eol)))))

;; «eevnow»  (to ".eevnow")
;; (find-fline "~/EXPECT/eevsh")
;; (find-eevnewfile "eevsh") <-- not yet
;;
;; (defun eevnow (s e suffix)
;;   (interactive "rsSuffix: ")
;;   (eev s e)
;;   (ee-write "ee\r" nil "" "" "~/eev-0.94/ee.eeg.onsigdo")
;;   (shell-command-to-string
;;    (format "kill -USR1 $(cat ~/eev-0.94/ee.eeg.pid.%s); echo -n $?"
;;            suffix)))

;; (defun eevnow (s &optional e)
;;   (interactive "r")
;;   (eev s e)
;;   (eech "ee\n"))
;;
;; (defmacro ee-at (anchor &rest body)
;;   `(save-excursion
;;      (ee-goto-position (format ee-anchor-format ,anchor))
;;      . ,body))
;;
;; (defmacro ee-at-file (fname anchor &rest body)
;;   (with-current-buffer (find-file-noselect fname)
;;     (apply 'ee-goto-position (format ee-anchor-format ,anchor))
;;     . ,body))



(defmacro if-xemacs    (&rest body) `(when   (featurep 'xemacs) . ,body))
(defmacro if-gnu-emacs (&rest body) `(unless (featurep 'xemacs) . ,body))

(code-c-d "xe"    "/usr/share/xemacs-21.4.15/lisp/" "xemacs21/xemacs")
(code-c-d "xel"   "/usr/share/xemacs-21.4.15/lisp/" "xemacs21/lispref")
(code-c-d "xefaq" "/usr/share/xemacs-21.4.15/lisp/" "xemacs21/xemacs-faq")

;; (find-xenode "")
;; (find-xelnode "")
;; (find-xefaqnode "")



;;-----------------------------------------
;; «find-w3m-links»  (to ".find-w3m-links")
(defun ee-links-for-findxxxw3m-1 (c d path)
  (list (intern (format "find-%sw3m" c))
	(ee-remove-prefix d path)))

(defun ee-links-for-findxxxw3m (path)
  (mapcar (lambda (c-d) (ee-pph (ee-links-for-findxxxw3m-1
				 (car c-d) (nth 1 c-d) path)))
	  (code-c-d-prefixes path)))

(defun find-w3m-links-old (fname &rest rest)
  (interactive (list (or w3m-current-url (buffer-file-name) default-directory)))
  (if (ee-prefixp "file://" fname)
      (setq fname (ee-remove-prefix "file://" fname)))
  (apply 'find-elinks-old
	 (list (ee-links-for-findxxxw3m (ee-expand fname)))
	 rest))

(defun ee-find-xxxw3m-sexps (fname)
  (ee-code-c-d-pairs-eval
   fname
   '(list (ee-intern "find-%sw3m" c) fname-)))

(defun find-w3m-links (fname &rest rest)
  (interactive (list (or w3m-current-url (buffer-file-name) default-directory)))
  (if (ee-prefixp "file://" fname)
      (setq fname (ee-remove-prefix "file://" fname)))
  (apply 'find-elinks
	 `((find-w3m-links ,fname ,@rest)
	   ,(concat "file://" fname)
	   ,fname
	   ,@(ee-find-xxxw3m-sexps (ee-expand fname)))
	 rest))

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

(defun find-w3m-anchors (&rest rest)
  (interactive)
  (apply 'find-epp
	 (with-current-buffer "*w3m*"
	   (get-char-property (point) 'w3m-name-anchor2))
	 rest))

;; (define-key eev-mode-map "\M-h3"    'find-w3m-anchors)
;; (define-key eev-mode-map "\M-h\M-3" 'find-w3m-anchors)




;;--------[ etc ]--------

;; (find-es "busybox" "busybox-1.2.0")
(code-c-d "busybox" "~/usrc/busybox-1.2.0/")
;; (code-c-d "uclibc" "~/bigsrc/uclibc/uclibc-0.9.26-cvs20040816/")
;; (find-es "anatocc" "uclibc-upstream")
(code-c-d "uclibc" "~/bigsrc/uClibc-0.9.29/" :grep)


;; «safe-local-variable»  (to ".safe-local-variable")
;; (find-elnode "File Local Variables" "safe-local-variable")
;; (find-elnode "Property Lists")
;; (find-elnode "Symbol Plists")
;; (find-egrep "grep -nH -e safe-local *.el")
;; (find-eevgrep "grep -nH -e comment-prefix *.el")
;;
;; (find-efunction 'risky-local-variable-p)
;; (find-es "emacs" "safe-local-variable")
;; (find-elnode "File Local Variables" "`-function'")
;; `ee-temp-bounded-function' isn't used anymore, and the warning is
;; annoying.
;;
(put 'ee-temp-bounded-function 'safe-local-variable t)
(put 'ee-comment-prefix        'safe-local-variable 'stringp)
;; (symbol-plist 'ee-comment-prefix)

;; (code-c-d-anchor "eeva" "$EEVDIR/article/")
;; (code-c-d-old    "eeva" "$EEVDIR/article/" :anchor :xdvi)
;; (find-eevafile "")





;; «latexbase» (to ".latexbase")
(code-c-d "latexbase" "/usr/share/texlive/texmf-dist/tex/latex/base/")
;; (find-latexbasefile "")
;; (find-latexbasefile "latex.ltx")
;; (find-latexbasefile "article.cls")
;; (find-latexbasefile "size12.clo")



;;-----------------------------
;; «classes» (to ".classes")
;; (find-es "tex" "classes")
;; (find-tlsh "find * | sort | grep classes.pdf")
;; (find-fline "/usr/local/texlive/2019/texmf-dist/doc/latex/base/" "classes.pdf")
(code-pdf-page "classes"  "/usr/local/texlive/2019/texmf-dist/doc/latex/base/classes.pdf")
(code-pdf-text "classes"  "/usr/local/texlive/2019/texmf-dist/doc/latex/base/classes.pdf")
;; (find-classespage)
;; (find-classestext)

;; (find-classespage 42 "the figure environment")
;; (find-classestext 42 "the figure environment")
;; (find-classespage 43 "\\abovecaptionskip")
;; (find-classestext 43 "\\abovecaptionskip")

;; Old:
;; «classes.dtx»  (to ".classes.dtx")
;; (find-es "tex" "classes.dtx-dvi")




;;-----------------------------
;; «source2e»   (to ".source2e")
;; (find-angg ".emacs.papers" "source2e")
;; (find-es "tex" "source2e")
;; (find-tlsh "find * | sort | grep source2e")
;; (find-fline "/usr/local/texlive/2018/texmf-dist/doc/latex/base/" "source2e.pdf")
;;(code-c-d      "source2e" "/usr/local/texlive/2018/texmf-dist/doc/latex/base/")
;;(code-pdf-page "source2e" "/usr/local/texlive/2018/texmf-dist/doc/latex/base/source2e.pdf")
;;(code-pdf-text "source2e" "/usr/local/texlive/2018/texmf-dist/doc/latex/base/source2e.pdf" 10)
;; (find-source2efile "" "source2e.pdf")
;; (find-source2epage)
;; (find-source2etext)
;; (find-source2epage (+ 10 609) "Index")
;; (find-source2etext (+ 10 609) "Index")




;; 2017ago15:
;; (find-fline "/usr/share/doc/texlive-doc/latex/base/")
;; (code-xpdf     "source2e" "/usr/share/doc/texlive-doc/latex/base/source2e.pdf")
;; (code-pdf-text "source2e" "/usr/share/doc/texlive-doc/latex/base/source2e.pdf" 8)
;; (find-source2epage)
;; (find-source2etext)
;; (find-source2epage        1  "Contents")
;; (find-source2etext        1  "Contents")

;; (find-source2epage 'ltoutput)
;; (find-texbookpage 'appendixI)
;; http://lists.gnu.org/archive/html/eev/2005-06/msg00000.html

;; (find-es "tex" "source2e.dvi")
;; (find-source2exdvi "source2e.dvi")
;; (find-source2efile "ltlists.dtx")
;; (find-source2efile "")
;; (find-source2efile "source2e.ind")
;; (find-source2efile "source2e.toc")
;; (find-source2esh "grep dtx source2e.toc")
;; (find-source2epage)
;; (find-source2epage 'ltdefns 2)
;; (find-source2epage 'lttab)

;; (find-eevex "")
;; (find-eevex "tex.e" "find-source2epage")

;; «find-source2epage»  (to ".find-source2epage")
;; Very old - and commented out.

;; (code-c-d-old "source2e" "~/usrc/latex/base/" :xdvi)
;;
;; (defvar ee-source2e-plist
;;   '(ltdirchk   1 ltplain   13 ltvers    24 ltdefns   26 ltalloc   40
;;     ltcntrl   42 lterror   46 ltpar     55 ltspace   57 ltlogos   69
;;     ltfiles   70 ltoutenc  80 ltcounts 112 ltlength 116 ltfssbas 117
;;     ltfsstrc 137 ltfsscmp 160 ltfssdcl 165 ltfssini 186 fontdef  192
;;     preload  209 ltfntcmd 213 ltpageno 221 ltxref   222 ltmiscen 226
;;     ltmath   235 ltlists  245 ltboxes  260 lttab    271 ltpictur 293
;;     ltthm    315 ltsect   319 ltfloat  329 ltidxglo 345 ltbibl   347
;;     ltpage   350 ltoutput 353 ltclass  408 lthyphen 426 ltfinal  428
;;     index    487)
;; "A plist that says at which page of source2e.dvi each .dtx file begins.
;; The plist is hand-built from (find-source2esh \"grep dtx source2e.toc\")
;; and is used by `find-source2epage'.")
;;
;; (defun find-source2epage (&optional pagespec add &rest rest)
;;   (interactive)
;;   (let* ((n (plist-get ee-source2e-plist pagespec))
;; 	 (page (if n (+ 9 n (if (numberp add) add 0)) pagespec)))
;;     (find-source2exdvi "source2e.dvi" page)))

;; (find-eevex "tex.e" "find-texbookpage")

;; (code-c-d-old "texbook" "~/usrc/texbook/" :xdvi)
;;
;; (defvar ee-texbook-plist
;;   '(chapter1    1 chapter2    3 chapter3    7 chapter4   13 chapter5   19
;;     chapter6   23 chapter7   37 chapter8   43 chapter9   51 chapter10  57
;;     chapter11  63 chapter12  69 chapter13  85 chapter14  91 chapter15 109
;;     chapter16 127 chapter17 139 chapter18 161 chapter19 185 chapter20 199
;;     chapter21 221 chapter22 231 chapter23 251 chapter24 267 chapter25 285
;;     chapter26 289 chapter27 295
;;     appendixA 305 appendixB 339 appendixC 367 appendixD 373 appendixE 403
;;     appendixF 427 appendixG 441 appendixH 449 appendixI 457 appendixJ 483)
;; "A plist that says at which page of texbook.dvi each chapter begins.
;; The plist is hand-built from:
;;   (find-texbookfile \"texbook.tex\" \"1. The Name of the Game. 1.\")
;; and is used by `find-texbookpage'.")

;; «find-texbookpage-old»  (to ".find-texbookpage-old")
;; Very old - commented out

;; (defun find-texbookpage (&optional pagespec add &rest rest)
;;   (interactive)
;;   (let* ((n (plist-get ee-texbook-plist pagespec))
;;         (page (if n (+ 11 n (if (numberp add) add 0)) pagespec)))
;;     (find-texbookxdvi "texbook.dvi" page)))


;; «find-texbookpage»  (to ".find-texbookpage")
;; (find-angg ".emacs.papers" "texbook")
;; (find-es "tex" "texbook")
;; (find-texbookfile "")
;; (find-eevex "tex.e" "find-texbookpage")
(code-c-d      "texbook" "~/usrc/texbook/")
(code-dvi      "texbook" (ee-texbookfile "texbook.dvi"))
(code-pdf-page "texbook" (ee-texbookfile "texbook.pdf"))
(code-pdf-text "texbook" (ee-texbookfile "texbook.pdf") 12)
;; (find-texbookfile "texbook.tex")
;; (find-texbookpage 1)
;; (find-texbooktext)

;; (find-es "tex" "mfbook")
;; (find-mfbookfile "")
(code-c-d       "mfbook" "~/usrc/mfbook/")
(code-dvi       "mfbook" (ee-mfbookfile "mfbook.dvi"))
(code-pdftotext "mfbook" (ee-mfbookfile "mfbook.pdf"))
;; (find-mfbookfile "mfbook.tex")
;; (find-mfbookpage 1)
;; (find-mfbooktext)

;; «find-amsmathpage» (to ".find-amsmathpage")
;; (find-es "tex" "amslatex")
;; (find-es "tex" "MaxMatrixCols")
;;
;; (find-fline         (ee-amslmathfile ""))
;; (find-pspage        (ee-amslmathfile "amsldoc.pdf"))
;; (find-pspage-links '(ee-amslmathfile "amsldoc.pdf"))
;; (code-xpdf      "amsldoc" (ee-amslmathfile "amsldoc.pdf"))
;; (code-pdftotext "amsldoc" (ee-amslmathfile "amsldoc.pdf"))
;; (code-xpdf      "amsmath" (ee-amslmathfile "amsmath.pdf"))
;; (code-pdftotext "amsmath" (ee-amslmathfile "amsmath.pdf"))
;;
;; (find-fline "/usr/share/doc/texlive-doc/latex/")
(code-xpdf      "amsldoc" "/usr/share/doc/texlive-doc/latex/amsmath/amsldoc.pdf")
(code-pdftotext "amsldoc" "/usr/share/doc/texlive-doc/latex/amsmath/amsldoc.pdf")
(code-xpdf      "amsmath" "/usr/share/doc/texlive-doc/latex/amsmath/amsmath.pdf")
(code-pdftotext "amsmath" "/usr/share/doc/texlive-doc/latex/amsmath/amsmath.pdf")
;; (find-amsldocpage 1)
;; (find-amsldoctext)
;; (find-amsmathpage 1)
;; (find-amsmathtext)




;; «wdg»  (to ".wdg")
;; (find-es "html" "wdg-upstream")
;; (find-es "html" "wdg")
;;
;; (code-c-d "wdgref" "/usr/share/doc/wdg-html-reference/reference/")
;; (code-c-d "wdg40"  "/usr/share/doc/wdg-html-reference/reference/html40/")
;; (code-c-d "wdgcss" "/usr/share/doc/wdg-html-reference/reference/css/")
(code-c-d "wdgref" "~/usrc/wdg/")
(code-c-d "wdg40"  "~/usrc/wdg/html40/")
(code-c-d "wdgcss" "~/usrc/wdg/css/")
;;
;; (find-wdgreffile "")
;; (find-wdg40w3m "index.html")
;; (find-wdg40w3m "alist.html")
;; (find-wdgrefw3m "css/index.html")
;; (find-wdgrefw3m "css/structure.html")
;; (find-wdgcssw3m "font/index.html")
;; (find-wdgcssw3m "font/index.html" "backup")
;; (find-wdgcssgrep "grep -niH -e font *")

;; http://www.mozilla.org/docs/dom/domref.pdf
(code-xpdf      "domref" "$S/http/www.mozilla.org/docs/dom/domref.pdf")
(code-pdftotext "domref" "$S/http/www.mozilla.org/docs/dom/domref.pdf")
;; (find-domrefpage         1  "Contents")
;; (find-domrefpage        12  "Testing the DOM API")
;; (find-domrefpage (+ 16  73) "DOM window Reference")
;; (find-domrefpage (+ 26 307) "DOM HTML Elements Reference")
;; (find-domreftext "")



;;---------[ tese de doutorado + etc ]------------
(code-c-d "dout" "/oldfs/7/pandahome/edrx/LATEX/dout/" :anchor)
(code-dvi "dout" "/oldfs/7/pandahome/edrx/LATEX/dout/chapters.dvi")
;; (find-doutfile "")
;; (find-doutpage 1)
(code-c-d "doutslides" "/oldfs/7/pandahome/edrx/LATEX/" :anchor)
(code-dvi "doutslides" "/oldfs/7/pandahome/edrx/LATEX/2003a-slides.dvi")
;; (find-doutslidesfile "")
;; (find-doutslidesfile "2003a-slides.tex")
;; (find-doutslidespage 1)




;;--------[ howm ]--------
;; «howm»  (to ".howm")
;; I am not using Howm anymore - I'm using Org instead.
;; (find-es "howm")
;; (find-fline "~/DTO/.emacs.howm")
;;
;; (code-c-d "howm"        "~/usrc/howm-1.3.2/")
;; (add-to-list 'load-path "~/usrc/howm-1.3.2/")
;; (code-c-d "howm"        "~/usrc/howm-test/")
;; (add-to-list 'load-path "~/usrc/howm-test/")
;; (autoload 'howm-mode "howm" nil t)

;;;_  , howm-view-*
;; (setq howm-view-summary-persistent nil)
;; (setq howm-view-contents-persistent nil)
;; (setq howm-view-keep-one-window t)  ; when you press '1' it sticks
;; (setq howm-view-summary-name "*howm S:%s*")
;; (setq howm-view-contents-name "*howm C:%s*")

;; (require 'howm nil t)
;; (setq howm-directory "~/HOWM/")
;; ;; (setq howm-file-name-format "%Y-%m-%d.howm")
;; (setq howm-file-name-format "%Y-%m-%d")
;; (setq howm-menu-file ".howm")
;; (howm-menu)

;; «howm-create-named-file»  (to ".howm-create-named-file")
;; ;; http://lists.sourceforge.jp/mailman/archives/howm-eng/2005/000010.html
;; ;; (find-howm "")
;; (defun howm-create-named-file (fname)
;;   (interactive (list (read-file-name "New howm file: " howm-directory)))
;;   (cond ((find-buffer-visiting fname) (error "File being visited"))
;; 	((file-exists-p fname)        (error "File already exists"))
;; 	(t (write-region (format "  -*- coding: raw-text -*-\n= %s\n"
;; 				 (file-name-nondirectory fname)) nil
;; 				 fname))))
;; 
;; ;; The default binding for (kbd "C-c , a") is howm-list-all - replace
;; ;; it with something that makes it easy to use several directories.
;; ;;
;; ;; (find-ekeymapdescr global-map "C-c , a")
;; ;; (global-set-key (kbd "C-c , a") 'howm-list-all-with-edrx-arg)
;; ;; (global-set-key (kbd "C-c , a") 'howm-list-all)
;; ;; (eek "M-h M-k C-c , a")
;; ;; (find-fline "~/HOMW/")
;; ;; (find-fline "~/HOMW4/")
;; 
;; (defun howm-list-all-with-edrx-arg (arg)
;;   "Like `howm-list-all', but when invoked with an argument set `howm-directory'.
;; When ARG is nil use \"~/HOMW/\", when ARG is a number, for
;; example, 32, use \"~/HOMW32/\"."
;;   (interactive "P")
;;   (if arg (setq howm-directory
;; 		(format "~/HOWM%s/" (if (eq arg 0) "" arg))))
;;   (howm-list-all))
;; 
;; (global-set-key (kbd "C-c , a") 'howm-list-all-with-edrx-arg)
;; 
;; ;; (find-howmfile "howm.el" "(require 'riffle)")
;; ;; (find-howmfile "riffle.el" "[backspace] 'scroll-other-window-down")
;; ;; (find-howmfile "riffle.el" "\"\\C-h\" 'scroll-other-window-down")
;; ;; (find-ekeymapdescr riffle-summary-mode-map)
;; 
;; (when (boundp 'riffle-summary-mode-map)
;;   (remove-from-keymap riffle-summary-mode-map 'backspace)
;;   (remove-from-keymap riffle-summary-mode-map ?\C-h))
;; 
;; ;; (find-howmfile "")
;; ;; (find-howmfile "doc/")
;; ;; (find-howmfile "doc/README.rd")
;; ;; (progn (find-howmfile "doc/README.rd") (howm-mode))
;; ;; (find-howmfile "howm.el")
;; ;; (find-howmfile "howm-mode.el")
;; 
;; ;; (find-efunction 'howm-menu)
;; ;; (require 'howm)


;; «hm»  (to ".hm")
;; (defun hm (&optional arg)
;; "Like howm-mode, but shorter, smarter, and more adequate (2005jul29)"
;;   (interactive)
;;   (if (null arg)
;;       (if howm-mode (normal-mode) (howm-mode 1))
;;     (if (> arg 0) (howm-mode 1) (normal-mode))))

;; «find-edrxhowm»  (to ".find-edrxhowm")
;; (code-c-d "edrx" "~/HOWM/")
;; (defun find-edrxhowm (file &rest pos-spec-list)
;;   (interactive (list ""))
;;   (setq howm-directory "~/HOWM/")
;;   (find-edrxfile file)
;;   (unless (string= file "") (hm 1))
;;   (apply 'ee-goto-position pos-spec-list))
;;
;; (defun find-edrxhowm+ (file &rest pos-spec-list)
;;   (interactive
;;    (let ((stuff (ee-no-properties (ee-stuff-around-point "A-Za-z0-9-+_:."))))
;;      ;; (list (read-file-name "Howm page: " "~/HOWM/" "" nil stuff))
;;      (list (read-string "Howm page: " stuff))
;;      ;; (list stuff)
;;      ))
;;   (apply 'find-edrxhowm file pos-spec-list)
;;   (if (= (point-min) (point-max))
;;       (let ((m (buffer-modified-p (current-buffer))))
;;         (insert "= " file "\n")
;;         (set-buffer-modified-p m)))
;;   (hm 1))
;;
;; (define-key eev-mode-map "\M-\r" 'find-edrxhowm+)
;;
;; test on this word: Heroes

;; ;; http://lists.sourceforge.jp/mailman/archives/howm-eng/2005/000004.html
;; ;;
;; ' (defun find-filehowm (file &optional title)
;;     (find-file (expand-file-name file howm-directory))
;;     (howm-mode 1)
;;     (when title
;;       (goto-char (point-min))
;;       (re-search-forward (concat "^= +" (regexp-quote title) "$"))))





;; «iheader»  (to ".iheader")
;; See: (find-node "(emacs)File Variables")
;;      (find-node "(emacs)Initial Options" "`--unibyte'")
(defun iheader ()
  (interactive)
  (setq buffer-file-coding-system 'raw-text-unix)
  (insert " -*- encoding: raw-text-unix -*-\n"))

;; «reload»  (to ".reload")
;; See: (find-efunction 'add-file-local-variable-prop-line)
;;      (find-elfile "files-x.el" "For this change to take effect")
;;      (find-efunction 'revert-buffer)
(defun reload ()
  "Reload the current file. Like `normal-mode', but stronger."
  (interactive)
  (let ((bfn (buffer-file-name))
        (lin (line-number-at-pos)))
    (save-buffer)
    (kill-buffer nil)
    (find-fline bfn lin)))

;; «no-mode-line»  (to ".no-mode-line")
;; (find-evardescr 'mode-line-format "nil means don" "t display a mode line")
(defun no-mode-line ()
  (interactive)
  (setq mode-line-format nil))




;;---------------------------------
;; «dednat4»  (to ".dednat4")
;; (find-dn4ex "dednat4.el")
;; (find-node "(web2c)tex invocation")
;; (find-node "(kpathsea)Path sources")
;; (find-es "tex" "TEXINPUTS")
;;
;; (find-dednat4 "examples/edrxmain.tex")
;; (find-dn4 "README" "eedn4-lisp")
;; (find-dn4file "")
;; (find-fline "~/LATEX/
;;
;; «dednat4-setup»  (to ".dednat4-setup")
;; (find-dn4ex "")
;; (find-dn4 "dednat4.el")
;; (find-dn4 "downloads/")
;; (find-dn4 "Makefile")
;; (eev "cd ~/dednat4/; make downloads")
;; (find-sh "cd ~/dednat4/; cp -v proof.sty diagxy.tex ~/LATEX/")

(defun eedn4 (s e)
"Write the region between S and E to ~/LATEX/ee.tex and write an
e-script to $EE; then running `ee' in a shell will run
dednat4.lua and after that latex on ~/LATEX/tmp.tex (tmp.tex is a
wrapper around ee.tex) and display the resulting DVI file.
See: (find-efunction 'eedn4)
     (find-fline \"~/LATEX/tmp.tex\")
     (find-fline \"~/LATEX/ee.tex\")"
  (interactive "r")
  (ee-write s e "" "" "~/LATEX/ee.tex")
  (eev "cd ~/LATEX/ &&
        cp -v edrxmain41.tex tmp.tex &&
        ~/dednat4/dednat4.lua tmp.tex &&
        latex tmp.tex &&
        rexdvi tmp.dvi"))

;; (eeb-define 'eedn4-bounded     'eedn4  'ee-delimiter-percent nil t t)
;; (eeb-define 'eedn4-%%-bounded  'eedn4  "\n%%*\n" nil t t)

(defun eedn4-script (&optional dir tmptex prog)
  (ee-template
   `(("~/LATEX/"       ,(or dir    "~/LATEX/"))
     ("edrxmain41.tex" ,(or tmptex "edrxmain41.tex"))
     ("dednat4"        ,(or prog   "~/dednat4/dednat41"))
     ("rexdvi"         ,(or rexdvi "rexdvi")))
   "cd {~/LATEX/} &&
    cp -v {edrxmain41.tex} tmp.tex &&
    {dednat4} tmp.tex &&
    latex tmp.tex &&
    rexdvi tmp.dvi"))

;; (eedn4-script)


;; «eedn4-51»  (to ".eedn4-51")
;; (find-dn4ex "edrxmain41.tex")
;;
(defun eedn4-51 (s &optional e)
  "Same as eedn4, but using lua51"
  (interactive "r")
  (ee-write s e "" "" "~/LATEX/ee.tex")
  (eev "cd ~/LATEX/ &&
    cp -v edrxmain41.tex tmp.tex &&
    ~/dednat4/dednat4 tmp.tex &&
    latex tmp.tex &&
    rexdvi tmp.dvi"))

(defun eedn4-51 (s &optional e)
  "Same as eedn4, but using dednat4, which uses lua51.
See: (eedn4-script \"~/LATEX/\" \"edrxmain41.tex\" \"~/dednat4/dednat41\")"
  (interactive "r")
  (ee-write s e "" "" "~/LATEX/ee.tex")
  (eev (eedn4-script "~/LATEX/" "edrxmain41.tex" "~/dednat4/dednat41")))


;; (eeb-define 'eedn4-51-bounded  'eedn4-51  'ee-delimiter-percent nil t t)

;; «eedn4a»  (to ".eedn4a")
;; (to "dn4-block")
;; (find-dn4ex "edrxmain41a.tex")
;; (find-dn4 "Makefile" "dednat41")
;;
(defun eedn4a (s &optional e)
  "Same as eedn4-51, but using \\documentclass[article]."
  (interactive "r")
  (ee-write s e "" "" "~/LATEX/ee.tex")
  (eev "cd ~/LATEX/ &&
        cp -v edrxmain41a.tex tmp.tex &&
        ~/dednat4/dednat41 tmp.tex &&
        latex tmp.tex &&
        rexdvi tmp.dvi"))

;; (eeb-define 'eedn4a-bounded  'eedn4a  'ee-delimiter-percent nil t t)

;; See: (find-bounded-intro "Defining new bounded functions")
;; (find-code-bounded 'eedn4a-bounded 'eedn4 "\n%*\n" nil t t)
;;      (code-bounded 'eedn4a-bounded 'eedn4 "\n%*\n" nil t t)
;;      (code-bounded 'eedn4a-bounded 'eedn4 "\n%*\n")

;; (find-code-bounded 'eev-bounded 'eev "\n#*\n")
;;      (code-bounded 'eev-bounded 'eev "\n#*\n")
;; (find-code-bounded 'eev-bounded 'eev 'ee-delimiter-hash)




(seen 4904)




;;;  ____      _          
;;; |  _ \ ___(_)_ __ ___ 
;;; | |_) / __| | '__/ __|
;;; |  _ < (__| | | | (__ 
;;; |_| \_\___|_|_|  \___|
;;;                       
;; «rcirc»  (to ".rcirc")
;; (find-angg ".emacs.mini" "rcirc")
;; (to "erc-freenode-join")
;; (find-es "emacs" "rcirc")
;;
(code-c-d "rcirc" "~/usrc/rcirc/" "rcirc")
;; (add-to-list 'load-path "~/usrc/rcirc/")
;; (add-to-list 'load-path "~/usrc/rcirc/" 'append)
;; (find-rcircnode "")
;; (find-rcircnode "Configuration" "`chanserv'")

;; (require 'rcirc)
;; (require 'rcirc nil 'no-error)
;; (find-fline "~/.passwds.sh")
;; (find-sh0 "~/.passwds.sh libera")

;; (find-rcircnode "Configuration" "rcirc-default-user-name")
;; (find-rcircnode "Configuration" "rcirc-default-full-name")
;; (find-rcircnode "Configuration" "rcirc-authinfo")
;; (find-evariable 'rcirc-scroll-show-maximum-output)
(setq rcirc-default-user-name      "Eduardo Ochs <http://anggtwu.net/>")
(setq rcirc-default-user-full-name "Eduardo Ochs <http://anggtwu.net/>")
(setq rcirc-default-full-name      "Eduardo Ochs <http://anggtwu.net/>")
(setq rcirc-authinfo
      `(("libera" nickserv "edrx" ,(find-sh0 "~/.passwds.sh libera"))
	))

(defun rcirc-defs () (interactive)
  (require 'rcirc)
  (rcirc-track-minor-mode 1)
  (setq rcirc-read-only-flag nil)
  (setq rcirc-time-format "")
  (setq                      rcirc-prompt "(%n) ")
  (set-face-foreground      'rcirc-prompt "sienna")
  (make-face                'rcirc-mode-line-nick)
  (set-face-bold-p          'rcirc-mode-line-nick nil)
  (set-face-foreground      'rcirc-mode-line-nick "sienna")
  (make-face                'rcirc-track-nick)
  (set-face-inverse-video-p 'rcirc-track-nick nil)
  (set-face-foreground      'rcirc-track-nick "sienna")
  (make-face                'rcirc-nick-in-message-full-line)
  (set-face-bold-p          'rcirc-nick-in-message-full-line nil)
  (setq                      rcirc-scroll-show-maximum-output nil)
  (global-set-key      [f2] 'rcirc-next-active-buffer)
  (define-key rcirc-mode-map (kbd "C-x C-s") 'ee-rcirc-save-buffer)
  )

(rcirc-defs)

;; (find-rcircfile "")
;; (find-rcircfile "rcirc.el")
;; (find-efunction 'save-buffer)
;; (find-efunction 'rename-buffer)
;; (find-elnode "Buffer File Name")
;; (find-elnode "Buffer File Name" "Command: set-visited-file-name")

;; «rcirc-save-buffer»  (to ".rcirc-save-buffer")
(defalias 'save-buffer-keep-buffer-name 'ee-rcirc-save-buffer)

(defun ee-rcirc-save-buffer (&rest args)
  "Like save-buffer, but doesn't changes the buffer name or the major mode."
  (interactive "p")
  (let ((bname (buffer-name))
	(change-major-mode-with-file-name nil))
    (save-excursion (apply 'save-buffer args))
    (rename-buffer bname)))

;; (find-ecolors)
;; (find-efaces "rcirc-special-modeline-face")
;; (find-efunction 'set-face-attribute)
;; (set-face-attribute  'rcirc-special-modeline-face nil :inherit 'mode-line)
;; (set-face-attribute  'rcirc-special-modeline-face nil :inherit nil)

;; «rcirc-channels»  (to ".rcirc-channels")

;; (find-freenode-links "e" "#eev")
;; (find-rcirc-intro)
(setq ee-freenode-ichannels "#eev")
(setq ee-freenode-achannels "#eev")
(setq ee-freenode-ichannels "#eev #emacs #emacsconf #emacs-beginners")
(setq ee-freenode-achannels "#eev #emacs #emacsconf #emacs-beginners")
(setq ee-freenode-ichannels "#eev #emacs #emacsconf #emacs-beginners #idris")
(setq ee-freenode-achannels "#eev #emacs #emacsconf #emacs-beginners #idris")
(setq ee-freenode-ichannels "#emacsconf #org-mode")
(setq ee-freenode-achannels "#emacsconf #org-mode")
(setq ee-freenode-ichannels "#eev #emacs #idris")
(setq ee-freenode-achannels "#eev #emacs #idris")
(setq ee-libera-ichannels "#eev #emacs #emacsconf #emacsconf-dev #emacsconf-gen")
(setq ee-libera-achannels "#eev #emacs #emacsconf #emacsconf-dev #emacsconf-gen")
(setq ee-libera-ichannels "#eev #emacs")
(setq ee-libera-achannels "#eev #emacs")

;; (defun e2 () (interactive) (find-freenode-2a "#eev"))
;; (defun e3 () (interactive) (find-freenode-3a "#eev"))
;; (defun m2 () (interactive) (find-freenode-2a "#emacs"))
;; (defun m3 () (interactive) (find-freenode-3a "#emacs"))
;; (defun h2 () (interactive) (find-freenode-2a "#haskell"))
;; (defun h3 () (interactive) (find-freenode-3a "#haskell"))
(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"))
(defun f2 () (interactive) (find-libera-2a "#fennel"))
(defun f3 () (interactive) (find-libera-3a "#fennel"))
(defun h2 () (interactive) (find-libera-2a "#haskell"))
(defun h3 () (interactive) (find-libera-3a "#haskell"))
(defun a2 () (interactive) (find-libera-2a "#agda"))
(defun a3 () (interactive) (find-libera-3a "#agda"))
(defun t2 () (interactive) (find-libera-2a "#tcl"))
(defun t3 () (interactive) (find-libera-3a "#tcl"))
(defun x2 () (interactive) (find-libera-2a "#maxima"))
(defun x3 () (interactive) (find-libera-3a "#maxima"))

(defun b2 () (interactive) (find-libera-2a "#emacs-beginners"))
(defun b3 () (interactive) (find-libera-3a "#emacs-beginners"))
(defun g2 () (interactive) (find-libera-2a "#git"))
(defun g3 () (interactive) (find-libera-3a "#git"))
(defun c2 () (interactive) (find-libera-2a "#emacsconf"))
(defun c3 () (interactive) (find-libera-3a "#emacsconf"))
(defun q2 () (interactive) (find-libera-2a "#emacsconf-questions"))
(defun q3 () (interactive) (find-libera-3a "#emacsconf-questions"))
(defun p2 () (interactive) (find-libera-2a "#python"))
(defun p3 () (interactive) (find-libera-3a "#python"))
(defun i2 () (interactive) (find-libera-2a "#idris"))
(defun i3 () (interactive) (find-libera-3a "#idris"))
(defun o2 () (interactive) (find-libera-2a "#org-mode"))
(defun o3 () (interactive) (find-libera-3a "#org-mode"))
(defun l2 () (interactive) (find-libera-2a "#lua"))
(defun l3 () (interactive) (find-libera-3a "#lua"))
(defun g2 () (interactive) (find-libera-2a "#grub"))
(defun g3 () (interactive) (find-libera-3a "#grub"))
(defun d2 () (interactive) (find-libera-2a "#dependent"))
(defun d3 () (interactive) (find-libera-3a "#dependent"))
(defun eb2 () (interactive) (find-libera-2a "#emacs-br"))
(defun eb3 () (interactive) (find-libera-3a "#emacs-br"))
(defun cl2 () (interactive) (find-libera-2a "#clschool"))
(defun cl3 () (interactive) (find-libera-3a "#clschool"))



;; «rcirc-spotchat»  (to ".rcirc-spotchat")
;; (find-es "mint" "irc-channel")
;; (find-spotchat-3a "#linuxmint-help")

(defvar ee-spotchat-server "irc.spotchat.org")

(defvar ee-spotchat-ichannels "#linuxmint-help"
  "The list of initial channels to connect to at spotchat.")

(defvar ee-spotchat-achannels nil
  "The list of channels that `find-spotchat' always reconnects to.
When this is nil act as if this was a copy of `ee-spotchat-ichannels'.")

(defun find-spotchat (&optional channel &rest pos-spec-list)
  "Connect to spotchat and switch to the buffer for channel CHANNEL.
This is like `find-rcirc-buffer', but uses the variables
`ee-spotchat-ichannels' and `ee-spotchat-achannels'."
  (apply 'find-rcirc-buffer
	  ee-spotchat-server
	  ee-spotchat-ichannels
	  ee-spotchat-achannels channel pos-spec-list))

(defun find-spotchat-2a (channel)
  (find-rcirc-buffer-2a ee-spotchat-server
			ee-spotchat-ichannels
			ee-spotchat-achannels
			channel))

(defun find-spotchat-3a (channel)
  (find-rcirc-buffer-3a ee-spotchat-server
			ee-spotchat-ichannels
			ee-spotchat-achannels
			channel))

;; See: (find-efunction 'eepitch)
;;      (find-efunction 'eepitch-to-buffer)
(defun eepitch-spotchat (channel)
  (interactive) (eepitch '(find-spotchat channel)))




;;;   ____ _              
;;;  / ___(_)_ __ ___ ___ 
;;; | |   | | '__/ __/ _ \
;;; | |___| | | | (_|  __/
;;;  \____|_|_|  \___\___|
;;;                       
;; «circe»  (to ".circe")
;; (find-es "circe" "circe-elpa")
;; (find-fline    "~/.emacs.d/elpa/circe-20190322.1242/")
(code-c-d "circe" "~/.emacs.d/elpa/circe-20190322.1242/")
;; (find-circefile "")

(setq circe-network-options
      `(("Freenode"
         :tls t
         :nick "edrx"
         :sasl-username "edrx"
         :sasl-password ,(find-sh0 "~/.passwds.sh freenode")
         :channels ("#emacs-circe")
         )))






;;---------------------------------------------------------------
;; a control panel for X (currently only for repeat speed and keymap)

;; «find-xkbprint»  (to ".find-xkbprint")
;; (eev "xkbprint $DISPLAY /tmp/o.ps; gv --orientation=seascape /tmp/o.ps &")
(defun find-xkbprint (&optional server psfile)
  "Display X's current keymap using xkbprint and gv (in background)."
  (if (not server) (setq server (ee-expand "$DISPLAY")))
  (if (not psfile) (setq psfile (ee-expand "~/o.ps")))
  (prog1 (find-sh0 (format "xkbprint %s %s" server psfile))
    (start-process "gv" "*Messages*"
		   "gv" "--orientation=seascape" psfile)))

;; «prep-X»  (to ".prep-X")
;; «prep-all»  (to ".prep-all")
(defun prep-X () (interactive) (find-angg ".emacs" "prep-X"))
(defun prep-all () (interactive) (find-angg ".emacs" "prep-all"))


;; «prep-X-kbdmap»  (to ".prep-X-kbdmap")
;; (find-man "setxkbmap")
;; My default:   (find-sh0 "setxkbmap -model pc104 -layout us")
;; US w/d.k.s:   (find-sh0 "setxkbmap -model pc104 -layout us_intl")
;; ABNT w/d.k.s: (find-sh0 "setxkbmap -model abnt2 -layout br -variant abnt2")
;; (find-xkbprint)
;;
;; Keymap captions:
;; My default:   "Group 1   Layout: pc/pc(pc104)+pc/us        Generic 104"
;; US w/d.k.s:   "Group 1   Layout: pc/pc(pc104)+pc/us_intl   Generic 104"
;; ABNT w/d.k.s: "Group 1   Layout: us(pc101)+br              Generic 101"

;; «prep-X-kbdrate»  (to ".prep-X-kbdrate")
;; (find-es "x" "X-kbdrate")
;; (find-man "1 xset" "repeat rate")
;; Default rate:         (find-sh0 "xset r rate")
;; My preferred setting: (find-sh0 "xset r rate 250 30")
;; Very fast:            (find-sh0 "xset r rate 250 75")

;; (find-angg ".Xdefaults")
;; (find-sh  "cd ~/eev-current/; ./eev-rctool prepare")
;; (find-sh0 "mkdir -p ~/tmp ~/usrc")

;; (find-angg ".Xdefaults")

;; «prep-X-font»  (to ".prep-X-font")
;; (find-sh "xlsfonts")
;; (find-sh "xlsfonts | grep -v ^-")
;; (find-sh "xlsfonts | grep ^terminus")
;; (find-sh "xlsfonts | grep ^terminus | grep bold")
;; (find-sh "xlsfonts | grep ^terminus | grep bold | grep 20\\$")
;; (set-frame-font "fixed")
;; (set-frame-font "terminus-iso8859-1-20")
;; (eev "ae -fn terminus-bold-20")
;; (find-sh0 "xfd -fn ")
;; (find-sh0 "xfd -fn terminus-bold-20")
;; (find-sh0 "xfd -fn terminus-iso8859-1-bold-20")




;;-------------
;; «gnus»  (to ".gnus")
;; (find-es "mail" "dovecot")
;; (find-gnusnode "Index")
;; (find-gnusnode "Index" "nnimap-authinfo-file")
;; (find-fline "~/.authinfo")
;; machine localhost login edrx password xxxx port imap

;; (find-fline "~/DTO/")
;; (find-fline "~/DTO/.gnus")

(code-c-d "gnus" (ee-efile "gnus/") "gnus")

;; (find-node "(gnus)Smileys")
(setq gnus-treat-display-smileys nil)

;; (setq user-mail-address "eduardoochs\100fastmail.fm")
;; (setq user-mail-address "edrx\100mat.puc-rio.br")
(setq user-mail-address "eduardoochs\100gmail.com")
(setq user-full-name "Eduardo Ochs")
(setq gnus-select-method '(nntp "news.gmane.org"))
(setq gnus-secondary-select-methods
      '((nnimap "localhost"
		(nnimap-authenticator login)
		(nnimap-authinfo-file "~/.authinfo")
		(nnimap-stream ssl))))

;; «gnus-quimby»  (to ".gnus-quimby")
;; (find-node "(gnus)Top")
;; (find-node "(gnus)Starting Up")
;; (find-node "(gnus)The First Time")
;; (find-node "(gnus)Startup Files")
;; (find-node "(gnus)Fetching a Group")
(setq gnus-select-method '(nntp "quimby.gnus.org"))
;; Already set:
;; user-full-name
;; user-mail-address

;; «lists.gnu.org»  (to ".lists.gnu.org")
;; http://lists.gnu.org/archive/html/index.html
;; (find-sh "cat  $S/http/lists.gnu.org/archive/html/index.html | grep listName")
;; (find-sh "sort $S/http/lists.gnu.org/archive/html/index.html | grep listName")

;; (find-es "gnus" "browse-foreign-server")
;; (gnus-group-browse-foreign-server '(nntp "quimby.gnus.org"))

;; «gnu.emacs.bugs»  (to ".gnu.emacs.bugs")
;; This group is at quimby and at gmane:
;; (setq gnus-select-method '(nntp "quimby.gnus.org"))
;;      (gnus-fetch-group   "gnu.emacs.bug")
;; http://lists.gnu.org/archive/html/bug-gnu-emacs/
;; (setq gnus-select-method '(nntp "news.gmane.org"))
;;      (gnus-fetch-group   "gmane.emacs.bugs")
;;     http://news.gmane.org/gmane.emacs.bugs
;; http://www.gnu.org/software/emacs/#HelpMailing

;; «gnu.emacs.sources»  (to ".gnu.emacs.sources")
;; This group is at quimby and at gmane:
;; (setq gnus-select-method '(nntp "quimby.gnus.org"))
;;      (gnus-fetch-group           "gnu.emacs.sources")
;; http://lists.gnu.org/archive/html/gnu-emacs-sources/
;; (setq gnus-select-method '(nntp "news.gmane.org"))
;;      (gnus-fetch-group   "gmane.emacs.sources")
;;     http://news.gmane.org/gmane.emacs.sources

;; (gnus-fetch-group   "gnu.emacs.sources")
;; (gnus-fetch-group "gmane.emacs.bugs")

;; «gnu.emacs.devel»  (to ".gnu.emacs.devel")
;; This group is not at quimby (afaik).
;; http://lists.gnu.org/archive/html/emacs-devel/
;; (setq gnus-select-method '(nntp "news.gmane.org"))
;;      (gnus-fetch-group   "gmane.emacs.devel")
;;     http://news.gmane.org/gmane.emacs.devel

;; (setq gnus-select-method '(nntp "quimby.gnus.org"))

;; «gmane.emacs.eev.devel»  (to ".gmane.emacs.eev.devel")
;; http://lists.gnu.org/archive/html/eev/
;; (setq gnus-select-method '(nntp "news.gmane.org"))
;;      (gnus-fetch-group   "gmane.emacs.eev.devel")
;;     http://news.gmane.org/gmane.emacs.eev.devel

;; «comp.lang.forth»  (to ".comp.lang.forth")
;; http://en.wikipedia.org/wiki/Nntp
;; http://www.dmoz.org/Computers/Usenet/Public_News_Servers/
;; http://www.freeusenetnews.com/newssrch.html?group=comp.lang.forth&active=1
;; (setq gnus-select-method '(nntp "dscnews2.dcccd.edu"))
;; (setq gnus-select-method '(nntp "news.cnusenet.org"))
;; (setq gnus-select-method '(nntp "web.aioe.org"))
;;      (gnus-fetch-group   "comp.lang.forth")



;; http://users.pepperfish.org/vivek/unihacks.el
;; http://www.kollektiv-hamburg.de/~forcer/unicode-helper.el
;; http://www.emacswiki.org/cgi-bin/wiki/UnicodeHelperMode



;; «super-key»  (to ".super-key")
;; (find-elnode "Other Char Bits" "super")
;; (global-set-key (kbd "s-s") 'scroll-bar-mode)
;; (find-esetkey-links (kbd "s-m") 'menu-bar-mode)
;; https://www.emacswiki.org/emacs/FullScreen
(global-set-key (kbd "s-s") 'toggle-scroll-bar)
(global-set-key (kbd "s-t") 'tool-bar-mode)
(global-set-key (kbd "s-m") 'menu-bar-mode)
(global-set-key (kbd "s-f") 'toggle-frame-fullscreen)
(global-set-key (kbd "s-x") 'toggle-frame-maximized)
(global-set-key (kbd "s-d") 'display-time-mode)
(global-set-key (kbd "s-b") 'blink-cursor-mode)
(global-set-key (kbd "s-w") 'wrap)


(defalias 'sbm 'scroll-bar-mode)

;; s-0 -> C-x 0 -> delete-window
;; s-1 -> C-x 1 -> delete-other-windows
;; s-2 -> C-x 2 -> split-window-vertically
;;
(global-set-key (kbd "s-0") 'delete-window)           ; (eek "M-h M-k C-x 0")
(global-set-key (kbd "s-1") 'delete-other-windows)    ; (eek "M-h M-k C-x 1")
(global-set-key (kbd "s-2") 'split-window-vertically) ; (eek "M-h M-k C-x 2")
(global-set-key (kbd "s-3") 'split-window-horizontally) ; (eek "M-h M-k C-x 3")
(global-set-key (kbd "s-o") 'other-window)            ; (eek "M-h M-k C-x o")
(global-set-key (kbd "s-,") 'prev-buffer)         ; (eek "M-h M-k C-x <left>")
(global-set-key (kbd "s-.") 'next-buffer)         ; (eek "M-h M-k C-x <right>")

;; (global-set-key "\M-s" 'search-forward)




;; (defun ei ()
;;   (interactive)
;;   (find-eevfile "doc/eev.texi")
;;   (find-estring
;;    (format "%s\n%S"
;;            (find-sh0 "cd ~/eev-current/doc/; makeinfo eev")
;;            ' (find-node "(eev)Top")
;;            )))


;; «hh»  (to ".hh")
;; (find-angg ".zshrc" "hh")
;; http://article.gmane.org/gmane.emacs.eev.devel/22
;; http://lists.gnu.org/archive/html/eev/2005-07/msg00019.html
(defun hh ()
  (interactive)
  (find-fline "$EEVTMPDIR/hh"))



;; Experimental - an alternative to `to'.
;; 2005aug08. Try these:
;; (index "foo")
;; (index "foo")
;; (index "foo")
' (defun index (str)
    (let ((bigstr (format "(index %S)" str)))
      (or (search-forward bigstr nil 'no-error)
	  (ee-goto-position bigstr))))


(defun unfill-paragraph (&optional arg)
  (interactive "P")
  (let ((fill-column (or arg 99999))) (fill-paragraph nil)))
;;
(global-set-key (kbd "M-Q") 'unfill-paragraph)

;; Recommended by dto:
' (add-hook 'find-file-hook 'auto-insert)

(defun downcase-to-eol ()
  (interactive)
  (downcase-region (point) (point-at-eol)))




;;;;;;
;;
;; find-eregion, find-eunicodeucs
;; 2005aug16
;;
;;;;;;

;; (find-fline "$VWT/o.el")

(defun find-eregion (s e &rest rest)
  (interactive "r")
  (apply 'find-estring (buffer-substring s e) rest))

(defun find-ebuffer-or-output (ee-buffer-name code &rest rest)
  (if (get-buffer ee-buffer-name)
      (apply 'find-ebuffer ee-buffer-name rest)
    (apply 'find-eoutput code rest)))

(defun ee-find-cd-sh (dir command &rest pos-spec-list)
  (find-ebuffer-or-output
   (format "cd %s; %s" dir command)
   `(progn (cd (ee-expand ,dir))
	   (insert (shell-command-to-string ,command))
	   (goto-char (point-min)))
   pos-spec-list))

;; «find-eunicode»  (to ".find-eunicode")
;; «find-eunicodeucs»  (to ".find-eunicodeucs")
;; Moved to:
;;   (find-eev "eev-blinks.el" "find-eunicode")
;; Inspired by:
;;   http://www.kollektiv-hamburg.de/~forcer/unicode-helper.el
;;   https://www.emacswiki.org/emacs/UnicodeHelperMode

(defun ee-to-ucs-link (c)
  (if (>= c 256)
      (format ";; %04X (find-eunicodeucs ?%c)\n"
	      (encode-char c 'ucs) c)
    ""))
(defun eeucs (s e)
  (interactive "r")
  (find-estring (mapconcat 'ee-to-ucs-link (ee-se-to-string s e) "")))


;; (find-elnode "Syntax Tables")
;; (find-esyntaxtable blogme-mode-syntax-table)
;; (find-esyntaxtable text-mode-syntax-table)
;; (find-eapropos "syntax-table")
(defun find-esyntaxtable (syntax-table &rest ignore)
  (with-syntax-table syntax-table (describe-syntax)))





;; (find-enode "Expanding Abbrevs" "`C-x a e'")
;; (find-enode "Defining Abbrevs" "M-x define-global-abbrev")
(define-global-abbrev "tabular" "\\begin{tabular}{ll}\n\\end{tabular}\n")
(define-global-abbrev "array" "\\begin{array}{ll}\n\\end{array}\n")
;;
' (eesteps '((find-estring "tabular")
	     (eek "C-e")
             (eek "C-x a e")))


;; (defun code-ps (code psfile)
;;   (ee-eval-read-format
;;    "(defun find-%spage (&optional n &rest comments) (interactive)
;;        (find-pspage %S n))"
;;    code psfile))

;; (defun code-dvi (code dvifile)
;;   (ee-eval-read-format
;;    "(defun find-%spage (&optional n &rest comments) (interactive)
;;        (find-dvipage %S n))"
;;    code dvifile))

;; «diagxy»  (to ".diagxy")
;; (find-angg ".emacs.papers" "diagxy")
;; (find-es "xypic" "diagxy")
(code-c-d       "diagxy" "~/usrc/diagxy/")
(code-dvi       "diagxy" "~/usrc/diagxy/diaxydoc.dvi")
(code-pdftotext "diagxy" "~/usrc/diagxy/diaxydoc.pdf")
;; (find-efunction 'find-dvipage)
;; (find-efunction 'find-dvipagenow)
;; (find-diagxypage)
;; (find-diagxyfile "")
;; (find-diagxypage 25)
;; (find-diagxyfile "diaxydoc.tex" "\\two/<-`->/<100>")

;; (find-sh "locate diagxy")
;; (find-sh "locate diaxydoc")
(code-c-d      "diagxy" "/usr/local/texlive/2019/texmf-dist/doc/generic/barr/")
(code-xpdf     "diagxy" "/usr/local/texlive/2019/texmf-dist/doc/generic/barr/diaxydoc.pdf")
(code-pdf-text "diagxy" "/usr/local/texlive/2019/texmf-dist/doc/generic/barr/diaxydoc.pdf")
;; (find-diagxyfile "")
;; (find-diagxypage)
;; (find-diagxytext)

;; «diaxydoc-and-barrdoc»  (to ".diaxydoc-and-barrdoc")
;; (find-es "dednat" "diaxydoc-and-barrdoc")
;; http://tug.ctan.org/tex-archive/macros/latex/contrib/xypic/doc/barrdoc.pdf
;; (find-fline "/usr/local/texlive/2018/texmf-dist/doc/generic/barr/")
;; (find-fline "/usr/local/texlive/2018/texmf-dist/doc/generic/xypic/")
;;
(code-pdf-page "diaxydoc" "/usr/local/texlive/2019/texmf-dist/doc/generic/barr/diaxydoc.pdf")
(code-pdf-text "diaxydoc" "/usr/local/texlive/2019/texmf-dist/doc/generic/barr/diaxydoc.pdf" 0)
(code-pdf-page "barrdoc"  "/usr/local/texlive/2019/texmf-dist/doc/generic/xypic/barrdoc.pdf")
(code-pdf-text "barrdoc"  "/usr/local/texlive/2019/texmf-dist/doc/generic/xypic/barrdoc.pdf" 0)
;; (find-diaxydocpage)
;; (find-diaxydoctext)
;; (find-barrdocpage)
;; (find-barrdoctext)
;; (find-diaxydocpage 1 "Version 2015-09-26")
;; (find-diaxydoctext 1 "Version 2015-09-26")
;; (find-barrdocpage  1 "Version 2011-06-18")
;; (find-barrdoctext  1 "Version 2011-06-18")
;; (find-barrdocpage  2 "\\usepackage[barr,pdf]{xy}")
;; (find-barrdoctext  2 "\\usepackage[barr,pdf]{xy}")
;; (find-diaxydocpage 3 "so that \\node lays down ink")
;; (find-diaxydoctext 3 "so that \\node lays down ink")
;; (find-diaxydocpage 19 "4.1     Nodes and arrows")
;; (find-diaxydoctext 19 "4.1     Nodes and arrows")
;; (find-barrdocpage 20 "5.1    Nodes and arrows")
;; (find-barrdoctext 20 "5.1    Nodes and arrows")
;; (find-barrdocpage 24 "5.3    Empty placement and moving labels")
;; (find-barrdoctext 24 "5.3    Empty placement and moving labels")
;; (find-barrdocpage 33 "5.9   A few samples")
;; (find-barrdoctext 33 "5.9   A few samples")





;; «libgtk-docs»  (to ".libgtk-docs")
;; (find-angg ".eev/HELP-gtk")
;; (find-status   "libgtk2.0-doc")
;; (find-vldifile "libgtk2.0-doc.list")
;; (find-udfile   "libgtk2.0-doc/")
;; (find-libgtkdocfile "")
(code-c-d "libgtkdoc" "/usr/share/doc/libgtk2.0-doc/")
(code-c-d "gdkdoc"    "/usr/share/doc/libgtk2.0-doc/gdk/")
(code-c-d "gtkdoc"    "/usr/share/doc/libgtk2.0-doc/gtk/")
(code-c-d "gtkfaqdoc" "/usr/share/doc/libgtk2.0-doc/gtk-faq/")
(code-c-d "gtktutdoc" "/usr/share/doc/libgtk2.0-doc/gtk-tutorial/")
;; (find-gdkdocfile "")
;; (find-gtkdocfile "")
;; (find-gtkfaqdocfile "")
;; (find-gtktutdocfile "")
;; (find-gdkdocw3m "index.html")
;; (find-gdkdocw3m "ix01.html")
;; (find-gtkdocw3m "index.html")
;; (find-gtkdocw3m "ix01.html")
;; (find-gtkfaqdocw3m "book1.html")
;; (find-gtktutdocw3m "book1.html")



;; (find-es "lua5" "pil")
;; (find-pilw3m "index.html")
;; (find-pilw3m "4.3.5.html" "Generic for")
(code-c-d "pil" "$S/http/www.lua.org/pil/")


(seen 5352)

(seen 5500)


(seen 5511)


(code-c-d "luagtk" "~/usrc/lua-gtk2-0.3/")
;; (find-luagtkfile "")
;; (find-es "lua5" "luagtk")
;; (find-es "lua5" "luagtk_pixmaps")


;; (find-eevfile "eev-langs.el" "ee-gdb-start")
;; (find-eevfile "eev.el" "setq code-c-d-keywords")

;; (defun ee-gdb-start (dir &optional fname)
;;   (if (= emacs-major-version 21)
;;       (gdb (format "gdb %s%s" dir (or fname "")))
;;     (gdb (format "gdb --annotate=3 %s%s" dir (or fname ""))))
;;   (eegud-keys-mode))

;; (defun eeb-gdb-start (dir &optional fname)
;;   (eegdb-bounded)
;;   (ee-gdb-start dir fname))

;; (add-to-alist 'code-c-d-keywords
;;   '(:gdb
;;     (ee-eval-read-format "
;;        (defun eeb-%sgdb-start (&optional fname)
;;          (ee-use-%s-tags)
;;          (eeb-gdb-start ee-%sdir fname))" c c c)
;;     (code-c-d-rest (cdr rest))))

(code-dvi "uff" "~/LATEX/2005oct20-seminar.dvi")
;; (code-c-d "uff" "~/LATEX/")
(defun find-uff (&rest rest) (interactive)
  (apply 'find-anchor "~/LATEX/2005oct20-seminar.tex" rest))

;; (find-uffpage 1)
;; (find-uff)

(code-dvi "2002cms"  "$S/http/anggtwu.net/math/2002cms.dvi.gz")
(code-dvi "2002fmcs" "$S/http/anggtwu.net/math/2002fmcs.dvi.gz")
;; (find-2002cmspage)
;; (find-2002fmcspage)



;; «color-theme»  (to ".color-theme")
;; (find-fline "~/elisp/color-theme.el")
;; (find-fline "~/DTO/color-theme-stanley-mk91.el")
;;
;; (require 'color-theme)
;; (load "~/DTO/color-theme-stanley-mk91.el")
;; (color-theme-stanley-mk91)

(defun color-theme-snap (name)
  "Write this color theme to a snapshot file."
  (interactive "MName of color-theme: ")
  (let* ((theme  (concat "color-theme-" name))
	 (file (concat dto/eefolder "/" theme ".el")))
    (progn (color-theme-print)
	   (replace-string "my-color-theme" theme)
	   (write-file file nil)
	   (eval-buffer))))


(seen 5599)

;; «my-make-face»  (to ".my-make-face")
;; (find-efaces)
;; (find-efacedescr 'variable-pitch)
;; (find-node "(elisp)Face Attributes")
;;
(defun my-make-face (face frame &rest args)
  (make-face face)
  (face-spec-reset-face face frame)
  (apply 'set-face-attribute face frame args)
  face)

;; (my-make-face 'my-face nil :foreground "#ffbc03" :inherit 'variable-pitch)
;; (put-text-property (point) (ee-search-forward "\n;;-\n") 'face 'my-face)
;; Blah Blah Blah
;;-

;; «myxpm»     (to ".myxpm")
;; «find-xpm»  (to ".find-xpm")
;; (find-angg "elisp/myxpm.el")
(autoload 'find-myxpm        "myxpm" nil t)
(autoload 'find-myxpmscaled  "myxpm" nil t)
(autoload 'find-myxpmscaled+ "myxpm" nil t)





;; (find-sh0 "convert ~/.eev/ee.xpm /var/www/favicon.ico")
;; (find-sh0 "convert ~/.eev/ee.xpm ~/favicon.ico")
;; (find-sh0 "convert ~/.eev/ee.xpm ~/eev-current/favicon.png")
;; (find-sh0 "display /var/www/favicon.ico")




;;;;;;
;;
;; Links for a symbol
;;
;;;;;;

;; (find-elnode "Symbol Components" "The four functions")
;; Links for a symbol: the four cells of the symbol, apropos, its
;; entry in the elisp manual, maybe its entries at the emacs manual
;; too... are there any alists or stuff the define where they have
;; been defined?




;;;;;;
;;
;; Links to all the active keymaps (minor modes, major, etc)
;; 2005nov11
;;
;;;;;;

;; (find-elnode "Minor Modes")
;; (find-elnode "Keymaps and Minor Modes")
;; (find-elnode "Active Keymaps")
;; (ee-active-minor-modes-having-keymaps)
;; (ee-minor-mode-keymap 'eev-mode)
;; (find-eminormodekeymapdescr 'eev-mode)
;; (find-ekeymapdescr (ee-minor-mode-keymap 'eev-mode))

;; Moved to eev.el
;; (defun ee-minor-mode-keymap (mode-symbol)
;;   (cdr (assq mode-symbol minor-mode-map-alist)))

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

' (defun find-eminormodekeymapdescr (mode-symbol &rest rest)
    (apply 'find-ekeymapdescr (ee-minor-mode-keymap mode-symbol) rest))

(defun ee-active-minor-modes-having-keymaps ()
  (delq nil (mapcar (lambda (m) (if (symbol-value m) m))
		    (mapcar 'car minor-mode-map-alist))))

;; (find-efunctionpp 'howm-view-summary-mode)
;; (find-howmfile "howm-view.el" " howm-view-summary-mode")
;; (find-efunctiond 'fundamental-mode)
;; (find-efunctiond 'emacs-lisp-mode)

;; Missing: a find-xxx-links function that creates links to the major
;; mode (symbol, pp, d, etc), to its keymap, and to all the keymaps of
;; active minor modes

;; Idea: I can use local variables at the *elisp hyperlinks* buffer to
;; store variables from the buffer where we came from... I need a
;; prefix for those vars.

(seen 5688)



;;;;;;
;;
;; ee-other-buffer
;; 2005nov12
;;
;;;;;;

;; (with-current-buffer nil default-directory)
;; (with-current-buffer "tmp" default-directory)
;; (setq ee-other-buffer "...")
;; (find-xxx (ee-other-buffer ...))

(defvar ee-other-buffer nil)
(make-variable-buffer-local 'ee-other-buffer)

(defmacro ee-other-buffer (&rest sexps)
  `(with-current-buffer ee-other-buffer . ,sexps))



;; (find-angg ".emacs.local.w32")
(when (eq window-system 'w32)
  (load-library  "~/.emacs.local.w32"))


;; «squeak»  (to ".squeak")
;; (find-es "squeak")
;; (find-angg ".zshrc" "mysqueak")
(code-c-d "squeak"       "~/SQUEAK/")
(code-c-d "squeakshared" "~/SQUEAK/Squeak5.3-19459-64bit-202003021730-Linux/shared/")
(code-c-d "squeakshared" "~/SQUEAK/Squeak6.0-22104-64bit-202206021410-Linux-x64/shared/")
(code-c-d "squeakshared" "~/SQUEAK/Squeak6.0-22104/shared/")
;; (find-squeakfile "")
;; (find-squeaksharedfile "")

;; (find-books "__comp/__comp.el" "squeak-by-example")
;; (find-es "squeak" "etoys")
(code-pdf-page "squeakbyex" "$S/http/anggtwu.net/SQUEAK/squeak-by-example-5.3.pdf")
(code-pdf-text "squeakbyex" "$S/http/anggtwu.net/SQUEAK/squeak-by-example-5.3.pdf" 16)
(code-pdf-page "etoysqg" "$S/http/www.squeakland.org/content/articles/attach/The_Etoys_Quick_Guides.pdf")
(code-pdf-text "etoysqg" "$S/http/www.squeakland.org/content/articles/attach/The_Etoys_Quick_Guides.pdf")
;; (find-etoysqgpage)
;; (find-etoysqgtext)


;; «smalltalk»  (to ".smalltalk")
;; (find-es "smalltalk" "gnu-smalltalk")
;; (find-es "squeak")
(code-c-d "gst"     "/usr/share/gnu-smalltalk/" "gst")
(code-c-d "gstbase" "/usr/share/gnu-smalltalk/" "gst-base")
(code-c-d "gstlibs" "/usr/share/gnu-smalltalk/" "gst-libs")
;; (find-gstfile "")
;; (find-gstfile "examples/")
;; (find-gstfile "examples/README")
;; (find-gstnode "")
;; (find-gstnode "Invocation")
;; (find-gstnode "Syntax")
;; (find-gstnode "Namespaces")
;; (find-gstnode "Disk file-IO")
;; (find-gstnode "Blox")
;; (find-gstnode "Seaside")
;; (find-gstnode "SUnit")
;; (find-gstnode "Editing")
;; (find-gstnode "Interactor")
;; (find-gstnode "Tutorial")
;; (find-gstnode "Files")
;; (find-gstnode "Arrays")
;; (find-gstnode "Dictionaries")
;; (find-gstlibsnode "BLOX package")
;; (find-gstbasenode "Array")

;; (code-c-d "gst" "~/usrc/smalltalk-2.1.9/" "~/usrc/smalltalk-2.1.9/doc/gst")
;; (code-c-d "gstlibs" "" "~/usrc/smalltalk-2.1.9/doc/gst-libs")
;; (code-c-d "gstbase" "" "~/usrc/smalltalk-2.1.9/doc/gst-base")
;; (find-gstnode "")
;; (find-gstlibsnode "")
;; (find-gstbasenode "")
;; (find-gstbasenode "Base classes")
;; (find-gstnode "Arrays")
;; (find-gstnode "Math in Smalltalk")

;; For gst and smalltalk-mode:
;; (find-gstfile "")
;; (find-gstfile "smalltalk-mode.el")
;; (find-gstfile "gst-mode.el")
;; (add-to-list 'load-path "~/usrc/smalltalk-2.1.9/")
;; (autoload 'smalltalk-mode "smalltalk-mode" nil t) ; GNU SmallTalk
;; (autoload 'gst            "gst-mode" nil t)       ; GNU SmallTalk

;; «visualworks»  (to ".visualworks")
;; (find-es "smalltalk" "visualworks")
(code-c-d "visualworksdoc" "~/vw7.8nc/doc/")
;; (find-visualworksdocfile "")
(code-xpdf      "vwwalkthrough" (ee-visualworksdocfile "WalkThrough.pdf"))
(code-pdftotext "vwwalkthrough" (ee-visualworksdocfile "WalkThrough.pdf"))
;; (find-vwwalkthroughpage      3  "Contents")
;; (find-vwwalkthroughpage (+ 1 1) "Index")
;; (find-vwwalkthroughtext "")

(code-xpdf      "vwinstall" "~/vw7.8nc/Install.pdf")
(code-pdftotext "vwinstall" "~/vw7.8nc/Install.pdf")
;; (find-vwinstallpage      3  "Contents")
;; (find-vwinstallpage      9  "Running the VisualWorks Installer")
;; (find-vwinstallpage     13  "Launching from the Command Line")
;; (find-vwinstallpage (+ 1 1) "Index")
;; (find-vwinstalltext "")



;; (car grep-history)
;; (find-grep ee-preemgstondir "grep -niH -e bprra *")
;; (find-code-c-d "preemgston" "~/src/mvgest/preemgston/" :grep)



;; For some reason in W$ f10 is bound to something else.
;;
(global-set-key (kbd "<f10>") 'tmm-menubar)



;; (find-angg ".emacs" "date")
(defun org-today-file-name (&optional date)
  (format "~/ORG/%s.org" (downcase (format-time-string "%Y-%m-%d"))))

(defun coding-footer () (interactive)
  (insert (format (concat
   "\n"
   "%sLocal Variables:\n"
   "%scoding: %S\n"
   "%sEnd:\n")
   ee-hyperlink-prefix ee-hyperlink-prefix buffer-file-coding-system
   ee-hyperlink-prefix)))

(defun org-footer () (interactive)
  (insert
   "\n"
   "* Local variables:\n"
   "\f\n"
   "#  Local Variables:\n"
   "#  coding: raw-text-unix\n"
   "#  modes: (my-org-mode emacs-lisp-mode)\n"
   "#  End:\n"))

(defun c-footer () (interactive)
  (insert
   "\n\f\n"
   "/*\n"
   " * Local variables:\n"
   " * coding: raw-text-unix\n"
   " * c-file-style: \"ellemtel\"\n"
   " * End:\n"
   " */\n"
   ))


;; «terminus» (to ".terminus")
;; Tests:
;; (set-frame-font "5x7" t)
;; (set-frame-font "6x13" t)
;; (ee-set-font-terminus 320)
;; (ee-set-font-terminus 200)
;; (ee-set-font-terminus 160)
;;
(defun ee-set-font-terminus (height)
  (set-frame-font "6x13" t)   ; to override the last ee-set-frame-font
  (set-face-attribute 'default nil :height height)
  (set-face-attribute 'default nil :family "Terminus"))




;; «find-sidebyside»  (to ".find-sidebyside")
(defun find-sidebyside (sexp1 sexp2)
  (eek "C-x 1")       (eval sexp1)
  (eek "C-x 3 C-x o") (eval sexp2))

' (find-sidebyside
   ' (find-rfcfile "rfc3550.txt")
   ' (find-rfcfile "rfc3551.txt")
     )

;; «eejump-define»  (to ".eejump-define")
;; «eejump-plists»  (to ".eejump-plists")
;; «eejump»  (to ".eejump")
;; (define-key eev-mode-map "\M-j" 'eejump)
;; (find-eev "eejump.el" "eejump-*")
(require 'eejump)

;; (defun eejump-* () (find-efunction 'eejump-*))
(defun eejump-1*  () (find-efunction 'eejump-1*))
(defun eejump-10  () (ee-set-frame-font "5x7"   t))
(defun eejump-11  () (ee-set-frame-font "fixed" t))
(defun eejump-11  () (ee-set-frame-font "6x13" t))
(defun eejump-110 ()    (set-frame-font "6x13" t))
;; (defun eejump-15  () (ee-set-font-terminus 180))
;; (defun eejump-16  () (ee-set-font-terminus 200))
;; (defun eejump-17  () (ee-set-font-terminus 320))
(defun eejump-14  () (set-frame-font "Monospace 14" t))
(defun eejump-16  () (set-frame-font "Monospace 16" t))
(defun eejump-111 () (find-wset "12_o_" '(eejump-1) '(eejump-0)))

(defun eejump-2* () (find-efunction 'eejump-2*))

;; (defun eejump-24* () (find-efunction 'eejump-24*))
;; (defun eejump-24  () (find-blogme4 ""))
;; (defun eejump-240 () (find-blogme4 "README"))
;; (defun eejump-241 () (find-blogme4 "blogme4.lua"))
;; (defun eejump-242 () (find-blogme4 "Makefile"))
;; (defun eejump-244 () (find-blogme4 "anggdefs.lua"))
;; (defun eejump-245 () (find-blogme4    "elisp.lua"))
;; (defun eejump-246 () (find-blogme4 "angglisp.lua"))
;; (defun eejump-248 () (find-blogme4 "doc/blogme4.b4texi"))
;; (defun eejump-249 () (find-blogme4 "doc/eev.b4texi"))

(defun eejump-23  () (find-blogme3 ""))
(defun eejump-24  () (find-blogme3 "anggdefs.lua"))
;; (defun eejump-25  () (find-blogme3 "youtube.lua"))
;; (defun eejump-255 () (find-TH "videos-locais"))
(defun eejump-26  () (find-blogme3 "anggmake.lua"))
;; (defun eejump-200 () (find-angg "TH/blogme3.blogme"))

;; (defun eejump-235 () (find-blogme3    "elisp.lua"))
;; (defun eejump-236 () (find-blogme3 "angglisp.lua"))

(defun eejump-20  () (find-booksfile ""))
(defun eejump-201 () (find-booksfile "__alg/__alg.el"))
(defun eejump-202 () (find-booksfile "__analysis/__analysis.el"))
(defun eejump-203 () (find-booksfile "__cats/__cats.el"))
(defun eejump-204 () (find-booksfile "__comp/__comp.el"))
;; (defun eejump-205 () (find-booksfile "__etc/__etc.el"))
;; (defun eejump-206 () (find-booksfile "__gender/__gender.el"))
;; (defun eejump-206 () (find-booksfile "__frege/__frege.el"))
;; (defun eejump-207 () (find-booksfile "__habermas/__habermas.el"))
(defun eejump-208 () (find-booksfile "__logic/__logic.el"))
;; (defun eejump-209 () (find-booksfile "__modal/__modal.el"))
(defun eejump-210 () (find-booksfile "__phil/__phil.el"))
;; (defun eejump-211 () (find-booksfile "__piaget/__piaget.el"))
;; (defun eejump-212 () (find-booksfile "__politics/__politics.el"))
;; (defun eejump-213 () (find-booksfile "__shibari/__shibari.el"))
;; (defun eejump-204 () (find-angg "TH/blogme3-angg.blogme"))
  ;;
  ;; (find-blogme3 "lstoindexhtml.lua")
  ;; (find-blogme3 "notes.e.lua")
  ;; (find-blogme3 ".files.sh")
  ;; (find-blogme3 "Makefile")
  ;;
  ;; 24 (find-TH "emacs"  "a-2D-map-of-eev")
  ;; 241 (find-angg "DAVINCI/intro.lua")
  ;; 242 (find-angg "TH/davinci.blogme")
  ;; 25  (find-es   "iup")

(defun eejump-3* () (find-efunction 'eejump-3*))
(defun eejump-30 () (find-es "lua5"))
(defun eejump-300 () (find-angg "LUA/lua50init.lua"))
;; (defun eejump-301 () (find-angg "eev-puro/mini-lua-intro.e"))
;; (defun eejump-302 () (find-dn5 "eoo.lua"))
(defun eejump-3000 () (find-es "lua-intro"))
;; (defun eejump-3001 () (find-es "lua-intro"))
;; (defun eejump-302 () (find-es "lua-intro" "bytecode:captures"))
(defun eejump-31 () (find-es "lua5" "lpeg-quickref"))
;; (defun eejump-34 () (find-TH "dednat4"))
;; (defun eejump-36 () (find-TH "dednat6"))
  ;; (defun eejump-32 () (find-angg "eev-puro/"))
  ;; 32 (find-angg "LUA/middle-c.lua")
  ;; 33 (find-angg "peek/ctypes.lua")
  ;; (defun eejump-33 () (find-angg "peek/ctypes2.lua"))
  ;; (defun eejump-34 () (find-LATEX "2011ebl-abs.tex"))
  ;; (defun eejump-35 () (find-LATEX "2011ebl-slides.tex"))
  ;; (defun eejump-36 () (find-fline "~/tmp/abstract_EBL_2011_ochs.tex"))
  ;; 32 (find-angg "CV/cv-edrx-2008-pt.tex")
  ;; 33 (find-miniforth "miniforth5.lua")
  ;; 34  (find-angg "TH/miniforth-article.blogme")
  ;; 333 (find-miniforth "miniforth6.lua")
  ;; 33  (find-es "lua5" "xpcall")
  ;; 333 (find-fline "~/ORG/Categories.org")
  ;; 34  (find-es "kepler")
  ;; 34 (find-fline "$S/http/primero.ricilake.net/lua/ldb.lua")
  ;; 37  (find-angg "LUA/luatclbridge.c")
  ;; (defun eejump-37 () (find-angg "CV/cv-edrx-2010-pt.tex"))
  ;; (defun eejump-377 () (find-angg "LUA/interactive.lua"))
  ;; (defun eejump-38 () (find-angg "TH/luainteractive.blogme"))
  ;; (defun eejump-384 () (find-angg "LATEX/chaui-hch.tex"))
  ;; (defun eejump-39 () (find-angg "elisp/cheap-face.el"))

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

(defun eejump-4* () (find-efunction 'eejump-4*))
(defun eejump-4  () (find-angg ".zshrc"))
;; (defun eejump-44 () (find-dn4 ""))
;; (defun eejump-44 () (find-angg "quadradinho/"))
;; (defun eejump-444 () (find-angg "quadradinho/quadradinho-texto.tex"))
;; (defun eejump-4444 () (find-xpdfpage "~/quadradinho/quadradinho-a5.pdf"))
;; (defun eejump-445 () (find-angg "quadradinho/quadradinho-a5.tex"))
;; (defun eejump-446 () (find-angg "quadradinho/quadradinho-print.tex"))
;; (defun eejump-42 () (find-angg "LATEX/2009dnc-in-coq.tex"))
;; (defun eejump-43 () (find-TH "math-b"))
;; (defun eejump-433 () (find-xpdfpage "~/PURO/diarios_de_classe/dclas_2009-10-C2.pdf"))
  ;44  (find-es "netbsd" "cvs-emacs-at-caramelo")
  ;44  (find-dn4 "dednat4.el")
  ;; (defun eejump-444 () (find-dn4 "dednat4.lua"))
  ;(defun eejump-44 () (find-dn4 "experimental.lua"))
;; (defun eejump-443 () (find-dn4 "Makefile" "dednat4" "make cleanscripts"))
;; (defun eejump-4433 () (find-sh  "cd ~/dednat4/; make cleanscripts; make S=$S scripts"))
 ;; (defun eejump-445 () (find-dn4 "examples/"))
;; (defun eejump-456 () (find-dn5 "dednat6.lua"))
;; (defun eejump-46  () (find-gab "gab.lua"))
;; (defun eejump-47  () (find-gab "gab-tests.lua"))
  ;; 46   (find-dn5 "gab.lua")
  ;; 47   (find-dn5 "gab-tests.lua")
  ;; 46   (find-dn5 "gabriela.lua")
  ;; 47   (find-dn5 "gabriela-app.lua")
;; (defun eejump-49 () (find-3 '(find-gab "gab.lua") '(find-gab "gabriela-tests.lua")))
;; (defun eejump-452 () (find-3 '(find-blogme4 "build.lua") '(find-dn5 "build.lua")))
;; (defun eejump-455 () (find-dn5 "dednat5.lua"))
;; (defun eejump-456 () (find-dn5 "tests/"))
;; (defun eejump-453 () (find-dn5 "tests/test3.tex"))
(defun eejump-46 () (find-dn6 "dednat6.lua"))
(defun eejump-44 () (find-dednat6 ""))
;; (defun eejump-466 () (find-dn6 "tests/"))
;; (defun eejump-44 () (find-dn6 "tests/4.tex"))
;; (defun eejump-45 () (find-dn6 "tests/5.tex"))
;; (defun eejump-48 () (find-dn4ex "edrx08.sty"))
;; (defun eejump-49 () (find-LATEX "edrx15.sty"))

(defun eejump-5*  () (find-efunction 'eejump-5*))
;; (defun eejump-50 () (find-eev-intro))
(defun eejump-51 () (find-eev "eev-intro.el"))
;;
;; (defun eejump-500 () (find-eevfile "eejump.el" "eejump-*"))
;; (defun eejump-511 () (find-eev "eev-code.el"))
;; (defun eejump-51 () (find-angg "TEXINFO/eev.texi.lua"))
;; (defun eejump-511 () (find-TH   "2011-maio"))
(defun eejump-512 () (find-TH   "2011-cuv-quorum"))
	;; 511 (find-node "(eev)introduction")
;; (defun eejump-508 () (find-dn4ex "edrx08.sty"))
(defun eejump-52  () (find-angg ".emacs.papers"))
(defun eejump-53  () (find-angg ".emacs.templates"))
(defun eejump-54  () (find-angg ".emacs.audios"))
(defun eejump-57  () (find-angg ".emacs.videos"))
;; (defun eejump-535 () (find-eev "eev-mini-steps.el"))
;; (defun eejump-545 () (find-eev "eepitch.readme"))
;; (defun eejump-55  () (find-angg ".emacs"))
;; (defun eejump-550 () (find-angg ".emacs.mini"))
;; (defun eejump-56 () (find-eev "eev-links.el"))
;; (defun eejump-57 () (find-eev "eev-template.el"))
;; (defun eejump-57 () (find-angg "eev-videos/1.sh"))
;; (defun eejump-58 () (find-eev  "eev-readme.el"))
;; (defun eejump-59 () (find-angg "eev-intros/README"))
	;58 (find-eev "eev-pdfpages.el")
	;56 (find-eev "eev-sshot.el")
;; (defun eejump-56 () (find-es  "eev"))
;; (defun eejump-58 () (find-eejumps))
;; (defun eejump-590 () (find-eev "eev-code-old.el"))
;; (defun eejump-551 () (find-eev2-links))
;; (defun eejump-552 () (find-eev "eev2-all.el"))
;; (defun eejump-554 () (find-es "eev" "dh-make-2"))
;; (defun eejump-555 () (find-eev ""))
;; (defun eejump-5554 () (find-eev "debian/"))

(defun eejump-7* () (find-efunction 'eejump-7*))
;; (defun eejump-70 () (find-fline "~/ORG/Lyrics.org"))
;; (defun eejump-7 () (find-angg "eev-videos/video-eev-quick-0.sh"))
;; (defun eejump-7 () (find-angg ".emacs.clg"))
;; (defun eejump-70 () (find-TH "javascript"))
;; (defun eejump-70 () (find-fline "~/ORG/lyrics.org"))
(defun eejump-71  () (find-LATEX ""))
(defun eejump-711 () (find-es "tex"))
(defun eejump-712 () (find-LATEX "tmp.tex"))
(defun eejump-717 () (find-es "luatex"))
(defun eejump-72 () (find-fline "~/tmp/"))
;; (defun eejump-73 () (find-fline "~/e/"))
(defun eejump-75 () (find-fline "/sda5/videos/"))
;; (defun eejump-77 () (find-es "luatex"))
;; (defun eejump-777 () (find-es "luatex" "getting-glyph-data"))

;; (defun eejump-1 () (find-fline (or (getenv "TODOFILE") "~/TODO")))
;; (defun eejump-12 () (find-blogme4 "doc/eev.b4texi"))
;; (defun eejump-13 () (find-TH "eev-article"))
        ;;
;; (defun eejump-120 () (find-ebuffer "*irc.freenode.net*"))
;; (defun eejump-12 () (find-ebuffer "cfa@irc.freenode.net"))
;; (defun eejump-121 () (eepitch '(find-ebuffer "cfa@irc.freenode.net")))
;; (defun eejump-122 () (find-es "clojure"))

(defun eejump-19 () (psne-log))

;; (defun eejump-6* () (find-efunction 'eejump-6*))
;; (defun eejump-65 () (find-TH "2012-greve-fontes-primarias"))
;; (defun eejump-6 () (find-freenode "#eev"))
;; (defun eejump-66 () (find-freenode-3a "#eev"))
;; (defun eejump-67 () (find-freenode "#labmacambira"))

;; (defun eejump-6  () (find-ebuffer "#eev@irc.freenode.net"))
;; (defun eejump-67 () (find-ebuffer "#rcirc@irc.freenode.net"))
;; (defun eejump-67 () (find-ebuffer "#node.js@irc.freenode.net"))
;; (defun eejump-67 () (find-ebuffer "#metareciclagem@irc.freenode.net"))
;; (defun eejump-67 () (find-ebuffer "#labmacambira@irc.freenode.net"))
;; (defun eejump-67 () (find-freenode "#labmacambira"))
;; (defun eejump-677 () (find-es "javascript"))
;; (defun eejump-66 () (progn (rcirc-defs) (find-freenode)))
;; (defun eejump-66 () (progn (rcirc-defs) (find-2a nil '(find-freenode))))
;; (defun eejump-68 () (progn (find-es "gnome" "gwm-keys") (eek "M-0 C-l")))
;; (defun eejump-69 () (find-2a nil '(find-ebuffer eepitch-buffer-name)))

(defun eejump-8* () (find-efunction 'eejump-8*))
(defun eejump-8  () (find-es "page" "upload-edrx.tgz-with-rsync"))
(defun eejump-88 () (find-eev2-links))
;; (defun eejump-88 () (find-pen-links))
(defun eejump-80   () (find-TH "2024.2"))
(defun eejump-800  () (find-TH "2024.1"))
(defun eejump-8000 () (find-es "puro"))
(defun eejump-81   () (find-TH "2019.1-TD"))
(defun eejump-811  () (find-TH "2018.2-MD"))
(defun eejump-8111 () (find-TH "2018.1-GA"))

(defun eejump-82   () (find-TH "2024.2-C2"))
(defun eejump-822  () (find-TH "2024.1-C2"))
(defun eejump-8222 () (find-TH "2023.2-C2"))

(defun eejump-83   () (find-TH "2024.2-C3"))
(defun eejump-833  () (find-TH "2024.1-C3"))
(defun eejump-8333 () (find-TH "2023.2-C3"))

(defun eejump-84   () (find-TH "2023.1-C4"))
(defun eejump-85   () (find-TH "2023.1-ES"))
(defun eejump-86   () (find-TH "2023.1-GA"))
(defun eejump-87   () (find-TH "2023.1-LA"))

;; (defun eejump-821 () (find-LATEX "2010-1-C2-prova-1.tex"))
;; (defun eejump-881 () (find-TH "2009.2-MD"))
;; (defun eejump-882 () (find-TH "2009.2-C2"))
;; (defun eejump-884 () (find-TH "2009.2-C4"))
;; (defun eejump-83  () (find-LATEX "2009-micropol.tex"))
;; (defun eejump-811 () (find-LATEX "2009-2-MD-prova-1.tex"))
;; (defun eejump-812 () (find-LATEX "2009-2-MD-prova-1-notas.tex"))
;; (defun eejump-813 () (find-LATEX "2009-2-MD-comparacao.tex"))
;; (defun eejump-814 () (find-LATEX "2009-2-MD-prova-2.tex"))
;; (defun eejump-821 () (find-LATEX "2009-2-C2-prova-1.tex"))
;; (defun eejump-822 () (find-LATEX "2009-2-C2-prova-1-notas.tex"))
;; (defun eejump-823 () (find-LATEX "2009-2-C2-lista-1.tex"))
;; (defun eejump-824 () (find-LATEX "2009-2-C2-prova-2.tex"))
;; (defun eejump-841 () (find-LATEX "2009-2-C4-prova-1.tex"))
;; (defun eejump-842 () (find-LATEX "2009-2-C4-prova-1-notas.tex"))
;; (defun eejump-843 () (find-LATEX "2009-2-C4-prova-2.tex"))
;; (defun eejump-85 () (find-LATEX "2009unilog-dnc.tex"))
;; (defun eejump-854 () (find-LATEX "2010unilog-current.tex"))
;; (defun eejump-854 () (find-angg ".emacs" "unilog-current"))
;; (defun eejump-855 () (find-LATEX "2010diags.tex"))
;; (defun eejump-86 () (find-LATEX "2010diags.tex"))
;; (defun eejump-850 () (find-LATEX "2010-1-MD-plano-de-aulas.tex"))
;; (defun eejump-851 () (find-TH    "2009-cola"))
;; (defun eejump-852 () (find-LATEX "forest.tex"))
;; (defun eejump-853 () (find-LATEX "2008graphs.tex"))
;; (defun eejump-857 () (find-LATEX "2009-nd-in-hyps.tex"))
;; (defun eejump-858 () (find-LATEX "2009dnc-monads.tex"))
;; (defun eejump-87 () (find-LATEX "2009-defesa.tex"))
;; (defun eejump-888 () (find-es "lenny" "syncing-the-edrx.tgzs"))
;; (defun eejump-8888 () (find-es "eev" "dh-make-2"))
;; (defun eejump-889 () (find-es "rcirc" "eepitch-full"))
;; (defun eejump-899 () (find-es "rcirc" "eepitch-full"))
;; (defun eejump-89 () (find-ebuffer "#eev@irc.freenode.net"))
;; (defun eejump-9 () (find-LATEX "2009-planodetrabalho.tex"))
;; (defun eejump-91 () (find-TH "2009.1-C1"))
;; (defun eejump-911 () (find-LATEX "2009-1-C1-prova-2.tex"))
;; (defun eejump-92 () (find-TH "2009.1-C2"))
;; (defun eejump-93 () (find-LATEX "catsem.bib"))
(defun eejump-93 () (find-LATEX "catsem-u.bib"))
(defun eejump-94 () (find-LATEX "filters.bib"))
;; (defun eejump-96 () (find-TH "2011-eleicoes"))
(defun eejump-0 () (find-fline "~/ORG/index.org"))
	;;
	;; ((eq arg 13) (find-ebuffer "*Messages*"))
	;;
	;; (find-sh "xlsfonts | grep terminus | grep -v ^- | sort")
	;; (find-sh "xlsfonts | grep -v ^- | sort")
(defun eejump-100 () (set-frame-font "nil2"))
	;; (find-fline "/usr/share/fonts/X11/misc/fonts.alias")
(defun eejump-10 () (ee-set-frame-font "5x7"   t))
(defun eejump-11 () (ee-set-frame-font "fixed" t))
(defun eejump-13 () (ee-set-frame-font "9x15"  t))
(defun eejump-14 () (ee-set-frame-font "10x20" t))
(defun eejump-22 () (set-frame-font "terminus-16"))
	;; ((eq arg 33) (set-frame-font "terminus-bold-16"))




;; Beginning of the el4r block:
;; RCtool generated this block automatically. DO NOT MODIFY this block!
(add-to-list 'load-path "/usr/share/emacs/site-lisp")
;; (require 'el4r)
;; (el4r-boot)
;; End of the el4r block.
;; User-setting area is below this line.

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

(defun find-tkdiff (f1 f2 &optional suffix)
  (cond (suffix (find-tkdiff (concat f1 suffix) (concat f2 suffix)))
	;; (ee-arg (find-fline-side-by-side f1 f2))
	(t (start-process "tkdiff" "*Messages*"
			  "tkdiff" (ee-expand f1) (ee-expand f2)))))

(defun find-tkdiff> (f1 f2 &optional suffix)
  "Takes the same arguments as find-tkdiff, but copies F1->F2"
  (if suffix
      (find-tkdiff> (concat f1 suffix) (concat f2 suffix))
    (find-sh0 (format "cp -av %s %s" f1 f2))))

(defun find-tkdiff< (f1 f2 &optional suffix)
  "Takes the same arguments as find-tkdiff, but copies F1<-F2"
  (if suffix
      (find-tkdiff> (concat f1 suffix) (concat f2 suffix))
    (find-sh0 (format "cp -av %s %s" f2 f1))))

(defun find-tkdiff1 (prefix1 prefix2 suffix &rest rest)
  (apply 'find-fline (concat prefix1 suffix) rest))

(defun find-tkdiff2 (prefix1 prefix2 suffix &rest rest)
  (apply 'find-fline (concat prefix2 suffix) rest))

(defun find-fline-side-by-side (f1 f2)
  (eek "C-x 1") (find-fline f1)
  (eek "C-x 3 C-x o") (find-fline f2))

;; Uh-oh, isearch-lazy-highlight-face -> lazy-highlight in CVS Emacs,
;; and somehow lazy-highlight stopped getting attributes.
;; (find-efile "isearch.el" "isearch-lazy-highlight-face")
(make-face           'lazy-highlight)
(set-face-background 'lazy-highlight "paleturquoise4")



;; «eekill»  (to ".eekill")
;; (find-es "x" "xclip")
;; (find-enode "Enabling Multibyte")
;; (find-enode "Enabling Multibyte" "nothing precedes the colon")
;; (find-enode "Mode Line" "When multibyte characters")
;;
(defun eekill (s &optional e)
  (interactive "r")
  (let ((str (ee-se-to-string s e)))
    (kill-new
     (with-temp-buffer			; because W32 dislikes unibyte data
       (insert str)
       (buffer-substring (point-min) (point-max))))
    str))

;; 2008may28
;; (find-elnode "Synchronous Processes" "Function: call-process-region")
;;
(defun eekill (s &optional e)
  (interactive "r")
  (let ((origb (current-buffer)))
    (with-temp-buffer
      (let ((tmpb (current-buffer)))
	(with-current-buffer origb
	  (call-process-region (point) (mark) "cat" nil tmpb)))
      (let ((str (buffer-substring (point-min) (point-max))))
	(kill-new str)
	str))))

;; 2014oct19, ugly tentative hack
(defun latkill ()
  (interactive)
  (eek "M-w")
  (let ((fname "/tmp/latin-1")
	(prefix1 " -*- coding: latin-1 -*-\n")
	(prefix2 "(eek \"2*<right> C-SPC M-> <<eekill>> C-x C-x\")\n\n")
	;; (prefix2 "(eekill (+ 2 (point)) (point-max))\n\n")
	(text (ee-last-kill))
	)
    (ee-kill-buffer "latin-1")
    (ee-write-string (concat prefix1 prefix2 text) fname)
    (find-2b nil `(find-fline fname))))




(code-c-d "wb" "$S/http/dto.freeshell.org/e/")
(code-c-d "dtoe" "$S/http/dto.freeshell.org/e/")
;; (find-wbfile "")
;; (find-dtoefile "")

(defun find-whiteboardlinks (&rest rest)
  (interactive)
  (apply 'find-elinks
	 `((eek "C-x 1 C-x b *wb-console* RET C-x 4 b whiteboard RET C-x o")
	   (load (ee-expand "$S/http/dto.freeshell.org/e/whiteboard.el"))
           (setq wb-directory "~/whiteboard")
	   (setq wb-base-port 10191)
	   (setq wb-local-ip ,(myip-as-string))
	   (wb-make-client "edrx" "66.189.73.146")
	   ""
	   (wb-make-server "edrx")
	   (wb-terminate)
	   ""
	   "* (eepitch '(shell))"
	   "psne http://dto.freeshell.org/e/whiteboard.el"
	   "mv whiteboard.el.1 whiteboard.el")
	 rest))

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






;;;                  _ _       _
;;;   ___  ___ _ __ (_) |_ ___| |__
;;;  / _ \/ _ \ '_ \| | __/ __| '_ \
;;; |  __/  __/ |_) | | || (__| | | |
;;;  \___|\___| .__/|_|\__\___|_| |_|
;;;           |_|

;; «eepitch»  (to ".eepitch")
;; «eepitch-kill»  (to ".eepitch-kill")
;; Code moved to  eev-mini-steps.el.
;; (find-eevfile "eev-mini-steps.el" "defvar eepitch-code")
;; (find-eevfile "eev-steps.el" "defun eepitch-prepare")

;;; --------------------------
;; (find-eevfile "eev-mini-steps.el" "defvar eepitch-code")

;; obsolete!
(defun eepitch-this-buffer ()
  "Set eepitch to copy lines to this buffer."
  (interactive)
  (setq eepitch-file-name (buffer-file-name))
  (eepitch (find-fline eepitch-file-name)))



;; some extra tools and things based on eepitch

(defun ee-to-char (charorstring)
  (if (stringp charorstring)
      (string-to-char charorstring)
    charorstring))

(defun find-eregister (register-char &rest rest)
  (jump-to-register (ee-to-char register-char))
  (ee-goto-rest rest))

(defun eepitch-register (register-char)
  (point-to-register (ee-to-char register-char))
  (eepitch `(find-eregister ,register-char -1)))

(defun ee-add-slash (dir)
  (if (string-match "/$" dir)
      dir
    (concat dir "/")))

(defmacro ee-at-dir (dir &rest body)
  `(let ((default-directory (ee-add-slash (ee-expand ,dir))))
	 . ,body))

;; (find-eev "eev-mini-steps.el")




;; «ee-comint»  (to ".ee-comint")
;; «ee-telnet»  (to ".ee-telnet")
;; (find-angg ".emacs.local.tijuca" "ee-comint")
;; 2005dez22
;;
(defun ee-comint (name program &rest switches)
  (apply 'make-comint name program nil switches)
  (switch-to-buffer (format "*%s*" name)))

;; (defun ee-telnet (name host &rest switches)
;;   (apply 'ee-comint name
;;          "C:/Arquivos de programas/PuTTY/plink.exe" "-telnet"
;;          host switches))

(seen 6268)


'(

(defun ee-telnet (name &optional host &rest switches)
  (apply 'ee-comint name "telnet" (or host name) switches))

(defun ee-telnet-mangaratiba () (interactive) (ee-telnet "mangaratiba"))
(defun ee-telnet-parati      () (interactive) (ee-telnet "parati"))
(defun ee-telnet-trindade    () (interactive) (ee-telnet "trindade"))
(defun eepitch-mangaratiba   () (interactive) (eepitch (ee-telnet-mangaratiba)))
(defun eepitch-parati        () (interactive) (eepitch (ee-telnet-parati)))
(defun eepitch-trindade      () (interactive) (eepitch (ee-telnet-trindade)))

)

(seen 6285)

(defun eepitch-Twu     () (interactive) (eepitch-comint "Twu" "Twu"))
(defun eepitch-Twu     () (interactive) (eepitch-comint "Twu" "~/EXPECT/autopasswd ssh -C edrx@angg.twu.net"))

(defun eepitch-lakh  () (interactive) (eepitch-comint "ssh lakh"  "ssh -C edrx@lakhesys"))
(defun eepitch-lakh2 () (interactive) (eepitch-comint "ssh lakh2" "ssh -C edrx@lakhesys"))
;; (find-fline "/etc/hosts")
(code-c-d "lakh" "/ssh:edrx@lakhesys:/")
;; (find-lakhfile "")



;; (defun eepitch-hallowlua   () (interactive)
;;   (eepitch (let ((default-directory (ee-expand "~/HALLOWEEN/")))
;; 	        (find-comintprocess "halloween: lua" "lua50"))))

(defun eepitch-hallowlua   () (interactive)
  (eepitch-at-dir-comint
   "~/HALLOWEEN/"
   "halloween: lua"
   "lua50"))

(defun eepitch-hallowplot   () (interactive)
  (eepitch-at-dir-comint
   "~/HALLOWEEN/"
   "hallowplot"
   "eegchannel hallowplot gnuplot"))



;; «miniforth»  (to ".miniforth")
;; (find-angg ".emacs.papers" "ochs")
;;
(code-c-d "miniforth" "~/miniforth/" :anchor)
;; (find-miniforthfile "")
;; (find-miniforth "miniforth6.lua" "downloads")
;;
;;    http://anggtwu.net/miniforth-article.html
;; file:///home/edrx/TH/L/miniforth-article.html
;; http://anggtwu.net/miniforth/miniforth-article.pdf
(code-pdf-page "miniforth" "$S/http/anggtwu.net/miniforth/miniforth-article.pdf")
(code-pdf-text "miniforth" "$S/http/anggtwu.net/miniforth/miniforth-article.pdf")
;; (find-miniforthpage)
;; (find-miniforthtext)
;;
;; (find-miniforthfile "miniforth3.lua")
;; (eepitch-miniforth)
;; (eepitch-kill)
(defun eepitch-miniforth () (interactive)
  (ee-eepitch-comint
   "~/miniforth/"
   "miniforth5.lua"
   "lua51 -e dofile[[miniforth5.lua]] -i"))



;; (find-eevfile "eev.el" "defun ee-goto-position")
;; (find-efunction 'ee-goto-position)
;; (find-efile "reveal.el")

(autoload 'reveal-post-command "reveal")

(defun ee-goto-position-orig (&optional pos-spec &rest rest)
  (when pos-spec
    (cond ((numberp pos-spec)
	   (goto-char (point-min))
	   (forward-line (1- pos-spec)))
	  ((stringp pos-spec)
	   (goto-char (save-excursion	          ; This used to be just:
			(goto-char (point-min))	  ; (goto-char (point-min))
			(search-forward pos-spec) ; (search-forward pos-spec)
			(point))))		  ;
	  (t (error "This is not a valid pos-spec: %S" pos-spec)))
    (if rest (ee-goto-rest rest))))

(defun ee-goto-position-reveal (&optional pos-spec &rest rest)
  (let ((search-invisible t))
    (apply 'ee-goto-position-orig pos-spec rest)
    (reveal-post-command)))

' (defun ee-goto-position (&optional pos-spec &rest rest)
    (apply 'ee-goto-position-reveal pos-spec rest))


(seen 6000)

;; (find-trampfile "")
;; (find-trampfile "om")
;; (find-trampfile "lisp/")
;; (find-file "/sudo:root@localhost:/etc/hosts")
;; (find-file "/ftp:guest@127.0.0.1:")
;; (find-file "/ftp:root@127.0.0.1:/")
;; (find-file "/ftp:edrx@parati:")
;; (find-node "(tramp)Top")
;; http://lists.gnu.org/archive/html/tramp-devel/
;; (eekill "make-auto-save-file-name")
;; (find-trampgrep "grep -nH -e make-auto-save-file-name lisp/*.el")
;; (find-efile "files.el")
;; (find-eetcfile "NEWS")
;; (find-eetcfile "NEWS" "`make-auto-save-file-name' is now handled")

(code-c-d "tramp" "~/usrc/tramp/" :grep)

(seen 6375)


;; (if (= emacs-major-version 22)
;;   (add-to-list 'load-path "~/usrc/tramp/lisp/"))



;; «ruby»  (to ".ruby")
;; (find-es "ruby" "rubyri")
;;
(code-c-d "rubybook"   "/usr/share/doc/rubybook/html/")
(code-c-d "rubymanual" "/usr/share/doc/ruby-manual/html/")
(code-c-d "rubyfaq"    "/usr/share/doc/ruby-manual/faq/")
(code-c-d "rubyex"     "/usr/share/doc/ruby1.8-examples/examples/")
(code-c-d "rubylib"    "/usr/lib/ruby/1.8/")

;; (find-rubyri "Test::Unit")
(defun find-rubyri (name &rest rest)
  (apply 'find-sh-man-fontify (format "PAGER=cat ri '%s'" name) rest))

;; (find-rubybookfile "")
;; (find-rubymanualfile "")
;; (find-rubyfaqfile "")
;; (find-rubyexfile "")
;; (find-rubyexfile "webrick/hello.rb")
;; (find-rubyexfile "webrick/hello.cgi")
;; (find-rubylibfile "")
;; (find-rubylibfile "webrick/")
;; (find-rubymanualw3m "syntax.html" "class Foo < Super")

(code-c-d "ruby" "~/usrc/ruby/ruby1.8-1.8.2/")
;; (code-c-d-old "rubysrc" "~/usrc/ruby/ruby1.8-1.8.2/build-tree/ruby-1.8.2/" :gdb)
;; (find-rubyfile "")
;; (find-rubysrcfile "")

;; (find-es "ruby" "postgres-pr")
(code-c-d "postgrespr" "~/usrc/postgres-pr-0.4.0/d/")

;; «ruby-pragmatic»  (to ".ruby-pragmatic")
;; (find-angg ".emacs.papers" "ruby")
;; (find-es "ruby" "pragmatic")
;;
;;(code-xpdf "pragmaticruby" "~/tmp/ruby-pragmatic-2nd-ed.pdf")
;;(code-c-d  "pragmaticruby" "~/tmp/ruby-pragmatic-2nd-ed.txt")
;;(defun find-pragmaticrubytext (&rest rest) (interactive)
;;  (apply 'find-pragmaticrubyfile "" rest))

;; (find-code-c-d "e" ee-emacs-lisp-directory "emacs" :grep :gz)
;; (code-c-d "e" ee-emacs-lisp-directory "emacs" :grep :gz)
(code-c-d "es" "$ES/" :grep)

;; (code-c-d "org" "~/ORG/" :anchor :grep)

;; This should be moved to .emacs.local.sj (sweetjane)
;; (code-c-d "mediador"       "/ftp:edrx@parati:/app/mediador/")
;; (code-c-d "mediadorparati" "/ftp:mediador@parati:/app/mediador/")
;; (code-c-d "parati"   "/ftp:edrx@parati:")
;; (code-c-d "trindade" "/ftp:edrx@trindade:")
;;
;; (code-c-d "paratireadline" "/ftp:edrx@parati:usrc/readline-5.1/")
;; (code-c-d "paratilua50"    "/ftp:edrx@parati:usrc/lua-5.0.2/")
;;
;; (code-c-d "paratioraclehome" "/ftp:edrx@parati:/opt/oracle/product/9.2.0/")


;; «titan»  (to ".titan")
;;
;; ;; (find-titanfile "")
;; ;; (find-titansmsfile "")
;; ;; (find-titansmsfile "titanfilter.h")
;; (code-c-d "titan"    "~/TITAN/" :anchor)
;; (code-c-d "titansms" "~/TITAN/" :anchor)
;; (code-c-d "titansmsdocs" "~/usrc/titan-sms-docs/")
;; ;; (find-titansmsdocsfile "")
;; ;;
;; (code-xpdf "titandic"
;;   "~/usrc/titan-sms-docs/Docionario de dados V1.1.pdf")
;; (code-xpdf "titanspec"
;;   "~/usrc/titan-sms-docs/Especificacao GTW Interceptador SMS - V1.0.pdf")
;; (code-xpdf "titanprojfis"
;;   "~/usrc/titan-sms-docs/TITAN_SMS_PROJ_FISICO.pdf")
;; (code-xpdf "titanprojlog"
;;   "~/usrc/titan-sms-docs/TITAN_SMS_PROJ_LOGICO.pdf")
;; (code-xpdf "titansmsminuta"
;;   "~/usrc/titan-sms-docs/20060607-VIVBRSIP02-Minuta-SMS-V1.5.pdf")
;;
;; (find-titandicpage 1)
;; (find-titanspecpage 1)
;; (find-titanprojfispage 1)
;; (find-titanprojlogpage 1)
;; (find-titansmsminutapage 1)

;; «titand-docs-text»  (to ".titand-docs-text")
;; (find-titan "titan.e" "docsprincipais.txt")
;;
;; (defun find-titanspectext (&rest rest)
;;   (apply 'find-titansmsdocsfile "titanspec.txt" rest))
;; (defun find-titandictext (&rest rest)
;;   (apply 'find-titansmsdocsfile "dicdados.txt" rest))
;; (defun find-titanprojfistext (&rest rest)
;;   (apply 'find-titansmsdocsfile "projfis.txt" rest))
;; (defun find-titanprojlogtext (&rest rest)
;;   (apply 'find-titansmsdocsfile "projlog.txt" rest))

;; (find-titanspectext)
;; (find-titandictext)
;; (find-titanprojfistext)
;; (find-titanprojlogtext)




;; (ee-add-file-name-maybe "/foo/bar/plic" "/tmp/ploc")
;; (ee-add-file-name-maybe "/foo/bar/"     "/tmp/ploc")
;;
(defun ee-add-file-name-maybe (fname-or-dir fname)
  (if (equal (file-name-directory fname-or-dir) fname-or-dir)
      (concat fname-or-dir (file-name-nondirectory fname))
    fname-or-dir))

(defun ee-copy-file- (fname1 fname2)
  (let ((coding-system-for-read  'raw-text-unix)
        (coding-system-for-write 'raw-text-unix))
    (with-temp-buffer
      (insert-file-contents-literally fname1)
      (write-region (point-min) (point-max) fname2))))

(defun ee-copy-file (fname1 fname2)
  (setq fname1 (ee-expand fname1))
  (setq fname2 (ee-expand fname2))
  (setq fname2 (ee-add-file-name-maybe fname2 fname1))
  (ee-copy-file- fname1 fname2))


;; (find-efunction 'org-goto)

(defun my-org-mode ()
  "Like `org-mode', but doesn't change point"
  (interactive)
  (save-excursion (org-mode))
  (reveal-post-command))

;; (find-elnode "Index" "* directory-files:")
;; (find-elnode "Contents of Directories")
;; (find-efunction 'find-frame-font-links)
;; (find-orgfiles)
;;
(defun find-orgfiles (&rest rest)
  (let* ((f (lambda (fname) `(find-orgfile ,fname)))
	 (fnames (directory-files  ee-orgdir nil "^[^#~]+.org$"))
	 (links (mapcar f (reverse fnames))))
    (apply 'find-elinks
	   `((find-orgfiles ,@rest)
	     (find-orggrep "grep -nH -e _ *.org")
	     (find-esgrep "grep -nH -e _ *.e")
	     ,@links)
	   rest)))

;; (code-c-d "mediadorsj" "~/usrc/mediador/" :grep)
;; (find-mediadorsjfile "")

(seen 7130)

;; http://article.gmane.org/gmane.emacs.eev.devel/42
;; http://www.emacswiki.org/cgi-bin/wiki/IndirectBuffers

(defvar indirect-mode-name nil
  "Mode to set for indirect buffers.")
(make-variable-buffer-local 'indirect-mode-name)

(defun indirect-region (start end)
  "Edit the current region in another buffer.
    If the buffer-local variable `indirect-mode-name' is not set, prompt
    for mode name to choose for the indirect buffer interactively.
    Otherwise, use the value of said variable as argument to a funcall."
  (interactive "r")
  (let ((buffer-name (generate-new-buffer-name "*indirect*"))
        (mode
         (if (not indirect-mode-name)
             (setq indirect-mode-name
                   (intern
                    (completing-read
                     "Mode: "
                     (mapcar (lambda (e)
                               (list (symbol-name e)))
                             (apropos-internal "-mode$" 'commandp))
                     nil t)))
           indirect-mode-name)))
    (switch-to-buffer (make-indirect-buffer (current-buffer) buffer-name))
    (narrow-to-region start end)
    (funcall mode)
    (goto-char (point-min))
    ))

(defun eeindirect ()
  "Edit the eev bounded region in another buffer."
  (interactive)
  (let ((eebound-re "^[-;%#]+*\n")      ; bounded region delimiter regexp
        s e)
    (save-excursion
      (when (re-search-backward eebound-re nil t)
        (forward-line -1)
        (setq s (point))))
    (save-excursion
      (when (and s (re-search-forward eebound-re nil t))
        (beginning-of-line)
        (setq e (point))
        (indirect-region s e)))))


;; (global-set-key (kbd "s-s") 'toggle-scroll-bar)
;; (global-set-key (kbd "s-w") 'wrap)

;; (defun upload-changes-sweetjane ()
;;   (interactive)
;;   (find-es "page" "compare-tp-and-home"))
;;
;; ' (defalias 'upload-changes 'upload-changes-sweetjane)


;; «postgres»  (to ".postgres")
;; (find-esfile "postgres.e")
;; Older (debian-ish, non-upstream-ish):
;; (code-c-d "pgdoc"  "/usr/share/doc/postgresql-doc/")
;; (code-c-d "pghtml" "/usr/share/doc/postgresql-doc/html/")
;; (code-c-d "pgtut"  "/usr/share/doc/postgresql-doc/tutorial/")

;; (code-c-d "pg"     "~/usrc/postgresql-7.4.13/" :grep)
;; (code-c-d "pgex"   "~/usrc/postgresql-7.4.13/src/test/examples/")
;; (code-c-d "pgdoc"  "~/usrc/postgresql-7.4.13/doc/html/" :grep)
;; (code-c-d "pghtml" "~/usrc/postgresql-7.4.13/doc/html/" :grep)
;; (code-c-d "psql"   "~/usrc/postgresql-7.4.13/src/bin/psql/" :grep)
;; (setq ee-pgextagsfile  ee-pgtagsfile)
;; (setq ee-pgdoctagsfile ee-pgtagsfile)
;; (setq ee-psqltagsfile  ee-pgtagsfile)
;; ;; (find-psqlfile "")
;; ;; (find-pgdocfile "")



;; «find-C-links»  (to ".find-C-links")
;; Test with M-h c on this: printf
;;
' (define-key eev-mode-map "\M-hc" 'find-C-links)

(defun find-C-links (fstr &rest rest)
  (interactive (list (read-string "C function name: "
				  (ee-stuff-around-point "a-zA-Z0-9_"))))
  (apply 'find-elinks
	 `((find-C-links ,fstr ,@rest)
	   (find-node "(libc)Function Index" ,(concat "* " fstr ":"))
	   (find-man ,(concat "3 " fstr))
	   (find-man ,(concat "2 " fstr))
	   (find-uclibctag ,fstr))
	 rest))



;; ;; «find-postgres-links»  (to ".find-postgres-links")
;; (defun find-postgres-links (symbolstr &rest rest)
;;   (interactive (list (read-string "Postgres function name: "
;; 				  (ee-stuff-around-point "a-zA-Z0-9_"))))
;;   (apply 'find-elinks
;; 	 `((find-postgres-links ,symbolstr ,@rest)
;; 	   (find-pgdocfile "")
;; 	   (find-pgtag ,symbolstr))
;; 	 rest))

;; (define-key eev-mode-map "\M-hp" 'find-postgres-links)


;; «find-grep-links»  (to ".find-grep-links")
'(

(defun ee-findxxxgreps (dir)
"Return the list of `find-xxxgrep' symbols where XXX is associated to DIR"
  ;; Inspired by: (find-efunction 'code-c-d-prefixes)
  (let* ((expdir (ee-expand dir))
	 (c-d-s (ee-filter (lambda (c-d) (equal (nth 1 c-d) expdir))
			   code-c-d-list))
	 (cs (mapcar 'car c-d-s)))
    (mapcar (lambda (c) (intern (format "find-%sgrep" c))) cs)))

;; (ee-trimafter 8 '(a b c d e f))
;; (ee-trimafter 4 '(a b c d e f))
;; (ee-trimafter 0 '(a b c d e f))

(defun ee-trimafter (n list)
"Return a list that has only the first N elements of LIST.
If LIST has N elements or less return it unchanged."
  ;; Inspired by: (find-efunction 'butlast)
  (cond ((<= (length list) n) list)
	((<= n 0) nil)
	(t (let ((newlist (copy-sequence list)))
	      (setcdr (nthcdr (- n 1) newlist) nil)
	      newlist))))

;; (ee-findxxxgrep-links '(f g h) '("a" "b" "c") "foo" "bar")
;;
(defun ee-findxxxgrep-links (find-xxxgreps grep-commands &rest rest)
  "FIND-XXXGREPS is a list of symbols, GREP-COMMANDS a list of strings."
  (let (result)
    (dolist (head find-xxxgreps)
      (dolist (command grep-commands)
	(setq result (cons `(,head ,command ,@rest) result))))
    (nreverse result)))

(defun find-grep-links (&rest rest)
  (interactive)
  (let ((findxxxgreps (ee-findxxxgreps default-directory))
	(grep-commands (ee-trimafter 4 (cons "grep -nH -e _ *" grep-history))))
    (apply 'find-elinks
	   `((find-grep-links ,@rest)
	     ,@(ee-findxxxgrep-links findxxxgreps grep-commands)
	     )
	   nil)))

(define-key eev-mode-map "\M-h\M-g" 'find-grep-links)

)


;; ;; «swig»  (to ".swig")
;; ;; Test with M-h M-p on this: PQexec
;; (code-c-d "swig"       "~/usrc/swig-1.3.29/")
;; (code-c-d "swigmanual" "~/usrc/swig-1.3.29/Doc/Manual/")



;; «eea2ps»  (to ".eea2ps")
;; (find-angg ".a2ps/a2psrc")

(defun find-a2ps (fname)
  (interactive "f")
  (list (find-sh0 (format "a2ps -=p2isol '%s' -o ~/o.ps" (ee-expand fname)))
	(find-pspage "~/o.ps")))

(defun eea2ps (s &optional e) (interactive "r")
  (let ((coding-system-for-write 'latin-1-unix))
    (ee-write s e "" "" "~/o"))
  (find-sh0 "cd; a2ps -=p2isol o")
  (find-pspage "~/o.ps"))

(defun eea2ps1 (s &optional e) (interactive "r")
  (let ((coding-system-for-write 'latin-1-unix))
    (ee-write s e "" "" "~/o"))
  (find-sh0 "cd; a2ps -=p1iso o")
  (find-pspage "~/o.ps"))

(defun eea2ps3 (s &optional e) (interactive "r")
  (let ((coding-system-for-write 'latin-1-unix))
    (ee-write s e "" "" "~/o"))
  (find-sh0 "cd; a2ps -=p3isol o")
  (find-pspage "~/o.ps"))

;; «eea2ps-meta»  (to ".eea2ps-meta")
;; (setq eea2ps-meta "cd; a2ps -=p1iso -l 100 o")
;; (find-eea2ps-links)
(setq  eea2ps-meta "cd; a2ps -=p1iso o")
(defun eea2ps-meta (s &optional e) (interactive "r")
  (let ((coding-system-for-write 'latin-1-unix))
    (ee-write s e "" "" "~/o"))
  (find-sh0 eea2ps-meta)
  (find-pspage "~/o.ps"))

(defun find-eea2ps-links (&rest rest)
  (interactive)
  (find-elinks
   `((find-eea2ps-links ,@rest)
     (find-angg ".a2ps/a2psrc")
     (find-angg ".emacs" "eea2ps-meta")
     (setq eea2ps-meta ,eea2ps-meta)
     (setq eea2ps-meta "cd; a2ps -=p1isol o")
     (setq eea2ps-meta "cd; a2ps -=p1iso o")
     (setq eea2ps-meta "cd; a2ps -=p2iso o")
     "%*"
     "% (eea2ps-meta-bounded)"
     "%*"
     )))

;; (eeb-define 'eea2ps-meta-bounded  'eea2ps-meta  'ee-delimiter-percent nil t t)

;; «eea2pswide»  (to ".eea2pswide")
;; (find-angg ".a2ps/a2psrc" "p1isolwide")
;;
(defun eea2pswide (s &optional e) (interactive "r")
  (let ((coding-system-for-write 'latin-1-unix))
    (ee-write s e "" "" "~/o"))
  (find-sh0 "cd; a2ps -=p1isolwide o")
  (find-pspage "~/o.ps"))

;; (eeb-define 'eea2ps-bounded  'eea2ps  'ee-delimiter-percent nil t t)
;; (eeb-define 'eea2ps3-bounded 'eea2ps3 'ee-delimiter-percent nil t t)

(defun find-a2ps-file (fname)
  (interactive "f")
  (list (find-callprocess0
	 `("a2ps" "-=p2isol" ,(ee-expand fname)
	          "-o"       ,(ee-expand "~/o.ps")))
	(find-pspage "~/o.ps")))

(defun find-a3ps-file (fname)
  (interactive "f")
  (list (find-callprocess0
	 `("a2ps" "-=p3isol" ,(ee-expand fname)
	          "-o"       ,(ee-expand "~/o.ps")))
	(find-pspage "~/o.ps")))


(code-brfile 'find-a2ps-file :local 'bra2psl :dired 'bra2psd)
(code-brfile 'find-a3ps-file :local 'bra3psl :dired 'bra3psd)




;; «fill-rcirc-paragraph»  (to ".fill-rcirc-paragraph")
;; Note: I haven't coded an "unfill-rcirc-paragraph" yet.

(defun fill-rcirc-paragraph ()
"Fill the current line as if it were a long line in an rcirc log.
If it starts with \"<nick>\" then use blanks to the width of
\"<nick>\" (plus one) as the fill-prefix for the other lines of
the paragraph. Lines that are not of that form are not changed.
This function advances point to the beginning of the next line.
Note that I don't use timestamps in my rcirc logs."
  (interactive)
  (save-restriction
    (narrow-to-region (point-at-bol) (1+ (point-at-eol)))
    (goto-char (point-min))
    (if (looking-at "<[-_A-Za-z0-9`]+>")
	(let* ((head (match-string 0))
	       (fill-prefix (make-string (1+ (length head)) 32)))
	  (fill-region-as-paragraph (point-min) (point-max))))
    (goto-char (point-max))))
;;
(global-set-key (kbd "M-R") 'fill-rcirc-paragraph)


;; «find-rcirc-channel-sexps»  (to ".find-rcirc-channel-sexps")
;; 2006sep02
(defun ee-sexp-value (sexp)
  "Example: (ee-sexp-value '(+ 1 2))"
  (list (ee-pp0 sexp) (format "  -> %s" (ee-pp0 (eval sexp)))))

(defun ee-rcirc-channel-sexp (sexp)
  "Internal use. Uses the value and the name of the variable `c'."
  (ee-sexp-value `(with-current-buffer c ,sexp)))

(defun ee-rcirc-server-sexp (sexp)
  "Internal use. Uses the value and the name of the variable `s'."
  (ee-sexp-value `(with-current-buffer s ,sexp)))

(defun ee-rcirc-channel-sexps (c)
  "Example: (find-elinks (ee-rcirc-channel-sexps \"#rcirc@irc.freenode.net\"))"
  `(,@(ee-rcirc-channel-sexp 'rcirc-target)
    ,@(ee-rcirc-channel-sexp '(rcirc-buffer-process))
    ,@(ee-rcirc-channel-sexp 'rcirc-server-buffer)
    ,@(ee-rcirc-channel-sexp 'rcirc-short-buffer-name)
    ,@(ee-rcirc-channel-sexp 'rcirc-topic)
    ,@(ee-rcirc-channel-sexp '(rcirc-nick (rcirc-buffer-process)))
    ,@(ee-rcirc-channel-sexp
       '(rcirc-channel-nicks (rcirc-buffer-process) rcirc-target))
    ))

(defun ee-rcirc-server-sexps (s)
  "Example: (find-elinks (ee-rcirc-server-sexps \"*irc.freenode.net*\"))"
  `(,@(ee-rcirc-server-sexp 'rcirc-server)
    ,@(ee-rcirc-server-sexp 'rcirc-buffer-alist)
    ))

;; (find-elinks (ee-rcirc-channel-sexps "#rcirc@irc.freenode.net"))
;; (find-elinks (ee-rcirc-server-sexps "*irc.freenode.net*"))
;; (find-rcirc-channel-sexps "#rcirc@irc.freenode.net")

(defun find-rcirc-channel-sexps (&optional buffer)
  "Visit a temporary buffer showing data associated to an rcirc channel buffer.
How to use: if you run\n
  (define-key eev-mode-map \"\M-hr\" 'find-rcirc-channel-sexps)\n
and then type `M-h r' when you're inside an rcirc channel buffer -
for example, when you're at the buffer for the channel #rcirc at
irc.freenode.node - then you will get a buffer with several
interesting sexps and their values.\n
This function is mostly a proof of concept at the moment.
We should write something like this to inspect buttons, customize
buffers, and dired buffers."
  (interactive (list (buffer-name (current-buffer))))
  (if (bufferp buffer) (setq buffer (buffer-name buffer)))
  (let ((server-buffer (buffer-name
			(with-current-buffer buffer
			  rcirc-server-buffer))))
    (find-elinks
     `((find-rcirc-channel-sexps ,buffer)
       (progn (make-local-variable 'c) (setq c ,buffer))
       (progn (make-local-variable 's) (setq s ,server-buffer))
       ""
       ,@(ee-rcirc-channel-sexps buffer)
       ""
       ,@(ee-rcirc-server-sexps server-buffer)
       ))))

(define-key eev-mode-map "\M-hr" 'find-rcirc-channel-sexps)








;; http://homepage1.nifty.com/bmonkey/emacs/elisp/screen-lines.el
;; See also: http://www.emacswiki.org/cgi-bin/wiki/VisibleLines
;; '(
;; (autoload 'screen-lines-mode
;;   (ee-expand "$S/http/homepage1.nifty.com/bmonkey/emacs/elisp/screen-lines.el")
;;   "Toggle Screen Lines minor mode for the current buffer." t)
;;
;; (defalias 'slm 'screen-lines-mode)
;; )

;; «display-time-mode»  (to ".display-time-mode")
;; (find-enode "Optional Mode Line")
;; With thanks to Marc Simpson.
(setq display-time-mail-file 'none)
(setq display-time-default-load-average nil)
(setq display-time-24hr-format t)
(setq display-time-format " %H:%M ")
(defalias 'dtm 'display-time-mode)
;; (dtm)

;; (find-evardescr 'mode-line-format)
;; (find-evardescr 'mode-line-format "global-mode-string")

' (defalias 'mkdir 'make-directory)

;; http://www.emacswiki.org/cgi-bin/emacs/eimp.el
;; http://www.emacswiki.org/cgi-bin/emacs/download/eimp.el
;;
;; '(autoload 'eimp-mode
;;   (ee-expand "$S/http/www.emacswiki.org/cgi-bin/emacs/download/eimp.el")
;;   "Emacs Image Manipulation Package." t)


;; «eemklinks-yank-w3m-anchor»  (to ".eemklinks-yank-w3m-anchor")
;; (find-efunction 'eemklinks-yank-pos-spec)
;; (find-efunction 'eemklinks-yank-w3m-anchor)
;;
;; (defun eemklinks-yank-w3m-anchor () (interactive)
;;   (save-excursion
;;     (end-of-line)
;;     (skip-chars-backward ")")
;;     (skip-chars-backward "\"")
;;     (insert "#" (with-current-buffer "*w3m*"
;;                   (car (get-char-property (point) 'w3m-name-anchor2))))))
;;
;; (define-key eev-mode-map "\M-h\M-Y" 'eemklinks-yank-w3m-anchor)


;; «find-C-x»  (to ".find-C-x")
;; (find-es "emacs" "window-configurations")
;; See: (find-eev "eev-multiwindow.el")
;;      (find-multiwindow-intro)
;;
(defun find-C-x (C-x &rest C-x-s)
  (cond ((stringp C-x) (eek (concat "C-x " C-x)))
	((listp C-x)   (eval C-x))
	(t (error "Not a C-x-step: %S" C-x)))
  (if C-x-s (apply 'find-C-x C-x-s)))

' (find-C-x "1" '(find-angg ".emacs" "find-C-x")
	    "3" "o" '(find-node "(emacs)RegConfig" "`C-x r w R'")
	    "o" "r w 1")




;; «find-ebuffer-links»  (to ".find-ebuffer-links")
;; (find-efunction 'find-ekey-links)
;; (find-efunctiondescr 'switch-to-buffer)
;; (find-efunction      'switch-to-buffer)
;; (find-efunctiondescr 'kill-buffer)
;; (find-efunction      'kill-buffer)

(define-key eev-mode-map "\M-h\M-b" 'find-ebuffer-links)

(defun find-ebuffer-links (buffer &rest rest)
  (interactive "bHyperlinks for buffer: ")
  (apply 'find-elinks
	 `((find-ebuffer-links ,buffer ,@rest)
	   (find-ebuffer ,buffer)
	   (eepitch-to-buffer ,buffer)
	   )
	 rest))


;; «freedb-rename»  (to ".freedb-rename")
;; (find-angg ".zshrc" "cddb2rentracks")
;;
;; (defun freedb-rename (N &optional ext)
;;   (interactive "p")
;;   (dotimes (i N)
;;     (let* ((line (ee-delete-and-extract-line))
;; 	   (sline (replace-regexp-in-string "^http://" "$S/http/" line)))
;;       (insert (format "# %s
;; # (find-zsh \"cddb2rentracks < %s\")
;; function rentrack () { mv -iv track$1.cdda.wav $1._$2.wav }
;; function rentrack () { mv -iv track$1.cdda.ogg $1._$2.ogg }
;; cd ~/NICOTINE/\n" line sline)))
;;     (forward-char 1)))



;; «find-pdfpage-pdftotext»  (to ".find-pdfpage-pdftotext")
;; Search for "Kock.zip" at gmail.
;; (find-fline "/tmp/Kock.zip")
;; (find-man "1 unzip" "overwrite existing files")
;; (find-es "ps" "xpdftools")
;; (find-sh "cd /tmp/; unzip -o ~/tmp/Kock.zip")
;; (find-pspage "/tmp/Kock3.pdf" 14)
;; (find-pspage "/tmp/Kock4.pdf" 3)
;; (find-pspage "/tmp/kock1.pdf")
;; (find-pspage "/tmp/kock2.pdf")
;; (find-pdftotext "/tmp/Kock3.pdf" "A simple axiomatics for differentiation")
;; (find-pdftotext "/tmp/Kock4.pdf" "factorization")
;; (find-pdftotext "/tmp/kock1.pdf")
;; (find-pdftotext "/tmp/kock2.pdf")
;;
'(
(defun find-pstotext (fname &rest rest)
  (apply 'find-sh (format "cat %s | pstotext" fname) rest))
(defun find-zpstotext (fname &rest rest)
  (apply 'find-sh (format "zcat %s | pstotext" fname) rest))

(code-brfile 'find-pdftotext
             :local 'brpdftxtl :dired 'brpdftxtd)
(code-brfile 'find-a2ps-file
             :local 'bra2psl :dired 'bra2psd)
(code-brfile 'find-a3ps-file
             :local 'bra3psl :dired 'bra3psd)

(code-brurl 'find-dpkg-build-escript
            :remote 'brdsc :local 'brdscl :dired 'brdscd)
(code-brurl 'find-template-untgz
            :remote 'bruntgz :local 'bruntgzl :dired 'bruntgzd)
(code-brurl 'find-template-untbz2
            :remote 'bruntbz2 :local 'bruntbz2l :dired 'bruntbz2d)

)


;; «find-xxxtkdiff»  (to ".find-xxxtkdiff")
;; 2006jul31; not working yet
;; '
;; (add-to-alist 'code-c-d-keywords
;;  '(:tkdiff
;;    (ee-eval-read-format "
;;     (defun find-%stkdiff (prefix f1 f2)
;;       (find-tkdiff (ee-%sfile prefix) f1 f2))" c c)))


;; AAAARGH, code-c-d doesn't complain when it gets bad tags
;; (code-c-d "mediadorsj" "~/usrc/mediador/" :grep :tkdiff :foo)
;; (code-c-d "dialogex" "/usr/share/doc/dialog/examples/" :grep)

;; (find-mediadorsjfile "")
;; (find-mediadorsjtkdiff "admin/ivr/" "volta_ivr.2006aug01.sh" "volta_ivr.2006jul26.sh")
;; "volta_ivr.2006mar28.sh"


;; «find-cdecl»  (to ".find-cdecl")
;; (find-es "anatocc" "cdecl")
;; (find-node "(cutils)cdecl/cundecl examples")
;; (find-cdecl "explain void (*commands[128])(void)")
;; (find-cdecl "declare commands as array 128 of pointer to function (void) returning void")
;; (find-cdecl "declare cmds as array 128 of ptr to function (void) ret void")
(defun find-cdecl (str) (find-sh0 (format "echo '%s' | cdecl" str)))


;; «eetcc»  (to ".eetcc")
;; (find-es "anatocc" "tcc")
;; (find-eev "eev-langs.el" "eelua0")
;; (find-eev "eev.el")
;; (find-eevexfile "c.e")
;; (find-eevfile "eev-rctool")
;; (find-eevfile "eev-rctool" "EETMPC:=")
;; (find-fline "$EEC")
;; (find-fline "$EETMPC")

(defun eetcc (s &optional e)
  (interactive "r")
  (ee-write-with-nl s e "#include <tcclib.h>\n" "" (ee-expand "$EEC")))

(defun eetccnow  (s &optional e)
  (interactive "r")
  (eetcc s e)
  (find-sh  "tcc -run $EEC"))

(defun eetccnow0 (s &optional e)
  (interactive "r")
  (eetcc s e)
  (find-sh0 "tcc -run $EEC"))

(defun find-tcc (progcode &rest rest)
  (eetcc progcode)
  (apply 'find-sh "tcc -run $EEC" rest))

(defun find-tcc0 (progcode &rest rest)
  (eetcc progcode)
  (apply 'find-sh0 "tcc -run $EEC" rest))

;; (eeb-define 'eeb-tcc  'eetccnow  "\n//*\n" nil t t)
;;(eeb-define 'eeb-tcc0 'eetccnow0 "\n//*\n" nil t t)


;; «figlet»  (to ".figlet")
;; (find-es "figlet")
;; Other nice fonts: ogre, big

(setq figlet-cmd "figlet -f standard | gsub.lua '' ';;; %1'")
(setq figlet-cmd "figlet -f standard | gsub.lua '' '%% %1'")
(setq figlet-cmd "figlet -f standard | gsub.lua '' '# %1'")
(setq figlet-cmd "figlet -f standard | gsub.lua '' ' # %1'")
(setq figlet-cmd "figlet -f standard | gsub.lua '' ' * %1'")
(setq figlet-cmd "figlet -f standard | gsub.lua '' '-- %1'")
(setq figlet-cmd "figlet -f standard | gsub.lua '' '    -- %1'")
(setq figlet-cmd "figlet -f standard | gsub.lua '' '// %1'")
(setq figlet-cmd "figlet -f standard | gsub.lua '' '*;; %1'")
(setq figlet-cmd "figlet -f standard | gsub.lua '' ' ! %1'")
(setq figlet-cmd "figlet -f standard | gsub.lua '' '     %1'")

(setq figlet-cmd "figlet -f standard | gsub.lua '' '%% %1'")

(defun figlet-region (s e)
  (interactive "r")
  (shell-command-on-region s e figlet-cmd nil t))

;; Tests: (figlet-cmd "!! ")
;;        (find-estring (figlet-string "Foo"))
;;        (find-estring (figlet-string-with "!! " "Foo"))
;;        (find-estring (figlet-string-with "!! " "Metaprogramming"))
;;
(defun figlet-cmd (subpat)
  (format "figlet -w 100 -f standard | gsub.lua '' '%s%%1'" subpat))

(defun figlet-string (str)
  (with-temp-buffer
    (insert str)
    (figlet-region (point-min) (point-max))
    (buffer-substring (point-min) (point-max))))

(defun figlet-string-with (subpat str)
  (let ((figlet-cmd (figlet-cmd subpat)))
    (figlet-string str)))

;; Test: (eek "RET foo <<figlet>>")
(defun figlet (&optional arg)
  "Run `figlet-region' on the current line."
  (interactive "P")
  (if (eq arg 0)
      (progn (find-angg ".emacs" "figlet")
	     (message "Current figlet-cmd: %S" figlet-cmd))
    (figlet-region (ee-bol) (1+ (ee-eol)))))




;; «eshell»  (to ".eshell")
;; (find-es "eshell")
(code-c-d "eshell" (ee-efile "eshell/") "eshell" :gz)
;; (find-eshellfile "")
;; (find-eshellnode "")
;;
;; kensanata
' (add-hook 'eshell-mode-hook
    (lambda ()
      (local-set-key (kbd "C-z") 'bury-buffer)
      (local-set-key (kbd "C-a") 'eshell-bol)
      (local-set-key (kbd "<up>") 'previous-line)
      (local-set-key (kbd "<down>") 'next-line)))

;; (find-efile "eshell/em-hist.el" "defun eshell-save-some-history")
;; (find-efile "eshell/em-hist.el" "defcustom eshell-save-history-on-exit")
;; (setq eshell-save-history-on-exit nil)
;; (find-efile "eshell/em-rebind.el")



;; «unaccent»  (to ".unaccent")
;; (find-angg ".emacs.unibyte" "unaccent")

;; «flip-psne-ness»  (to ".flip-psne-ness")
;; Moved to: (find-eev "eev-edit.el" "ee-flip-psne-ness")
;;
;; (defun flip-psne-ness ()
;;   (interactive)
;;   (if (search-forward-regexp "\\$S/\\(https?\\|ftp\\)/\\|\\(https?\\|ftp\\)://")
;;       (cond ((match-string 1) (replace-match "\\1://"))
;;             ((match-string 2) (replace-match "$S/\\2/")))))

;; (define-key my-mode-map "\M-s" 'flip-psne-ness)


(code-c-d "debfaq" "/usr/share/doc/debian/FAQ/")
;; (find-debfaqfile "debian-faq.en.txt.gz")

;; «find-other-debian-links»  (to ".find-other-debian-links")
;; Add: stuff for unpacking and building from source.
(defun find-other-debian-links (&optional str)
  (interactive (list (ee-no-properties (ee-debpkgname-around-point))))
  (if (or (null str) (equal str ""))
      (setq str "_"))
  (find-elinks `((find-other-debian-links ,str)
		 (find-zsh ,(format "dmissing %s" str))
		 (find-sh  ,(format "apt-file search %s" str))
		 (find-zsh "installeddebs | sort")
		 (find-zsh "installeddebs | sort" ,str)
		 (find-zsh ,(format "installeddebs | sort | grep %s" str))
		 (find-zsh "availabledebs | sort")
		 (find-zsh "availabledebs | sort" ,str)
		 (find-zsh ,(format "availabledebs | sort | grep %s" str))
		 (find-zsh ,(format "acse %s | sort" str))
		 (find-zsh ,(format "acse -i %s | sort" str))
		 (find-zsh ,(format "grep-available %s" str))
		 (find-zsh ,(format "grep-status %s" str)))))

(define-key eev-mode-map "\M-hd" 'find-other-debian-links)



;; «find-ekbmacro-links»  (to ".find-ekbmacro-links")
;; (find-eev "eev-elinks.el" "find-ekbmacro-links")



;; «find-dpkg-build-escript»  (to ".find-dpkg-build-escript")
;; anyone here remembers the precise rules for splitting the names of
;; "dsc" files (a debian source package thing) into parts? I need a
;; regexp for splitting, for example,
;; "http://ftp.debian.org/debian/pool/main/i/imagemagick/imagemagick_6.2.4.5.dfsg1-0.9.dsc"
;; into ("http" "ftp.debian.org/debian/pool/main/i/imagemagick/"
;; "imagemagick" "6.2.4.5.dfsg1" "-0.9")

(defun ee-dsc-url-split (dsc-url)
  "Example:
  (ee-dsc-url-split
   \"http://ftp.debian.org/debian/pool/main/i/imagemagick/imagemagick_6.2.4.5.dfsg1-0.9.dsc\")
  -> (\"http\" \"ftp.debian.org/debian/pool/main/i/imagemagick/\"
      \"imagemagick\" \"6.2.4.5.dfsg1\" \"-0.9\")"
  (let ((prot://dir/ (file-name-directory dsc-url))
	(fname-dsc (file-name-nondirectory dsc-url))
	prot dir/ xxx vvv -sv)
    (if (string-match "^\\([a-z]+\\)://\\(.*\\)" prot://dir/)
	(setq prot (match-string 1 prot://dir/)
	      dir/ (match-string 2 prot://dir/)))
    (if (string-match "^\\([^_]+\\)_\\([^-]+\\)\\(-.*\\)?\\.dsc$" fname-dsc)
	(setq xxx (match-string 1 fname-dsc)
	      vvv (match-string 2 fname-dsc)
	      -sv (or (match-string 3 fname-dsc) "")))
    (list prot dir/ xxx vvv -sv)))

(defun ee-escript-header (title)
  "Example: (find-elinks (ee-escript-header \"Blah blah blah\"))"
  `("#####"
    "#"
    ,(format "# %s" title)
    ,(format "# %s" (date-as-string))
    "#"
    "#####"
    ))

(defun ee-find-dpkg-build-escript (prot dir/ xxx vvv -sv)
  "Example:
  (find-elinks
   (ee-find-dpkg-build-escript
    \"http\" \"ftp.debian.org/debian/pool/main/i/imagemagick/\"
    \"imagemagick\" \"6.2.4.5.dfsg1\" \"-0.9\"))"
  (let ((urld/      (concat prot "://" dir/))
	(localurld/ (concat "$S/" prot "/" dir/)))
    `(,(format "# %s" urld/)
      ,(format "# %s%s_%s%s.dsc"           urld/ xxx vvv -sv)
      ,(format "# %s%s_%s%s.diff.gz"       urld/ xxx vvv -sv)
      ,(format "# %s%s_%s%s.debian.tar.gz" urld/ xxx vvv -sv)
      ,(format "# %s%s_%s.orig.tar.gz"     urld/ xxx vvv)
      "#*"
      ,(format "rm -Rv ~/usrc/%s/"       xxx)
      ,(format "mkdir  ~/usrc/%s/"       xxx)
      ,(format "cd %s"                   localurld/)
      ,(format "cp -v %s_%s* ~/usrc/%s/" xxx vvv xxx)
      ,(format "cd     ~/usrc/%s/"       xxx)
      ,(format "dpkg-source -sn -x %s_%s%s.dsc" xxx vvv -sv)
      ,(format "cd     ~/usrc/%s/%s-%s/"        xxx xxx vvv)
      ,(format "dpkg-buildpackage -us -uc -b -rfakeroot     |& tee odb")
      ""
      "#*"
      ,(format "# (find-fline \"~/usrc/%s/\")" xxx)
      ,(format "* (eepitch-shell)")
      ,(format "cd ~/usrc/%s/"                 xxx)
      ,(format "sudo dpkg -i *.deb")
      ""
      "#*"
      ,(format "# (code-c-d \"%s\" \"~/usrc/%s/%s-%s/\")" xxx xxx xxx vvv)
      ,(format "# (find-%sfile \"\")"                     xxx)
      )))

(defun find-dpkg-build-escript (dsc-url)
"Example: (find-dpkg-build-escript
          \"http://ftp.debian.org/debian/pool/main/g/gv/gv_3.6.2-4.dsc\")"
  (let* ((url-parts (ee-dsc-url-split dsc-url))
	 (xxx (nth 2 url-parts)))
    (find-elinks
     `((find-dpkg-build-escript ,dsc-url)
       ""
       ,@(ee-escript-header (format "%s (from the debian sources)" xxx))
       ""
       ,(format "# <%s-deb-src>" xxx)
       ,@(apply 'ee-find-dpkg-build-escript url-parts)
       ))))

;; (find-efunctiondescr 'find-dpkg-build-escript)
;; (find-efunctiondescr 'ee-find-dpkg-build-escript)
;; (find-efunctiondescr 'ee-escript-header)

;; (find-dpkg-build-escript "http://ftp.debian.org/debian/pool/main/g/gv/gv_3.6.2-4.dsc")
;; (brdsc  "http://ftp.debian.org/debian/pool/main/g/gv/gv_3.6.2-4.dsc")

(code-brurl 'find-dpkg-build-escript
	    :remote 'brdsc :dired 'brdscd)



;; 2006sep09 - overrides the default
;; «find-file-links»  (to ".find-file-links")
;; (find-efunction 'find-file-links)

(defun ee-find-file-extra-links (fname)
  (list
   ""
   (ee-replace-prefix "~/"      "http://anggtwu.net/" fname)
   (ee-replace-prefix "~/TH/L/" "http://anggtwu.net/" fname)
   (ee-replace-prefix "~/"      "file:///home/edrx/TH/L/" fname)
   (ee-replace-prefix "~/TH/L/" "file:///home/edrx/TH/L/" fname)
   ))

;; (find-eevfile "eev-insert.el")
;; (find-eevfile "eev-insert.el" "defun find-file-links")

;; '
;; (defun find-file-links (fname &rest rest)
;;   "Visit a temporary buffer containing hyperlinks related a file."
;;   (interactive (list (or (buffer-file-name) default-directory)))
;;   (apply 'find-elinks
;;          `((find-file-links ,fname)
;;            ""
;;            (find-fline ,fname)
;;            ,@(let ((home (ee-expand "$HOME/")))
;;                (if (ee-prefixp home fname)
;;                    (let ((homeless-fname (ee-remove-prefix home fname)))
;;                      `((find-fline ,(concat "~/" homeless-fname))
;;                        ""
;;                        ,(format "http://anggtwu.net/%s" homeless-fname)
;;                        ,(format "http://anggtwu.net/%s.html" homeless-fname)))))
;;            ,@(let ((vwt (ee-expand "$VWT/")))
;;                (if (ee-prefixp vwt fname)
;;                    (let ((vwtless-fname (ee-remove-prefix vwt fname))
;;                          (vwt-dir-url (format "http://%s/tmp/" (myip-as-string))))
;;                      `((find-fline ,(format "$VWT/%s" vwtless-fname))
;;                        ,(format "%s%s" vwt-dir-url vwtless-fname)))))
;;            ""
;;            ,@(ee-links-for-findxxxfile (ee-expand fname)))
;;          rest))

;; (progn (find-file-links (ee-expand "$VWT/1.txt")))


;; «find-bgprocess»  (to ".find-bgprocess")
;; (ee-unsplit (ee-split "aa   bb cc"))
;; (find-bgprocess `("xzgv" ,(ee-expand "$S/http/www.domai.com/-today/")))
;; (find-bgprocess                 "xzgv $S/http/www.domai.com/-today/" t)
;; (find-efunction 'find-callprocess0)

'(

(defun ee-split (str)
  "Return a list of the \"words\" at STR by splitting it at whitespace.
If STR is already a list return it unchanged."
  (if (stringp str)
      (split-string str "[ \t]+")
    str))

(defun ee-unsplit (list)
  "Concatenate the \"words\" in LIST into a big string, using spaces.
If LIST is already a string return it unchanged."
  (if (listp list)
      (mapconcat 'identity list " ")
    list))

'
(defun find-bgprocess (program-and-args &optional expand)
  "Start the background process PROGRAM-AND-ARGS.
PROGRAM-AND-ARGS can be either a string or a list of strings; see
`ee-split'. If EXPAND is non-nil then run `ee-expand' on each
component of PROGRAM-AND-ARGS. The process runs in background and
its output (including error messages) goes to the buffer
\"*Messages*\". "
  (let ((list (ee-split program-and-args)))
    (if expand (setq list (mapcar 'ee-expand list)))
    (apply 'start-process (car list) "*Messages*" list)))

;;-------
;; (find-eev "eev-mini.el")

)

;;

(defun find-xzgv (dir)
  (find-bgprocess `("xzgv" ,dir)))
(defun find-xzgvf (dir)
  (find-bgprocess `("xzgv" "-f" ,dir)))
(defun find-gqview (dir)
  (find-bgprocess `("gqview" ,dir)))



;; «sshot»  (to ".sshot")
;; (find-angg "elisp/sshot.el")
;; (find-fline "~/flipbooks/" "eesteps")
;; (find-sshot "~/flipbooks/eesteps" 1)

;; 2007nov27: commenting this out - use eev-sshot instead.
'(

;; (find-anggfile "bin/sshot-uniq.lua")
;; (find-efunction 'eeurl-dired-file-name-at-point)
;;
(defun sshot-uniq (stem)
  (interactive
   (list
    (read-string "Screenshot stem: "
		 (file-name-sans-versions (dired-get-filename) t))))
  (find-sh (format "sshot-uniq.lua %s" stem)))

;; A "template" for screenshot-taking:
;;   (set-frame-size (selected-frame) 80 25)
;;   (recenter 12)
;;   (sshot-init "/tmp/sshot/eesteps")
;;   (find-efunctiondescr 'eesteps)
;;   (sshot-blink)
;;   (sshot-write-html)
;;   (find-fline (sshot-dir))
;;   (find-fline "/tmp/sshot/" "eesteps")
;;   (find-sshot "/tmp/sshot/eesteps" 1)
;;   (sshot-uniq "/tmp/sshot/eesteps")
;;   (find-sh  "cd /tmp/sshot/ && tar -cvzf eesteps.tgz eesteps{.html,_*.png}")
;;   (find-sh0 "cp -v /tmp/sshot/eesteps.tgz ~/flipbooks/")
;;   (find-fline  "~/flipbooks/")
;;   (find-sh  "cd ~/flipbooks/ && tar -xvzf eesteps.tgz")

(autoload 'sshot-init "sshot")
(autoload 'find-sshot "sshot")
(autoload 'sshot-write-html "sshot")

)



;; «defalias-hard-maybe»  (to ".defalias-hard-maybe")
;;
(defun defalias-hard (new-symbol old-symbol)
  (fset new-symbol (symbol-function old-symbol))
  new-symbol)

(defun defalias-hard-maybe (new-symbol old-symbol)
  (unless (fboundp new-symbol) (defalias-hard new-symbol old-symbol)))

;; (find-elnode "Function Cells")
;; (require 'rcirc)
;; (fmakunbound         'rcirc-print-orig)
;; (defalias-hard-maybe 'rcirc-print-orig 'rcirc-print)
;; (find-efunctiond     'rcirc-print-orig)

;; How do I make defalias-hard and defalias-hard-maybe fontify as
;; defalias?
;; (find-efunction 'emacs-lisp-mode)
;; (find-ecvsfile "lisp/")
;; (find-elgrep "grep -nH -e font-lock-function-name-face $(find * -name '*.el')")

;; (code-c-d "el"  ee-emacs-lisp-directory "elisp" :grep)




;; «ee-kill-this-buffer»  (to ".ee-kill-this-buffer")
;; (find-enode "Command Index" "* delete-other-windows:")
;; (find-efunction 'kill-buffer-and-window)
;; (find-efunction 'delete-window)

(defvar ee-kill-buffer-kills-window nil)
(make-variable-buffer-local 'ee-kill-buffer-kills-window)

;; Argument: permament

(defun ee-kbkw ()
  "Set `ee-kill-buffer-kills-window' to t in this buffer."
  (interactive)
  (put 'ee-kill-buffer-kills-window 'permanent-local t)
  (setq ee-kill-buffer-kills-window t))

(defun ee-delete-window (&optional window)
  "Like `delete-window', but do not raise an error on failure."
  (interactive)
  (condition-case nil
      (delete-window window)
    (error nil)))

(defun ee-kill-this-buffer-and-window ()
  "Run `kill-this-buffer', then `ee-delete-window'."
  (interactive)
  (kill-this-buffer)
  (ee-delete-window))

;; (defun ee-kill-this-buffer ()
;;   "Like `kill-this-buffer', but might delete the current window too."
;;   (interactive)
;;   (if ee-kill-buffer-kills-window
;;       (ee-kill-this-buffer-and-window)
;;     (kill-this-buffer)))

;; (define-key eev-mode-map "\M-k" 'ee-kill-this-buffer)
;; (define-key eev-mode-map "\M-k" 'kill-this-buffer)

;; Run this at fid-gdb
;; (put 'ee-kill-buffer-kills-window 'permanent-local t)
;; (setq ee-kill-buffer-kills-window t)

;; what about M-K?
;; (find-efunction 'kill-this-buffer)



;; (find-teseleapage 20)
;; (find-teseleatext)
;;
(code-xpdf "teselea" "~/LEA/teselea2006.pdf")
(defun find-teseleatext (&rest rest)
  (interactive)
  (apply 'find-pdfpage-pdftotext "~/LEA/teselea2006.pdf" rest))


;; (find-es "icon" "icon-sarge-source")
;; (find-iconfile "")
(code-c-d "icon" "~/usrc/icon/icon-9.4.2/" :grep)



;; «golisp»  (to ".golisp")
;; http://dto.freeshell.org/notebook/GoLisp.html
;; http://dto.freeshell.org/e/golisp.el
;; (eev "psne http://dto.freeshell.org/e/golisp.el; mv -v golisp.el.1 golisp.el")
;; (find-sh0 "cp -v $S/http/dto.freeshell.org/e/golisp.el ~/elisp/")
;; (find-fline "~/elisp/golisp.el")
;;
;; (code-c-d "golisp" "~/elisp/")
;; (find-golispfile "golisp.el" "defface golisp-xref-face")
;; (find-golispfile "golisp.el" "{{fontlocking}}")
;;
(defface golisp-xref-face '((t (:weight normal :bold nil :foreground "gold")))
  "Face for golisp links.")
;;
(setq golisp-xref-bullet 342435)
(setq golisp-anchor-bullet 343416)
(autoload 'golisp-mode "golisp" nil t)





;; (defun ee-find-dvdcopy-script (name)
;;   (format "\
;; * (eechannel-xterm \"A\")
;; cd
;; umount       /tmp/dvd/
;; mkdir        /oldfs/dvds/%s/
;; mount        /tmp/dvd/
;; cd           /tmp/dvd/
;; du -c
;; cp -diPpvR * /oldfs/dvds/%s/
;; cd           /oldfs/dvds/%s/
;; find
;; du -c\n
;; # (find-man \"growisofs\" \"To master and burn an ISO9660\")
;; # (find-sh \"dvd+rw-mediainfo /dev/hdc\")
;; cd /oldfs/dvds/%s/
;; du -c
;; growisofs -dvd-compat -Z /dev/hdc -R -J -v .
;; " name name name name))
;;
;; (defun find-dvdcopy-script (name &rest rest)
;;   (apply 'find-estring (ee-find-dvdcopy-script name) rest))

;; (find-dvdcopy-script "padrone")
;; (find-dvdcopy-script "sheltering")
;; (find-dvdcopy-script "nossamusica")


;; (defun ee-find-bigdvdcopy-script (isoimagefilename nfiles1)
;;   (format "\
;; * (eechannel-xterm \"A\")
;; * (eepitch-shell)
;; mkdir /tmp/dvd/
;;
;; # Check the size
;; sudo umount /tmp/dvd/
;; mount  /tmp/dvd/
;; du -c  /tmp/dvd/
;; find   /tmp/dvd/
;;
;; # Check for partitions with free space
;; df
;;
;; # Copy the DVD image as an .iso
;; # (find-fline \"%s\")
;; # (find-sh0 \"ls -l %s\")
;; cat /dev/hdc > %s
;;
;; # Play
;; vlc dvd://%s
;;
;; # Mount the the .iso image or the real DVD
;; sudo umount /tmp/dvd/
;; mount | grep dvd
;; mount /tmp/dvd/
;; sudo mount -o loop,ro -t iso9660 %s /tmp/dvd/
;; sudo mount -o loop,ro -t udf     %s /tmp/dvd/
;;
;; # Write the .iso into a single DVD-R
;; # (find-sh \"dvd+rw-mediainfo /dev/hdc\")
;; growisofs -dvd-compat -Z /dev/hdc=%s
;;
;; # Check for how to split
;; # (find-zsh \"laf /tmp/dvd/*/*\")
;; du -c $(find /tmp/dvd/ -type f | sort | awk 'NR <= %d')
;; du -c $(find /tmp/dvd/ -type f | sort | awk 'NR  > %d')
;;
;; # (find-man \"growisofs\" \"To master and burn an ISO9660\")
;; # (find-angg \".zshrc\" \"asgraftpoints\")
;; # (find-sh \"dvd+rw-mediainfo /dev/hdc\")
;; cd /tmp/dvd/
;; du -c
;; growisofs -dvd-compat -Z /dev/hdc -R -J -v \\
;;   $(find * -type f | sort | awk 'NR <= %d' | asgraftpoints)
;; growisofs -dvd-compat -Z /dev/hdc -R -J -v \\
;;   $(find * -type f | sort | awk 'NR  > %d' | asgraftpoints)
;; " (file-name-directory isoimagefilename)
;;   isoimagefilename isoimagefilename isoimagefilename isoimagefilename
;;   isoimagefilename isoimagefilename
;;   nfiles1 nfiles1 nfiles1 nfiles1))
;;
;; ;; «find-bigdvdcopy-script»  (to ".find-bigdvdcopy-script")
;; ;;
;; (defun find-bigdvdcopy-script (isoimagefilename nfiles1 &rest rest)
;;   (apply 'find-estring
;; 	 (ee-find-bigdvdcopy-script isoimagefilename nfiles1) rest))
;;
;; (defun find-bigdvdcopy-script (isoimagefilename nfiles1 &rest rest)
;;   (apply 'find-elinks
;; 	 `((find-bigdvdcopy-script ,isoimagefilename ,nfiles1 . ,rest)
;; 	   ""
;; 	   ,(ee-find-bigdvdcopy-script isoimagefilename nfiles1))
;; 	 rest))

;; (find-bigdvdcopy-script "/oldfs/dvds/pantano.iso" 10)
;; (find-bigdvdcopy-script "/oldfs/dvds/castelo.iso" 15)





;; (find-halloweenfile "")
;; (find-halloweengrep "grep -nH -e '^[A-Za-z]' 2.lua")

;; (code-c-d "halloween" "~/HALLOWEEN/" :anchor :grep)
;;
;; (defun fs (&rest rest) (interactive)
;;   (apply 'find-sh "egrep 'function|return' ~/HALLOWEEN/2.lua" rest))


;; «find-cat-to-lp0-script»  (to ".find-cat-to-lp0-script")
;; (find-angg ".zshrc" "MAKEDEV_create")
;; (find-angg ".zshrc" "gsdj")
;; (find-angg "bin/lpdj-tmp")
;; (find-anggfile "bin/" "lpr -> lpdj-tmp")
;; (find-fline "/dev/" "lp0")
;; (find-fline "/dev/usb/" "lp0")
;;
;; (defun find-cat-to-lp0-script ()
;;   (interactive)
;;   (find-estring (format "\
;; gnudoit \"(find-cat-to-lp0-script)\"\n
;; * (eepitch-shell)
;; R
;;   MAKEDEV_create /tmp/lp0 c 6 0 edrx:edrx 0666
;; # MAKEDEV_create /tmp/lp0 c 180 0 edrx:edrx 0666
;; exit
;; cd /tmp/
;; laf
;; %s
;; rm -v /tmp/lp0
;; " (find-sh00 "cd /tmp
;;       for i in o.p[0-9][0-9][0-9]; do
;;         echo \"cat $i > /tmp/lp0\"
;;       done"))))



;; «cltl»  (to ".cltl")
;; (find-es "lisp" "common-lisp-the-language")
;; (code-c-d "cltl" "~/usrc/cltl_src/")
;; (code-dvi "cltl"    (ee-cltlfile "clm.dvi"))
;; (code-dvi "cltldvi" (ee-cltlfile "clm.dvi"))
;; (code-ps  "cltlps"  (ee-cltlfile "clm.ps"))
;; (find-cltlfile "")
;; (find-cltlpage 2)
;; (find-cltlpage (+ 24 80))
;; (find-cltlpage (+ 24 81))
;; (find-cltlpage (+ 24 84))
;; (find-cltlpage (+ 24 86))
;; (find-cltlpage (+ 24 90))

;; (find-sh "pstotext ~/usrc/cltl_src/clm.ps")



(defun ee-first-directory (fname)
  (replace-regexp-in-string "^\\([^/]*\\)\\(/[^/]*\\)*" "\\1" fname))

(defun ee-tar-tzf-first-line (fname)
  (find-sh0 (format "tar -tzf %s 2>&1 | head -n 1" fname)))

(defun ee-tar-tzf-first-directory (fname)
  (ee-first-directory (ee-tar-tzf-first-line fname)))

;; «find-template-untgz»  (to ".find-template-untgz")
;; Superseded by: (find-angg ".emacs.templates" "find-untgz-links")
;;
(defun ee-template-untgz (url &optional c)
  (let* (;; (shortlurl (eeurl-u-to-f url))
	 (shortlurl (ee-url-to-fname url))
	 (lurl (ee-expand shortlurl))
	 (shortd (ee-tar-tzf-first-directory lurl))
	 (d (format "~/usrc/%s" shortd))
	 (date (downcase (format-time-string "%Y%b%d"))))
    `(,(format "#####")
      ,(format "#")
      ,(format "# %s" shortd)
      ,(format "# %s" date)
      ,(format "#")
      ,(format "#####")
      ,(format "")
      ,(format "# %s" url)
      ,(format "#*")
      ,(format "rm -Rv ~/usrc/%s/" shortd)
      ,(format "tar -C ~/usrc/ -xvzf \\")
      ,(format "  %s" shortlurl)
      ,(format "cd     ~/usrc/%s/" shortd)
      ,(format "")
      ,(format "#*")
      ,(format "# (code-c-d %S \"~/usrc/%s/\")" c shortd)
      ,(format "# (find-%sfile \"\")" c)
      )))

(defun find-template-untgz (url &optional c &rest rest)
  (apply 'find-elinks `
   ((find-template-untgz ,url ,c)
    ""
    ,@(ee-template-untgz url c))
   rest))

;; «bruntgz»  (to ".bruntgz")
;; (find-angg ".emacs.templates" "find-untgz-links")
' (code-brurl 'find-template-untgz :remote 'bruntgz)
  (code-brurl 'find-untgz-links    :remote 'bruntgz)




(defun ee-tar-tjf-first-line (fname)
  (find-sh0 (format "tar -tjf %s | head -n 1" fname)))

(defun ee-tar-tjf-first-directory (fname)
  (ee-first-directory (ee-tar-tjf-first-line fname)))

(defun ee-template-untbz2 (url &optional c)
  (let* (;; (shortlurl (eeurl-u-to-f url))
	 (shortlurl (ee-url-to-fname url))
	 (lurl (ee-expand shortlurl))
	 (shortd (ee-tar-tjf-first-directory lurl))
	 (d (format "~/usrc/%s" shortd))
	 (date (downcase (format-time-string "%Y%b%d"))))
    `(,(format "#####")
      ,(format "#")
      ,(format "# %s" shortd)
      ,(format "# %s" date)
      ,(format "#")
      ,(format "#####")
      ,(format "")
      ,(format "# %s" url)
      ,(format "#*")
      ,(format "rm -Rv ~/usrc/%s/" shortd)
      ,(format "tar -C ~/usrc/ -xvjf \\")
      ,(format "  %s" shortlurl)
      ,(format "cd     ~/usrc/%s/" shortd)
      ,(format "")
      ,(format "#*")
      ,(format "# (code-c-d %S \"~/usrc/%s/\")" c shortd)
      ,(format "# (find-%sfile \"\")" c)
      )))

(defun find-template-untbz2 (url &optional c &rest rest)
  (apply 'find-elinks `
   ((find-template-untbz2 ,url ,c)
    ""
    ,@(ee-template-untbz2 url c))
   rest))

(code-brurl 'find-template-untbz2 :remote 'bruntbz2)


;; «find-code-ps-url-links»  (to ".find-code-ps-url-links")
;; «brcps»  (to ".brcps")

;; (find-code-ps-url-links "http://foo/bar.pdf" "foobar")
;; "dvipdf -" doesn't work:
;; (find-man "dvipdf")
;; (find-sh "cd /tmp/ && cat ~/LATEX/tmp.dvi && dvipdf - foo.pdf")

(defun find-code-ps-url-links (url &optional code &rest rest)
  "Example: (find-code-ps-url-links \"http://foo/bar.pdf\" \"foobar\")"
  (setq code (or code "_"))
  (let* ((ee-hyperlink-prefix ";; ")
	 (localurl (eeurl-u-to-f url))
	 (localdir (file-name-directory localurl))
	 (fname    (file-name-nondirectory localurl))
	 )
    (find-elinks
     `((find-code-ps-url-links ,url ,code ,@rest)
       ""
       ,(format ";; %s" url)
       ,(format ";; (find-sh \"cd %s && zcat %s | ps2pdf - %s.pdf\")" localdir fname fname)
       ,(format "(code-ps        %S %S)" code localurl)
       ,(format "(code-pdftotext %S %S)" code localurl)
       ,(format ";; (find-%spage 1)" code)
       ,(format ";; (find-%stext)"   code)
       ) rest)))

(defun find-code-xpdf-url-links (url &optional code &rest rest)
  "Example: (find-code-xpdf-url-links \"http://foo/bar.pdf\" \"foobar\")"
  (setq code (or code "_"))
  (let ((ee-hyperlink-prefix ";; ")
	(localurl (eeurl-u-to-f url)))
    (find-elinks
     `((find-code-xpdf-url-links ,url ,code ,@rest)
       ""
       ,(format ";; %s" url)
       ,(format "(code-xpdf      %S %S)" code localurl)
       ,(format "(code-pdftotext %S %S)" code localurl)
       ,(format ";; (find-%spage 1)" code)
       ,(format ";; (find-%stext)"   code)
       ) rest)))

(code-brurl 'find-code-ps-url-links
            :remote 'brcps :local 'brcpsl :dired 'brcpsd)
(code-brurl 'find-code-xpdf-url-links
            :remote 'brcxpdf :local 'brcxpdfl :dired 'brcxpdfd)




;; «find-pspage-links»  (to ".find-pspage-links")
;; (find-amslmathfile "")
;; (find-fline         (ee-amslmathfile ""))
;; (find-pspage        (ee-amslmathfile "amsldoc.pdf"))
;; (find-pspage-links '(ee-amslmathfile "amsldoc.pdf") "amsldoc")
;;
(defun find-pspage-links (sexp &optional code &rest rest)
  "Example: see (find-efunction 'find-pspage-links)"
  (setq code (or code "_"))
  (find-elinks
   `((find-pspage-links ',sexp ,code ,@rest)
     ""
     ,(format "(find-pspage        %S)" sexp)
     ,(format "(find-pspage-links '%S)" sexp)
     ,(format "(code-ps        %S %S)" code sexp)
     ,(format "(code-pdftotext %S %S)" code sexp)
     ,(format "(find-%spage 1)" code)
     ,(format "(find-%stext)"   code)
     ) rest))


;; «find-jstor-links»  (to ".find-jstor-links")
;; (define-key eev-mode-map "\M-h\M-j" 'find-jstor-links)
;; (find-efunction 'ee-template)

(defun find-jstor-links (&optional numeric code &rest rest)
  (interactive)
  (setq numeric (or numeric "{2222222}"))
  (setq code (or code "_"))
  (apply 'find-elinks `(
    (find-jstor-links ,numeric ,code ,@rest)
    ,(ee-template `(("2222222" ,numeric) ("code" ,code)) "
;; Author: \"Title\"
;; http://www.jstor.org/stable/info/{2222222}
;; http://www.jstor.org/stable/pdfplus/{2222222}.pdf
;; (find-sh0 \"mv -iv /tmp/{2222222}.pdf $S/http/www.jstor.org/stable/pdfplus/\")
\(code-xpdf      \"{code}\" \"$S/http/www.jstor.org/stable/pdfplus/{2222222}.pdf\")
\(code-pdftotext \"{code}\" \"$S/http/www.jstor.org/stable/pdfplus/{2222222}.pdf\")
;; (find-{code}page 1)
;; (find-{code}text)")
    ) rest))

;; (defun find-arxiv-links (&optional url v code &rest rest)
;;   (interactive)
;;   (setq url (or url "http://arxiv.org/abs/0807.1704"))
;;   (setq v (or v "v1"))
;;   (setq code (or code "_"))
;;   (apply 'find-elinks `(
;;     (find-arxiv-links ,url ,v ,code ,@rest)
;;     (find-efunction 'find-arxiv-links)
;;     ,(ee-template
;;       `(("code" ,code)
;; 	("v1" ,v)
;;         ("http://arxiv.org/abs/12.34" ,url)
;;         ("$S/http/arxiv.org/abs/12.34" ,(eeurl-u-to-f url))
;;         ("$S/http/arxiv.org/abs/" ,(file-name-directory (eeurl-u-to-f url)))
;;         ("12.34" ,(file-name-nondirectory url))
;; 	) "
;; ;; Author: \"Title\"
;; ;; {http://arxiv.org/abs/12.34}
;; ;; {http://arxiv.org/abs/12.34}v1.dvi
;; ;; {http://arxiv.org/abs/12.34}v1.pdf
;; ;; (find-fline \"{$S/http/arxiv.org/abs/}\" \"{12.34}\")
;; ;; (find-sh0 \"mv -iv /tmp/{12.34}* {$S/http/arxiv.org/abs/}\")
;; \(code-dvi       \"{code}\" \"{$S/http/arxiv.org/abs/12.34}{v1}.dvi\")
;; \(code-xpdf      \"{code}\" \"{$S/http/arxiv.org/abs/12.34}{v1}.pdf\")
;; \(code-pdftotext \"{code}\" \"{$S/http/arxiv.org/abs/12.34}{v1}.pdf\")
;; ;; (find-{code}page 1)
;; ;; (find-{code}text)")
;;     ) rest))

;; (find-arxiv-links)

;; (code-brurl 'find-arxiv-links :remote 'brarxiv)






;; http://www.hermetic.com/crowley/aba/
;; (code-c-d "mitap" "$S/http/www.hermetic.com/crowley/aba/" :grep)
;; (find-mitapfile "")
;; (find-mitapw3m "index.html")
;; (find-mitapw3m "chap14.html" "Many ends, many means")



(seen 7953)





;; «wikit-edit»  (to ".wikit-edit")
;; (find-es "tcl" "httpwiki")
(defun wikit-edit (interactive) (find-es "tcl" "httpwiki"))



;; «find-eepitch-links»  (to ".find-eepitch-links")
;; (defun find-eepitch-links (&rest rest)
;;   (interactive)
;;   (apply 'find-elinks
;;          `((find-eepitch-links ,@rest)
;;            "* (eepitch-shell)"
;;            "* (eepitch-lua51)"
;;            "* (eepitch-kill)"
;;            ""
;;            (find-angg ".emacs" "find-eepitch-links")
;;            (find-angg ".emacs" "eepitch-kill")
;;            (find-efunction 'eepitch)
;;            (find-eevfile "eev-steps.el")
;;            (find-eevfile "eev-mini-steps.el"))
;;          rest))
;;
;; (define-key eev-mode-map "\M-h\M-p" 'find-eepitch-links)



;; «find-eevarticle-links»  (to ".find-eevarticle-links")
;; (defun find-eevarticle-links (&rest rest)
;;   (interactive (list ""))
;;   (let* ((anchororempty (if (equal (car rest) "") ""  (car rest)))
;; 	 (anchorornil   (if (equal (car rest) "") nil (car rest)))
;; 	 (htmlanchororempty (if anchorornil (concat "#" anchorornil) ""))
;; 	 (htmlanchorornil   (if anchorornil (concat "#" anchorornil) nil))
;; 	 )
;;     (apply 'find-elinks
;; 	   `((find-eevarticle-links ,@rest)
;; 	     (find-angg "TH/eev-article.blogme")
;; 	     (find-angg ".emacs" "find-eevarticle-links")
;; 	     )
;; 	   rest)))
;;
;; (define-key eev-mode-map "\M-h\M-a" 'find-eevarticle-links)


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

(defun filename-at-eol ()
  (let ((line (buffer-substring (ee-bol) (ee-eol))))
    (string-match "\\([^ \t]*\\)$" line)
    (ee-no-properties (match-string 1 line))))

(defun find-anggrumidiff-links (fname &rest rest)
  (interactive (list (filename-at-eol)))
  (let ((anggfname (concat "/tmp/page/angg/" fname))
	(rumifname (concat "/tmp/page/rumi/" fname))
	(homefname (concat              "~/" fname))
	)
    (apply 'find-elinks
	   `((find-anggrumidiff-links ,fname)
	     (find-anggfile "LUA/quickdiff.lua")
	     ""
	     (find-tkdiff ,anggfname ,rumifname)
	     (find-fline ,anggfname)
	     (find-fline ,rumifname)
	     (find-fline ,homefname)
	     (find-sidebyside '(find-fline ,anggfname) '(find-fline ,homefname))
	     (find-sh0 ,(format "cp -v %s %s" anggfname rumifname))
	     (find-sh0 ,(format "cp -v %s %s" rumifname anggfname))
	     (find-sh0 ,(format "cp -v %s %s" anggfname homefname))
	     (find-sh0 ,(format "cp -v %s %s" rumifname homefname)))
	   rest)))

;; (define-key eev-mode-map "\M-ha" 'find-anggrumidiff-links)


;; This is missing from eev.el, why?
' (defmacro eeb-once (&rest body) `(let (eeb-defaults) . ,body))
' (defmacro ee-once  (&rest body) `(let (eeb-defaults) . ,body))


;; «ee-shrink-hyperlink-at-eol»  (to ".ee-shrink-hyperlink-at-eol")
;; (find-eev "eev-edit.el" "ee-shrink-hyperlink-at-eol")



;; 2007apr19
;; (find-angg ".emacs" "eechannel-send-passwd")
;; (find-elnode "Reading a Password")
;; (find-efunction 'ee-hyperlink-prefix)
;; (find-efunction 'eechannel-send)
;; (find-eevfile "eev-steps.el" "defun eechannel-send")
;; (find-eevgrep "grep -nH -e concat *.el")
;; (find-eevgrep "grep -nH -e '\"eev\"' *.el")

;; (code-c-d "eev" "$EEVDIR/" :anchor :grep)
'
(defun eechannel-send (channel &rest strings)
  (if (not channel) (setq channel eechannel-default))
  (ee-write (ee-concat strings) nil "" "" (eechannel-strfile channel))
  (find-sh0 (format "kill -USR1 $(cat %s)" (eechannel-pidfile channel))))

;; «find-setq-links»	(to ".find-setq-links")
;; # (find-setq-links 'k8-password-edrx)
;; # (find-setq-links 'k8-password-root)
;; * (eechannel-xterm "A")
;; ssh edrx@mta13.prv.k8.com.br
;; * (eechannel-send nil k8-password-edrx "\n")
;; su
;; * (eechannel-send nil k8-password-root "\n")
;;
(defun find-setq-links (var &rest rest)
  (interactive)
  (if (not (boundp var)) (set var nil))
  (find-elinks
   `((find-setq-links ',var ,@rest)
     (setq ,var ,(symbol-value var))
     (setq ,var (read-passwd ,(format "%s: " var)))
     )))



;; (code-c-d "rumi" "~/" :anchor)




;; «ee-choosecolor»  (to ".ee-choosecolor")
;; (find-es "tcl" "tk_chooseColor")
;; (find-estring (ee-choosecolor))
;; (find-eev "eev-langs.el" "ee-choosecolor")

;; «find-ecolor-links»  (to ".find-ecolor-links")
;; (find-efunction 'list-colors-display)
;; (find-efunction 'list-colors-print)
;; (find-efunction 'list-colors-print "#%02x%02x%02x")
;; (find-ecolor-links)
;; (find-ecolor-links "sienna")
;; (find-eev "eev-insert.el" "find-ecolor-links")

;; «find-eface»  (to ".find-eface")
;; (find-eev "eev-blinks.el" "find-ebufferandpos" "defun find-eface")
;; (find-eev "eev-blinks.el" "find-wottb")
;; (find-efunction 'find-face-definition)
;; (find-efunction 'find-definition-noselect)
;; (find-egrep "grep -nH -e find-face-definition C*")
;;
;; «find-eface-links»  (to ".find-eface-links")
;; (find-eface-links 'makefile-space)
;; (find-eapropos "foreground")
;; (find-eface-links 'region)
;;
'
(defun find-eface-links (face-symbol &rest rest)
  ;; (interactive (list (read-face-name "Links for face:")))
  (interactive (list (face-at-point)))
  (apply 'find-elinks `(
    (find-eface-links ',face-symbol ,@rest)
    ""
    (find-efacedescr ',face-symbol)
    (find-eface ',face-symbol)
    (customize-face ',face-symbol)
    (set-face-foreground ',face-symbol ,(face-foreground face-symbol))
    (set-face-background ',face-symbol ,(face-background face-symbol))
    (face-id ',face-symbol)
    (find-epp (mapcar (lambda (face) (cons (face-id face) face)) (face-list)))
    (find-ecolors)
    (find-efaces)
    ) rest))

;; (find-eevfile "eev.el" "\\M-h\\M-s")
;; (define-key eev-mode-map "\M-h\M-s" 'find-eface-links)



;; «digirati»  (to ".digirati")
;; (find-rumi "RUMI/baktodo.e" "download-from-svn")
;; (find-baksrvfile "")
(code-c-d "baksrv" "~/svn/adm/todo/bak/srv/" :grep)
;;
;; (find-rumi "RUMI/ruby.e")
;; (find-rumi "RUMI/ruby.e" "rubyway")
;; (find-rubywayfile "")
;; (find-rubywayw3m "toc.html")
(code-c-d "rubyway" "~/usrc/rubyway/0768667208/")
;;
;; (find-es "ruby" "ruby-from-debian-sources-etch")
(code-c-d "rubysrc" "~/usrc/ruby1.8/ruby1.8-1.8.5/" :grep)
(code-c-d "rubysrc" "~/usrc/ruby1.8/ruby1.8-1.8.5/build-tree/ruby-1.8.5/" :grep)

(defun eepitch-osmio () (interactive)
  (eepitch '(find-comintprocess "osmio" "ssh edrx@osmio.prv.k8.com.br")))

(defun eepitch-svl2 () (interactive)
  (eepitch '(find-comintprocess "svl2" "ssh teste@10.7.5.243")))

;; * (eepitch-svl2)
;; * (ansi-color-for-comint-mode-on)

;; (find-es "cvs" "svnbook")
(code-xpdf      "svnbook" "$S/http/svnbook.red-bean.com/en/1.2/svn-book.pdf")
(code-pdftotext "svnbook" "$S/http/svnbook.red-bean.com/en/1.2/svn-book.pdf")
;; (find-svnbookpage 4)
;; (find-svnbookpage (+ 17 44))
;; (find-svnbooktext "Chapter 4. Branching and Merging")

;; A new edition (non-free, on a private machine) of the "pragmatic
;; programmers" etc etc book...
;; http://andre.prv.digirati.com.br/programming_ruby_2nd.pdf
;; (find-es "ruby" "pragmatic")
(code-xpdf      "progruby2" "$S/http/andre.prv.digirati.com.br/programming_ruby_2nd.pdf")
(code-pdftotext "progruby2" "$S/http/andre.prv.digirati.com.br/programming_ruby_2nd.pdf")
;;
;; (find-progruby2page (+ 28 313) "Names")
;; (find-progruby2page (+ 28 343))
;; (find-progruby2page (+ 28 363) "(diagram)")
;; (find-progruby2text)
;; (find-progruby2text "export RI=\"--format ansi --width 70\"")
;; (find-progruby2page (+ 28 330) "Method Definition")
;; (find-progruby2page (+ 28 333) "Invoking a Method")

;; (find-es "ruby" "ruby-in-a-nutshell")
(code-xpdf      "rubynutshell" "~/books/ruby-in-a-nutshell.pdf")
(code-pdftotext "rubynutshell" "~/books/ruby-in-a-nutshell.pdf")
;; (find-rubynutshellpage 45)
;; (find-rubynutshelltext "Among the methods of the modules")

(code-xpdf "railssolutions"
  "~/tmp/FriendsofED.Rails.Solutions.Ruby.on.Rails.Made.Easy.Jan.2007.pdf")
;; (find-railssolutionspage 6)

(code-xpdf      "rubyforrails" "~/tmp/ruby_for_rails.pdf")
(code-pdftotext "rubyforrails" "~/tmp/ruby_for_rails.pdf")
;; (find-rubyforrailspage 1)
;; (find-rubyforrailspage (+ 35 1))
;; (find-rubyforrailspage (+ 35 25) "irb -rrbconfig")
;; (find-rubyforrailstext)
;; (find-rubyforrailstext "irb -rrbconfig")

;; (find-rubyismsfile "")
;; (find-rubyismsw3m "toc.html")
(code-c-d "rubyisms" "~/usrc/rubyisms/0321474074/")

;; «mysql»  (to ".mysql")
;; (find-es "mysql" "mysql-ref")
(code-c-d "mysqlref" "~/usrc/refman-5.0-en.html-chapter/")
;;
;; (find-mysqlrefw3m "index.html")
;; (find-mysqlrefw3m "tutorial.html")
;;
;; (find-es "mysql" "mysql-help")
;; (find-mysqldo "help")
;; (find-mysqldo "help show")
;; (find-mysqldo "help contents")
(defun find-mysqldo (str &rest rest)
  (apply 'find-sh (format "echo '%s' | mysql -u root" str) rest))
(defun find-mysqlvdo (str &rest rest)
  (apply 'find-sh (format "echo '%s' | mysql -u root -t -vvv" str) rest))

;; (defun eepitch-mysql () (interactive)
;;   (eepitch '(let ((process-environment (cons "PAGER=cat" process-environment)))
;;               (find-comintprocess "mysql" "mysql -u root"))))

;; «find-anggupload-links»  (to ".find-anggupload-links")
;; (find-anggupload-links "~/e/sqlite.e")
;;
(defun ee-expand-remove-prefix (prefix fname)
  (ee-remove-prefix (ee-expand prefix) (ee-expand fname)))
;;
(define-key eev-mode-map "\M-h\M-u" 'find-anggupload-links)
(defun find-anggupload-links (fname &rest rest)
  (interactive (list (buffer-file-name)))
  (let ((fnamestem (ee-expand-remove-prefix "~/" fname)))
    (find-elinks
     `((find-anggupload-links ,fname ,@rest)
       (find-angg ,fnamestem)
       ,(format "# http://anggtwu.net/%s"      fnamestem)
       ,(format "# http://anggtwu.net/%s.html" fnamestem)
       ""
       "* (eepitch-eshell)"
       ,(format "cp -v ~/%s /scp:edrx@angg.twu.net:public_html/%s"
		fnamestem fnamestem)
       ""
       "* (eechannel-xterm \"TWU\" '(\"ssh\" \"edrx@angg.twu.net\"))"
       "cd ~/public_html/ && make -f TH/Makefile page |& tee ~/om"
       "cd ~/public_html/ && make -f TH/Makefile page edrx.tgz |& tee ~/om"
       ""
       (find-es "page" "upload-rsync")
       (find-angg ".zshrc" "makepagefromtar")
       (find-angg ".zshrc" "makepage")
       (find-fline "/scp:edrx@angg.twu.net:om")
       (find-fline "/scp:edrx@angg.twu.net:public_html/")
       ))))

;; «find-unpack-chm-links»  (to ".find-unpack-chm-links")
;; (find-zsh "dmissing extract_chmLib")
;; (eev "apti libchm-bin")
(defun find-unpack-chm-links (chm &optional destdir code &rest rest)
  (interactive "f")
  (if (not destdir) (setq destdir "~/usrc/tmpchm/"))
  (if (not code)    (setq code    "tmpchm"))
  (find-elinks
   `((find-unpack-chm-links ,chm ,destdir ,code ,@rest)
     (find-efunction 'find-unpack-chm-links)
     ,@(ee-escript-header code)
     ""
     "#*"
     ,(format "rm -Rv %s" destdir)
     ,(format "mkdir  %s" destdir)
     ,(format "cd     %s" destdir)
     ,(format "extract_chmLib \\")
     ,(format "  %s \\" chm)
     ,(format "  %s" destdir)
     ""
     "#*"
     ,(format "# (code-c-d %S %S)" code destdir)
     ,(format "# (find-%sfile \"\")" code)
     ,(format "# (find-%sw3m \"toc.html\")" code)
     )))

(code-brfile 'find-unpack-chm-links :local 'brunchml :dired 'brunchmd)



(seen 8000)

;;;                  _
;;;   ___  ___ _ __ (_) ___
;;;  / _ \/ _ \ '_ \| |/ __|
;;; |  __/  __/ |_) | | (__
;;;  \___|\___| .__/|_|\___|
;;;           |_|
;;
;; «eepic»  (to ".eepic")
;; (find-eev "eev-mini-steps.el")
;; (find-eev "eev-mini-steps.el" "eechannel-assert")
;; (load "eev-mini-steps")

(defun eepic-gv-assert ()
  (eechannel-assert "eepicgv" `("gv" "-watch" "$EEVTMPDIR/ee.pic.ps")))

(defun eepic-now (s &optional e)
  (interactive "r")
  (ee-write s e ".PS\n" "\n.PE\n" (ee-expand "$EEVTMPDIR/ee.pic"))
  (let ((output (find-sh0 "groff -p $EEVTMPDIR/ee.pic > $EEVTMPDIR/ee.pic.ps")))
    (unless (equal output "")
      (find-estring output)))
  (eepic-gv-assert))

;; (eepic-now "box; box wid 1 ht 1; box same; box")
;; (eepic-now "box; box wid 1 ht 2; box same; box")
;;
;; (find-fline  "$EEVTMPDIR/" "ee.pic")
;; (find-pspage "$EEVTMPDIR/ee.pic.ps")

;; «esrpic»  (to ".esrpic")
;; (find-es "pic" "pic-manual")
;; (find-es "pic" "gpic")
;; (find-angg "PIC/1.pic")
;;
(defun find-esrpicorigtext (&rest rest)
  (apply 'find-sh "zcat /usr/share/doc/groff-base/pic.txt.gz | col -b" rest))
;; (code-ps      "esrpic" "/usr/share/doc/groff-base/pic.ps.gz")
;;
;; (find-sh0 "cd /usr/share/doc/groff-base/ && zcat pic.ps.gz | ps2pdf - ~/tmp/esrpic.pdf")
(code-xpdf      "esrpic" "~/tmp/esrpic.pdf")
(code-pdftotext "esrpic" "~/tmp/esrpic.pdf")
;;
;; (find-esrpicpage      1  "Contents")
;; (find-esrpictext "")
;;
;; (find-esrpicpage 12   "9. Naming Objects")
;; (find-esrpictext      "9. Naming Objects")
;; (find-esrpicorigtext "9.  Naming Objects")



;; (find-eevarticlesection "shorter-hyperlinks")
(defun find-eevarticlesection (&rest rest)
  (interactive)
  (apply 'find-angg "TH/eev-article.blogme" rest))


(code-c-d "keplersrc" "~/usrc/kepler-1.1/")
(code-c-d "kepler"    "~/usrc/kepler/")



;; «find-adduser-links»  (to ".find-adduser-links")
;; (find-adduser-links)
;; (find-adduser-links "aleph" "aleph")
(defun find-adduser-links (&optional username password)
  (interactive)
  (setq username (or username "foo"))
  (setq password (or password "1234"))
  (setq homedir (format "/home/%s/" username))
  (find-elinks `(
    (find-adduser-links ,username ,password)
    ""
    "** (Re)create the user"
    "* (eexterm \"A\")"
    ,(format "sudo rm -Rfv /home/%s/" username)
    ,(format "sudo deluser %s" username)
    ,(format "sudo adduser %s" username)
    ,(format "%s" password)
    ,(format "%s" password)
    ,(format "(fullname)")
    ,(format "(roomnumber)")
    ,(format "(workphone)")
    ,(format "(homephone)")
    ,(format "(other)")
    ,(format "y")
    ""
    "** Test \"su -\" to the new user"
    (find-fline ,homedir)
    ,(format "cd %s" homedir)
    ,(format "su - %s" username)
    ,(format "%s" password)
    ,(format "exit")
    ,(format "exit")
    ""
    ""
    ""
    "** \"su -\" with an authorization to open X windows"
    "* (eexterm \"A\")"
    ,(format "xhost +")
    ,(format "cd  ~%s/" username)
    ,(format "su - %s"  username)
    ,(format "aleph")
    ,(format "export DISPLAY=%s" (getenv "DISPLAY"))
    ,(format "  xterm &")
    ,(format "exit")
    ,(format "exit")
    )))

;; «find-osmio-template»  (to ".find-osmio-template")
(defun find-osmio-template ()
  (interactive)
  (find-elinks '(
    (find-osmio-template)
    (find-efunction 'find-osmio-template)
    ""
    "* (eepitch-osmio)"
    "su -"
    "head -n 1"
    ""
    (find-setq-links 'k8-password-edrx)
    (find-setq-links 'k8-password-root)
    ""
    "* (eechannel-xterm \"osmio\" '(\"ssh\" \"osmio.prv.k8.com.br\"))"
    "* (eechannel-send nil k8-password-edrx \"\\n\")"
    "su"
    "* (eechannel-send nil k8-password-root \"\\n\")"
    "head -n 1"
    ""
    (find-fline "/ssh:osmio.prv.k8.com.br:")
    (find-fline "/su:osmio.prv.k8.com.br:")
    )))


;; «find-template-svnadm»  (to ".find-template-svnadm")
;; (find-template-svnadm "todo/bak/srv/")
;;
;; (defun find-template-svnadm (stem)
;;   (interactive (list "todo/bak/srv/"))
;;   (find-elinks `(
;;     (find-template-svnadm ,stem)
;;     ""
;;     ,(format "# http://svn.prv.digirati.com.br/repos/adm/trunk/%s" stem)
;;     (svn-status ,(format "~/svn/adm/%s" stem))
;;     ""
;;     ,(format "* (eepitch-shell)")
;;     ,(format "cd ~/svn/adm/")
;;     ,(format "svn checkout --username edrx.dig \\")
;;     ,(format "   http://svn.prv.digirati.com.br/repos/adm/trunk/%s" stem)
;;     )))

;; «find-copydvdtohd-script»  (to ".find-copydvdtohd-script")
(defun find-copydvdtohd-script (dir &rest rest)
  (interactive (list "/hda6/movie/"))
  (let ((ee-buffer-name (or ee-buffer-name "*copydvdtohd*"))
	(dirvideots (concat dir "video_ts/")))
    (apply 'find-elinks `(
      (find-copydvdtohd-script ,dir ,@rest)
      (find-fline ,dir)
      (find-fline ,dirvideots)
      (eev ,(format "cd %s" dir))
      (eev ,(format "cd %s" dirvideots))
      ""
      ,(format "* (eechannel-xterm \"A\")")
      ,(format "* (eepitch-shell)")
      ,(format "mkdir /tmp/dvd/")
      ""
      ,(format "sudo umount /tmp/dvd/")
      ,(format "mount  /tmp/dvd/")
      ,(format "du -c  /tmp/dvd/")
      ,(format "find   /tmp/dvd/")
      ,(format "mkdir                    %s"  dir)
      ,(format "(cd /tmp/dvd; cp -av *   %s)" dir)
      ,(format "sudo chown -Rv edrx:edrx %s"  dir)
      ,(format "chmod -v 777             %s*" dir)
      ,(format "umount /tmp/dvd/")
      ) rest)))

;; (find-copydvdtohd-script "/hda6/sacrificio/")
;; (find-copydvdtohd-script "/hda6/manufacturingconsent/")
;; (find-copydvdtohd-script "/hda6/thecorporation/")
;; (find-copydvdtohd-script "/hda6/felakuti/")
;; (find-copydvdtohd-script "/hda6/bomdia/")
;; ^ cp: reading `video_ts/vts_01_5.vob': Input/output error
;; (find-copydvdtohd-script "/hda6/ogostodacereja/")
;; (find-copydvdtohd-script "/hda6/capote/")
;; (find-copydvdtohd-script "/hda6/capitaesdeabril/")


;; Just because these make some scripts clearer
;;
(defun ee-with-newline (str)
  (if (string-match "[^\n]\\'" str) (concat str "\n") str))
(defun eexterm-password (str)
  (eechannel-send nil (ee-with-newline str)))


;; This will force me to clean up some stuff in eev-mini-steps.el
;; (find-eev "eev-mini-steps.el")
;; (load "eev-mini-steps")



;; (find-fline "~/LATEX/2005oct20-seminar.tex")
(code-c-d "2005oct20seminar" "~/LATEX/2005oct20-seminar.tex" :anchor)
(code-dvi "2005oct20seminar" "~/LATEX/2005oct20-seminar.dvi")
;; (find-2005oct20seminarfile "")
;; (find-2005oct20seminar "")
;; (find-2005oct20seminar "" "original-motivation-2")
;; (find-2005oct20seminarpage 1)
;; (find-2005oct20seminarpage 31)

(seen 8500)





(code-c-d "THL" "~/TH/L/" :grep)


;; «davinci»  (to ".davinci")
;; (find-THLw3m "e/davinci.e.html")
;; (find-es "davinci")
;; (find-es "lua5" "ldb-from-tgz")
(code-c-d "ldb" "~/usrc/ldb/" :grep)

(code-c-d "luawiki" "$S/http/lua-users.org/wiki/")
;; (find-luawikiw3m "UsingLuaWithScite.html")
;; To do: the htmlizer for luawikiw3m links should remove the ".html"

(code-c-d "scite"    "~/usrc/scite/scite-1.71/" :grep)
(code-c-d "scitedoc" "~/usrc/scite/scite-1.71/scite/doc/" :grep)
(code-c-d "scite174" "~/usrc/scite174/" :grep)



;; «eepitch-gdb»  (to ".eepitch-gdb")
;; http://article.gmane.org/gmane.emacs.eev.devel/47
;; http://lists.gnu.org/archive/html/eev/2007-07/msg00000.html
;; (find-efunction 'eegud-keys-mode)
;; * (eepitch-gdb-kill "*gud-lua*")
;; * (eepitch-gdb "*gud-lua*" "gdb --annotate=3 ~/usrc/lua-5.1.2/src/lua")
;; br main
;; run

;; (define-key eegud-keys-mode-map "\M-k" 'eegud-kill-this-buffer)
;;
;; (defun eegud-kill-this-buffer ()
;;   (interactive)
;;   (delete-other-windows)
;;   (kill-this-buffer))
;;
;; (defvar ee-gdb-escript-window nil
;;   "An internal variable used to simplify the code of `eepitch-gdb'.
;; The \"e-script window\" is the upper-left quadrant of the frame.")
;;
;; (defvar ee-gdb-gdb-window nil
;;   "An internal variable used to simplify the code of `eepitch-gdb'.
;; The \"gdb window\" is the lower-left quadrant of the frame.")
;;
;; (defvar ee-gdb-source-window nil
;;   "An internal variable used to simplify the code of `eepitch-gdb'.
;; The \"source window\" is the right half of the frame.")
;;
;; (defun eepitch-gdb-window-setup ()
;;   (interactive)
;;   (delete-other-windows)
;;   (split-window-horizontally)  ; left|right
;;   (split-window-vertically)    ; split the left side into upper/lower
;;   (setq ee-gdb-escript-window (selected-window)) ; upper left
;;   (setq ee-gdb-gdb-window     (next-window))	 ; lower left
;;   (setq ee-gdb-source-window  (next-window (next-window)))) ; right
;;
;; ;; 2008jul05
;; (defun eepitch-gdb (buffer-name gdb-prog-and-args)
;;   (eepitch-gdb-window-setup)
;;   (with-selected-window ee-gdb-gdb-window
;;     (if (get-buffer buffer-name)
;; 	(find-ebuffer buffer-name)
;;       (gdb gdb-prog-and-args)
;;       (eegud-keys-mode 1)))
;;   (setq eepitch-code `(find-ebuffer ,buffer-name)))
;;
;; (defun eepitch-gdb-old (buffer-name gdb-prog-and-args)
;;   ;; (eek "s-1 s-3 s-2 s-o")
;;   (delete-other-windows)
;;   (split-window-horizontally)
;;   (split-window-vertically)
;;   (other-window 1)
;;   (if (get-buffer buffer-name)
;;       (find-ebuffer buffer-name)
;;     (gdb gdb-prog-and-args)
;;     (eegud-keys-mode 1))
;;   ;; (eek "s-o s-o")
;;   (other-window 2)
;;   (setq eepitch-code `(find-ebuffer ,buffer-name)))
;;
;; (defun eepitch-gdb-kill (buffer-name)
;;   (if (get-buffer buffer-name) (kill-buffer buffer-name))
;;   (delete-other-windows))

;; «eepitch-gdb-lua»  (to ".eepitch-gdb-lua")
;; (find-es "lua5" "lua-innards-gdb")
;; 2013, low-tech:
(defun eepitch-gdb-lua ()
  (eepitch-comint "*gdb lua_O0*" "gdb -q ~/usrc/lua-5.1.4/src/lua_O0"))

;; Old:
;; (find-es "lua5" "lua-api-from-gdb")
;; (find-es "lua5" "compile-5.1.2-lua_O0")
;; (find-es "lua5" "compile-5.1.4-lua_O0")
;; (find-angg ".lua51/PP.gdb")
;; (find-angg ".lua51/PP.c")
'(

(defun eepitch-gdb-lua ()
  (eepitch-gdb "*gud-lua_O0*"
	       "gdb --annotate=3 --quiet ~/usrc/lua-5.1.2/src/lua_O0"))
(defun eepitch-gdb-lua ()
  (eepitch-gdb "*gud-lua_O0*"
	       "gdb --annotate=3 --quiet ~/usrc/lua-5.1.4/src/lua_O0"))
(defun eepitch-gdb-lua ()
  (eepitch-gdb "*gud-lua_O0*"
	       "gdb -i=mi --quiet ~/usrc/lua-5.1.4/src/lua_O0"))
(defun eepitch-gdb-lua-kill ()
  (eepitch-gdb-kill "*gud-lua_O0*"))

)



;; * (eepitch-gdb-kill "*gud-lua*")
;; * (eepitch-gdb "*gud-lua*" "gdb --annotate=3 ~/usrc/lua-5.1.2/src/lua")
;; * (eepitch-gdb-lua-kill)
;; * (eepitch-gdb-lua)

;; «eepitch-gdb-scite»  (to ".eepitch-gdb-scite")
;; (find-es "davinci" "scite-in-gdb")
(defun eepitch-gdb-scite ()
  (eepitch-gdb "*gud-SciTE*" "gdb --annotate=3 ~/usrc/scite174/scite/bin/SciTE"))
(defun eepitch-gdb-scite-kill ()
  (eepitch-gdb-kill "*gud-SciTE*"))

(defun eepitch-gdb-bait ()
  (eepitch-gdb "*gud-bait*" "gdb --annotate=3 ~/usrc/bait/bait"))
(defun eepitch-gdb-bait-kill ()
  (eepitch-gdb-kill "*gud-bait*"))

;; (find-es "davinci")
;; http://www.tecgraf.puc-rio.br/tecmake/
;; (code-c-d "iup" "~/usrc/iup/" :grep)
;; (code-c-d "iupbinaries" "~/usrc/iupbinaries/")
;; (code-c-d "tecmake"    "~/usrc/tecmake/" :grep)
;; (code-c-d "tecmakedoc" "$S/http/www.tecgraf.puc-rio.br/tecmake/" :grep)
;; 
;; (code-c-d "cd" "~/usrc/cd/" :grep)
;; (code-c-d "im" "~/usrc/im/" :grep)

;; (find-es "anatocc" "K-and-R")
(code-c-d "kandr" "~/usrc/the-c-programming-language/")


;; «tcl-tk»  (to ".tcl-tk")
;; (find-angg ".zshrc" "tcl-tk")
;; (find-tcl84file "")
;; (find-tk84file "")
(code-c-d "tcl84" "~/usrc/tcl8.4/tcl8.4-8.4.12/" :grep)
(code-c-d "tk84"  "~/usrc/tk8.4/tk8.4-8.4.12/" :grep)
(defun eepitch-gdb-wish ()
  (eepitch-gdb "*gud-wish*" "gdb --annotate=3 ~/usrc/tk8.4/tk8.4-8.4.12/unix/wish"))
(defun eepitch-gdb-wish-kill ()
  (eepitch-gdb-kill "*gud-wish*"))
(defun eepitch-gdb-tclsh ()
  (eepitch-gdb "*gud-tclsh*" "gdb --annotate=3 ~/usrc/tcl8.4/tcl8.4-8.4.12/unix/tclsh"))
(defun eepitch-gdb-tclsh-kill ()
  (eepitch-gdb-kill "*gud-tclsh*"))


;; «ee-meta-S»  (to ".ee-meta-S")
;; (find-efunction 'ee-delete-and-extract-line)
;;
;; (defun ee-meta-S () (interactive)
;;   (insert (ee-pph `(find-sh ,(ee-no-properties (ee-delete-and-extract-line)))))
;;   (next-line 1))
;; (define-key eev-mode-map "\M-S" 'ee-meta-S)


;; (find-efacedescr 'w3m-anchor)
;; (find-efacedescr 'org-link)
(make-face 'w3m-anchor)
(set-face-foreground 'w3m-anchor "SteelBlue1")
;; (set-face-foreground 'org-link "SteelBlue1")
;; (find-ecolors)
;; (find-efaces)
;; (find-efaces "w3m-anchor")

;; (find-es "emacs" "w3m-upstream")
;; (add-to-list 'load-path "~/usrc/emacs-w3m/")

;; «org-mode»  (to ".org-mode")
;; (find-es "org" "git")
;; (code-c-d   "org"        (ee-efile "org/") "org" :gz)
(code-c-d      "org"        (ee-locate-library "org.el") "org" :gz)
(code-c-d      "orggit"     "~/usrc/org-mode/")
(code-pdf-page "orgmanual"  "~/usrc/org-mode/doc/org.pdf")
(code-pdf-text "orgmanual"  "~/usrc/org-mode/doc/org.pdf" 10)
(code-pdf-page "orgcard"    "~/usrc/org-mode/doc/orgcard.pdf")
(code-pdf-text "orgcard"    "~/usrc/org-mode/doc/orgcard.pdf")
(code-pdf-page "orgcompact" "~/usrc/org-mode/doc/orgguide.pdf")
(code-pdf-text "orgcompact" "~/usrc/org-mode/doc/orgguide.pdf")
;; (find-orggitfile "")
;; (find-orgmanualpage)
;; (find-orgmanualtext)
;; (find-orgcardpage)
;; (find-orgcardtext)
;; (find-orgcompactpage)
;; (find-orgcompacttext)



;; Tell org-mode to not create and use a display-table.
;; (find-evardescr 'org-display-table)
;; (find-evardescr 'org-ellipsis)
;; (find-egrep "grep -nH -e buffer-display-table $(find * -name '*.el')")
;; (find-efile "textmodes/org.el" "buffer-display-table")
;; (find-efile "textmodes/org.el" "setq buffer-display-table")
;; (find-efile "textmodes/org.el" "defcustom org-ellipsis")
;; (setq org-ellipsis 'org-ellipsis)

;; (find-es "org" "TODO-and-DONE")
(setq org-log-done nil)

;; (code-c-d "org" (ee-efile "org/") "org")
;; (find-orgfile "")
;; (find-orgnode "")
(code-c-d "orgsrc"   "~/usrc/org-mode/")
(code-c-d "orgbabel" "~/usrc/org-mode/contrib/babel/")
(setq org-ellipsis nil)

(make-face 'org-link)
(set-face-foreground 'org-link "CornflowerBlue")
(make-face 'org-level-1)
(set-face-foreground 'org-level-1 "CadetBlue")
(set-face-foreground 'org-level-1 "LightSteelBlue")
(set-face-foreground 'org-level-1 "SteelBlue")
;; (find-ecolor-links)
;; (find-ecolors)

;; http://dto.freeshell.org/notebook/OrgTutorial.html
;; (add-to-list 'load-path "PATH_TO_WHERE_YOU_UNPACKED_ORGMODE")
;; (require 'org)
;; (find-fline "~/ORG/index.org" "Org: e-script to install")
;; (find-orgfile "")

;; (code-c-d "org" "~/usrc/org-4.34/" "org")
;; (add-to-list 'load-path ee-orgdir)
;; (add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
;; (define-key global-map "\C-cl" 'org-store-link)
;; (define-key global-map "\C-ca" 'org-agenda)
;; (setq org-log-done t)




;; «auto-mode-alist-tecmake»  (to ".auto-mode-alist-tecmake")
(add-to-alist 'auto-mode-alist '("\\.mak$" . makefile-mode))
(add-to-alist 'auto-mode-alist '("\\.bsh$" . sh-mode))

(seen 8700)


(code-c-d "iup3" "~/usrc/iup3/" :grep)
(code-c-d "gtk20" "~/bigsrc/gtk+2.0/gtk+2.0-2.10.13/" :grep)
;; (code-c-d "grub2" "~/usrc/grub2/" :grep)

(seen 8729)



;; «code-c-d-new»  (to ".code-c-d-new")
;; (find-eev "eev.el" "code-c-d-new")
;; (find-eev "eev.el" "code-c-d")
;; (find-eev "eev.el" "code-c-d-register")
;; (find-eev "eev-mini.el" "ee-code-c-d")
;; (find-code-c-d-new "CCC" "DDD/" :info "III" :anchor :grep)
;; (find-code-c-d-new "CCC" "DDD/" :info "III" :anchor)
;; (find-code-c-d-new "CCC" "DDD/"       "III" :anchor)
;; (find-code-c-d-new "CCC" "DDD/")
;; (find-code-c-d     "CCC" "DDD/")
;; (code-c-d-new "iup3" "~/usrc/iup3/" :grep :foo)
;; (code-c-d-new "iup3" "~/usrc/iup3/" :grep)
;; (code-c-d     "iup3" "~/usrc/iup3/" :grep)
;; (find-iup3file "")
;; (find-iup3grep "grep -nH -e FUNCPROTO $(find *)")
;; (find-iup3file "src/gtk/iupgtk_drv.h")
;; (:gdb . ee-code-c-d-:gdb)         ; rusty
;; :linux, :xdvi and :gv shouldn't be standard...
;; (:linux  . ee-code-c-d-:linux)
;; (:xdvi   . ee-code-c-d-:xdvi)
;; (:gv     . ee-code-c-d-:gv)



;; (defun ee-find-node (dir manual section &rest rest)
;;   (setq dir (if dir (ee-expand dir) ""))
;;   (apply 'find-node (format "(%s%s)%s" dir manual section) rest)


;; «ee-sexp-remote»  (to ".ee-sexp-remote")
;;
(setq ee-sexp-beg nil)
(setq ee-sexp-end nil)
(setq ee-sexp-buffer nil)

(defun ee-sexp-read ()
  (interactive)
  (eek-forward-sexp)
  (setq ee-sexp-end (point))
  (save-excursion
    (eek-backward-sexp)
    (setq ee-sexp-beg (point)))
  (read (buffer-substring ee-sexp-beg ee-sexp-end)))

(defun ee-sexp-next ()
  (interactive)
  (eek-forward-sexp)
  (eek-backward-sexp))

(defun ee-sexp-remote-read-next ()
  (with-selected-window
      (get-buffer-window ee-sexp-buffer t)
    (prog1 (ee-sexp-read)
      (ee-sexp-next))))

(defun ee-sexp-stop ()
  (with-selected-window
      (get-buffer-window ee-sexp-buffer t)
    (goto-char ee-sexp-beg)
    (error "End of steps")))

;; (define-key my-mode-map (kbd "<f7>")
;;   (lambda (arg) (interactive "P")
;;     (if (eq arg 0)
;; 	(setq ee-sexp-buffer (buffer-name))
;;       (eesteps-perform (ee-sexp-remote-read-next)))))

;; (eev-demos 4)

;; (frame-height)
;; (frame-width)
;; (set-frame-size (selected-frame) 167 59)
;; (set-frame-size (selected-frame) 80 59)
;; (find-elnode "Position Parameters")
;; (find-elnode "Size Parameters")
;; (find-eapropos "frame")
;; (find-angg ".fvwm/keys.fvwm" "4-v,h,b")
;; (find-es "fvwm" "no-borders")
;; (modify-frame-parameters (selected-frame) '((vertical-scroll-bars . nil)))

;; «ee-make-frame»  (to ".ee-make-frame")
(defun ee-make-frame (x y width height &rest rest)
  (select-frame
   (make-frame `((user-position . t) (left . ,x) (top . ,y)
		 (user-size . t) (width . ,width) (height . ,height)
		 (vertical-scroll-bars . nil) ,@rest))))

(defun ee-sexp-setup (&optional x y width height &rest rest)
  (delete-other-windows)
  (delete-other-frames)
  ;; (find-angg ".fvwm/keys.fvwm" "4-v,h,b" "Key v")
  (find-fvwm0 "Current Maximize 0, 100")
  (sleep-for 0.2)
  (ee-make-frame (or x 516) (or y 0)  (or width 80) (or height 20))
  (sleep-for 0.2)
  ;; (find-angg ".fvwm/keys.fvwm" "4-f,g"   "Key f")
  (find-fvwm0 "Current WindowStyle NoTitle, !Borders")
  (sleep-for 0.2)
  (setq ee-sexp-buffer (buffer-name)))

;; «ee-sexp-remote-demo»  (to ".ee-sexp-remote-demo")
'( (progn
     (find-fvwm0 "Current Maximize 0, 100")
     (sleep-for 0.2)
     (delete-other-frames)
     (ee-make-frame 500 0  80 20)
     (ee-bare-frame)
     (setq ee-sexp-buffer (buffer-name))
     (eek "M-O")
     (find-ebuffer "o")
     )

   "<down>" "foobar" "3*<left>"
   (ee-sexp-stop) nil

)

'( (progn
     (ee-sexp-setup)
     (eek "M-O")
     (find-ebuffer "o")
     )

   "<down>" "foobar" "3*<left>"
   (ee-sexp-stop) nil

)


;; Ex: (find-emount-links)
;; (find-sh "dmesg")
;; (find-sh "dmesg | grep ^hd")
;; Persephone, 2007oct08:
;; hdc: TSSTcorpCD/DVDW SH-W162D, ATAPI CD/DVD-ROM drive
;; hdc: ATAPI 48X DVD-ROM DVD-R CD-R/RW drive, 2048kB Cache, UDMA(33)
;; hdd: HL-DT-ST GCE-8526B, ATAPI CD/DVD-ROM drive
;; hdd: ATAPI 52X CD-ROM CD-R/RW drive, 2048kB Cache, UDMA(33)
;;
(defun find-emount-links (&optional dir &rest rest)
  (interactive)
  (find-elinks
    `((find-emount-links ,@rest)
      (find-efunction 'find-emount-links)
      ""
      "* (eepitch-shell)"
      "mkdir /tmp/dvd/"
      "sudo mount -o ro /dev/hdc /tmp/dvd/"
      (find-fline "/tmp/dvd/")
      "sudo umount /tmp/dvd/"
      ""
      "mkdir /tmp/cdrom/"
      "sudo mount -o ro /dev/hdd /tmp/cdrom/"
      (find-fline "/tmp/cdrom/")
      "sudo umount /tmp/cdrom/"
      ""
      (find-sh "dmesg")
      "mkdir /tmp/pen/"
      "sudo mount -o ro /dev/sda1 /tmp/pen/"
      "sudo mount -o ro /dev/sdb1 /tmp/pen/"
      "sudo umount /tmp/pen/"
      (find-fline "/tmp/pen/")
      )))


;; «rename-track»  (to ".rename-track")
;; (find-emode-links 'wdired-mode)
;; (find-efunction-links 'wdired-change-to-wdired-mode)
;; (find-ekeymapdescr wdired-mode-map)

(defun rename-track-string (str)
  (if (string-match "^\\([0-9]+\\)[-_ .]*\\(.*\\)" str)
      (let* ((n (match-string 1 str))
	     (name (match-string 2 str))
	     (newname (replace-regexp-in-string "[ ']" "_" (downcase name))))
	(format "%02d._%s" (string-to-number n) newname))))

(rename-track-string "1 - Foo bar")

(defun rename-track-after-point ()
  (interactive)
  (save-excursion
    (insert
     (rename-track-string
      (delete-and-extract-region (point) (ee-eol)))))
  (next-line 1))

(eval-after-load "wdired"
  '(define-key wdired-mode-map "\M-t" 'rename-track-after-point))

(seen 8900)


;; "1.   Foo bar" -> "01._foo_bar.wav"
;;
(defun rename-wav-tracks (&optional arg)
  (interactive "p")
  (dotimes (i (or arg 1))
    (eek "M-f <right> M-\\ C-e M-\\ .wav C-a <<rename-track-after-point>>")))




;; «firefox»  (to ".firefox")
;; (find-es "javascript")
;; (find-fline "~/.mozilla/")
;; (find-fline "~/.mozilla/firefox/")
;; (find-sh "cd ~/.mozilla/firefox/ && ls -l")
;; (find-sh "cd ~/.mozilla/firefox/ && rm -v default")
;; (find-sh "cd ~/.mozilla/firefox/ && ln -s s59t32wg.default default")
;; (find-fline "~/.mozilla/firefox/default/")
(code-c-d "dotfirefox" "~/.mozilla/firefox/default/")
(code-c-d "firefoxext" "~/.mozilla/firefox/default/extensions/")
;; (find-dotfirefoxfile "")
;; (find-firefoxextfile "")

;; «mozrepl»  (to ".mozrepl")
;; (find-es "javascript" "mozrepl")
;; (find-es "javascript" "mozrepl-2011")
' (code-c-d "mozrepl"        (ee-firefoxextfile "mozrepl@hyperstruct.net/"))
' (code-c-d "mozreplcontent" (ee-mozreplfile "chrome/content/"))
;; (find-mozreplfile "")
;; (find-mozreplcontentfile "")

(defun eepitch-mozrepl () (interactive)
  (eepitch-comint "mozrepl" "telnet localhost 4242"))

;; http://dev.hyperstruct.net/mozlab
;; http://dev.hyperstruct.net/movie/mozrepl.html
;; http://dev.hyperstruct.net/movie/mozrepl.swf
;; http://dev.hyperstruct.net/mozlab/wiki/MozRepl
;; http://dev.hyperstruct.net/mozlab/wiki/MozRepl/Tutorial
;; http://dev.hyperstruct.net/mozlab/wiki/MozRepl/Emacs
;; http://hyperstruct.net/projects/mozrepl
;; http://hyperstruct.net/projects/mozrepl/emacs-integration
;; http://wiki.github.com/bard/mozrepl/custom-commands

(seen 8940)

;; (find-fline "~/.mozilla/firefox/")
;; (find-fline "~/.mozilla/firefox/")
;; (find-mozreplfile "chrome/content/")
;; (find-mozlabfile "")
;; (find-mozlabfile "components/MozRepl.js")
;; (find-mozlabfile "defaults/preferences/mozlab.js")
;; (find-mozlabfile "chrome/mozlab.jar")
;; (find-mozlabfile "chrome/mozlab.jar" "moz.el")
;; -> (find-anggfile "elisp/moz.el")
;; (find-anggfile "elisp/moz.el")
;; (find-anggfile "elisp/moz.el" "(\"localhost\" . 4242)")
;; (find-mozlabfile "chrome/mozlab.jar" "javascript.el")
;; -> (find-anggfile "elisp/javascript.el")

;; «eepitch-moz»  (to ".eepitch-moz")
;; (find-es "javascript" "mozrepl")
;; (find-mozreplfile "chrome/content/")
;; (find-mozreplfile "chrome/content/moz.el" "defalias 'run-mozilla")
;; (find-mozreplfile "chrome/content/moz.el" "defun inferior-moz-switch-to-mozilla")
(defun eepitch-moz ()
  (interactive)
  (require 'moz)
  (eepitch '(run-mozilla nil)))

;; «espresso-mode»  (to ".espresso-mode")
;; (find-mozreplfile "")
;; (find-mozreplfile "chrome/content/")
;; (add-to-list 'auto-mode-alist '("\\.js\\'" . espresso-mode))
;; (autoload 'espresso-mode "espresso" nil t)

;; (find-dotfirefoxfile "")
;; (find-dotfirefoxfile "downloads.rdf")
;; (find-dotfirefoxfile "prefs.js" "default.print_edge_top")

(code-c-d "itsalltext" (ee-dotfirefoxfile "extensions/itsalltext@docwhat.gerf.org/"))
;; https://addons.mozilla.org/en-US/firefox/addon/4125
;; (find-itsalltextfile "")

(code-c-d "tabsopenrelative" (ee-dotfirefoxfile "extensions/tabsopenrelative@jomel.me.uk/"))
;; https://addons.mozilla.org/en-US/firefox/addon/1956
;; (find-tabsopenrelativefile "")

(code-c-d "conkeror"   (ee-dotfirefoxfile "extensions/{a79fe89b-6662-4ff4-8e88-09950ad4dfde}/"))
;; (find-conkerorfile "")
;; http://dev.technomancy.us/conkeror/
;; http://mozdev.org/pipermail/conkeror/
;; http://conkeror.mozdev.org/installation.html
;; (find-conkerorfile "chrome/conkeror.jar")


(seen 9000)


;; «find-emode-links»  (to ".find-emode-links")
;; (find-emode-links 'org-mode)
;;
(defun find-emode-links (symbol &rest rest)
  (interactive (find-function-read))
  (apply 'find-elinks `(
    (find-emode-links ',symbol ,@rest)
    ""
    (find-efunctiondescr ',symbol)
    (find-efunction ',symbol)
    (find-efunctiond ',symbol)
    (find-efunctionpp ',symbol)
    ""
    (find-efunction 'ee-minor-mode-keymap)
    (find-evardescr 'minor-mode-map-alist)
    (find-eppp (mapcar 'car minor-mode-map-alist))
    (find-elinks ,'(mapcar (lambda (xx) `(find-emode-links ,(car xx))) minor-mode-map-alist))
    (find-emode-links ',major-mode)
    ""
    (find-eapropos "^org-.*mode$")
    (find-eapropos "^org-.*map$")
    (find-elinks ,'(mapcar (lambda (x) `(find-emode-links ',x)) (apropos-internal "^org-.*mode$")))
    (find-elinks ,'(mapcar (lambda (x) `(find-ekeymapdescr ,x)) (apropos-internal "^org-.*map$")))
    ) rest))

;; (find-eevfile "eev.el" "\\M-h\\M-s")
(define-key eev-mode-map "\M-h\C-m" 'find-emode-links)





;; «find-sshot-links»  (to ".find-sshot-links")
;; (find-angg ".emacs.templates" "find-sshot-links")
;;
;; Old:
;; (find-sshot-links "/tmp/sshot/test")
;; (define-key eev-mode-map "\M-h\C-s" 'find-sshot-links)
;;
;; (defun find-sshot-links (&optional fnamestem &rest rest)
;;   (interactive)
;;   (if (not fnamestem) (setq fnamestem "/tmp/sshot/test"))
;;   (apply 'find-elinks
;;     `((find-sshot-links ,fnamestem ,@rest)
;;        (find-eevfile "eev-sshot.el")
;;        ""
;;        ,(ee-addhp "Use the geometry of the Emacs window:")
;;        (sshot-save-geom-fvwm)
;;        ""
;;        ,(ee-addhp "Manual setting:")
;;        (sshot-save-geom-tcl)
;;        (find-fline "/tmp/sshot.geom")
;;        (sshot-force-geom ,(find-sh0 "cat /tmp/sshot.geom"))
;;        ""
;;        (global-set-key (kbd "<print>") 'sshot-take+)
;;        (eefvwm0 "Key Print A N   Exec gnudoit '(sshot-take+)'")
;;        (eefvwm0 "Key Print A N   -")
;;        (sshot-blink)
;;        (sshot-init ,fnamestem)
;;        (sshot-write-html)
;;        (find-sshot ,fnamestem 1)
;;        ""
;;        (find-fline ,(file-name-directory fnamestem))
;;        ,(ee-addhp (format "file://%s.html" fnamestem))
;;        ,(ee-addhp "To do: code for packing and uploading")
;;        ) rest))






;; «find-glyphashtml-links»  (to ".find-glyphashtml-links")
;; (find-blogme3file "anggdefs.lua" "eev_math_glyphs_edrx =")
;; (find-eevfile "eev-compose.el")
;; (find-eevfile "eev-glyphs.el")
;; (find-eevfile "eev-math-glyphs.el")
;; (find-efunction 'ee-glyph)
;; (eev-math-glyphs-reset)
;; (eev-math-glyphs-edrx)
;; (find-elnode "Creating Strings")
;; (find-glyphashtml-links "ox")

(defun ee-glyph-bign (char) (aref (aref standard-display-table char) 0))
(defun ee-glyph-char (bign) (logand (- (ash 1 19) 1) bign))
(defun ee-glyph-face-id (bign) (ash bign -19))

;; (define-key eev-mode-map "\M-hg" 'find-glyphashtml-links)
(defun find-glyphashtml-links (composepair &rest rest)
  (interactive (list "<<"))
  (let* ((lowchar (cadr (member composepair eev-composes-all)))
	 (bigchar (ee-glyph-char (ee-glyph-bign lowchar))))
    (apply 'find-elinks
     `((find-glyphashtml-links ,composepair ,@rest)
       (find-eevfile "eev-math-glyphs.el")
       ""
       (cadr (member ,composepair eev-composes-all))
       (ee-glyph-char (ee-glyph-bign ,lowchar))
       (find-eoutput '(insert ,bigchar))
       (find-eleimfile "quail/latin-ltx.el" (string ,bigchar))
       (find-eleimfile "quail/sgml-input.el" (string ,bigchar))
       (require 'htmlize)
       (htmlize-protect-string (string ,bigchar))
       ) rest)))



;; (find-eface-links 'subscript)
;; (find-eface-links 'superscript)
;; (find-efile "textmodes/tex-mode.el" "defun tex-font-lock-suscript")
;; (find-efile "textmodes/tex-mode.el" "defcustom tex-font-script-display")
;; https://lists.gnu.org/archive/html/help-gnu-emacs/2021-02/msg00277.html
;; See: (font-lock-flush)
;;
(setq tex-fontify-script nil)



;; «find-TH»  (to ".find-TH")
;; (find-code-c-d-new "TH" "~/TH/" :anchor :grep)
;; (find-TH "davinci" "long-way")
;;
(code-c-d  "TH" "~/TH/" :anchor :grep)
(defun find-TH (str &rest pos-spec-list)
  (apply 'find-anchor (ee-THfile (concat str ".blogme")) pos-spec-list))


(seen 9106)


(defun find-sh0-if (okmsg command)
   (let ((output (find-sh0 command)))
     (if (equal output okmsg) (message "ok") (find-estring output))))



;; «blogme3»  (to ".blogme3")
;; (find-es "blogme" "interactive")
;; (find-angg "LUA/lua50init.lua" "loadblogme3")
(defun eepitch-blogme3 () (interactive)
  (eepitch-comint "blogme3" "lua51 -e loadblogme3(true) -i"))

(defun find-blogme3-sh0-if (stem)
  (find-sh0-if "" (ee-find-blogme3-sh0-if stem)))

;; Example: (ee-find-blogme3-sh0-if "math-b")
(defun ee-find-blogme3-sh0-if (stem)
  (format "\
    cd ~/TH/L/
    cp ~/TH/%s.blogme ~/TH/L/TH/%s.blogme
    lua51 ~/blogme3/blogme3.lua -o %s.html -i TH/%s.blogme"
    stem stem stem stem))

(defun blogme3-lisp-as-string (stem)
  (format "[#
\(defun c () (interactive) (find-blogme3-sh0-if \"%s\"))
;;    http://angg.twu.net/%s.html
;; file:///home/edrx/TH/L/%s.html
#]
" stem stem stem))

(defun blogme3-tt-as-string ()
  (format "[lua:
  -- (eev-math-glyphs-edrx)
  eev_math_glyphs_edrx()
]\n
\[WITHINDEX
\[#
 #]
\[RULE ----------------------------------------]\n
\[tsec <_>
\[++N]. _
=========
]\n
]
"))

;; (find-estring (blogme3-footer-as-string "xxx"))
(defun blogme3-footer-as-string (&optional stem)
  (format
"[INCLUDE TH/speedbar.blogme]
\[SETFAVICON dednat4/dednat4-icon.png]
\[SETFAVICON IMAGES/forthsun.png]
\[lua: LR = R ]
\[htmlize [J (Title)]\n
]
\[#
 # Local Variables:
 # coding: raw-text-unix
 # modes: (fundamental-mode blogme-mode)
 # End:
#]"))

(defun blogme3-bounded-as-string ()
 "\n#*
\[# (eeblogme-now-bounded)
 # file:///tmp/ee.html
 #]
#*
")

(defun blogme3-stem ()
  (replace-regexp-in-string "\\.blogme" "" (buffer-name)))

(defun blogme3-footer ()
  (interactive)
  (insert (blogme3-footer-as-string (blogme3-stem))))

(defun blogme3-lisp ()
  (interactive)
  (insert (blogme3-lisp-as-string (blogme3-stem))))

(defun blogme3-tt ()
  (interactive)
  (insert (blogme3-tt-as-string)))

(defun blogme3-bounded ()
  (interactive)
  (insert (blogme3-bounded-as-string)))


;; «startup-screen»  (to ".startup-screen")
;; (find-eapropos "inhibit-startup-screen")
;; (find-efile "startup.el")
;; (find-efile "startup.el" "defcustom fancy-splash-image")
;; (find-efile "startup.el" "defun fancy-splash-head")
;; (find-evardescr 'inhibit-startup-screen)
(setq inhibit-startup-screen t)

(seen 8900)



;; «dednat6.el»  (to ".dednat6.el")
;; (find-angg "dednat6/dednat6.el")
(load       "~/dednat6/dednat6.el")

;; «dednat6-ftch»  (to ".dednat6-ftch")
;; (find-LATEX "2021fitch.tex" "defftch")
;; (find-es "dednat" "ftch")
(defun ftchskel ()
  (interactive)
  (insert "
%F 1 /
%F 2 \\
%L
%L defftch \"??\"
$$\\pu
  \\ftch{??}
$$
"))

;; «dednat6-vbt»  (to ".dednat6-vbt")
;; (find-LATEX "2021verbatim.tex")
(defun vbtskel ()
  (interactive)
  (insert "
%V
%L
%L defvbt \"??\"
$\\pu
 \\vbt{??}
$
"))




;; «find-wget»  (to ".find-wget")
;; «brwget»     (to ".brwget")
;; Moved to: (find-eev "eev-plinks.el" "find-wget")
;;           (find-eev "eev-brxxx.el" "code-brxxxs" "brwget")
;;
;; Old:
;;
;; (find-efunction 'find-callprocess0-ne)
;; (setq myurl "http://anggtwu.net/eev-current/eev-math-glyphs.el")
;; (find-eoutput '(insert (find-wget00u myurl)))
;;
;; (defun ee-with-raw-text-unix (code)
;;   (let ((coding-system-for-read 'raw-text-unix)
;; 	(coding-system-for-write 'raw-text-unix))
;;     (eval code)))
;; ' (defun find-wget00 (url) (find-callprocess00 `("wget" "-q" "-O" "-" ,url)))
;; ' (defun find-wget00u (url) (ee-with-raw-text-unix `(find-wget00 ,url)))
;;
;; Newer:
;;
;; (find-urlretrieve000 "http://127.0.0.1/")
;; (find-urlretrieve000 "http://127.0.0.1/404")
;; (find-wget "http://127.0.0.1/")
;; (find-wget "http://127.0.0.1/404")
;; (find-urlretrieve000 "http://anggtwu.net/eev-current/eev-math-glyphs.el")
;; (find-wget "http://anggtwu.net/eev-current/eev-math-glyphs.el")
;; (find-wget "http://anggtwu.net/404")
;;
;; (defun find-wget00 (url)
;;   (find-callprocess00 `("wget" "-q" "-O" "-" ,url)))
;;
;; (defun find-wget (url &rest rest)
;;   (setq url (ee-expand url))
;;   (apply 'find-eoutput-reuse (format "*wget: %s*" url)
;;          `(insert (find-wget00 ,url))
;;          rest))

;; (code-brurl 'find-wget :remote 'brwget)



;; «find-epalette»  (to ".find-epalette")
;; (find-es "emacs" "palette")
;; (find-epalette my-palette)

;; Screenshot: (find-anggfile "IMAGES/palette.png")
;; Entry in my Emacs page: (find-TH "emacs" "palette")

(defun find-epalette (&optional colorstr &rest rest)
  ;; (interactive (list my-palette))
  (interactive)
  (if (not colorstr) (setq colorstr my-palette))
  (apply
   'find-eoutput-reuse
   "*palette*"
   '(progn (insert colorstr)
	   (goto-char (point-min))
	   (while (re-search-forward "#?[A-Za-z0-9]+" nil 'no-error)
	     (set-text-properties
	      (match-beginning 0) (match-end 0)
	      `(face (foreground-color . ,(match-string 0))))))
   rest))

(setq my-palette "
LightSeaGreen MediumAquamarine aquamarine DarkSeaGreen MediumSeaGreen
SeaGreen DarkOliveGreen OliveDrab MediumSpringGreen
LightGreen PaleGreen SpringGreen green GreenYellow YellowGreen
LimeGreen DarkKhaki khaki LightGoldenrod PaleGoldenrod yellow gold
goldenrod RosyBrown tan HotPink PaleVioletRed MediumVioletRed
VioletRed DeepPink magenta1 magenta magenta2 magenta3

SandyBrown DarkSalmon
LightSalmon LightSalmon1 LightSalmon2 LightSalmon3
orange1 orange orange2 orange3 tan1 tan2 tan3 peru
DarkOrange1 DarkOrange DarkOrange2 DarkOrange3
chocolate1 chocolate2 chocolate3 chocolate
sienna1 sienna2 sienna3
salmon salmon1 salmon2 salmon3
coral coral1 coral2 coral3
tomato tomato1 tomato2 tomato3 LightCoral
IndianRed1 IndianRed2 IndianRed3 IndianRed
OrangeRed1 OrangeRed OrangeRed2 OrangeRed3
firebrick1 firebrick2 firebrick3 firebrick
brown1 brown2 brown3
red red1 red2 red3

snow1 snow2 snow3 snow4
seashell1 seashell2 seashell3
AntiqueWhite1 AntiqueWhite2 AntiqueWhite3
LightGoldenrodYellow LightYellow beige
bisque1 bisque2 bisque3
PeachPuff1 PeachPuff2 PeachPuff3
NavajoWhite1 NavajoWhite2 NavajoWhite3
burlywood burlywood1 burlywood2 burlywood3
wheat wheat1 wheat2 wheat3
LemonChiffon1 LemonChiffon2 LemonChiffon3
cornsilk1 cornsilk2 cornsilk3
ivory1 ivory2 ivory3
honeydew1 honeydew2 honeydew3
azure1 azure2 azure3
LavenderBlush1 LavenderBlush2 LavenderBlush3
MistyRose1 MistyRose2 MistyRose3
thistle thistle1 thistle2 thistle3
RosyBrown1 RosyBrown2 RosyBrown3
pink LightPink
plum1 plum2 plum3 plum
orchid1 orchid2 orchid orchid3 violet
MediumOrchid1 MediumOrchid2 MediumOrchid MediumOrchid3
DarkOrchid1 DarkOrchid2 DarkOrchid3 DarkOrchid
purple1 purple2 purple purple3 BlueViolet DarkViolet
MediumPurple1 MediumPurple2 MediumPurple MediumPurple3
MediumSlateBlue LightSlateBlue CornflowerBlue
SlateBlue1 SlateBlue2 SlateBlue3
RoyalBlue1 RoyalBlue2 RoyalBlue3
DodgerBlue DodgerBlue1 DodgerBlue2 DodgerBlue3
DeepSkyBlue DeepSkyBlue1 DeepSkyBlue2 DeepSkyBlue3
SteelBlue1 SteelBlue2 SteelBlue3
SkyBlue SkyBlue1 SkyBlue2 SkyBlue3
LightSkyBlue LightSkyBlue1 LightSkyBlue2 LightSkyBlue3
SlateGray1 SlateGray2 SlateGray3
LightSteelBlue1 LightSteelBlue2 LightSteelBlue LightSteelBlue3
LightBlue1 LightBlue2 LightBlue LightBlue3
LightCyan1 LightCyan2 LightCyan3
PaleTurquoise1 PaleTurquoise2 PaleTurquoise3
PowderBlue PaleTurquoise LightCyan
CadetBlue1 CadetBlue2 CadetBlue3
DarkSlateGray1 DarkSlateGray2 DarkSlateGray3
turquoise1 turquoise2 turquoise3
cyan1 cyan2 cyan3
")


(seen 9082)

;; «tgt»  (to ".tgt")
;; (find-blogme3 "anggdefs.lua" "-tgt")
;; (tgt00 '(find-blogme3 "elisp.lua" "TGT"))
;; (tgt0  '(find-blogme3 "elisp.lua" "TGT"))
;; (tgt   '(find-blogme3 "elisp.lua" "TGT"))

(defun tgt00 (sexp)
  (if (not (stringp sexp)) (setq sexp (format "%S" sexp)))
  (find-callprocess00 `("lua51" "~/blogme3/blogme3.lua" "-tgt" ,sexp)))

(defun tgt0 (sexp) (ee-no-trailing-nl (tgt00 sexp)))

(defun tgt (sexp)
  (interactive (list (ee-last-sexp)))
  (if (stringp sexp) (setq sexp (read sexp)))
  (let* ((ee-buffer-name (or ee-buffer-name "*tgt*")))
    (find-estring (tgt00 sexp))))

(defun tgt (sexp)
  (interactive (list (ee-last-sexp)))
  (if (stringp sexp) (setq sexp (read sexp)))
  (let* ((ee-buffer-name (or ee-buffer-name "*tgt*"))
	 (target (tgt0 sexp))
	 (localtarget (replace-regexp-in-string
		       "^http://anggtwu.net/"
		       "file:///home/edrx/TH/L/"
		       target)))
    (find-elinks `(
      (tgt ',sexp)
      ,sexp
      ""
      ,target
      ,localtarget
      ""
      (find-blogme3 "angglisp.lua")
      ))))

(define-key eev-mode-map "\M-hb" 'tgt)

;; «find-ecp0»  (to ".find-ecp0")
;; (find-es "emacs" "letf")
;; (find-eapropos "tramp")
;; (find-efunction 'tramp-message)
;; (find-efunction 'tramp-error-with-buffer)
;; (find-evardescr 'tramp-verbose)
;; (find-es "emacs" "letf")

;; dired-copy-file is here: (find-efile "dired-aux.el")
;; it has an autoload, but running it straight away without a
;; (require 'dired) doesn't work...

(defun find-ecp0 (from to &optional ok-flag)
  (require 'dired)
  (let ((tramp-verbose 0))
    (dired-copy-file from to ok-flag)))

(seen 9126)


;; «caramelo»  (to ".caramelo")
;; «zumbi»  (to ".zumbi")
;; (find-fline "/etc/hosts")
;; (find-zumbifile "")
;; (find-zumbipagefile "")
;; (find-zumbihomefile "")
;; (find-caramelofile "")
;; (find-tanenbaumfile "")
;; (find-node "(tramp)Inline methods" "`host#42'")
;; (code-c-d "zumbi"  "/scp:edrx@zumbi#222:/home/edrx/")
;; (find-fline "~/.ssh/")
;; (find-fline "~/.ssh/config" "port 222")

;; (code-c-d "zumbi"     "/scp:edrx@_zumbi:/home/edrx/")
;; (code-c-d "zumbipage" "/scp:edrx@_zumbi:/home/edrx/public_html/")
;; (code-c-d "zumbihome" "/scp:edrx@_zumbi:/home/")
;; (code-c-d "caramelo"  "/scp:edrx@caramelo:/home/edrx/")
;; (code-c-d "tanenbaum" "/scp:edrx@tanenbaum:/home/")
;;
;; (code-c-d "zumbipage" "/scp:edrx@_zumbi:/home/edrx/public_html/"
;;                                      :wget "http://zumbi/~edrx/" :ffox)
;; (code-c-d "zumbiwiki" "/scp:edrx@_zumbi:/omnisys/www/www/wiki/"
;;                                      :wget "http://zumbi/wiki/"  :ffox)

;; (find-zumbipagefile "")
;; (find-zumbipageffox "")
;; (find-zumbiwikifile "")
;; (find-zumbiwikiffox "")

;; «zumbiwikicvs»  (to ".zumbiwikicvs")
;; (find-es "omnisys" "zumbi-wiki-cvs")

;; (code-c-d "zumbiwikicvs" "~/usrc/zumbi-wiki/www/wiki/"
;;                             :wget "http://zumbi/wiki/"  :ffox)

;; (find-zumbiwikicvsfile "")

;; «dekooning»  (to ".dekooning")
;; Tramp doesn't like my zsh prompt, but edrsh uses /bin/sh...
;; (find-dekooningfile "")
;; (find-es "ssh" "ssh-copy-id")

(code-c-d "dekooning" "/scp:edrsh@dekooning:/home/edrx/")
(defun eepitch-dekooning () (interactive)
  (eepitch '(find-comintprocess "dekooning" "ssh edrx@dekooning")))
(defun eexterm-dekooning ()
  (eexterm "dekooning" "ssh edrx@dekooning"))

;; «persephone»  (to ".persephone")
;; (find-persephonefile "")
(code-c-d "persephone" "/scp:edrx@persephone:/home/edrx/")
(defun eepitch-persephone () (interactive)
  (eepitch '(find-comintprocess "persephone" "ssh edrx@persephone")))
(defun eexterm-persephone ()
  (eexterm "persephone" "ssh edrx@persephone"))



;; (defun eepitch-zumbi () (interactive)
;;   (eepitch '(find-comintprocess "zumbi" "ssh -p 222 edrx@zumbi")))
;;
;; (defun eepitch-caramelo () (interactive)
;;   (eepitch '(find-comintprocess "caramelo" "ssh edrx@caramelo")))
;;
;; (defun eepitch-tanenbaum () (interactive)
;;   (eepitch '(find-comintprocess "ssh tanenbaum" "ssh edrx@tanenbaum")))
;;
;; (defun eepitch-gomanetstevens () (interactive)
;;   (eepitch '(find-comintprocess "gomanetstevens" "ssh -p 2222 edrx@tanenbaum")))
;;
;; (defun eepitch-gomanetfreire () (interactive)
;;   (eepitch '(find-comintprocess "gomanetfreire"
;; 				"ssh -p 2222 edrx@tanenbaum -t ssh freire")))



;; «sisrot»  (to ".sisrot")
;; (find-zumbihomefile "andre/public_html/projects/cla-sisrot/tmp/")
;; (find-fline "~/tmp/")
;; (find-noronhafile "Sisrot/PD/" "39.11.0080_352_rev00.doc")
(code-xpdf      "sisrotpdp" "~/tmp/PD_Sisrot_CLA_2006dec14.pdf")
(code-pdftotext "sisrotpdp" "~/tmp/PD_Sisrot_CLA_2006dec14.pdf")
;; (find-sisrotpdppage 1)
;; (find-sisrotpdppage 25)
;; (find-sisrotpdppage 126)
;; (find-sisrotpdptext)
;; (find-sisrotpdppage 23  "6.3" "Sinais TU / TD IRIG B")
;; (find-sisrotpdppage 109 "8.6.1.5" "Recepção do sinal de IRIG-B")
;;
;; (find-sisrotpdppage  28 "8.1.3" "telemetria laser")
;; (find-sisrotpdppage  73 "8.4"   "mecanica do pedestal")
;; (find-sisrotpdppage 124 "8.7.1" "manche de comando manual")
;; (find-sisrotpdppage 126 "8.7.2" "Tela de interface" "monitoração")
;; (find-sisrotpdppage 127 "8.7.2" "Tela de interface" "operação")
;;
;; (find-fline "~/tmp/CLA-sisrot_cronograma_expandido.txt")
;; (find-sh "cd /tmp/; a2ps -l 160 -=p1isol ~/tmp/CLA-sisrot_cronograma_expandido.txt")
;; (find-pspage "/tmp/o.ps")
;; (find-sh0 "cd /tmp/; ps2pdf o.ps")
;; (find-pspage "/tmp/o.pdf")
;; (find-sh0 "cp -v /tmp/o.pdf /var/www/tmp/screenies/")
;;
;; Versão obsoleta (2005):
;; (code-ps "sisrotpdp0" "~/tmp/PD_Sisrot_CLA_rev00.pdf")
;; (find-sisrotpdp0page 1)

;; «sisrotpdsw»  (to ".sisrotpdsw")
;; (find-noronhafile "QUALIDADE/1-S G Q/Templates(modelos)/ENGENHARIA/")
;; (find-noronhafile "QUALIDADE/1-S G Q/Templates(modelos)/ENGENHARIA/" "90.01.0054_031_rev02.doc")
;; (find-lnoronhafile "QUALIDADE/1-S G Q/Templates(modelos)/ENGENHARIA/" "90.01.0054_031_rev02.doc")
;; (find-lnoronhafile "QUALIDADE/1-S G Q/Templates(modelos)/ENGENHARIA/")
;; (find-pspage (ee-lnoronhafile "QUALIDADE/1-S G Q/Templates(modelos)/ENGENHARIA/90.01.0054_031_rev02.pdf"))
;; http://zumbi/~silas/_/tmp/90.01.0054_031_rev02.pdf
(code-xpdf      "pdswmodel" "$S/http/zumbi/~silas/_/tmp/90.01.0054_031_rev02.pdf")
(code-pdftotext "pdswmodel" "$S/http/zumbi/~silas/_/tmp/90.01.0054_031_rev02.pdf")
;; (find-pdswmodelpage 1)
;; (find-pdswmodeltext)

;; «sisrot-pdsw-etc»  (to ".sisrot-pdsw-etc")
;; http://www.pragmaticsoftware.com/Templates.asp
;; http://zumbi/~andre/_/resources/project/ProjectMgtGuidelines.pdf
;; http://zumbi/~andre/_/resources/project/SDP_Template.pdf
;; http://zumbi/~andre/_/resources/project/ArchitectureOverview.pdf
(code-xpdf      "pdsw_AO"  "$S/http/zumbi/~andre/_/resources/project/ArchitectureOverview.pdf")
(code-pdftotext "pdsw_AO"  "$S/http/zumbi/~andre/_/resources/project/ArchitectureOverview.pdf")
(code-xpdf      "pdsw_PMG" "$S/http/zumbi/~andre/_/resources/project/ProjectMgtGuidelines.pdf")
(code-pdftotext "pdsw_PMG" "$S/http/zumbi/~andre/_/resources/project/ProjectMgtGuidelines.pdf")
(code-xpdf      "pdsw_ST"  "$S/http/zumbi/~andre/_/resources/project/SDP_Template.pdf")
(code-pdftotext "pdsw_ST"  "$S/http/zumbi/~andre/_/resources/project/SDP_Template.pdf")
;; (find-pdsw_AOpage 1)
;; (find-pdsw_AOtext)
;; (find-pdsw_PMGpage 1)
;; (find-pdsw_PMGtext)
;; (find-pdsw_STpage 1)
;; (find-pdsw_STtext)

;; «sisrot-cameras»  (to ".sisrot-cameras")
;; (find-noronhafile "Sisrot/Sensores/Cedip infrared systems/")
;; (find-noronhafile "Sisrot/Sensores/Cedip infrared systems/DOC/")

;; «noronha»  (to ".noronha")
;; (find-fline "/scp:edrx@caramelo:/etc/fstab")
;; (find-fline "/scp:edrx@caramelo:/etc/fstab" "/mnt/omnisys.files")
(code-c-d  "noronha" "/scp:edrx@caramelo:/mnt/omnisys.files/")
(code-c-d "lnoronha" "$S/http/noronha/")
(code-c-d "lnoronhatpt"
  (ee-lnoronhafile "Telemedidas Redundante/PD/01 Sistema/Procedimentos de testes sistema/"))
;; (find-noronhafile "")
;; (find-lnoronhafile "")
;; (find-lnoronhatptfile "")
;; (find-noronhafile "QUALIDADE/1-S G Q/Procedimentos/")
;; (find-noronhafile "QUALIDADE/1-S G Q/Processos/")
;; (find-noronhafile "QUALIDADE/1-S G Q/Processos/" "01.30.0200_500_rev02.doc")
;; (find-lnoronhafile "QUALIDADE/1-S G Q/Processos/" "01.30.0200_500_rev02.doc")
;; (find-lnoronhafile "QUALIDADE/1-S G Q/Processos/" "01.30.0200_500_rev02.pdf")
;; (find-pspage (ee-lnoronhafile "QUALIDADE/1-S G Q/Processos/01.30.0200_500_rev02.pdf"))

;; «telemedidastestes»  (to ".telemedidastestes")
;; (find-pspage (ee-lnoronhatptfile "95.24.0014_doc456_rev00.pdf"))
(code-xpdf      "telemedidastestes" (ee-lnoronhatptfile "95.24.0014_doc456_rev00.pdf"))
(code-pdftotext "telemedidastestes" (ee-lnoronhatptfile "95.24.0014_doc456_rev00.pdf"))
;; (find-telemedidastestespage 1)
;; (find-telemedidastestespage 29)
;; (find-telemedidastestestext)

;; Make rcirc connect to freenode through a local machine that
;; connects to freenode via an ssh tunnel - override `rcirc-freenode'
;;
(setq omnisys-machines
      '(;; "persephone"
	"caramelo"
	))

(if (member system-name
	    '(;; "persephone"
	      "caramelo"
	      ))
    (defun rcirc-freenode () (interactive)
      (rcirc-connect "tanenbaum"
		     "6666" ; "6667"
		     "edrx"
		     "Eduardo Ochs <http://anggtwu.net/>"
		     "Eduardo Ochs <http://anggtwu.net/>"
		     '("#eev" "#emacs"
		       ;; "#lua" "#forth"
		       ;; "#tcl"
		       ;; "#truta.org" "#omnisys"
		       )))
  )

;; Make the emacs window that I run on caramelo visually distinct
;; M-44 M-j ->
;;   (find-es "netbsd" "cvs-emacs-at-caramelo")
;; (find-eface-links 'mode-line)
;; (find-ecolor-links "grey75")
;; (find-ecolor-links "#ccddbb")
;; (find-ecolor-links "khaki")
;; (find-epalette my-palette "YellowGreen")
;; (find-epalette my-palette "burlywood")
;; (find-epalette "red orange yellow green blue #7000C0 violet")
;; (find-ecolors)
;; (set-face-background 'mode-line "grey75")
;; (set-face-background 'mode-line "#ccddbb")
;; (set-face-background 'mode-line "khaki")
;; (set-face-background 'mode-line "burlywood")
;; (set-face-background 'mode-line "tan")
;;
(if (equal system-name "caramelo")
    (set-face-background 'mode-line "burlywood")
  )
(if (equal system-name "dekooning")
    (set-face-background 'mode-line "tan")
  )


;; «find-omnisys-links»  (to ".find-omnisys-links")
;; (find-omnisys-links)
;;
(defun find-omnisys-links (&rest rest)
  (interactive)
  (apply 'find-elinks `(
    (find-omnisys-links ,@rest)
    (find-efunction 'find-omnisys-links)
    nil
    (find-rcirc-channel-sexps "*tanenbaum*")
    (find-ebuffer "#omnisys@tanenbaum")
    (find-es "netbsd" ".xterms-at-caramelo")
    (find-es "netbsd" "cvs-emacs-at-caramelo")
    (find-es "omnisys")
    (find-es "sisrot")
    (find-angg ".emacs" "sisrot")
    nil
    (find-es "omnisys" "zumbi-wiki-w2html")
    (find-zumbipagefile "")
    ,(ee-addhp "http://zumbi/wiki/")
    ,(ee-addhp "http://zumbi/wiki/project.omnisys-zumbi.Blogme3")
    ,(ee-addhp "http://zumbi/~edrx/")
    ,(ee-addhp "http://zumbi/~edrx/sisrot/")
    ,(ee-addhp "http://zumbi/devel/")
    ,(ee-addhp "http://zumbi/cgi-bin/cvsweb.cgi/cla-telemedidas/")
    ,(ee-addhp "http://zumbi/~andre/projects/omnisys-zumbi/standards/public-filetree.txt")
    ,(ee-addhp "http://meskita/")
    nil
    (find-es "sisrot" "pdsw-upload")
    nil
    (find-zsh "TERM=vt100 muttfetchmail")
    (find-sh0 "cp -v ~/.mutt/inbox /tmp/testmbox")
    (find-fline "/tmp/testmbox")
    (find-mbox "/tmp/testmbox")
    (find-mbox "/tmp/testmbox" "" '(eek "C-u /w /t-2"))
    nil
    ,(ee-addhp "Fetch and auth with 'G', exit with 'x':")
    (find-bgprocess "xterm -e mutt")
    (ee-addhp "http://192.168.51.5/consulta_ramais.asp")
    nil
    (find-zumbipagefile "tmp/")
    (find-zumbipagefile "tmp/TODO")
    (find-es "blogme" "a2html-at-zumbi")
    nil
    (ee-cp (ee-zumbipagefile "tmp/TODO") "~/OMNISYS/")
    (eekill "TODO and index.org")
    (eekill "~/TODO")
    (eekill "~/ORG/index.org")
    (eekill "~/.psne.log")
    ""
    (find-zsh "TERM=vt100 muttfetchmail")
    "* (eepitch-shell)"
    "* (eepitch-kill)"
    "* (eepitch-shell)"
    ""
    "/var/qmail/bin/qmail-inject -feduardo.ochs\100omnisys.com.br <<'%%%'"
    "From: \"Eduardo Nahum Ochs\" <eduardo.ochs\100omnisys.com.br>"
    "To: \"Andre Luiz de Oliveira\" <andre.luiz\100omnisys.com.br>"
    "Subject:"
    "Cc: \"Eduardo Nahum Ochs\" <eduardo.ochs\100omnisys.com.br>, \"Silas Silva\" <silas.silva\100omnisys.com.br>"
    ""
    "%%%"
    ) rest))

;; (find-omnisys-links)
;; (eejump 14)


;; «telemedidas»  (to ".telemedidas")
;; (find-es "omnisys" "telemedidas")
(code-c-d    "telemedidas" "~/usrc/telemedidas/")
(code-c-d "clatelemedidas" "~/usrc/telemedidas/cla-telemedidas/")
(code-c-d        "ihmtelm" "~/usrc/telemedidas/cla-telemedidas/ihmtelm/")
;; (find-telemedidasfile "")
;; (find-clatelemedidasfile "")
;; (find-ihmtelmfile "")
;; (find-ihmtelmfile "tests/")



;; «column-marker»  (to ".column-marker")
;; http://www.emacswiki.org/cgi-bin/wiki/download/column-marker.el
;; http://www.emacswiki.org/cgi-bin/wiki/RulerMode
;; http://www.emacswiki.org/cgi-bin/wiki/PopupRuler



;; «find-mbox»  (to ".find-mbox")
;; (find-es "gnus" "find-mbox")
;; (find-es "gnus" "limiting")
;; (find-sh0 "cp -v ~/.mutt/inbox /tmp/testmbox")
;; (find-mbox "/tmp/testmbox")
;; (find-mbox "/tmp/testmbox" "" '(eek "C-u /w/t-3"))
;;
(defun find-mbox (fname &rest pos-spec-list)
  (setq fname (ee-expand fname))
  (gnus-fetch-group
   (format "nndoc+%s:%s" fname (file-name-nondirectory fname)))
  (apply 'ee-goto-position pos-spec-list))




(seen 9500)



;; «find-urlretrieve-old»  (to ".find-urlretrieve-old")
;; (find-es "emacs" "find-urlretrieve")
;; (find-efunction 'url-retrieve-synchronously)
;; http://lists.gnu.org/archive/html/bug-gnu-emacs/2007-11/msg00065.html
;; http://lists.gnu.org/archive/html/emacs-devel/2007-11/msg00648.html
;; http://lists.gnu.org/archive/html/emacs-devel/2007-11/msg00922.html
;; http://thread.gmane.org/gmane.emacs.bugs/16951
;; http://article.gmane.org/gmane.emacs.bugs/16951
;; http://article.gmane.org/gmane.emacs.devel/82931
;; http://article.gmane.org/gmane.emacs.devel/83205
;; (find-urlretrieve000 "http://127.0.0.1/")
;; (find-urlretrieve000 "http://127.0.0.1/404")
;; (find-urlretrieve00  "http://127.0.0.1/")
;; (find-urlretrieve00  "http://127.0.0.1/404")
;;
;; (defun ee-url-retrieve-body ()
;;   (goto-char (point-min))
;;   (when (looking-at "HTTP/1.1 200 OK")
;;     (ee-goto-position "\n\n")
;;     (buffer-substring (point) (point-max))))
;;
;; (defun find-urlretrieve000 (url)
;;   (find-ebuffer (url-retrieve-synchronously (ee-expand url)))
;;   (ee-url-retrieve-body))
;;
;; (defun find-urlretrieve00 (url)
;;   (let* ((buffer (url-retrieve-synchronously (ee-expand url)))
;; 	 (body (with-current-buffer buffer (ee-url-retrieve-body))))
;;     (if body
;; 	(prog1 body (kill-buffer buffer))
;;       (switch-to-buffer buffer)
;;       (error "find-urlretrieve00: not OK!"))))
;;
;; (defun find-urlretrieve (url &rest rest)
;;   **NOT-YET**)




;; «eshell-url-retrieve»  (to ".eshell-url-retrieve")
;; (find-efile "eshell/")
;; (find-egrep "grep -nH -e cp eshell/*.el")
;; (find-egrep "grep -nH -e eshell-eval-using-options eshell/*.el")
;; (find-efile "eshell/em-unix.el" "defun eshell/cp")
;; (find-efile "eshell/esh-opt.el" "defmacro eshell-eval-using-options")
;; (find-eapropos "eshell-")
;;
(defun eshell/taturana (&rest args)
  "A skeleton for implementing an url-retrieve/wget-like command in eshell."
  (eshell-eval-using-options
   "taturana" args
   '((?v "verbose" nil verbose
	 "explain what is being done")
     (nil "help" nil nil "show this usage screen")
     :preserve-args
     :external "wget"
     :show-usage
     :usage "URL")
   (eshell-printn (format "Taturana: args = %S" args))))

;; A test:
'
(find-estring "
* (eepitch-eshell)
* (eepitch-kill)
* (eepitch-eshell)
taturana
taturana foo
taturana foo bar
")


;; «find-netbsdman»  (to ".find-netbsdman")
;; (find-angg ".emacs" "find-fline-ov")
;;
(defun find-netbsdman (manpage &rest rest)
  (let ((buffername (format "*netbsdman: %s*" manpage))
	(command (format "ssh edrx@caramelo \"sh -c 'PAGER=cat man %s'\"" manpage)))
    (apply 'find-eoutput-reuse
	   buffername
	   `(progn (insert (find-sh0 ,command))
		   (Man-fontify-manpage))
	   rest)))

;; (find-netbsdman "man")
;; (find-netbsdman "1 make")
;; (find-netbsdman "1 make" "Print debugging")



;; 2007dec27: new function, still dirty...
;; Based on:         (find-eev-update-links)
;;   (find-efunction 'find-eev-update-links)

;; «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)
makeLedrxtgz
laf   ~/TH/L/edrx.tgz ~/edrx.tgz
cp -v ~/TH/L/edrx.tgz ~/edrx.tgz
mount -l | grep ' on / '
lsblk --fs

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd
mv -v edrx.tgz edrx-old.tgz
wget http://anggtwu.net/edrx.tgz
# cp -iv /sda5/home/edrx/edrx.tgz .
tar -xvzf edrx.tgz
")
     )
   pos-spec-list))




;; (setq password-cache-expiry nil)

;; (code-c-d "ezilh"
;;  "/scp:ezil@shells.sf.net:/home/users/e/ez/ezil/htdocs/"
;;                     :wget "http://ezil.sourceforge.net/" :ffox)
;; (code-c-d "ezilfr"
;;  "/scp:ezil@shells.sf.net:/home/users/e/ez/ezil/htdocs/forth/rubyforth/"
;;                     :wget "http://ezil.sourceforge.net/forth/rubyforth/" :ffox)

(code-c-d "twup"
 "/scp:edrx@anggtwu.net:/home/edrx/public_html/"
                               :wget "http://anggtwu.net/" :ffox)

;; (find-twupfile "tmp/o")
;; (find-twupwget "tmp/o")
;; (find-ezilhfile "")
;; (find-ezilhwget "")
;; (find-ezilfrfile "")
;; (find-ezilfrwget "")

;; (find-ezilhwget "")
;; (find-ezilffox  "")
;; (find-firefox (ee-ezilhurl ""))

;; «eev-traffic-light-glyphs»  (to ".eev-traffic-light-glyphs")
;; (find-es "blogme" "traffic-lights-glyphs")
;; (find-blogme3 "anggdefs.lua" "TRAFFIC")
;;
(defun eev-traffic-light-glyphs ()
  (interactive)
  (eev-math-glyphs-edrx)
  (add-to-alist 'eev-math-glyphs-name-to-char '("^a" . ?a))
  (add-to-alist 'eev-math-glyphs-name-to-char '("^b" . ?b))
  (add-to-alist 'eev-math-glyphs-name-to-char '("^c" . ?c))
  (eev-glyphs-set-face 'eev-glyph-face-cfont-a "firebrick1"      "firebrick")
  (eev-glyphs-set-face 'eev-glyph-face-cfont-b "orange1"         "orange4")
  (eev-glyphs-set-face 'eev-glyph-face-cfont-c "darkolivegreen1" "darkolivegreen4")
  (eev-math-glyphs-set 'eev-glyph-face-cfont-a "^a" "^a" "\^A")
  (eev-math-glyphs-set 'eev-glyph-face-cfont-b "^b" "^b" "\^B")
  (eev-math-glyphs-set 'eev-glyph-face-cfont-c "^c" "^c" "\^C"))


(message "line 9606")

;; «no-super-key»  (to ".no-super-key")
;; (find-angg ".fvwm/.fvwm2rc" "no-super-key")
;; For freire, a netbsd machine with an old IBM keyboard
(defun no-super-key ()
  (find-fvwm0 "
    Key F5 A M WindowStyle NoTitle, !Borders # no borders
    Key F6 A M WindowStyle Title, Borders    # borders
    Key F7 A M Maximize   0 100  # maximize vertically (toggle)
    Key F8 A M Maximize 100 100  # maximize both ways (toggle)
  ")
  (global-set-key (kbd "C-M-s") 'toggle-scroll-bar)
  (global-set-key (kbd "C-M-d") 'display-time-mode)
  (find-sh0 "~/bin/mysetxkb us"))

;; This is for freire too...
;; (find-fline "/usr/pkg/info/")
(add-to-list 'Info-additional-directory-list "/usr/pkg/info/")
;; (find-sh "locate wget.info")
;; (find-node "(/usr/pkg/info/wget)")
;; (find-node "(wget)")
;; (find-node "(wget)Sample Wgetrc" "http_proxy =")




;; «eepitch-sisrotlua»  (to ".eepitch-sisrotlua")
;; (find-angg "sisrot/")
(defun eepitch-sisrotlua (&optional rubyforthargs)
  (ee-eepitch-comint "~/sisrot/" "sisrotlua" "lua51"))


;; «brecp»  (to ".brecp")

(defun find-cpsne-links (url &rest rest)
  (let* ((localurl (replace-regexp-in-string
		    "^\\(https?\\|ftp\\)://" "$S/\\1/" url))
	 (caramurl (replace-regexp-in-string
		    "^\\(https?\\|ftp\\)://" "snarf/\\1/" url))
	 (localdir (file-name-directory localurl)))
  (find-elinks `(
    (find-cpsne-links ,url ,@rest)
    ,(ee-addhp url)
    nil
    "* (eepitch-caramelo)"
    "* (eepitch-kill)"
    "* (eepitch-caramelo)"
    "S=$HOME/snarf"
    ,(format "mkdir -p %s" localdir)
    ,(format "cd       %s" localdir)
    ,(format "wget --user=guest --password=guest \\")
    ,(format "          %s" url)
    ""
    "* (eepitch-eshell)"
    "* (eepitch-kill)"
    "* (eepitch-eshell)"
    ,(format "mkdir -p %s" localdir)
    ,(format "cd       %s" localdir)
    ,(format "cp -v (ee-caramelofile %S) ." caramurl)
    ,(format "echo    '%s' >> ~/.psne.log" url)
    ""
    ,(ee-addhp url)
    ))))

(code-brurl 'find-cpsne-links :remote 'brecp)



;; «qt»  (to ".qt")
;; (find-es "qt")
;; (find-es "qt" "qtprogramming")
;; (find-angg ".emacs.templates")
;; (find-angg ".emacs.templates" "find-qtdemo-links")
(code-c-d "qt4doc" "/usr/share/qt4/doc/html/")
(code-c-d "qtprogramming" "/tmp/qtprogramming/0131872494/")
;; (find-qt4docfile "")
;; (find-qt4docw3m "index.html")
;; (find-qt4docw3m "classes.html")
;; (find-qtprogrammingfile "")
;; (find-qtprogrammingw3m "toc.html")


(code-c-d "progfiles"   "c:/Arquivos de programs/")
(code-c-d "progfilesff" "c:/Arquivos de programs/Mozilla Firefox/")
(defun find-windowsfirefox (url)
  (interactive (browse-url-interactive-arg "URL: "))
  (find-bgprocess (list (ee-progfilesfffile "firefox.exe") url)))

;; (find-windowsfirefox "http://anggtwu.net/")
;; (find-eevfile "eev-browse-url.el" "'browse-url-firefox")
' (code-brurl 'find-windowsfirefox
              :remote 'brm :local 'brml :dired 'brmd)


(seen 9950)


;; «maut»  (to ".maut")
;; http://www.movimentoautentico.com/
;; (code-c-d "mautr" "/ftp:soraia@www.movimentoautentico.com:public_html/")
;; (code-c-d "maut" "$S/http/www.movimentoautentico.com/")
;; (setenv "MAUT"  (ee-expand "$S/http/www.movimentoautentico.com"))
;; (setenv "MAUTR" (ee-expand "/ftp:soraia@www.movimentoautentico.com:public_html"))
;; (find-fline "$MAUT/")
;; (find-fline "$MAUTR/")

;; Emacs21:
;; (code-c-d "mautr" "/soraia@www.movimentoautentico.com:public_html/")
;; (code-c-d "maut"  "/soraia@www.movimentoautentico.com:public_html/")
;; (code-c-d "maut" "/ftp:soraia@www.movimentoautentico.com:public_html/")
;; (ee-cp (ee-mautfile "introducao.html") (ee-mautrfile "introducao.html") 'over)
;; (ee-cp (ee-mautfile "menu.html")       (ee-mautrfile "menu.html")       'over)
;; (ee-cp (ee-mautfile "quem.html")       (ee-mautrfile "quem.html")       'over)
;; (ee-cp (ee-mautfile "movaut.html")     (ee-mautrfile "movaut.html")     'over)
;; (find-mautrfile "")
;; (find-mautfile "")
;; (find-mautfile "index.html")
;; (find-mautw3m  "index.html")
;; (find-mautfile  "introducao.html")
;; (find-mautw3m   "introducao.html")
;; (find-mautff    "menu.html")
;; (find-mautfile  "menu.html")
;; (find-mautw3m   "menu.html")
;; (find-mautfile "oficinas.html")
;; (find-mautw3m  "oficinas.html")
;; (find-mautfile "quem.html")
;; (find-mautw3m  "quem.html")
;; (find-mautfile "movaut.html")
;; (find-mautw3m  "movaut.html")
;; http://www.movimentoautentico.com/index.html
;; http://www.movimentoautentico.com/introducao.html
;; http://www.movimentoautentico.com/menu.html
;; http://www.movimentoautentico.com/oficinas.html
;; http://www.movimentoautentico.com/quem.html
;; http://www.movimentoautentico.com/movaut.html
;;
;; http://www.movimentoautentico-orig.com/
;; http://www.movimentoautentico.com/
;; http://www.movimentoautentico.com/movaut.html
;; http://www.movimentoautentico.com/english.html
;; http://www.movimentoautentico.com/english-2009jul07.html



;; «lilypond»  (to ".lilypond")
;; (find-books "__comp/__comp.el" "lilypond")
;; (find-es "lilypond" "lilypond")
;; (code-c-d "lilymut" "/usr/share/doc/lilypond/html/input/mutopia/")

;; «lilypond-info»  (to ".lilypond-info")
;; (find-es "lilypond" "lilypond-2022")
;; (find-es "emacs" "Info-directory-list")
(add-to-list 'load-path "/usr/local/lilypond/usr/share/emacs/site-lisp/")
(add-to-list 'Info-directory-list "/usr/local/lilypond/usr/share/info/")
;;
(code-c-d "lilysrc"   "~/bigsrc/lilypond-2.22.2/")
(code-c-d "lilylocal" "/usr/local/lilypond/")
(code-c-d "lilydoc"   "/usr/local/lilypond/usr/share/info/")
(code-c-d "lilylisp"  "/usr/local/lilypond/usr/share/emacs/site-lisp/")
;; (find-lilysrcfile "")
;; (find-lilylocalfile "")
;; (find-lilysrcsh   "find * | sort")
;; (find-lilylocalsh "find * | sort")
;; (find-lilylocalsh "find * | sort | grep pdf")
;; (find-lilydocfile "")
;; (find-lilylispfile "")
;;
(code-c-d "lilylearn" ee-lilydocdir "lilypond-learning")
(code-c-d "lilynot"   ee-lilydocdir "lilypond-notation")
(code-c-d "lilysnip"  ee-lilydocdir "lilypond-snippets")
(code-c-d "lilyusage" ee-lilydocdir "lilypond-usage")
;; (find-lilylearnnode "")
;; (find-lilynotnode "")
;; (find-lilysnipnode "")
;; (find-lilyusagenode "")
;; (find-lilypondnode "")
;; (find-lilypondnode "LilyPond command index")
;; (find-lilypondnode "LilyPond index")
;; (find-lilylearnnode "")
;; (find-lilylearnnode "Tutorial")
;; (find-lilylearnnode "Multiple staves")
;; (find-lilylearnnode "LilyPond index")
;; (find-lilyintnode "")
;; (find-lilyintnode "Indices")
;; (find-lilyprognode "")
;; (find-lilyprognode "LilyPond index")
;; (find-lilysnipnode "")
;; (find-lilyglosnode "")
;; (find-lilymutfile "")
;; (find-lilymutfile "E.Satie/petite-ouverture-a-danser.ly")

;; «lilypond-2.18» (to ".lilypond-2.18")
;; (find-es "lilypond" "lilypond-2.18.2")
;;(code-c-d      "lily"      "~/lilypond/" :anchor)
;;(code-c-d      "lilylisp"  "~/lilypond/usr/share/emacs/site-lisp/")
;;
;; «lilypond-manuals-pdf» (to ".lilypond-manuals-pdf")
;; (find-fline "$S/http/lilypond.org/doc/v2.18/Documentation/")
;; http://lilypond.org/doc/v2.18/Documentation/learning.pdf
;; http://lilypond.org/doc/v2.18/Documentation/snippets.pdf
;; http://lilypond.org/doc/v2.18/Documentation/notation.pdf
;;(code-c-d      "lilydoc"   "/usr/share/doc/lilypond/html/Documentation/")
;;(code-pdf-page "lilyessay" "/usr/share/doc/lilypond/html/Documentation/essay.pdf")
;;(code-pdf-text "lilyessay" "/usr/share/doc/lilypond/html/Documentation/essay.pdf")
;;(code-pdf-page "lilylearn" "/usr/share/doc/lilypond/html/Documentation/learning.pdf")
;;(code-pdf-text "lilylearn" "/usr/share/doc/lilypond/html/Documentation/learning.pdf" 5)
;;(code-pdf-page "lilynotat" "/usr/share/doc/lilypond/html/Documentation/notation.pdf")
;;(code-pdf-text "lilynotat" "/usr/share/doc/lilypond/html/Documentation/notation.pdf")
;; (find-lilylearnpage)
;; (find-lilylearntext)
;; (find-lilylearnpage (+ 5 23) "Fingerings")
;; (find-lilylearntext (+ 5 23) "Fingerings")
;; (find-lilylearnpage (+ 5 26) "Grace notes")
;; (find-lilylearntext (+ 5 26) "Grace notes")
;; (find-lilylearnpage (+ 5 32) "warning: barcheck failed at:")
;; (find-lilylearntext (+ 5 32) "warning: barcheck failed at:")
;; (find-lilylearnpage (+ 5 55) "3.2.3 Voices and vocals")
;; (find-lilylearntext (+ 5 55) "3.2.3 Voices and vocals")
;; (find-lilylearnpage (+ 5 83) "\\repeat")
;; (find-lilylearntext (+ 5 83) "\\repeat")
;; (find-lilylearnpage (+ 5 147) "A.1.4 Notes, lyrics, and chords")
;; (find-lilylearntext (+ 5 147) "A.1.4 Notes, lyrics, and chords")
;; (find-lilylearnpage (+ 5 148) "A.2 Piano templates")
;; (find-lilylearntext (+ 5 148) "A.2 Piano templates")

;; (find-lilysnippage)
;; (find-lilysniptext)

;; (find-lilyrefpage)
;; (find-lilyreftext)
;; (find-lilyrefpage (+ 12 6) "reminder accidental")
;; (find-lilyreftext (+ 12 6) "reminder accidental")
;; (find-lilyrefpage (+ 12 49) "Ties")
;; (find-lilyreftext (+ 12 49) "Ties")
;; (find-lilyrefpage (+ 12 67) "\\partial duration")
;; (find-lilyreftext (+ 12 67) "\\partial duration")
;; (find-lilyrefpage (+ 12 137) "1.4 Repeats")
;; (find-lilyreftext (+ 12 137) "1.4 Repeats")
;; (find-lilyrefpage (+ 12 139) "with one alternate ending:")
;; (find-lilyreftext (+ 12 139) "with one alternate ending:")
;; (find-lilyrefpage (+ 12 384) "2.7 Chord notation")
;; (find-lilyreftext (+ 12 384) "2.7 Chord notation")
;; (find-lilyrefpage (+ 12 389) "2.7.2 Displaying chords")
;; (find-lilyreftext (+ 12 389) "2.7.2 Displaying chords")
;; (find-lilyrefpage (+ 12 448) "3.2 Titles and headers")
;; (find-lilyreftext (+ 12 448) "3.2 Titles and headers")
;; (find-lilyrefpage (+ 12 499) "left-margin")
;; (find-lilyreftext (+ 12 499) "left-margin")
;; (find-lilyrefpage (+ 12 494) "4.1.1 The \\paper block")
;; (find-lilyreftext (+ 12 494) "4.1.1 The \\paper block")
;; (find-lilyrefpage (+ 12 507) "4.3 Breaks")
;; (find-lilyreftext (+ 12 507) "4.3 Breaks")
;; (find-lilyrefpage (+ 12 509) "4.3.2 Page breaking")
;; (find-lilyreftext (+ 12 509) "4.3.2 Page breaking")
;; (find-lilyrefpage (+ 12 699) "A.13 List of articulations")
;; (find-lilyreftext (+ 12 699) "A.13 List of articulations")

;; (find-lilylispfile "")
;; (find-lilylispfile "lilypond-init.el")
(autoload 'LilyPond-mode "lilypond-mode" "LilyPond Editing Mode" t)
(add-to-list 'auto-mode-alist '("\\.ly$" . LilyPond-mode))
(add-to-list 'auto-mode-alist '("\\.ily$" . LilyPond-mode))
(add-hook 'LilyPond-mode-hook (lambda () (turn-on-font-lock)))

(defalias 'lilypond-mode 'LilyPond-mode)

;; «lilypond-repl»  (to ".lilypond-repl")
;; (find-angg "LILYPOND/repl.ly")
(defun eepitch-lilyrepl () (interactive)
  (eepitch-comint "Lilypond REPL" "lilypond ~/LILYPOND/repl.ly"))



;; «metalua»  (to ".metalua")
;; (find-es "lua5" "metalua")
;; (find-angg "bin/setenved-metalua")
(code-c-d "metalua"        "~/usrc/metalua/")
(code-c-d "metaluaext"     "~/usrc/metalua/src/lib/extension/")
(code-c-d "metaluasamples" "~/usrc/metalua/src/samples/")
(code-xpdf      "metalua" (ee-metaluafile "doc/manual/metalua-manual.pdf"))
(code-pdftotext "metalua" (ee-metaluafile "doc/manual/metalua-manual.pdf"))
;; (find-metaluafile "")
;; (find-metaluaextfile "")
;; (find-metaluasamplesfile "")
;; (find-metaluapage 1)
;; (find-metaluatext 1)
(defun eepitch-metalua () (interactive)
  (eepitch-comint "metalua" (ee-metaluafile "target/bin/setenved-metalua")))
(defun eepitch-metalua () (interactive)
  (eepitch-comint "metalua" "setenved-metalua"))



;; «texinfo»  (to ".texinfo")
;; (find-es "texinfo" "texinfo-deb-src")
;; (find-es "texinfo" "texinfo-doc-nonfree-deb-src")
(code-c-d "texinfo" "~/usrc/texinfo/texinfo-4.11.dfsg.1/" "texinfo")
(code-c-d "texi" "~/usrc/texinfo-doc-nonfree/texinfo-doc-nonfree-4.11/" "texinfo")
;; (find-texinode "Top")
;; (find-efile "textmodes/texinfo.el")
(setq texinfo-open-quote  "\"")
(setq texinfo-close-quote "\"")


;; «ee-unglyph»  (to ".ee-unglyph")
;; (ee-unglyph-1 15)
;; (find-eevfile "eev-insert.el" "defun ee-template")
;; (find-eevfile "htmlize-eev.el")
;; (find-eevfile "htmlize-eev.el" "glyphs-faceglyph-to-facechar")
;; (find-efunctiondescr 'regexp-quote)
;; (find-elnode "Search and Replace")
;; On recent CVS Emacsen glyphs can be either numbers (bitfields) or
;; conses like this: (code . face). See:
;; http://article.gmane.org/gmane.emacs.bugs/17576
;; http://article.gmane.org/gmane.emacs.bugs/17607
;; (find-efunction 'glyph-char)

(defun ee-unglyph-0 (glyph)
  "Convert GLYPH to a propertized string of length 1.
GLYPH is usually a number whose higher bits encode a face-id.
In recent versions of GNU Emacs (after 2008-02-27) GLYPH can also
be a cons."
  (propertize (string (glyph-char glyph)) 'face (glyph-face glyph)))

(defun ee-unglyph-1 (glyph-code)
  "Convert a vector of glyphs to a propertized string.
The vector of glyphs is read from the position GLYPH-CODE of
`standard-display-table'."
  (let* ((glyphvec (aref standard-display-table glyph-code)))
    (apply 'concat (mapcar 'ee-unglyph-0 glyphvec))))

(defun ee-unglyph-alist (glyphs)
"Return an alist with entries of this form: (glyph-code . propertized-string).
The returned alist is used by `ee-unglyph-replace' to speed
up (and simplify) the replacement process."
  (mapcar (lambda (glyph-code)
	    (cons glyph-code (ee-unglyph-1 glyph-code)))
	  glyphs))

(defun ee-unglyph-replace (&optional glyphs)
  "Replace - from point onwards - all glyphs listed in the string GLYPHS.
Return the number of substitutions made."
  (setq glyphs (or glyphs "\f
*«»"))
  (let ((re    (format "[%s]" glyphs))
	(alist (ee-unglyph-alist glyphs))
	(n     0))
    (while (re-search-forward re nil t)
      (setq n (1+ n))
      (replace-match (cdr (assoc (char-after (match-beginning 0))
				 alist))))
    n))

(defun ee-unglyph-region (beg end &optional glyphs)
  "Replace all glyphs listed in the string GLYPHS, in a region.
Return the number of substitutions made.
This function does not move point."
  (interactive "r")
  (save-excursion
    (save-restriction
      (narrow-to-region beg end)
      (goto-char (point-min))
      (ee-unglyph-replace glyphs))))

;; Tests:
;;      (assoc 15 (ee-unglyph-alist "*\r"))
;; (cdr (assoc 15 (ee-unglyph-alist "*\r")))
;;
' (find-estring
   "(ee-unglyph-region (point-min) (point-max))\nfoo * «» bar\n\f\n\r\n")


;; (find-efile "doc-view.el" "Welcome to DocView!")
;; (find-evardescr 'auto-mode-alist ". doc-view-mode")
;; (find-efile "files.el" ". doc-view-mode")



;; «eev-math-glyphs-new»  (to ".eev-math-glyphs-new")
;; New code for eev-math-glyphs.el - incomplete
;; (find-eevfile "eev-math-glyphs.el")
;; (find-eevfile "eev-compose.el")
;; (find-elnode "Other Plists")

(when window-system

(require 'eev-math-glyphs)

(setq ee-new-name-to-char-0 '(
    (Theta Pi  Sigma Omega)
    (920   928 931   937)
    (delta epsilon theta lambda nu  pi  rho sigma tau omega)
    (948   949     952   955    957 960 961 963   964 969)
    (top  bot  land lor  supset forall exists _box box  thin:)
    (8868 8869 8743 8744 8835   8704   8707   9633 9744 8758)
    (in   circ cap  cup  infty Int  nabla ge   ^1  sqcap)
    (8712 9675 8745 8746 8747  8711 8734  8805 185 8851)
    (ud&  oplus otimes to   dotli nat  seblock neblock)
    (8523 8853  8855   8594 9480  9838 9623    9629)
    (b  r   s   t)
    (98 114 115 116)
  ))

(setq ee-new-name-to-char (ee-chop3 2 1 ee-new-name-to-char-0))

)

(defun ee-insert-sexp (sexp) (insert (ee-pp0 sexp) "\n"))
(defun find-elist     (list) (find-eoutput `(mapc 'ee-insert-sexp ',list)))
(defun ee-mapcar      (f seq) (mapcar (lambda (args) (apply f args)) seq))
(defun ee-mapc        (f seq) (mapc   (lambda (args) (apply f args)) seq))
(defun ee-insert-name-char (name char) (insert (format "%c %s\n" char name)))

;; (find-elist ee-new-name-to-char-0)
;; (find-elist ee-new-name-to-char)
;; (find-eoutput '(ee-mapc 'ee-insert-name-char ee-new-name-to-char))
;; (find-epp   (ee-chop1 4 (number-sequence 1 10)))
;; (find-elist (ee-chop1 4 (number-sequence 1 10)))

;; (eq 'ee-mapc (intern "ee-mapc"))
;; (eq '\99 (intern "99"))

;; (concat "foo" "bar" "plic" "ploc")
;; (append '(1 2) '(3 4) '(5 6))

;; (find-eevfile "eev-math-glyphs.el")
;;
(defun eev-math-glyph-names (name code &rest rest)
  (add-to-alist 'eev-math-glyphs-name-to-char `(,name . ,code))
  (if rest (apply 'eev-math-glyph-names rest)))




;; «my-faces-sort»  (to ".my-faces-sort")

(defun my-next-single-property-change (pos prop &optional object limit)
  "Like `next-single-property-change', but OBJECT is ignored,
LIMIT is set to (point-max) if nil, and if the property stays
constant until LIMIT then return LIMIT instead of returning nil.
Usage is typically like this:\n
\(let (next)
  (while (setq next (my-next-single-property-change (point) 'face nil limit))
    ...
    (goto-char next)))"
  (let* ((limit (or limit (point-max)))
	 (nextpos (next-single-property-change pos prop nil limit)))
    (cond ((and nextpos (< pos nextpos))
	   nextpos)
	  ((< pos limit)
	   limit))))

(defun my-strings-and-faces (s e)
  "Return a description of the region between S and E as a list
of (face str) pairs. The typical output will be something like:\n
  ((font-lock-doc-face \"foo\")
   (nil \" \")
   ((:foreground \"red\") \"bar\"))"
  (save-excursion
    (let (next pairs (limit (max s e)))
      (goto-char (min s e))
      (while (setq next (my-next-single-property-change (point) 'face nil limit))
	(let ((str  (buffer-substring-no-properties (point) next))
	      (face (get-text-property (point) 'face)))
	  (setq pairs (cons (list face str) pairs))
	  (goto-char next)))
      (nreverse pairs))))

;; Example/test:
' (eesteps '(
    (find-estring "")
    (insert (propertize "foo" 'face 'font-lock-doc-face) " ")
    (insert (propertize "bar" 'face '(:foreground "red")))
    (insert (format "\n%S\n" (my-strings-and-faces (point-min) (point))))
    ;; Result:
    ;; ((font-lock-doc-face "foo") (nil " ") ((:foreground "red") "bar"))
    ))

(defun my-strings-and-faces-face-name (stringandface)
  (let ((face (car stringandface)))
    (if (consp face)
	(format "%S" face)
      (symbol-name face))))

;; (find-node "(cl)Sequence Functions" "delete-duplicates")
(defun my-faces-sort (stringandfacelist)
  (require 'cl)
  (delete-duplicates
   (sort (mapcar 'my-strings-and-faces-face-name stringandfacelist)
	 'string<)
   :test 'equal
   ))

(defun my-simplify-faces (s e)
"Htmlize.el doesn't like faces like (face1 face2) - replace them by their car."
  (let ((start (min s e)) (limit (max s e)) next face (n 0))
    (save-excursion
      (goto-char start)
      (while (setq next (my-next-single-property-change (point) 'face nil limit))
	(setq face (get-text-property (point) 'face))
	(when (and (consp face) (facep (car face)))
	  (put-text-property (point) next 'face (car face))
	  (setq n (1+ n)))
	(goto-char next)))
    n))

(defun copy-this-unibyte-buffer ()
  "Warning: this is confusing - watch the name of the buffer!"
  (interactive)
  (let ((b (buffer-substring (point-min) (point-max)))
	(p (point))
	(ee-buffer-name "*copy*"))
    (find-euboutput '(insert b))
    (goto-char p)))

' (eesteps '(
   (copy-this-unibyte-buffer)
   (find-epp (my-faces-sort (my-strings-and-faces (point-min) (point-max))))
   (kill-this-buffer)
   (message "%d simplifications" (my-simplify-faces (point-min) (point-max)))
   (find-epp (my-faces-sort (my-strings-and-faces (point-min) (point-max))))
   (kill-this-buffer)
   (kill-this-buffer)
   ))

;;                          (my-faces-sort (my-strings-and-faces (point) (mark)))
;; (find-estring (ee-concat (my-faces-sort (my-strings-and-faces (point) (mark))) "\n"))
;; (find-estring (ee-concat (my-faces-sort (my-strings-and-faces (point-min) (point-max))) "\n"))
;; (find-epp (my-faces-sort (my-strings-and-faces (point-min) (point-max))))

;; (find-estring  (my-strings-and-faces (point) (mark))))
;; (find-epp (mapcar 'car myp))
;; (delete-duplicates (sort (mapcar 'symbol-name (mapcar 'car myp)) 'string<))




;; «doc-view-mode»  (to ".doc-view-mode")
;; (find-evardescr 'auto-mode-alist)
;; (find-egrep "grep -nH -e  doc-view-mode $(find * -name '*.el')")
;; (find-efile "files.el" ". doc-view-mode")
;; (find-elnode "Sequence Functions" "Function: copy-sequence")
;; (find-elnode "Association Lists" "Function: rassq-delete-all")
;; (find-elnode "Auto Major Mode" "Variable: auto-mode-alist")
;;
(if (fboundp 'rassq-delete-all)
(setq auto-mode-alist (rassq-delete-all 'doc-view-mode auto-mode-alist))
)


(seen 10050)


;; «sqlite»  (to ".sqlite")
;; (find-es "sqlite")
;; (code-c-d "sqlitedoc" "/usr/share/doc/sqlite3-doc/")
(code-c-d "lsqlite3"  "~/usrc/lsqlite3_v096/")
;; (find-lsqlite3file "")

;; «find-lsqlite3wiki»  (to ".find-lsqlite3wiki")
;; (find-es "sqlite" "lua-src")
;; (find-es "sqlite" "lua-wiki")
;; (find-lsqlite3wiki)
;; (find-lsqlite3wiki "stmt_nrows")
(defun find-lsqlite3wiki (&optional tag &rest rest)
  (interactive)
  (let ((fmt "file:///home/edrx/usrc/lsqlite3_v096/lsqlite3.wiki.html#%s"))
    (if tag
	(brg (format fmt tag))
      (find-es "sqlite" "lua-wiki"))))


;; (code-c-d "pclcvs" "/tmp/foo/" "pcl-cvs")
;; (find-pclcvsnode "")


;; (find-enode "Persistent Mark")
;; (find-egrep "grep -nH -e 'Mark deactivated' *.el")
;; (find-efunction 'set-mark-command)
;; (find-evardescr 'transient-mark-mode)
;; (find-evariable 'transient-mark-mode)
;; (find-efunctiondescr 'transient-mark-mode)
;; (find-efunction 'transient-mark-mode)

;; «deact»  (to ".deact")
;; «deactivate-mark»  (to ".deactivate-mark")
;; (find-es "emacs" "transient-mark-mode")
(defun deact () (interactive) (deactivate-mark 'force))





;; «find-pen-links»  (to ".find-pen-links")
;; (find-pen-links)
;; (find-es "pendrive")
;; (find-fline "/tmp/pen/")
;; (find-man "mount")
;; (find-man "mount" "Mount options for fat")
;; (find-man "8 mount" "Mount options for fat" "uid=value")
;; (find-sh "dmesg")
;;
(defun find-pen-links (&optional str &rest rest)
  "Visit a temporary buffer containing hyperlinks for pen drive operations."
  (interactive)
  (find-elinks `(
    (find-pen-links ,str ,@rest)
    (find-efunction 'find-pen-links)
    (find-es "pendrive" "repartition-1")
    (find-man "8 mount" "Mount options for fat" "uid=value")
    (find-angg "VIDEOS/Makefile")
    (find-sh "sudo dmesg")
    (find-sh "sudo dmesg | tail")
    (find-fline "/dev/disk/by-id/")
    (find-sh "sudo ls -l /dev/disk/by-id/*usb*")
    (find-sh "sudo ls -l /dev/disk/by-id/*usb* | cut -b 56-")
    "
* (eepitch-shell)
mkdir /tmp/pen/
sudo mount -o ro               /dev/sdb1 /tmp/pen/
sudo mount -o ro               /dev/sdc1 /tmp/pen/
sudo mount -o ro       -t vfat /dev/sdb1 /tmp/pen/
sudo mount             -t vfat /dev/sdb1 /tmp/pen/
sudo mount -o uid=$UID -t vfat /dev/sdb1 /tmp/pen/
sudo mount -o uid=$UID         /dev/sdb1 /tmp/pen/
sudo mount -o uid=$UID         /dev/sdc1 /tmp/pen/
sudo mount -o uid=$UID         /dev/sdb  /tmp/pen/
sudo mount -o uid=$UID         /dev/sdc  /tmp/pen/
# (find-fline \"/tmp/pen/\")
# (find-fline \"/tmp/pen/Music/\")
# (find-fline \"/tmp/pen/DCIM/Camera/\")
# (find-fline \"/tmp/pen/DCIM/100D5100/\")
# (find-fline \"/tmp/pen/VOICE/FOLDER01/\")"
    ;;
    ,(or str "")
    ;;
"sudo umount /dev/sdb1
sudo umount /tmp/pen
sync

# (find-es \"hd\" \"seagate-expansion\")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
lsscsi
sudo fdisk -l /dev/sdb

sudo umount   /dev/sdb1
sudo umount   /tmp/sgexpansion1
mount
mkdir /tmp/sgexpansion1/
sudo mount    /dev/sdb1  /tmp/sgexpansion1/
sudo mount    /dev/sdc1  /tmp/sgexpansion1/
sudo mount    /dev/sdd1  /tmp/sgexpansion1/
sudo mount    /dev/sde1  /tmp/sgexpansion1/

sudo umount   /dev/sdb1
sudo fsck     /dev/sdb1

# (find-fline \"/tmp/sgexpansion1/\")
# (find-fline \"/tmp/sgexpansion1/movies/\")
# (find-sh-at-dir \"/tmp/sgexpansion1/movies/\" \"find * | sort\")

cd /sda6/nikon/caderno/
make -f ~/VIDEOS/Makefile r4_jpgs
# (find-fline \"/sda6/nikon/caderno/\")

\ (find-fline \"/sda6/nikon/aula_1/\")
\ (find-fline \"/sda6/nikon/aula_2/\")
\ (find-fline \"/sda6/nikon/aula_3/\")
\ (find-fline \"/sda6/nikon/aula_4/\")
\ (find-fline \"/sda6/nikon/aula_5/\")
\ (find-fline \"/sda6/nikon/aula_6/\")
\ (find-fline \"/sda6/nikon/aula_7/\")
\ (find-fline \"/sda6/nikon/aula_8/\")
\ (find-fline \"/sda6/nikon/aula_9/\")
\ (find-fline \"/sda6/nikon/aula_10/\")

\(progn
  (kill-new \"/sda6/nikon/\")
  (find-3
    ' (find-fline \"/tmp/pen/DCIM/100D5100/\" 1 '(eek \"M->\"))
    ' (find-fline \"/sda6/nikon/\"            1 '(eek \"M->\"))
  ))"
    )))

;; Tests:
;; (find-pen-links)
;; (find-pen-links "# Hello")


;; (find-dvd-links)
(defun find-dvd-links (&rest rest)
  "Visit a temporary buffer containing hyperlinks for dvd operations."
  (interactive)
  (apply 'find-elinks `(
    (find-dvd-links ,@rest)
    (find-efunction 'find-dvd-links)
    (find-man "8 mount" "Mount options for fat" "uid=value")
    (find-sh "dmesg")
    (find-sh "dmesg | tail")
    "
* (eepitch-shell)
mkdir /tmp/dvd/
sudo mount -o ro /dev/sr0 /tmp/dvd/
# (find-fline \"/tmp/dvd/\")
cd
vlc    /tmp/dvd/
cd
sudo umount /tmp/dvd/
eject /dev/sr0
") rest))

;; (find-cdrom-links)
(defun find-cdrom-links (&rest rest)
  "Visit a temporary buffer containing hyperlinks for cdrom operations."
  (interactive)
  (apply 'find-elinks `(
    (find-cdrom-links ,@rest)
    (find-man "8 mount" "Mount options for fat" "uid=value")
    (find-sh "dmesg")
    (find-es "cdrom")
    "
* (eepitch-shell)
mkdir /tmp/cdrom/
sudo mount -o ro       /dev/hdc /tmp/cdrom/
sudo mount             /dev/hdc /tmp/cdrom/
sudo mount -o uid=$UID /dev/hdc /tmp/cdrom/
# (find-fline \"/tmp/cdrom/\")
sudo umount /tmp/cdrom"
    ) rest))


;; «find-hde-links» (to ".find-hde-links")
;; Test: (find-hde-links)
(defun find-hde-links (&optional dir &rest pos-spec-list)
"Visit a temporary buffer containing hyperlinks for foo."
  (interactive)
  (setq dir (or dir "{dir}"))
  (apply 'find-elinks
   `((find-hde-links ,dir ,@pos-spec-list)
     (find-hde-links "/")
     (find-hde-links "/nikon/")
     (find-es "hd")
     (find-es "hd" "external-hds-sex")
     (find-es "hd" "external-hds-reef")
     ;; Convention: the first sexp always regenerates the buffer.
     ;; (find-efunction 'find-hde-links)
     ""
     ,(ee-template0 "\
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# (find-sh \"dmesg | tail\")
mkdir /tmp/hde1/
mkdir /tmp/hde2/
mkdir /tmp/hde5/
mkdir /tmp/hde6/
mkdir /tmp/hde7/
sudo mount /dev/sdb1  /tmp/hde1/
sudo mount /dev/sdb2  /tmp/hde2/
sudo mount /dev/sdb5  /tmp/hde5/
sudo mount /dev/sdb6  /tmp/hde6/
sudo mount /dev/sdb7  /tmp/hde7/
# (find-fline \"/tmp/hde1/\")
# (find-fline \"/tmp/hde2/\")
# (find-fline \"/tmp/hde5/\")
# (find-fline \"/tmp/hde6/\")
# (find-fline \"/tmp/hde7/\")
# (find-fline \"/tmp/hde2{dir}\")
cd /tmp/hde2{dir}
du -c
cp -auv * {dir}
# (find-fline \"{dir}\")

cd
sudo umount /tmp/hde1/
sudo umount /tmp/hde2/
sudo umount /tmp/hde5/
sudo umount /tmp/hde6/
sudo umount /tmp/hde7/
")
     )
   pos-spec-list))

;; Test: (find-hde-links)




;; «find-dn4tex-links»  (to ".find-dn4tex-links")
;; (find-angg ".emacs.templates" "find-dn4tex-links")


;; «find-euboutput»  (to ".find-euboutput")
;; (find-es "emacs" "display-table-latin-1")
;; (find-enode "Enabling Multibyte" "nothing precedes the colon")
;; (find-enode "Mode Line" "When multibyte" "CS does not appear")
;; (find-enode "Multibyte Conversion" "0200 through 0237")
;; (find-efunction 'find-eoutput)
;; (find-euboutput '(insert "«»"))
;; (find-eeoutput '(ee-set-latin-1) '(insert "«»"))
;; (find-eeoutput '(ee-set-unibyte) '(insert "«»"))
;;
(defun find-eeoutput (precode code &rest pos-spec-list)
  "Like `find-eoutput', but runs PRECODE before CODE."
  (find-escratchbuffer (or ee-buffer-name "*output*"))
  (eval precode)
  (eval code)
  (goto-char (point-min))
  (apply 'ee-goto-position pos-spec-list))

(defun ee-set-unibyte ()
  (interactive)
  (set-buffer-multibyte nil)
  (set-buffer-file-coding-system 'raw-text))

(defun ee-set-latin-1 ()
  (interactive)
  (set-buffer-file-coding-system 'latin-1))

(defun find-euboutput (code &rest pos-spec-list)
  "Like `find-eoutput', but sets the buffer to unibyte."
  (apply 'find-eeoutput (ee-set-unibyte) code pos-spec-list))




;; «ee-compilation-buffer»  (to ".ee-compilation-buffer")
;; (find-angg "elisp/test.el" "ee-compilation-buffer")
(setq ee-compilation-buffer "")

;; «ee-code-c-d-:SH»  (to ".ee-code-c-d-:SH")
(defun ee-code-c-d-:SH (c d &rest rest)
  (concat (ee-template0 "
   ;; {(ee-S `(ee-code-c-d-:SH ,c ,d ,@rest))}
   (defun ee-{c}shbuf-name (command)
     (format \"cd {d}\\n%s\" command))
   (defun find-{c}SH (command &rest pos-spec-list)
     (find-sh-at-dir ee-{c}dir command)
     (setq ee-compilation-buffer (buffer-name))
     (apply 'ee-goto-position pos-spec-list))
   ") (ee-code-c-d-rest c d rest)))

;; (find-code-c-d "LATEX"    "~/LATEX/" :anchor :SH)
        (code-c-d "LATEX"    "~/LATEX/" :anchor :SH)

;; (find-code-c-d "LILYPOND" "~/LILYPOND/" :anchor :SH)
        (code-c-d "LILYPOND" "~/LILYPOND/" :anchor :SH)



;; «verbatim» (to ".verbatim")
(defun eeinsert2 (pre post s e)
  (save-excursion (goto-char (max s e)) (insert post))
  (save-excursion (goto-char (min s e)) (insert pre)))

(defun vf (s e)
  (interactive "r")
  (eeinsert2
   "{\\myttchars\n\\footnotesize\n\\begin{verbatim}\n"
   "\\end{verbatim}\n}\n" s e))



;; Hacky fix, 2008may20:
;; (find-egrep "grep -nH -e crm $(find * -name '*.el')")
(defalias 'crm-select-current-element 'crm--select-current-element)
;; Note that `find-eface-links' calls that function indirectly.
;; (eek "M-h M-k M-h M-s")

;; Fix `tex-verbatim':
;;   (face-attribute 'font-lock-comment-face :family)
;;   (face-attribute 'tex-verbatim           :family)
;;   (find-eface-links    'font-lock-comment-face)
;;   (find-eface-links    'tex-verbatim)
;;   (find-efacedescr     'tex-verbatim)
;; Original: (set-face-foreground 'tex-verbatim nil)
;;           (set-face-attribute  'tex-verbatim nil :family "courier")
;; Changed:  (set-face-foreground 'tex-verbatim "burlywood1")
;;           (set-face-attribute  'tex-verbatim nil :family 'unspecified)
;;
;; Fix `region':
;;   (find-eface-links    'region)
;; Original: (set-face-background 'region "blue3")
;; Changed:  (set-face-background 'region "navyblue")
;;
(set-face-background 'region "navyblue")
(eval-after-load "tex-mode"
  '(progn
     (set-face-foreground 'tex-verbatim "burlywood1")
     (set-face-attribute  'tex-verbatim nil :family 'unspecified)))


;; «find-printindex»  (to ".find-printindex")
;; (find-printindex)
;; (find-angg "LUA/anchors.lua")
(defun find-printindex0 (&optional fname)
  (interactive)
  (find-sh0 (format
	     "lua51 ~/LUA/anchors.lua -i %s"
	     (or fname (buffer-file-name)))))
(defun find-printindex (&optional fname)
  (interactive)
  (find-sh (format
	    "lua51 ~/LUA/anchors.lua -i %s"
	    (or fname (buffer-file-name)))))

;; 2008may25:
;; run-hooks: Symbol's value as variable is void: ispell-local-dictionary-alist
(setq ispell-local-dictionary-alist nil)
;; <f10> e t r
;; (find-egrep "grep -nH -e 'Remove Text Properties' $(find * -name '*.el')")
;; (find-efile "facemenu.el" "Remove Text Properties")
;; (find-efunction 'facemenu-remove-all)
;; (where-is       'facemenu-remove-all)
;; (find-elongkey-links "<menu-bar> <edit> <Text Properties> <ra>")
(defalias 'etr 'facemenu-remove-all)
(defalias 'ma  'eev-math-glyphs-edrx)
(defalias 'mar 'eev-math-glyphs-reset)


;; «find-fontset-links»  (to ".find-fontset-links")
;; (find-es "emacs" "find-fontset-links")
;; (find-fontset-links)
;;
(defun find-fontset-links (&rest rest)
  (interactive)
  (apply 'find-es "emacs" "find-fontset-links" rest))


;; «ee-font-unalias»  (to ".ee-font-unalias")
;; (find-es "emacs" "ee-font-unalias")
;; (find-sh0 "xlsfonts -ll -fn 7x13")
;; (find-sh0 "xlsfonts -ll -fn 7x13 | grep ' FONT ' | cut -b29- | tr A-Z a-z")
;; (find-sh "xlsfonts -ll -fn -misc-fixed-medium-r-normal--13-120-75-75-c-70-iso8859-1")
;; (find-sh "xlsfonts -ll -fn foo")
;; (ee-font-unalias-x "foo")
;; (ee-font-unalias-x "7x13")
;; (ee-font-unalias-x (ee-font-unalias-x "7x13"))
;; (ee-font-unalias (ee-font-unalias-x "7x13"))
;; (ee-font-unalias (ee-font-unalias-x "7x13") t)
;;
(defun ee-font-unalias-x (fontname)
  (find-sh0 (format
	     "xlsfonts -ll -fn '%s' | grep ' FONT ' | head -n 1 | cut -b29- | tr A-Z a-z"
	     fontname)))

(defun ee-font-unalias (fontname &optional use-ucs)
  (setq fontname (ee-font-unalias-x fontname))
  (if use-ucs (replace-regexp-in-string
	       "iso8859" "iso10646"
	       fontname)
    fontname))

;; «ee-set-frame-font»  (to ".ee-set-frame-font")
;; (find-es "emacs" "ee-set-frame-font")
(defun ee-set-frame-font (fontname &optional use-ucs)
  "Like `set-frame-font', but uses `ee-font-unalias' to expand FONTNAME."
  (set-frame-font (ee-font-unalias fontname use-ucs)))

;; Tests:
;; (ee-font-unalias "fixed")
;; (ee-font-unalias "fixed" t)
;; (set-frame-font "-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1")
;; (ee-set-frame-font "5x7" t)
;; (ee-set-frame-font "6x10" t)
;; (ee-set-frame-font "6x13" t)
;; (ee-set-frame-font "fixed" t)
;; (ee-set-frame-font "9x15" t)
;; (ee-set-frame-font "10x20" t)
;; (find-eoutput '(ee-insert '(32 126) "\n" '(913 981) "\n" '(8592 9675)))



;; «:dvi»  (to ".:dvi")

;; (find-eevfile "eev.el" "defvar code-c-d-keywords-new")
' (add-to-alist 'code-c-d-keywords-new '(:dvi  . ee-code-c-d-:dvi))
' (defun ee-code-c-d-:dvi (&rest rest)
    (concat (ee-template0 "
   (defun find-{c}dvi (fname &rest rest)
     (apply 'find-dvipage (ee-{c}file fname) rest))
   ") (ee-code-c-d-rest rest)))
' (code-c-d "LATEX" "~/LATEX/" :anchor :dvi)
(code-c-d "LATEX" "~/LATEX/" :anchor)

;; (find-sh "cd ~/LATEX/; ls *.tex")

;; «find-LTX»  (to ".find-LTX")
;; (find-TH "math-b" "seminars-2007")
;; (find-LTX "2007dnc-sets")
;; (find-blogme3 "angglisp.lua" "find-LTX")
(defun find-LTX (stem)
  (if ee-arg
      (find-LATEX (format "%s.tex" stem))
    (find-LATEXdvi (format "%s.dvi" stem))))


;; «find-testfont»  (to ".find-testfont")
;; (find-es "tex" "testfont.tex")
(defun eetestfont0 (s &optional e)
  "Write HEADER+(ee-se-to-string S E)+\"\\bye\" to /tmp/eetestfont.tex."
  (interactive "r")
  (ee-write-with-nl s e "\\let\\noinit!
\\input testfont
\\def\\t#1{\\def\\fontname{#1}\\startfont\\table}
\\def\\T#1{\\def\\fontname{#1}\\startfont\\table\\vfill\\break}
\\def\\newpage{\\vfill\\break}\n"
    "\\bye\n"
    "/tmp/eetestfont.tex"))

(defun find-testfont (texcmds &rest rest)
  "Run `eetestfont0' on TEXCMDS, then run TeX and xdvi on /tmp/eetestfont.*"
  (eetestfont0 texcmds)
  (prog1 (find-sh0 "cd /tmp/ && tex eetestfont.tex")
    (apply 'find-dvipage "/tmp/eetestfont.dvi" rest)))

;; «find-dvifonts»  (to ".find-dvifonts")
;; (find-angg ".zshrc" "dvifonts")
(defun ee-dvifonts-command (fname)
  (format "dvitype -output-level=1 '%s' | grep fntdef | cut -d' ' -f 4-"
	  (ee-expand fname)))
(defun find-dvifonts (fname &rest rest)
  (apply 'find-sh (ee-dvifonts-command fname) rest))
(defun find-dvifonts0 (fname &rest rest)
  (apply 'find-sh (ee-dvifonts-command fname) rest))

;; Tests:
;; (find-testfont "\\T{bbm10}\\T{bbold10}")
;; (find-dvifonts "/tmp/eetestfont.dvi")


;; «ee-env-normalize»  (to ".ee-env-normalize")
;; (string-match "=" "foo=bar")
;; (substring "foo=bar" 0 3)
;; (substring "foo=bar" 4)
;; (ee-env-expand1 "foo=$EE=bar")
;; (ee-env-normalize '("FOO=BAR" ("plic" "ploc") "BLETCH=QUX"))
;; (ee-env-normalize   "FOO=BAR")
;;

;; Moved, with changes, to: (find-eev "eev-env.el" "ee-with-env0")
;;
;; (defun ee-env-expand1 (pair)
;;   (let ((where (string-match "=" pair)))
;;     (if where
;; 	(let ((var (substring pair 0 where))
;; 	      (exp (substring pair (1+ where))))
;; 	  (format "%s=%s" var (ee-expand exp)))
;;       pair)))
;;
;; (defun ee-env-normalize1-ne (pair)
;;   (if (stringp pair) pair (format "%s=%s" (car pair) (or (cadr pair) ""))))
;;
;; (defun ee-env-normalize-ne (pairs)
;;   (if (stringp pairs) (list pairs) (mapcar 'ee-env-normalize1-ne pairs)))
;;
;; (defun ee-env-normalize (pairs)
;;   (mapcar 'ee-env-expand1 (ee-env-normalize-ne pairs)))

;; «ee-with-env»  (to ".ee-with-env")
;; (find-efunction 'with-current-buffer)
;; (find-elnode "Expansion")
;;                                             (find-sh0 "echo $FOO")
;; (ee-with-env          "FOO=bar"             (find-sh0 "echo $FOO"))
;; (ee-with-env        '("FOO=bar")            (find-sh0 "echo $FOO"))
;; (ee-with-env        '("FOO=bar" "FOO=plic") (find-sh0 "echo $FOO"))
;; (ee-with-env '("FOO=" "FOO=bar" "FOO=plic") (find-sh0 "echo $FOO"))
;; (ee-with-env '("FOO"  "FOO=bar" "FOO=plic") (find-sh0 "echo $FOO"))
;;

;; Moved, with changes, to: (find-eev "eev-env.el" "ee-with-env")
;;
;; (defmacro ee-with-env (envchanges &rest body)
;;   `(let ((process-environment
;; 	  (append (ee-env-normalize ,envchanges)
;; 		  process-environment)))
;;      ,@body))



;; From:
;; http://steve.yegge.googlepages.com/my-dot-emacs-file
(defun swap-windows ()
  "If you have 2 windows, it swaps them."
  (interactive)
  (cond ((not (= (count-windows) 2))
	 (message "You need exactly 2 windows to do this."))
	(t (let* ((w1 (first (window-list)))
		  (w2 (second (window-list)))
		  (b1 (window-buffer w1))
		  (b2 (window-buffer w2))
		  (s1 (window-start w1))
		  (s2 (window-start w2)))
	     (set-window-buffer w1 b2)
	     (set-window-buffer w2 b1)
	     (set-window-start w1 s2)
	     (set-window-start w2 s1)))))


;; «eepitch-makeinfo»  (to ".eepitch-makeinfo")
;; (find-es "texinfo" "texinfo-deb-src")
;; (find-fline "$MAKEINFODIR")
;; (code-c-d "texinfo" "~/usrc/texinfo/texinfo-4.11.dfsg.1/")
;; (setenv "MAKEINFODIR" (ee-texinfofile "makeinfo"))

(defun eepitch-gdb-makeinfo ()
  (eepitch-gdb "*gud-makeinfo*" "gdb --annotate=3 $MAKEINFODIR/makeinfo"))
(defun eepitch-gdb-makeinfo-kill ()
  (eepitch-gdb-kill "*gud-makeinfo*"))


;; «tmpdn4»  (to ".tmpdn4")
;; (find-dn4 "Makefile" "tmpdir")
(code-c-d "tmpdn4"  "/tmp/dn4/" :anchor)
(code-c-d "tmpdn4d" "/tmp/dn4/demos/")


;; «luatex»  (to ".luatex")
;; (find-angg ".emacs.papers" "luatexref")
;; (find-es "luatex" "luatex-manual")
;; (find-es "luatex" "luatex")
;; http://www.luatex.org/svn/trunk/manual/luatexref-t.pdf
;; http://www.luatex.org/svn/trunk/manual/luatex.pdf
;;
;; «luatexref»  (to ".luatexref")
;; http://mirrors.ibiblio.org/CTAN/systems/doc/luatex/luatex.pdf (2022oct22)
;;(code-pdf-page "luatexref" "$S/http/mirrors.ibiblio.org/CTAN/systems/doc/luatex/luatex.pdf")
;;(code-pdf-text "luatexref" "$S/http/mirrors.ibiblio.org/CTAN/systems/doc/luatex/luatex.pdf" 4)
;; (find-luatexrefpage)
;; (find-luatexreftext)
;;
;; (find-tlsh "find * | sort | grep luatex")
;; (find-tlsh "find * | sort | grep luatex | grep manual")
;; (find-tlsh "find * | sort | grep luatex | grep manual | grep pdf")
;; (find-luatexreffile "")
;; (find-fline "/usr/local/texlive/2018/texmf-dist/doc/context/documents/general/manuals/")
(code-c-d      "luatexref" "/usr/local/texlive/2019/texmf-dist/doc/context/documents/general/manuals/")
(code-pdf-page "luatexref" "/usr/local/texlive/2019/texmf-dist/doc/context/documents/general/manuals/luatex.pdf")
(code-pdf-text "luatexref" "/usr/local/texlive/2019/texmf-dist/doc/context/documents/general/manuals/luatex.pdf" 4)
;; (find-luatexrefpage        5  "Contents")
;; (find-luatexreftext        5  "Contents")
;; (find-luatexrefpage       10  "tex.print")
;; (find-luatexrefpage (+ 4  15) "1 Introduction")
;; (find-luatexreftext (+ 4  15) "1 Introduction")
;; (find-luatexrefpage (+ 4  23) "2.7.6 Catcode tables")
;; (find-luatexreftext (+ 4  23) "2.7.6 Catcode tables")
;; (find-luatexrefpage (+ 4  26) "3.2 LUA changes" "3.2 LUA changes")
;; (find-luatexreftext (+ 4  26) "3.2 LUA changes" "3.2 LUA changes")
;; (find-luatexrefpage (+ 4  76) "The mplib library")
;; (find-luatexreftext (+ 4  76) "The mplib library")
;; (find-luatexrefpage (+ 4  90) "The node library")
;; (find-luatexreftext (+ 4  90) "The node library")
;; (find-luatexrefpage (+ 4  94) "4.10.1.17 node.hpack")
;; (find-luatexreftext (+ 4  94) "4.10.1.17 node.hpack")
;; (find-luatexrefpage (+ 4  95) "4.10.1.19 node.dimensions")
;; (find-luatexreftext (+ 4  95) "4.10.1.19 node.dimensions")
;; (find-luatexrefpage (+ 4  96)   "\\setbox0 = \\hbox to 20pt {a b}")
;; (find-luatexreftext (+ 4  96)   "\\setbox0 = \\hbox to 20pt {a b}")
;; (find-luatexrefpage (+ 4 106) "4.13.1.1 Integer parameters")
;; (find-luatexreftext (+ 4 106) "4.13.1.1 Integer parameters")
;; (find-luatexrefpage (+ 4 107) "4.13.1.2 Dimension parameters")
;; (find-luatexreftext (+ 4 107) "4.13.1.2 Dimension parameters")
;; (find-luatexrefpage (+ 4 110) "4.13.3 Last item commands")
;; (find-luatexreftext (+ 4 110) "4.13.3 Last item commands")
;; (find-luatexrefpage (+ 4 110) "4.13.4 Attribute, count, dimension, skip and token registers")
;; (find-luatexreftext (+ 4 110) "4.13.4 Attribute, count, dimension, skip and token registers")
;; (find-luatexrefpage (+ 4 112) "4.13.6 Box registers")
;; (find-luatexreftext (+ 4 112) "4.13.6 Box registers")

;; (find-luatexrefpage (+ 4 115) "4.13.10 Print functions")
;; (find-luatexreftext (+ 4 115) "4.13.10 Print functions")
;; (find-luatexrefpage (+ 4 117) "4.13.11.1 tex.round")
;; (find-luatexreftext (+ 4 117) "4.13.11.1 tex.round")
;; (find-luatexrefpage (+ 4 126) "4.16 The token library")
;; (find-luatexreftext (+ 4 126) "4.16 The token library")
;; (find-luatexreftext "")

;; (find-luatexrefpage (+ 4 113) "4.14.1.1 Integer parameters")
;; (find-luatexreftext (+ 4 113) "4.14.1.1 Integer parameters")
;; (find-luatexrefpage (+ 4 114)   "tex.catcodetable")
;; (find-luatexreftext (+ 4 114)   "tex.catcodetable")
;; (find-luatexrefpage (+ 4 119) "4.14.5 Character code registers")
;; (find-luatexreftext (+ 4 119) "4.14.5 Character code registers")


;; «luatex-src» (to ".luatex-src")
;; (find-es "luatex" "luatex-upstream")
(code-c-d "luatexsrc"   "~/bigsrc/luatex-beta-0.79.1/")
(code-c-d "luatexsrclt" "~/bigsrc/luatex-beta-0.79.1/source/texk/web2c/luatexdir/tex/")
(code-c-d "luatexweb2c" "~/bigsrc/luatex-beta-0.79.1/build/texk/web2c/")
(setenv "NEWLUATEXDIR" "/home/edrx/bigsrc/luatex-beta-0.79.1/build/texk/web2c")
;; (find-luatexsrcfile "")
;; (find-luatexweb2cfile "")

;; «luatex-0.95.0» (to ".luatex-0.95.0")
;; (find-es "luatex" "luatex-0.95.0-pdfoutput")
(code-c-d      "luatex095" "~/usrc/luatex/0.95.0/")
(code-xpdf     "luatex095" "~/usrc/luatex/0.95.0/manual/luatex.pdf")
(code-pdf-text "luatex095" "~/usrc/luatex/0.95.0/manual/luatex.pdf" 4)
;; (find-luatex095page (+ 4 30) "2.1.7 The backend primitives \\pdf *")
;; (find-luatex095text (+ 4 30) "2.1.7 The backend primitives \\pdf *")
;; (find-luatex095page (+ 4 33) "\\let\\pdfoutput")
;; (find-luatex095text (+ 4 33) "\\let\\pdfoutput")



;; «luacode» (to ".luacode")
;; (find-fline "/usr/share/doc/texlive-luatex/lualatex/luacode/")
(code-xpdf     "luacode" "/usr/share/doc/texlive-luatex/lualatex/luacode/luacode.pdf")
(code-pdf-text "luacode" "/usr/share/doc/texlive-luatex/lualatex/luacode/luacode.pdf")
;; (find-luacodepage)
;; (find-luacodetext)

(defun eepitch-luatex () (interactive)
  (eepitch-comint-at "/tmp/" "luatex" "luatex"))
(defun eepitch-lualatex () (interactive)
  (eepitch-comint-at "/tmp/" "lualatex" "lualatex"))

(defun eeluatex (s &optional e)
  (interactive "r")
  (ee-write s e
	    "\\documentclass{article}\n\\begin{document}\n"
	    "\n\\end{document}" "$EEVTMPDIR/ee.tex")
  (find-sh "cd $EEVTMPDIR/ && lualatex ee.tex"))

(defun eeluatex-view () (find-xpdf-page "$EEVTMPDIR/ee.pdf"))

;; (find-code-bounded 'eeluatex-bounded 'eeluatex 'ee-delimiter-percent)
        (code-bounded 'eeluatex-bounded 'eeluatex 'ee-delimiter-percent)


;; «lua-repl» (to ".lua-repl")
;; (find-es "lua5" "luarepl-2017")
;; (find-es "lua5" "lua-repl-0.8")
(code-c-d "luarepl" "~/usrc/lua-repl/")
;; (find-luareplfile "")
;; (find-luareplfile "repl/")
;; (find-luareplfile "repl/plugins/")
;; (find-luareplfile "repl/plugins/autoreturn.lua")

;; «luatex-repl» (to ".luatex-repl")
;; «lualatex-repl» (to ".lualatex-repl")
;; (find-es "luatex" "lualatex-repl")
;; (find-LATEX "2015lualatex.tex")
;; (find-LATEX "lualoader.lua")
;; (find-LATEX "myrepl.lua")
;; (find-LATEX "twot.tex")
;;
(defun eepitch-lltr () (interactive)
  (eepitch-comint-at "~/LATEX/" "lualatex 2015lualatex.tex"))
(defun eepitch-ltrepl2 () (interactive)
  (eepitch-comint-at "~/LATEX/" "lualatex twot2.tex"))
(defun eepitch-ltrepl (&optional texfile) (interactive)
  (eepitch-comint-at "~/LATEX/"
		     (format "lualatex %s" (or texfile "twot.tex"))))


(code-c-d "luarepl"  "~/usrc/lua-repl-0.5/")
(code-c-d "luareplp" "~/usrc/lua-repl-0.5/repl/plugins/")
;; (find-luareplfile "")
;; (find-luareplpfile "")




;; «ee-replace-regexp»  (to ".ee-replace-regexp")
;; (find-efunctiondescr 'replace-regexp "re-search-forward")
;; (find-efunctiondescr 're-search-forward)
;; (find-efunctiondescr 'replace-match)
;; (find-efunction 'query-replace-compile-replacement)
;; (query-replace-compile-replacement "\\1\\,\"foo\"\\2" t)
(defun ee-replace-regexp (from to)
  (if (re-search-forward from nil t)
      (replace-match to 'fixed-case nil)))


(seen 10780)


;; (find-eev "eev-sshot.el")
;; (find-eevfile "eev-sshot.el" "This is how I produced")
;; (ee-demo-eesteps)
;; (find-evariable 'initial-scratch-message)
;; (find-egrep "grep -nH -e initial-scratch-message *.el")
(defun ee-demo-eesteps () (interactive)
  (eesteps
   '((find-efunctiondescr 'eesteps)
     (search-forward ")))")
     (message "Next key:  M-e")
     )))

;; (require 'eev-sshot)
;; (find-zsh0 "rmmkdircd /tmp/sshot/ && tar -xvzf $S/http/anggtwu.net/flipbooks/eesteps.tgz")
;; (find-sshot "/tmp/sshot/eesteps" 1)


;; «ee-demo-4»  (to ".ee-demo-4")
;; (find-eevexfile "demos.e" ";; End of demo 4")
(defun ee-demo-4 () (interactive)
  (eesteps
   '((find-enode "Lisp Eval")
     (search-forward "`defvar'")
     (eekvr "C-SPC C-SPC 8*<left>")
     (eekv "M-w       ;;; kill-ring-save")
     (eekv "M-h M-i   ;;; find-einfo-links")
     (search-forward "find-enode")
     (eekv "M-h M-2   ;;; eemklinks-duplicate-this-line")
     (eekv "M-h M-y   ;;; eemklinks-yank-pos-spec")
     "C-a"
     (eekvr "C-SPC C-SPC <down>")
     (eekv "M-w       ;;; kill-ring-save")
     (eekv "C-x b TEMP")
     (eekv "C-y       ;;; yank")
     (message "Next key:  M-e")
     "M-e"
     (eekv "q         ;;; Info-exit")
     (eekv "C-x k TEMP")
     (eekv "M-K       ;;; bury-buffer")
     )))



;; (define-key eev-mode-map (kbd "M-h M-e")
;;   (lambda () (interactive) (find-efunctiondescr 'eev-mode)))


;; «coq»  (to ".coq")
;; (find-es "coq" "coq-deb-src")
(code-c-d "coq" "~/usrc/coq/coq-8.1.pl3+dfsg/")
(defun eepitch-coqtop () (interactive) (eepitch-comint "coqtop" "coqtop"))

;; http://coq.inria.fr/V8.1/
;; http://coq.inria.fr/V8.1/tutorial.html
(code-c-d "coqv81" "$S/http/coq.inria.fr/V8.1/")

(code-xpdf      "coqref" "/usr/share/doc/coq-doc-pdf/Reference-Manual.pdf")
(code-pdftotext "coqref" "/usr/share/doc/coq-doc-pdf/Reference-Manual.pdf")
;; (find-coqrefpage  13 "Contents")
;; (find-coqrefpage  47 "Record types")
;; (find-coqrefpage 333 "Global Index")
;; (find-coqrefpage 341 "Tactics Index")

(code-c-d "coqref"    "/usr/share/doc/coq-doc-html/refman/")
(code-c-d "coqlibdoc" "/usr/share/doc/coq-libs/html/")
;; (find-coqreffile "")
;; (find-coqrefw3m "command-index.html")
;; (find-coqrefw3m "general-index.html")
;; (find-coqrefw3m "tactic-index.html")
;; (find-coqrefw3m "toc.html")

;; http://cel.archives-ouvertes.fr/docs/00/33/44/28/PDF/coq-hurry.pdf
(code-xpdf      "coqhurry" "$S/http/cel.archives-ouvertes.fr/docs/00/33/44/28/PDF/coq-hurry.pdf")
(code-pdftotext "coqhurry" "$S/http/cel.archives-ouvertes.fr/docs/00/33/44/28/PDF/coq-hurry.pdf")
;; (find-coqhurrypage 1)
;; (find-coqhurrytext)

;; (find-coqrefw3m "Reference-Manual016.html" "The Coq Emacs mode")
;; (find-coqlibdocfile "")

(code-c-d       "coqtut"  "/usr/share/doc/coq-doc-html/Tutorial.v.html")
(code-c-d       "coqtut1" "/usr/share/doc/coq-doc-html/Tutorial.v.html")
(code-c-d       "coqtut2" "/usr/share/doc/coq-doc-html/Tutorial.v.html")
(code-c-d       "coqtut3" "/usr/share/doc/coq-doc-html/Tutorial.v.html")
(code-xpdf      "coqtut"  "/usr/share/doc/coq-doc-pdf/Tutorial.v.pdf")
(code-pdftotext "coqtut"  "/usr/share/doc/coq-doc-pdf/Tutorial.v.pdf")
;; (find-coqtutw3m "")
;; (find-coqtut1w3m "#htoc3")
;; (find-coqtutpage 1)
;; (find-coqtuttext)

(code-c-d       "coqrectut" "/usr/share/doc/coq-doc-html/RecTutorial.v.html")
(code-xpdf      "coqrectut" "/usr/share/doc/coq-doc-pdf/RecTutorial.v.pdf")
(code-pdftotext "coqrectut" "/usr/share/doc/coq-doc-pdf/RecTutorial.v.pdf")
;; (find-coqrectutw3m "")
;; (find-coqrectutw3m "#htoc3")
;; (find-coqrectutpage 1)
;; (find-coqrectuttext)

;; (find-es "coq" "coq-art")
(code-c-d "coqart" "~/usrc/CoqArtExos81/")
;; (find-coqartfile "")
;; (find-coqartw3m "contents.html")



;; «proof-general»  (to ".proof-general")
;; (find-es "coq" "proof-general")
(code-c-d "proofgeneral" "~/.emacs.d/elpa/proof-general-20200911.3/" "ProofGeneral")



;; Moved to:
;; (find-eev "eev-browse-url.el" "find-psne-links")
;; «find-psne-links»  (to ".find-psne-links")
;; «brep»             (to ".brep")
;;
;; «ee-cp»      (to ".ee-cp")
;; «find-ecp0»  (to ".find-ecp0")
(defalias 'find-ecp0 'ee-cp)


;; 2008aug31
;; http://lists.gnu.org/archive/html/eev/2008-08/msg00001.html


;; 2012jun05
;; Tests:
;; (find-estring (ee-find-psne-links "http://foo/bar"))
;;                  (find-psne-links "http://foo/bar")
;; See: (find-eev "eev-browse-url.el" "conversion-functions")
;;
;; 2012dec25: moved to:
;;   (find-eev "eev-tlinks.el" "find-psne-links")
;;   (find-eevfile "eev-brxxx.el" "brep")
;;


;; «std-to-dnc»  (to ".std-to-dnc")
;; «dnc-to-std»  (to ".dnc-to-std")

(defun std-to-dnc ()
  (interactive)
  (fooi ">->" "`->" "|->" "=>" "<-|" "<=" "->" "|->" "<-" "<-|"))

(defun dnc-to-std ()
  (interactive)
  (fooi "`->" ">->" "|->" "->" "<-|" "<-" "=>" "|->" "<=" "<-|"))


;; «dn4-block»  (to ".dn4-block")
;; (to "eedn4a")
(defun dn4-block ()
  (interactive)
  (insert "\n%*
% (eedn4a-bounded)
% (find-sh0 \"cd ~/LATEX/ && dvips  -D 600 -P pk -o tmp.ps tmp.dvi\")
% (find-sh0 \"cd ~/LATEX/ && dvired -D 600 -P pk -o tmp.ps tmp.dvi\")
% (find-pspage \"~/LATEX/tmp.ps\")

%*
"))

(code-xpdf "oficiotcu" "~/tmp/processo/Oficio_TCU.pdf")
;; (find-oficiotcupage 2)


;; «save-this-block-as»  (to ".save-this-block-as")
;; «anchors-in-latin-1»  (to ".anchors-in-latin-1")
;; (find-evariable 'ee-delimiter-semicolon)
;; (find-es "emacs" "anchors-in-latin-1")
;; http://lists.gnu.org/archive/html/bug-gnu-emacs/2008-10/msg00830.html
;; (find-fline "/tmp/1.txt")
;; (find-fline "/tmp/2.txt")
;; (find-fline "/tmp/3.txt")
(setq ee-delimiter-semisnip "\n;;--------snip,snip--------\n")
;; (eeb-define 'eeb-string 'ee-se-to-string ee-delimiter-semisnip nil t t)
(defun save-this-block-as (fname) (eev (ee-once (eeb-string)) nil fname))


;; (find-efunction 'find-callprocess0)
;; (find-efunction 'find-eoutput-reuse)
;; (find-eevgrep "grep -nH -e callprocess *.el")
;; (find-eev "eev-plinks.el" "find-callprocess")
;;
(defun find-unrarl (fname &rest pos-spec-list)
  (apply 'find-callprocess `("unrar" "l" ,fname) pos-spec-list))

(code-brfile 'find-unrarl
             :local 'brunrarll :dired 'brunrarld)

(seen 11000)

;; (find-unrarl "~/books/new/Tractatus.rar")

;; (find-efunction 'ee-delete-and-extract-line)
;; This works on lines in which the first words is the code
;; and the second one is the fname.
(defun wrap-book ()
  (interactive)
  (let* ((pair (ee-split (ee-no-properties (ee-delete-and-extract-line))))
	 (code  (car pair))
	 (fname (cadr pair))
	 (ext (file-name-extension fname))
	 (code-c-d (if (equal ext "djvu")
		       `(code-djvu ,code ,fname)
		     `(code-xpdf ,code ,fname)))
	 (code-ptt `(code-pdftotext ,code ,fname))
	 (find-1 (format "(find-%spage      1  \"Contents\")" code))
	 (find-2 (format "(find-%spage (+ 1 1) \"Index\")" code))
	 (find-t (format "(find-%stext \"\")" code))
	 (str (format "%S\n%S\n;; %s\n;; %s\n;; %s" code-c-d code-ptt find-1 find-2 find-t))
	 )
    (insert str)
    (ee-next-line)))

(define-key eev-mode-map "\M-U" 'wrap-book)

(defun totext ()
  (interactive)
  "A quick hack to add a link to the text version of a wrap-book-ed sexp"
  (end-of-line)
  (let* ((sexp (read (eek-last-sexp)))
	 (cmd (car sexp))
	 (newcmd (cond ((eq cmd 'code-djvu) 'code-djvutotext)
		       ((eq cmd 'code-xpdf) 'code-pdftotext)
		       (t 'error)))
	 (newsexp (cons newcmd (cdr sexp))))
    (insert (format "\n%S\n;; (find-%stext \"\")\n" newsexp (cadr sexp)))))

;; (define-key eev-mode-map "\M-W" 'totext)

(code-c-d "books" "~/books/" :anchor)
;; (find-books "__cats/README.el")

(defvar books-subdir "__logic")

(defun find-mvbooks-links (&optional code fname &rest rest)
  "Visit a temporary buffer containing hyperlinks for moving a downloaded book."
  (interactive)
  (setq code (or code "_"))
  (setq fname (or fname (file-name-nondirectory
			 (eeurl-dired-file-name-at-point))))
  (apply 'find-elinks `(
    ;; Convention: the first sexp always regenerates the buffer.
    (find-mvbooks-links ,code ,fname ,@rest)
    ;; Body:
    ""
    ,(ee-template `(("_" ,code)
                    ("title.pdf" ,fname)
                    ("__logic" ,books-subdir)) "\
# (find-books-links \"{title.pdf}\")
# (setq books-subdir \"{__logic}\")
# (find-fline \"~/books/{__logic}/\")
# (find-sh0 \"mv -iv /tmp/{title.pdf} ~/books/{__logic}/\")

# (find-fline \"~/books/{__logic}/{__logic}.el\")
{_} ~/books/{__logic}/{title.pdf}")
    ) rest))

(defalias 'mvbookd 'find-mvbooks-links)


;; «hjbc1»  (to ".hjbc1")
;; (find-THfile "2009.1-C1.blogme")
;; http://www.professores.uff.br/hjbortol/disciplinas/2008.2/gma00108/
(code-c-d "hjbc1" "$S/http/www.professores.uff.br/hjbortol/disciplinas/2008.2/gma00108/")
;; (find-hjbc1file "")
;; (find-hjbc1file "listas/gma00108-lista-01.pdf")
(code-xpdf "hjbc1lista01" (ee-hjbc1file "listas/gma00108-lista-01.pdf"))
(code-xpdf "hjbc1lista02" (ee-hjbc1file "listas/gma00108-lista-02.pdf"))
(code-xpdf "hjbc1lista03" (ee-hjbc1file "listas/gma00108-lista-03.pdf"))
(code-xpdf "hjbc1lista04" (ee-hjbc1file "listas/gma00108-lista-04.pdf"))
(code-xpdf "hjbc1lista05" (ee-hjbc1file "listas/gma00108-lista-05.pdf"))
(code-xpdf "hjbc1lista06" (ee-hjbc1file "listas/gma00108-lista-06.pdf"))
(code-xpdf "hjbc1lista07" (ee-hjbc1file "listas/gma00108-lista-07.pdf"))
(code-xpdf "hjbc1lista08" (ee-hjbc1file "listas/gma00108-lista-08.pdf"))
(code-xpdf "hjbc1lista09" (ee-hjbc1file "listas/gma00108-lista-09.pdf"))
(code-xpdf "hjbc1lista10" (ee-hjbc1file "listas/gma00108-lista-10.pdf"))
(code-xpdf "hjbc1lista11" (ee-hjbc1file "listas/gma00108-lista-11.pdf"))
(code-xpdf "hjbc1lista12" (ee-hjbc1file "listas/gma00108-lista-12.pdf"))
(code-xpdf "hjbc1lista13" (ee-hjbc1file "listas/gma00108-lista-13.pdf"))
(code-xpdf "hjbc1lista14" (ee-hjbc1file "listas/gma00108-lista-14.pdf"))
(code-xpdf "hjbc1lista15" (ee-hjbc1file "listas/gma00108-lista-15.pdf"))
(code-xpdf "hjbc1lista16" (ee-hjbc1file "listas/gma00108-lista-16.pdf"))
(code-xpdf "hjbc1lista17" (ee-hjbc1file "listas/gma00108-lista-17.pdf"))
(code-xpdf "hjbc1lista18" (ee-hjbc1file "listas/gma00108-lista-18.pdf"))
(code-xpdf "hjbc1lista19" (ee-hjbc1file "listas/gma00108-lista-19.pdf"))
;; (find-hjbc1lista01page 1)
;; (find-hjbc1lista02page 1)
;; (find-hjbc1lista03page 1)
;; (find-hjbc1lista04page 1)
;; (find-hjbc1lista05page 1)
;; (find-hjbc1lista06page 1)
;; (find-hjbc1lista07page 1)
;; (find-hjbc1lista08page 1)
;; (find-hjbc1lista09page 1)
;; (find-hjbc1lista10page 1)
;; (find-hjbc1lista11page 1)
;; (find-hjbc1lista12page 1)
;; (find-hjbc1lista13page 1)
;; (find-hjbc1lista14page 1)
;; (find-hjbc1lista15page 1)
;; (find-hjbc1lista16page 1)
;; (find-hjbc1lista17page 1)
;; (find-hjbc1lista18page 1)
;; (find-hjbc1lista19page 1)


;; «hjbc2»  (to ".hjbc2")
;; (find-THfile "2009.1-C2.blogme")
;; http://www.professores.uff.br/hjbortol/disciplinas/2007.1/gma06074/
;; http://www.professores.uff.br/hjbortol/disciplinas/2007.1/gma06074/listas/
(code-c-d "hjbc2" "$S/http/www.professores.uff.br/hjbortol/disciplinas/2007.1/gma06074/")
;; (find-hjbc2file "")
;; (find-hjbc2w3m "gma06074.cronograma.html")
;; (find-hjbc2w3m "gma06074.listas.html")
;; (find-hjbc2w3m "gma06074.news.html")
;; (find-hjbc2file "listas/")
;; (find-hjbc2file "listas/lista-00-2007-1.pdf")
(code-xpdf "hjbc2lista00" (ee-hjbc2file "listas/lista-00-2007-1.pdf"))
(code-xpdf "hjbc2lista01" (ee-hjbc2file "listas/lista-01-2007-1.pdf"))
(code-xpdf "hjbc2lista02" (ee-hjbc2file "listas/lista-02-2007-1.pdf"))
(code-xpdf "hjbc2lista03" (ee-hjbc2file "listas/lista-03-2007-1.pdf"))
(code-xpdf "hjbc2lista04" (ee-hjbc2file "listas/lista-04-2007-1.pdf"))
(code-xpdf "hjbc2lista05" (ee-hjbc2file "listas/lista-05-2007-1.pdf"))
(code-xpdf "hjbc2lista06" (ee-hjbc2file "listas/lista-06-2007-1.pdf"))
(code-xpdf "hjbc2lista07" (ee-hjbc2file "listas/lista-07-2007-1.pdf"))
(code-xpdf "hjbc2lista08" (ee-hjbc2file "listas/lista-08-2007-1.pdf"))
(code-xpdf "hjbc2lista09" (ee-hjbc2file "listas/lista-09-2007-1.pdf"))
(code-xpdf "hjbc2lista10" (ee-hjbc2file "listas/lista-10-2007-1.pdf"))
(code-xpdf "hjbc2lista11" (ee-hjbc2file "listas/lista-11-2007-1.pdf"))
(code-xpdf "hjbc2lista12" (ee-hjbc2file "listas/lista-12-2007-1.pdf"))
(code-xpdf "hjbc2lista13" (ee-hjbc2file "listas/lista-13-2007-1.pdf"))
(code-xpdf "hjbc2lista14" (ee-hjbc2file "listas/lista-14-2007-1.pdf"))
(code-xpdf "hjbc2lista15" (ee-hjbc2file "listas/lista-15-2007-1.pdf"))
(code-xpdf "hjbc2lista16" (ee-hjbc2file "listas/lista-16-2007-1.pdf"))
(code-xpdf "hjbc2lista17" (ee-hjbc2file "listas/lista-17-2007-1.pdf"))
(code-xpdf "hjbc2lista18" (ee-hjbc2file "listas/lista-18-2007-1.pdf"))
(code-xpdf "hjbc2lista19" (ee-hjbc2file "listas/lista-19-2007-1.pdf"))
;; (find-hjbc2lista01page 1)
;; (find-hjbc2lista02page 1)
;; (find-hjbc2lista03page 1)
;; (find-hjbc2lista04page 1)
;; (find-hjbc2lista05page 1 "integrais impróprias")
;; (find-hjbc2lista06page 1)
;; (find-hjbc2lista07page 1)
;; (find-hjbc2lista08page 1)
;; (find-hjbc2lista09page 1)
;; (find-hjbc2lista10page 1)
;; (find-hjbc2lista11page 1)
;; (find-hjbc2lista12page 1)
;; (find-hjbc2lista13page 1)
;; (find-hjbc2lista14page 1)
;; (find-hjbc2lista15page 1)
;; (find-hjbc2lista16page 1)
;; (find-hjbc2lista17page 1)
;; (find-hjbc2lista18page 1)
;; (find-hjbc2lista19page 1)




;; «hpprint»  (to ".hpprint")
;; (find-angg "bin/hpprint")
;;
(defun find-hpprint (fname &rest rest)
  (apply 'find-sh (format
		   "sudo chown edrx:edrx /dev/usb/lp0; cat %s > /dev/usb/lp0"
		   fname) rest))

(code-brfile 'find-hpprint
	     :local 'brhpprintl :dired 'brhpprintd)



(seen 11190)


;; 2009may22
;; (find-eevfile "eev-math-glyphs.el")
(defun lenny-ma () (interactive)
  "Make the math glyphs use ascii chars. This is a quick hack."
  (mapcar
   (lambda (p) (add-to-alist 'eev-math-glyphs-name-to-char
			     (cons (car p) (string-to-char (cadr p)))))
   (ee-chop3
    2 0
    '("Theta Pi Sigma Omega"
      "H     P  S     W    "
      "delta epsilon theta lambda nu pi rho sigma tau omega"
      "d     e       h     \\     n  p  r   s     t   w    "
      "top bot land lor supset forall exists"
      "T   F   &    v   >      A      E     "
      "box thin: in circ cap cup Int infty"
      "b   :     e  o    ^   v   I   8    "
      "oplus"
      "+    "))
   )
  (ma))


;; (find-fline "~/usrc/emacs-w3m/w3m-session.el" "w3m-session-load-crashed-sessions")
(setq w3m-session-load-crashed-sessions nil)




;; «eepitch-region»  (to ".eepitch-region")
;; (find-elongkey-links "<f8>")
;; (find-efunction 'eepitch-this-line)
;; (find-eevfile "eev.el" "define-key eev-mode-map [f8]")
;; (find-eevfile "eev.el" "define-key eev-mode-map [f8]")
;; (define-key eev-mode-map [f8]   'eepitch-this-line)
;; (define-key eev-mode-map [f8]   'eepitch-this-line-or-region)

(defun eepitch-trim (str)
  (setq str (replace-regexp-in-string "\n+$" "" str))
  (setq str (replace-regexp-in-string "^\n+" "" str))
  str)

(defun eepitch-region (s &optional e)
  (interactive "r")
  (setq deactivate-mark t)
  (let ((str (eepitch-trim (ee-se-to-string s e))))
    (eepitch-prepare-target-buffer)   ; Reconstruct the target buffer,
    (eepitch-display-target-buffer)   ; display it, make sure it's a
    (eepitch-not-this-buffer)	      ; different buffer, and pitch
    (eepitch-line str)))	      ; the trimmed str to the target.

;; (find-elnode "The Mark" "Function: use-region-p")
;; (find-elnode "The Mark" "deactivate-mark")
;; (find-elnode "The Mark" "User Option: mark-even-if-inactive")
;; (defun ee-use-region-p () (use-region-p))
(defun ee-use-region-p () (use-region-p))
;; (read-event "Key: " t)

(defun eepitch-this-line-or-region (s &optional e)
  (interactive "r")
  (if (use-region-p)
      (progn (eepitch-region s e)
	     (setq deactivate-mark t))
    (eepitch-this-line)))

;; (define-key eev-mode-map [f8]   'eepitch-this-line-or-region)
;; (define-key eev-mode-map [f8]   'eepitch-this-line)
;; (define-key eev-mode-map [S-f8] 'eepitch-region)




;; «perl»  (to ".perl")
;; (find-es "perl" "eepitch-perl")
(defun eepitch-perl () (interactive) (eepitch-comint "perl" "perl -d -e 42"))


;; «python»  (to ".python")
;; (find-es "python" "python-on-lenny")
;; (find-es "python" "python-on-squeeze")

(code-c-d "py2docsrc" "/usr/share/doc/python2.7/html/_sources/")
(code-c-d "py3docsrc" "/usr/share/doc/python3.5/html/_sources/")
;; (find-py2docsrcfile "")
;; (find-py3docsrcfile "")

;; «matplotlib-examples»  (to ".matplotlib-examples")
(code-c-d "matplotlibex" "/usr/share/doc/python-matplotlib-doc/examples/")
;; (find-matplotlibexfile "")

;; (code-c-d "pyapi"  "/nopath"             "python2.5-api")
;; (code-c-d "pydist" "/nopath"             "python2.5-dist")
;; (code-c-d "pyext"  "/nopath"             "python2.5-ext")
;; (code-c-d "pylib"  "/usr/lib/python2.5/" "python2.5-lib")
;; (code-c-d "pyref"  "/nopath"             "python2.5-ref")
;; (code-c-d "pytut"  "/nopath"             "python2.5-tut")
;; (code-c-d "pyex"   "/usr/share/doc/python2.5/examples/")
;; (code-c-d "pyexd"  "/usr/share/doc/python2.5/examples/Demo/")
;; 
;; (code-c-d "pydocsrc"  "/usr/share/doc/python2.6/html/_sources/")
;; (code-c-d "pytut"     "/usr/share/doc/python2.6/html/_sources/tutorial/")
;; (code-c-d "pyhowto"   "/usr/share/doc/python2.6/html/_sources/howto/")
;; (code-c-d "pydocing"  "/usr/share/doc/python2.6/html/_sources/documenting/")
;; (code-c-d "pyusing"   "/usr/share/doc/python2.6/html/_sources/using/")
;; ;; (find-pytutfile "")
;; ;; (find-pydocingfile "")
;; ;; (find-pyhowtofile "")
;; ;; (find-pyhowtofile "functional.txt")
;; ;; (find-pyusingfile "")

;; (find-pyapinode "")
;; (find-pydistnode "")
;; (find-pyextnode "")
;; (find-pylibnode "")
;; (find-pyrefnode "")
;; (find-pytutnode "")
;; (find-pytutnode "Python Scopes and Name Spaces")
;; (find-pyrefnode "standard type hierarchy" "`Classes'")

;; (code-c-d "pyref" "" "python-ref")
;; (code-c-d "pylib" "/usr/lib/python1.5/" "python-lib")
;; (code-c-d "pyexd" "/usr/share/doc/python/examples/Demo/" "python-ref")
;; (code-c-d "pyext" "/usr/share/doc/python/examples/Tools/" "python-ref")

;; «ipython» (to ".ipython")
;; «pylab»   (to ".pylab")
;; (find-es "python" "ipython")
(defun eepitch-pylab () (interactive) (eepitch-comint "pylab" "ipython --pylab"))

;; «sympy» (to ".sympy")
;; (find-es "python" "sympy")
;; (find-es "sympy")
;; (find-es "sympy" "sympy-git")
(code-c-d "sympy"   "~/bigsrc/sympy/")
(code-c-d "sympyd" "/usr/lib/python2.7/dist-packages/sympy/")
(code-c-d "sympyex" "/usr/share/doc/python-sympy/examples/")
(code-c-d "sympydocsrc" "$S/http/docs.sympy.org/0.7.2/_sources/")
(code-c-d "sympydocsrc" "~/bigsrc/sympy/doc/src/")
(code-c-d "sympytut"    "~/bigsrc/sympy/doc/src/tutorial/")
(code-c-d "sympytutsrc" "~/bigsrc/sympy/doc/src/tutorial/")
;;
;; (find-sympyfile "")
;; (find-sympydfile "")
;; (find-sympydfile "integrals/")
;; (find-sympydocsrcfile "")
;; (find-sympydocsrcfile "tutorial/matrices.rst")
;; (find-sympytutfile "matrices.rst")
;;
;; (find-eev "eepitch.el" "eepitch-R")
;; (find-es "sympy" "sympy-colors")

;; (defun eepitch-isympy () (interactive) (eepitch-comint "isympy" "isympy"))
;; (defun eepitch-isympy () (interactive)
;;   (eepitch '(ee-with-pager-cat (find-comintprocess "isympy" "isympy"))))
;; (defun eepitch-isympy () (interactive)
;;   (eepitch-de '(ee-with-pager-cat (find-comintprocess "isympy3" "isympy3"))))

;;
(defun sytu () (interactive) (find-es "sympy" ".tutorial"))
;; (sytu)

;; «sympydoc»       (to ".sympydoc")
;;  «find-pydoc»    (to ".find-pydoc")
;;  «find-sympydoc» (to ".find-sympydoc")
;; (find-angg "elisp/rstdoc.el" "find-pydoc")
;; (find-angg "elisp/rstdoc.el" "find-sympydoc")
;; (find-angg "elisp/rstdoc.el")
;; (find-es "sympy" "sympydoc")
;;
;; (find-sympydoc "tutorial/basic_operations#converting-strings-to-sympy-expressions")





;; «pip3»  (to ".pip3")
(code-c-d "pip3sp" "~/.local/lib/python3.9/site-packages/")
;; (find-pip3spfile "")



;; «maxima»  (to ".maxima")
(defun m   () (interactive) (find-es "maxima"))
(defun ilt () (interactive) (insert "\
** (find-anchor \"~/lisptree/lisptree.mac\")
load           (\"~/lisptree/lisptree.mac\");
"))
(defun iq3 () (interactive) (insert "\
** (find-anchor \"~/MAXIMA/myqdraw3.mac\")
load           (\"~/MAXIMA/myqdraw3.mac\");
"))

;; (find-es "maxima" "no-init")
(defun eepitch-maxima0 () (interactive)
  (eepitch-comint "maxima0" "maxima --no-init"))

;; «oldmaxima»  (to ".oldmaxima")
;; (find-es "maxima" "no-init")
;; (find-angg ".maxima/maxima-init.mac")
;; (find-efunction 'eepitch-maxima)
(code-c-d "oldmaxima" "/usr/share/maxima/5.44.0/" "/usr/share/info/maxima")
(defun eepitch-oldmaxima () (interactive)
  (eepitch-comint "oldmaxima" "/usr/bin/maxima"))
(defun eepitch-oldmaxima0 () (interactive)
  (eepitch-comint "oldmaxima0" "/usr/bin/maxima --userdir=/tmp"))


;; «maxima-mode»  (to ".maxima-mode")
;; (find-es "maxima" "maxima-mode")
;; (find-maximagitfile "interfaces/emacs/emaxima/")
(add-to-list 'load-path "~/bigsrc/maxima/interfaces/emacs/emaxima/")
(autoload 'maxima-mode "maxima")

;; «maxima-git»  (to ".maxima-git")
;; (find-es "maxima" "maxima-git")
;; (find-fline "/usr/local/share/maxima/")
(code-c-d "maximagit" "~/bigsrc/maxima/")
(code-c-d "maximagiti" "/usr/local/share/maxima/branch_5_47_base_1348_g39c0ffa27/")
;; (find-maximagitfile "")
;; (find-maximagitsh "find *")
;; (find-maximagitifile "")

;; (find-books "__comp/__comp.el" "maximabook")
(code-pdf-page "maximabook" "$S/https/maxima.sourceforge.io/docs/maximabook/maximabook-19-Sept-2004.pdf")
(code-pdf-text "maximabook" "$S/https/maxima.sourceforge.io/docs/maximabook/maximabook-19-Sept-2004.pdf" 1)

;; (find-es "maxima" "maxima-src")
;; (find-fline "/usr/share/maxima/")
(code-c-d "maximasrc"   "/usr/share/maxima/5.44.0/src/")
(code-c-d "maximashare" "/usr/share/maxima/5.44.0/share/")
;; (find-maximasharefile "")
;; (find-maximasrcfile "")

;; (find-books "__comp/__comp.el" "maxima-workbook")
(code-pdf-page "maximawb" "$S/http/roland-salz.de/Maxima_Workbook.pdf")
(code-pdf-text "maximawb" "$S/http/roland-salz.de/Maxima_Workbook.pdf" 19)

;; Tests: (find-maximanode "Function and Variable Index")
;;        (find-maximaindex)
;;        (find-maximanode "integrate")
;;        (find-fline "/usr/local/share/info/" "maxima-index.lisp")
;;        (find-maximaindex "lambda")
;;        (find-maximaindex "lambda" :RET)
;;        (find-maximaindex "lambda" :RET "Defines")
;;   Try: (find-maximaindex-links)
;;        (find-maximaindex-links "lambda subst")

(defun find-maximaindex (&optional name &rest rest)
  (interactive)
  (if (not name)
      (find-maximanode "Function and Variable Index")
    (apply 'find-maximanode
	   "Function and Variable Index"
	   (format "* %s:" name)
	   (ee-maximaindex-rest rest))))

(defun ee-maximaindex-rest (rest)
  (if (eq (car rest) :RET)
      (cons '(eek "RET") (cdr rest))
    rest))

;; «maxima»  (to ".maxima")
;; (to "maxima-cvs")
;; (find-es "maxima")
(code-c-d "maxima" "/usr/share/maxima/5.44.0/" "maxima")
;; (find-maximafile "")
;; (find-maximanode "")
;; (code-c-d "xmaxima"   "/usr/share/maxima/5.21.1/src/" "xmaxima")
;; (code-c-d "maximasrc" "/usr/share/maxima/5.21.1/src/")
;; (code-c-d "maximael"  "/usr/share/emacs/site-lisp/maxima/")
;; (defun eepitch-maxima () (interactive) (eepitch-comint "maxima" "maxima"))
;; (find-maximasrcfile "")
;; (find-maximaelfile "")
;; (find-maximanode "")
;; (find-maximanode "Introduction to Maxima")
;; (find-maximagrep "grep -nH -e integrate *.lisp")
;; (find-maximagrep "grep -niH -e prompt *.lisp")
;; (find-maximanode "Introduction to draw")
;; (find-xmaximanode "")



;; «maxima-cvs»  (to ".maxima-cvs")
;; (to "maxima")

;; (code-c-d "maximacvs" "~/usrc/maxima-cvs/"
;;           :info "~/usrc/maxima-cvs/usr/share/info/maxima")
;; (defun eepitch-maximacvs () (interactive)
;;   (eepitch-comint "maximacvs" "~/usrc/maxima-cvs/usr/bin/maxima"))

;; (find-maximacvsfile "")
;; (find-maximacvsfile "usr/share/info/")
;; (find-maximacvssh "find usr | sort")
;; (find-maximacvsnode "")

;; (find-efunction 'ee-goto-position)
;; (find-elnode "Regexp Search")
;; (find-elnode "Regexp Backslash")
(defun ee-maxima-draw-node-re (word)
  (concat "^ -- [A-Za-z ]+: " word "\\>"))
(defun ee-maxima-draw-node-search (word)
  (if word (re-search-forward (ee-maxima-draw-node-re word))))
(defun find-maximanode-draw (&optional word &rest rest)
  (apply 'find-maximanode "Functions and Variables for draw"
	 "" `(ee-maxima-draw-node-search ,word) rest))

;; (find-maximanode "Functions and Variables for draw")
;; (find-maximanode-draw "title")
;; (find-maximanode-draw nil '(ee-write (point-min) (point-max) "" "" "/tmp/o"))
;; (find-fline "/tmp/o")
;; (find-sh "grep '^ --' /tmp/o")
;; (find-sh "grep '^ --' /tmp/o | awk '{print $4}'")
;; (find-sh "grep '^ --' /tmp/o | awk -F: '{print $2}' | awk '{print $1}'")
;; (find-sh "grep '^ --' /tmp/o | awk -F: '{print $2}' | awk '{print $1}' | sort | uniq")

;; «maxima-gpdraw»  (to ".maxima-gpdraw")
;; (find-es "maxima" "maxima-gpdraw")
;; http://www.telefonica.net/web2/biomates/maxima/gpdraw/index.html
;; http://www.telefonica.net/web2/biomates/maxima/gpdraw/
(code-c-d "maximagpdraw" "$S/http/www.telefonica.net/web2/biomates/maxima/gpdraw/")
;; (find-maximagpdrawfile "")
;; (find-maximagpdraww3m "index.html")
;; (find-maximagpdraww3m "implic/index.html")

;; «emaxima»  (to ".emaxima")
;; «emaxima-conv»  (to ".emaxima-conv")
;;    (find-es "maxima" "emaxima-conv")
;;       (find-angg "LUA/emaxima.lua")
;;
(defun emaxima-conv (s e)
  (interactive "r")
  (eev s e "/tmp/emaxima-in")
  (let ((cmd "lua5.1 -e \"ee_dofile'~/LUA/emaxima.lua';conv()\" && cat /tmp/emaxima-out"))
    (find-sh cmd)))

(defun emaxima-block ()
  (interactive)
  (insert "
% (setq eepitch-preprocess-regexp \"^\")
% (setq eepitch-preprocess-regexp \"^%T ?\")
%
%T * (eepitch-maxima)
%T * (eepitch-kill)
%T * (eepitch-maxima)
%T load(\"/usr/share/emacs/site-lisp/maxima/emaxima.lisp\")$
%T display2d:'emaxima$
%T linenum:0;
%T
%M (%i1)
%M (%o1)
%L Maxima.sa \"foo\"
"))

;; «imaxima»  (to ".imaxima")
;;  (find-es "maxima" "imaxima")

(defun eepitch-imaxima () (interactive)
  (eepitch '(find-imaximaprocess)))

(defun find-imaximaprocess (&rest rest)
  (require 'imaxima)
  (imaxima)
  (find-ebuffer
   (if imaxima-use-maxima-mode-flag
       "*maxima*"
     "*imaxima*")))






(seen 11350)



;; «code-filetext»  (to ".code-filetext")
;; (find-eev "eev.el" "code-xpdf")
;;
(defun ee-code-filetext (code fname)
  (format "
    (defun find-%stext (&rest rest) (interactive)
      (apply 'find-fline %S rest))
  " code fname))
(defun code-filetext (c f) (eval (ee-read (ee-code-filetext c f))))
(defun find-code-filetext (c f) (find-estring-elisp (ee-code-filetext c f)))

;; «debian-devel-docs»  (to ".debian-devel-docs")
;; (find-es "debiandev" "debian-devel-docs")
;; http://www.debian.org/doc/packaging-manuals/debian-emacs-policy
(code-filetext "dpol"      "/usr/share/doc/debian-policy/policy.txt.gz")
(code-filetext "debref"    "/usr/share/doc/debian-reference-common/html/debian-reference.en.txt.gz")
(code-filetext "debdevref" "/usr/share/doc/developers-reference/developers-reference.txt.gz")
(code-filetext "docbase"   "/usr/share/doc/doc-base/doc-base.txt.gz")
(code-filetext "maintg"    "/usr/share/doc/maint-guide/maint-guide.en.txt.gz")
(code-filetext "debemacspol" "/usr/share/doc/emacsen-common/debian-emacs-policy.gz")
(code-filetext "apthowto"  "/usr/share/doc/Debian/apt-howto/apt-howto.en.txt.gz")
;; (find-dpoltext)
;; (find-debreftext)
;; (find-debdevreftext)
;; (find-docbasetext)
;; (find-maintgtext)
;; (find-debemacspoltext)
;; (find-apthowtotext)

;; (find-man "8 dh_make")
;; (find-man "8 dh_make" "debian-policy")
;; (find-dpolfile "")
;; (find-dpolgrep "zgrep -nH -e ompar *")
;; (find-dpolgrep "zgrep -nH -e ompare-v *")
;; (find-dpolgrep "zgrep -nH -e lexically *")
;; (find-dpolfile "policy.txt.gz" "<upstream_version>")
(code-c-d "dpol"   "/usr/share/doc/debian-policy/")
(code-c-d "maintg" "/usr/share/doc/maint-guide/")
(code-c-d "debref" "/usr/share/doc/Debian/reference/")


(setq debian-changelog-mailing-address "eduardoochs@gmail.com")

;; «vcaa»  (to ".vcaa")
;; (find-node "(coreutils)cp invocation" "`-u'")
(code-c-d "vcaa"  "/var/cache/apt/archives/")
(code-c-d "vcaab" "/var/cache/apt/archives/backup/")
;; (find-vcaafile "")
;; (find-vcaash0 "sudo mkdir backup; sudo chown edrx:edrx backup")
;; (find-vcaash0 "sudo cp -vul *.deb backup/")
;; (find-vcaabfile "")



;; «no-mouse-mode»  (to ".no-mouse-mode")
;; For laptops with touchpads - I keep hitting my thumbs on the
;; touchpad by accident, and this minor mode makes most of these
;; "accidental clicks" harmless.
;;
;; Notes:
;; To identify the event corresponding to mouse clicks:
;;   (defun foo (key) (interactive "k") (setq my-key key))
;; To sort of disable mouse events:
;;   (defun foo () (interactive) (message "Foo!"))
;;   (define-key eev-mode-map [down-mouse-1] 'foo)
;;   (define-key eev-mode-map [mouse-1] 'foo)
;; See:
;;   (find-eevfile "eev.el" "define-minor-mode eev-mode\n")
;;   (find-efile "mouse.el")
;;
;; Use also:
;;   (mouse-wheel-mode 0)
;;
(defun my-mouse-event (str)
  `(lambda () (interactive) (message ,str)))

(setq no-mouse-mode-map (make-sparse-keymap))
(define-key no-mouse-mode-map [down-mouse-1] (my-mouse-event "down-mouse-1"))
(define-key no-mouse-mode-map      [mouse-1] (my-mouse-event      "mouse-1"))
(define-minor-mode no-mouse-mode
  "The no-mouse-mode keymap just binds some mouse events to dummy events."
  :init-value nil :global t :lighter " no-mouse")

;; (no-mouse-mode 1)
;; (no-mouse-mode 0)



;; «openoffice»  (to ".openoffice")
;;
(defun find-oowriter (fname)
  (interactive "fOpen with oowriter: ")
  (find-bgprocess `("oowriter" ,fname)))
(defun find-oocalc (fname)
  (interactive "fOpen with oocalc: ")
  (find-bgprocess `("oocalc" ,fname)))

;; LibreOffice:
(defun find-oowriter (fname)
  (interactive "fOpen with lowriter: ")
  (find-bgprocess `("lowriter" ,fname)))
(defun find-oocalc (fname)
  (interactive "fOpen with localc: ")
  (find-bgprocess `("localc" ,fname)))

(code-brfile 'find-oowriter
             :local 'broowl :dired 'broowd)
(code-brfile 'find-oocalc
             :local 'broocl :dired 'broocd)




;; (find-fline "/sda7/nikon/")

(defun find-avidemux (fname &rest pos-spec-list)
  (apply 'find-bgprocess `("avidemux" ,fname) pos-spec-list))
(defun find-totem (fname &rest pos-spec-list)
  (apply 'find-bgprocess `("totem" ,fname) pos-spec-list))
(defun find-vlc (fname &rest pos-spec-list)
  (apply 'find-bgprocess `("vlc" ,fname) pos-spec-list))

(code-brfile 'find-avidemux
             :local 'bravl :dired 'bravd)
(code-brfile 'find-totem
             :local 'brtoteml :dired 'brtotemd)
(code-brfile 'find-vlc
             :local 'brvlcl :dired 'brvlcd)
(code-brfile 'find-mplayer
             :local 'brmplayerl :dired 'brmplayerd)




;; «mm:ss»  (to ".mm:ss")
;; (find-eev "eev-template.el" "secs-to-mm:ss")
;; Examples:
;; (mm:ss-to-secs "3:20")
;; (mm:ss-to-secs  200)
;; (secs-to-mm:ss "3:20")
;; (secs-to-mm:ss  200)

;; «find-mplayer»  (to ".find-mplayer")
;; (find-eev "eev-template.el" "find-mplayer")
;; (find-angg "VIDEOS/Makefile")
;; (find-es "video" "mplayer")
;; (find-es "math" "catsters")
;; (find-efunction 'find-firefox)
;; (find-efunction 'find-bgprocess)
;; (find-es "dvd" "mplayer-subtitles")
;; (find-man "1 mplayer" "-ss <time>" "Seek to given time position")
;; (find-man "1 mplayer" "onscreen display (OSD)")
;; (find-man "1 mplayer" "keyboard control" "o" "Toggle OSD states:")
;; (find-man "1 mplayer" "keyboard control" "<- and ->" "Seek backward/forward 10 seconds")
;; (find-man "1 mplayer" "keyboard control" "f" "Toggle fullscreen")

;; «code-mplayer»  (to ".code-mplayer")
;; «code-Mplayer»  (to ".code-Mplayer")
;; (find-eev "eev-template.el" "code-mplayer")
;; (find-efunction 'code-xpdf)

;; Renamed and moved to:
;;   (find-eev "eev-audiovideo.el")

;; (defun find-Mplayer (fname &optional pos &rest rest)
;;   (interactive "sFile name: ")
;;   (find-bgprocess
;;    `("xterm" "-geometry" "+200+100" "-e"
;;      "mplayer" ,fname
;;      ,@(if pos `("-ss" ,(secs-to-mm:ss pos)))
;;      )))
;;
;; (defun ee-code-Mplayer (code fname)
;;   (format "
;;     (defun find-%s (&rest rest) (interactive)
;;       (apply 'find-Mplayer %S rest))
;;   " code fname))
;; (defun code-Mplayer      (c f) (eval (ee-read (ee-code-Mplayer c f))))
;; (defun find-code-Mplayer (c f) (find-estring-elisp (ee-code-Mplayer c f)))


;; «ict-quimica»  (to ".ict-quimica")
;; Moved to: (find-angg ".emacs.audios" "ict-quimica")
;; (find-fline "~/PURO/2011dec13-ict/")


;; «find-minicatsvideo»  (to ".find-minicatsvideo")
(defun find-minicatsvideo (subdir stem &optional pos &rest rest)
  (find-mplayer (format "/sda7/nikon/%s%s.flv" subdir stem) pos))
(defun find-minicatsvideo (subdir stem &optional pos &rest rest)
  (find-mplayer (format "/sda6/nikon/%s%s.avi" subdir stem) pos))


;; Examples:
;; (find-dirfile     "$EEVDIR/eepitch.el")
;; (find-dirfile (ee-eevfile "eepitch.el"))
;;
(defun find-dirfile (fullpath)
  (find-fline (file-name-directory    fullpath)
	      (file-name-nondirectory fullpath)))

;; «find-minicatsframe»  (to ".find-minicatsframe")
;; Examples:
;;               (ee-minicatsvideofile 1 145)
;; (find-dirfile (ee-minicatsvideofile 1 145))
;;               (ee-minicatsframefile 1 145)
;;               (ee-minicatsframefile 1 145 "2:00")
;; (find-dirfile (ee-minicatsframefile 1 145 "2:00"))
;; (find-mplayer (ee-minicatsvideofile 1 144))
;; (find-minicatsvideo 1 145)
;; (find-minicatsvideo 1 145 "2:00")
;; (find-minicatsframe 1 145 "2:00")
;;
(defun ee-minicatsvideofile (aula dscn)
  (format "/sda6/nikon/aula_%d/DSC_%04d.avi" aula dscn))
(defun ee-minicatsframefile (aula dscn &optional pos)
  (format "/sda6/nikon/aula_%d/DSC_%04d_frames/DSC_%04d_%03d.jpg"
	  aula dscn dscn
	  (+ 1 (/ (mm:ss-to-secs (or pos 0)) 20))))

(defun find-minicatsvideofile (aula dscn &optional pos &rest rest)
  (find-dirfile (ee-minicatsvideofile aula dscn)))
(defun find-minicatsframefile (aula dscn &optional pos &rest rest)
  (find-dirfile (ee-minicatsframefile aula dscn pos)))

(defun find-minicatsvideo     (aula dscn &optional pos &rest rest)
  (find-mplayer (ee-minicatsvideofile aula dscn) pos))
(defun find-minicatsframe     (aula dscn &optional pos &rest rest)
  (find-fline   (ee-minicatsframefile aula dscn pos)))


;; (find-minicatsvideofile 1 145 "3:40" "Functions, explicitly")
;; (find-minicatsframefile 1 145 "3:40" "Functions, explicitly")
;; (find-minicatsvideo 1 145 "3:40" "Functions, explicitly")
;; (find-minicatsframe 1 145 "3:40" "Functions, explicitly")
;; (find-minicatsvideo 1 145 "3:40" "Functions are sets")
;; (find-minicatsframe 1 145 "3:40" "Functions are sets")
;; (find-minicatsvideo 1 145 "5:48" "Preamble to Cats")
;; (find-minicatsframe 1 145 "5:48" "Preamble to Cats")





;; (find-fline   "~/CATSTERS/")
;; (find-mplayer "~/CATSTERS/Representables+and+Yoneda+2.mp4")
;; (find-mplayer "~/CATSTERS/Representables+and+Yoneda+2.mp4" "1:10")
;; (find-code-mplayer "catsters-repyoneda4" "~/CATSTERS/Representables+and+Yoneda+2.mp4")
;; (find-es "math" "catsters")

;; (find-angg "bin/gsub.lua")
;; (find-sh "cd ~/CATSTERS/ && ls | gsub.lua '' '(code-mplayer \"catsters-\" \"~/CATSTERS/%1\")'")
;; (find-sh "cat ~/.emacs | gsub.lua '^%(code%-mplayer \"catsters%-([^\"]+)\".*' ';; (find-catsters-%1 nil)'")

(code-mplayer "catsters-2categories1"    "~/CATSTERS/2-categories+1+(Catsters+36).mp4")
(code-mplayer "catsters-2categories2"    "~/CATSTERS/2-categories+2.mp4")
(code-mplayer "catsters-adjs1"           "~/CATSTERS/Adjunctions+1.mp4")
(code-mplayer "catsters-adjs2"           "~/CATSTERS/Adjunctions+2.mp4")
(code-mplayer "catsters-adjs3"           "~/CATSTERS/Adjunctions+3.mp4")
(code-mplayer "catsters-adjs4"           "~/CATSTERS/Adjunctions+4.mp4")
(code-mplayer "catsters-adjs5"           "~/CATSTERS/Adjunctions+5.flv")
(code-mplayer "catsters-adjs6"           "~/CATSTERS/Adjunctions+6.mp4")
(code-mplayer "catsters-adjs7"           "~/CATSTERS/Adjunctions+7.mp4")
(code-mplayer "catsters-adjsfrommorphs1" "~/CATSTERS/Adjunctions+from+morphisms+1.mp4")
(code-mplayer "catsters-adjsfrommorphs2" "~/CATSTERS/Adjunctions+from+morphisms+2.mp4")
(code-mplayer "catsters-adjsfrommorphs3" "~/CATSTERS/Adjunctions+from+morphisms+3.mp4")
(code-mplayer "catsters-adjsfrommorphs4" "~/CATSTERS/Adjunctions+from+morphisms+4.mp4")
(code-mplayer "catsters-adjsfrommorphs5" "~/CATSTERS/Adjunctions+from+morphisms+5.mp4")
(code-mplayer "catsters-coeqs1"          "~/CATSTERS/Coequalisers+1.mp4")
(code-mplayer "catsters-coeqs2"          "~/CATSTERS/Coequalisers+2.mp4")
(code-mplayer "catsters-distrlaws1"      "~/CATSTERS/Distributive+laws+1.mp4")
(code-mplayer "catsters-distrlaws2"      "~/CATSTERS/Distributive+laws+2.mp4")
(code-mplayer "catsters-distrlaws3"      "~/CATSTERS/Distributive+laws+3+and%or+Monads+6+[29].mp4")
(code-mplayer "catsters-distrlaws4"      "~/CATSTERS/Distributive+laws+4+[30].mp4")
(code-mplayer "catsters-doublecats"      "~/CATSTERS/Double+categories.mp4")
(code-mplayer "catsters-eckmannhilton1"  "~/CATSTERS/Eckmann-Hilton+1.mp4")
(code-mplayer "catsters-eckmannhilton2"  "~/CATSTERS/Eckmann-Hilton+2+(beware+typo+at+4:13).mp4")
(code-mplayer "catsters-limsandcolims1"  "~/CATSTERS/General+limits+and+colimits+1.mp4")
(code-mplayer "catsters-limsandcolims2"  "~/CATSTERS/General+limits+and+colimits+2.mp4")
(code-mplayer "catsters-limsandcolims3"  "~/CATSTERS/General+limits+and+colimits+3.mp4")
(code-mplayer "catsters-limsandcolims4"  "~/CATSTERS/General+limits+and+colimits+4.mp4")
(code-mplayer "catsters-limsandcolims5"  "~/CATSTERS/General+limits+and+colimits+5.mp4")
(code-mplayer "catsters-limsandcolims6"  "~/CATSTERS/General+limits+and+colimits+6.mp4")
(code-mplayer "catsters-grobjsandhopf1"  "~/CATSTERS/Group+objects+and+Hopf+algebras+1.mp4")
(code-mplayer "catsters-grobjsandhopf1"  "~/CATSTERS/Group+objects+and+Hopf+algebras+2.mp4")
(code-mplayer "catsters-grobjsandhopf1"  "~/CATSTERS/Group+objects+and+Hopf+algebras+3+(Catsters+37).mp4")
(code-mplayer "catsters-grobjsandhopf1"  "~/CATSTERS/Group+objects+and+Hopf+algebras+4+(Catsters+38).mp4")
(code-mplayer "catsters-grobjsandhopf1"  "~/CATSTERS/Group+objects+and+Hopf+algebras+5.mp4")
(code-mplayer "catsters-grobjsandhopf1"  "~/CATSTERS/Group+objects+and+Hopf+algebras+6.mp4")
(code-mplayer "catsters-howitisdone"     "~/CATSTERS/How+it+is+done.mp4")
(code-mplayer "catsters-kleinbottle"     "~/CATSTERS/Klein+bottle.mp4")
(code-mplayer "catsters-metricspaces1"   "~/CATSTERS/Metric+spaces+and+enriched+categories+1.mp4")
(code-mplayer "catsters-metricspaces2"   "~/CATSTERS/Metric+spaces+and+enriched+categories+2.mp4")
(code-mplayer "catsters-monads1"         "~/CATSTERS/Monads+1.mp4")
(code-mplayer "catsters-monads2"         "~/CATSTERS/Monads+2.mp4")
(code-mplayer "catsters-monads3"         "~/CATSTERS/Monads+3.mp4")
(code-mplayer "catsters-monads3a"        "~/CATSTERS/Monads+3A.mp4")
(code-mplayer "catsters-monads4"         "~/CATSTERS/Monads+4.mp4")
(code-mplayer "catsters-monoidobjs1"     "~/CATSTERS/Monoid+objects+1.mp4")
(code-mplayer "catsters-monoidobjs2"     "~/CATSTERS/Monoid+objects+2.mp4")
(code-mplayer "catsters-multicats1"      "~/CATSTERS/Multicategories+1+(Catsters+33).mp4")
(code-mplayer "catsters-multicats2"      "~/CATSTERS/Multicategories+2+(Catsters+34).mp4")
(code-mplayer "catsters-nts1"            "~/CATSTERS/Natural+transformations+1.mp4")
(code-mplayer "catsters-nts2"            "~/CATSTERS/Natural+transformations+2.mp4")
(code-mplayer "catsters-nts3"            "~/CATSTERS/Natural+transformations+3.mp4")
(code-mplayer "catsters-nts3a"           "~/CATSTERS/Natural+transformations+3A.mp4")
(code-mplayer "catsters-openclosedcob1"  "~/CATSTERS/Open-closed+cobordism+1.mp4")
(code-mplayer "catsters-openclosedcob2"  "~/CATSTERS/Open-closed+cobordisms+2.mp4")
(code-mplayer "catsters-openclosedcob3"  "~/CATSTERS/Open-closed+cobordisms+3.mp4")
(code-mplayer "catsters-outtakes"        "~/CATSTERS/Outtakes+(Catsters+35).mp4")
(code-mplayer "catsters-prodscoprods1"   "~/CATSTERS/Products+and+coproducts+1.mp4")
(code-mplayer "catsters-prodscoprods2"   "~/CATSTERS/Products+and+coproducts+2.mp4")
(code-mplayer "catsters-prodscoprods3"   "~/CATSTERS/Products+and+coproducts+3.mp4")
(code-mplayer "catsters-prodscoprods4"   "~/CATSTERS/Products+and+coproducts+4.mp4")
(code-mplayer "catsters-pbspushouts1"    "~/CATSTERS/Pullbacks+and+pushouts+1.mp4")
(code-mplayer "catsters-pbspushouts2"    "~/CATSTERS/Pullbacks+and+pushouts+2.mp4")
(code-mplayer "catsters-repyoneda1"      "~/CATSTERS/Representables+and+Yoneda+1.mp4")
(code-mplayer "catsters-repyoneda2"      "~/CATSTERS/Representables+and+Yoneda+2.mp4")
(code-mplayer "catsters-repyoneda3"      "~/CATSTERS/Representables+and+Yoneda+3.mp4")
(code-mplayer "catsters-slicecomma1"     "~/CATSTERS/Slice+and+comma+categories+1.mp4")
(code-mplayer "catsters-slicecomma2"     "~/CATSTERS/Slice+and+comma+categories+2.mp4")
(code-mplayer "catsters-spans1"          "~/CATSTERS/Spans+1+[31].mp4")
(code-mplayer "catsters-spans2"          "~/CATSTERS/Spans+2+[32].mp4")
(code-mplayer "catsters-stringdiagrams1" "~/CATSTERS/String+diagrams+1.mp4")
(code-mplayer "catsters-stringdiagrams2" "~/CATSTERS/String+diagrams+2.mp4")
(code-mplayer "catsters-stringdiagrams3" "~/CATSTERS/String+diagrams+3.mp4")
(code-mplayer "catsters-stringdiagrams4" "~/CATSTERS/String+diagrams+4.mp4")
(code-mplayer "catsters-stringdiagrams5" "~/CATSTERS/String+diagrams+5.mp4")
(code-mplayer "catsters-terminits1"      "~/CATSTERS/Terminal+and+initial+objects+1.mp4")
(code-mplayer "catsters-terminits2"      "~/CATSTERS/Terminal+and+initial+objects+2.mp4")
(code-mplayer "catsters-terminits3"      "~/CATSTERS/Terminal+and+initial+objects+3.mp4")


(seen 11630)


;; «luajit»  (to ".luajit")
;; (find-es "lua5" "luajit")
(code-c-d "luajit" "~/usrc/LuaJIT-2.0.0-beta8/")
(code-c-d "luajit" "~/usrc/LuaJIT-2.0.2/")
(defun eepitch-luajit () (interactive)
  (eepitch-comint "luajit" (ee-luajitfile "src/luajit")))
(defun eepitch-luajit () (interactive)
  (eepitch-comint "luajit" "luajit"))

;; (find-enode "Choosing Modes" "#!")
;; (find-enode "Choosing Modes" "interpreter-mode-alist")
;; (find-evardescr 'interpreter-mode-alist)
;; (find-anggfile "elisp/lua-mode.el")
(add-to-list 'interpreter-mode-alist '("luajit"   . lua-mode))
(add-to-list 'interpreter-mode-alist '("lua5.1"   . lua-mode))
(add-to-list 'interpreter-mode-alist '("tclsh8.0" . tcl-mode))
(add-to-list 'interpreter-mode-alist '("expectk"  . tcl-mode))
(add-to-list 'interpreter-mode-alist '("expect"   . tcl-mode))




;; «love2d»  (to ".love2d")
;; (find-es "love" "love-vilua")
(defun eepitch-love () (interactive)
  (eepitch-comint "love" "love ~/LOVE2D/vilua2.love"))





;; «caderno»  (to ".caderno")
;; (find-fline "~/SCANS/")
(code-djvu "caderno2" "~/SCANS/caderno2/caderno.djvu")
;; (find-caderno2page 10      "A família {p_U, p_V} viola separatedness")
;; (find-caderno2page 16 "MD" "g(f(4)) -^v^-> g(2*4+3)")
;; (find-caderno2page 21 "C2" "Um modo de estruturar respostas para alguns problemas de Cálculo 2")
;; (find-caderno2page 21 "C2" "boa primitiva")
;; (find-caderno2page 22 "C2" "Exercícios de Integral de Riemann")
;; (find-caderno2page 23 "MD" "Exercícios sobre relações e funções")
;; (find-caderno2page 26 "C2" "reduzir" "(D^2 + \\aa D + \\bb)f = 0" "(D-a)(D-b)f=0")
;; (find-caderno2page 26 "C2" "encontre uma EDO da forma y'''+ay''+by'+cy=0 com sols básicas")
;; (find-caderno2page 27 "C4" "Sejam F, G, H, K os seguintes campos em R^2:")
;; (find-caderno2page 29      "este é o caminho para sermos ouvidos _por outras comissões_")
;; (find-caderno2page 30 "C2" "Gabarito da P2")
;; (find-caderno2page 33 "MD" "Prova de reposição")
;; (find-caderno2page 34 "C2" "Prova de reposição")
;; (find-caderno2page 35 "C4" "2ª Prova de reposição")
;; (find-caderno2page 36 "C4" "2ª Prova de reposição - gabarito")
;; (find-caderno2page 38 "C2" "(VR/VS?)")
;; (find-caderno2page 39 "C4" "VS")
;; (find-caderno2page 40 "C4" "Mini-gabarito da VS")
;; (find-caderno2page 41 "C4" "VS2")
;; (find-caderno2page 42 "C2" "VS")
;; (find-caderno2page 43 "C2" "VS - gabarito")
;; (find-caderno2page 45      "(Yoneda in 6 diagrams)")
;; (find-caderno2page 50      "RRZ's book is centered on presheaves (draft)")
;; (find-caderno2page 51      "RRZ's book is centered on presheaves")
;; (find-caderno2page 52      "O que é preciso para trabalhar em empresas?")
;; (find-caderno2page 53      "Lambek/Scott")
;; (find-caderno2page 55      "Lambek/Scott")
;; (find-caderno2page 56      "pare de fingir que dá pra ver o mundo só do ponto de vista dos winners")
;; (find-caderno2page 57      "\"o método autoritário é melhor\"")
;; (find-caderno2page 58      "A lemma about bifunctors")
;; (find-caderno2page 59      "A lemma about bifunctors")
;; (find-caderno2page 60      "Product categories")
;; (find-caderno2page 61      "A lemma on bifunctors")
;; (find-caderno2page 62      "mapinha do dednat5")
;; (find-caderno2page 63      "The condition on variables (and on terms)")

(code-djvu "caderno1" "~/SCANS/caderno1/caderno1.djvu")
;; (find-caderno1page 1)

(code-djvu "judith" "$S/http/anggtwu.net/MD/judith_p59_a_110.djvu")
;; (find-judithpage (+ -58 59) "2.1. Técnicas de Demonstração")
;; (find-judithpage (+ -58 61)   "Exaustiva")
;; (find-judithpage (+ -58 63)   "Direta")
;; (find-judithpage (+ -58 63)   "Contraposição")
;; (find-judithpage (+ -58 64)   "Absurdo")
;; (find-judithpage (+ -58 65)   "Acidentes Felizes")
;; (find-judithpage (+ -58 66)   "Exercícios")



;; «unilog-2010»  (to ".unilog-2010")
;; http://www.uni-log.org/start3.html
;; http://www.uni-log.org/ss3-CAT.html
;; http://www.uni-log.org/handbook-unilog2010.pdf
(code-xpdf      "uniloghandbook" "$S/http/www.uni-log.org/handbook-unilog2010.pdf")
(code-pdftotext "uniloghandbook" "$S/http/www.uni-log.org/handbook-unilog2010.pdf")
;; (find-uniloghandbookpage        3  "Contents")
;; (find-uniloghandbookpage (+ 4   6) "Yuri Gurevich")
;; (find-uniloghandbookpage (+ 4   7) "Giovanni Sambin")
;; (find-uniloghandbookpage (+ 4   7) "Jonathan Seldin")
;; (find-uniloghandbookpage (+ 4   7) "Amilcar Sernadas")
;; (find-uniloghandbookpage (+ 4  11) "Carlos Caleiro")
;; (find-uniloghandbookpage (+ 4  19) "Categorical Logic")
;; (find-uniloghandbookpage (+ 4  20)   "Maietti")
;; (find-uniloghandbookpage (+ 4  21)   "Dominique Duval")
;; (find-uniloghandbookpage (+ 4  21)   "René Guitart")
;; (find-uniloghandbookpage (+ 4  21)   "Eduardo Ochs")
;; (find-uniloghandbookpage (+ 4  22)   "Valeria de Paiva")
;; (find-uniloghandbookpage (+ 4  22)   "Szczeciniarz")
;; (find-uniloghandbookpage (+ 4  22) "Logic diagrams")
;; (find-uniloghandbookpage (+ 4  28)   "Polynomial Ring Calculus")
;; (find-uniloghandbookpage (+ 4  34) "+ update")
;; (find-uniloghandbookpage (+ 4  39)  "tortoise")
;; (find-uniloghandbookpage (+ 4  55)  "how to combine logics")
;; (find-uniloghandbookpage (+ 4  58)  "tortoise")
;; (find-uniloghandbookpage (+ 4  62)  "godel completeness")
;; (find-uniloghandbookpage (+ 4  66)  "information")
;; (find-uniloghandbookpage (+ 4  69)  "S4")
;; (find-uniloghandbookpage (+ 4  73)  "socrates")
;; (find-uniloghandbookpage (+ 4  79)  "proof events")
;; (find-uniloghandbookpage (+ 4  83)  "Piaget")
;; (find-uniloghandbookpage (+ 4  88) "Tutorials")
;; (find-uniloghandbookpage (+ 4  89)   "Fractals, topology and logic")
;; (find-uniloghandbookpage (+ 4  94)   "Coniglio")
;; (find-uniloghandbookpage (+ 4  95)   "Ideospheres")
;; (find-uniloghandbookpage (+ 4  95)   "Institutions")
;; (find-uniloghandbookpage (+ 4  96)   "Kripke's World")
;; (find-uniloghandbookpage (+ 4  98)   "Plurality")
;; (find-uniloghandbookpage (+ 4  98)   "Natural Deductions")
;; (find-uniloghandbookpage (+ 4 102)   "Joao Marcos")
;; (find-uniloghandbookpage (+ 4 103)   "Truth-values")
;; (find-uniloghandbooktext "" "Luiz Henrique da Cruz Silvestrini")
;; (find-uniloghandbooktext "" "Juan Luis Gastaldi")
;; (find-uniloghandbooktext "" "James Brotherston")
;; (find-uniloghandbooktext "" "Danielle Macbeth")
;; (find-uniloghandbooktext "" "Abelian logic")
;; (find-uniloghandbooktext "" "Arno Bastenhof")
;; (find-uniloghandbooktext "")



;; «gdb»  (to ".gdb")
;; (find-es "emacs" "gdb-mi")
;; (find-es "gdb" "gdb-squeeze")
(code-c-d "gdb"    "/usr/share/doc/gdb-doc/html/gdb/"    "gdb")
(code-c-d "gdbint" "/usr/share/doc/gdb-doc/html/gdbint/" "gdbint")
(code-c-d "stabs"  "/usr/share/doc/gdb-doc/html/stabs/"  "stabs")
;; (find-gdbfile "")
;; (find-gdbnode "")
;; (find-gdbintfile "")
;; (find-gdbintnode "")
;; (find-stabsfile "")
;; (find-stabsnode "")



;; «bash»  (to ".bash")
;; (find-es "bash" "bash-debian")
(code-c-d "bash" "/usr/share/doc/bash/examples/" "bash")
;; (find-bashfile "")
;; (find-bashnode "")

;; «dash»  (to ".dash")
;; (find-es "bash" "dash")
;; (defun eepitch-dash () (interactive) (eepitch-comint "dash" "dash"))

;; (find-es "emacs" "dash")
(code-c-d "dash" "~/.emacs.d/elpa/dash-20220516.2220/" "dash")

;; «ksh»  (to ".ksh")
;; (find-es "zsh" "ksh")
;; (defun eepitch-ksh () (interactive) (eepitch-comint "ksh" "ksh"))

;; «tcsh»  (to ".tcsh")
;; (find-es "bash" "ksh")
;; (defun eepitch-tcsh () (interactive) (eepitch-comint "tcsh" "tcsh"))

;; «zsh»  (to ".zsh")
;; (find-es "zsh" "zsh-debian")
;; (defun eepitch-zsh () (interactive) (eepitch-comint "zsh" "zsh"))
(code-c-d "zsh" "/usr/share/doc/zsh/examples/" "zsh")
;; (find-zshfile "")
;; (find-zshnode "")




;; «guile»  (to ".guile")
;; (find-es "scheme" "guile-1.8")
;; (defun eepitch-guile () (interactive) (eepitch-comint "guile" "guile"))
(code-c-d "guile"    "/usr/share/guile/3.0/" "guile")
;; (find-guilefile "")
;; (find-guilefile "ice-9/")
;; (find-guilefile "ice-9/expect.scm")
;; (find-guilenode "")
;; (find-guilenode "REPL Commands")

;; «mit-scheme»  (to ".mit-scheme")
;; (find-es "scheme" "mit-scheme")
(code-c-d "mitscheme" "/usr/lib/mit-scheme-i386/" "mit-scheme-user")
' (defun eepitch-mitscheme () (interactive)
    (eepitch-comint "mit-scheme" "mit-scheme"))
;; (find-mitschemefile "")
;; (find-mitschemenode "")
;; (find-mitschemenode "Edwin")
;; (find-mitschemenode "Edwin REPL Mode")

;; «scsh»  (to ".scsh")
;; (find-es "scheme" "scsh")
(code-c-d "scshdoc" "/usr/share/doc/scsh-0.6-doc/")
;; (defun eepitch-scsh () (interactive) (eepitch-comint "scsh" "scsh"))
;; (find-scshdocfile "")
;; (find-scshdocfile "cheat.txt.gz")


;; «haskell»  (to ".haskell")
;; «haskell-docs»  (to ".haskell-docs")
;; (find-es "haskell" "haskell-docs")
;; (find-es "haskell" "haskell-docs" "zcat")
(code-pdf-page "h98" "~/tmp/haskell98-report.pdf")
(code-pdf-text "h98" "~/tmp/haskell98-report.pdf")
(code-pdf-page "h98t" "$S/https/www.haskell.org/tutorial/haskell-98-tutorial.pdf")
(code-pdf-text "h98t" "$S/https/www.haskell.org/tutorial/haskell-98-tutorial.pdf")
(code-c-d "h98"  "/usr/share/doc/haskell98-report/html/haskell98-report-html/")
(code-c-d "h98t" "/usr/share/doc/haskell98-tutorial/html/")
;; (find-h98file "")
;; (find-h98tfile "")
;; (find-h98page)
;; (find-h98text)
;; (find-h98tpage)
;; (find-h98ttext)

;; Old:
(code-c-d "hask98report" "/usr/share/doc/haskell98-report/html/haskell98-report-html/")
(code-c-d "hask98tut"    "/usr/share/doc/haskell98-tutorial/html/")
;; (find-hask98reportfile "")
;; (find-hask98reportw3m  "index.html")
;; (find-hask98reportw3m  "index98.html")
;; (find-hask98tutfile "")
;; (find-hask98tutw3m  "index.html")
;; (find-blogme3 "angglisp.lua" "haskell")

;; «haskell-mode»  (to ".haskell-mode")
;; (find-es "haskell" "haskell-mode")
;;(code-c-d "haskellmode" "~/usrc/haskell-mode-2.8.0/")
(code-c-d "haskellmode" "~/.emacs.d/elpa/haskell-mode-20220529.1859/")
;; (find-haskellmodefile "")
;;
;; (add-to-list 'load-path "~/usrc/haskell-mode-2.8.0/")
;; (when (file-exists-p "~/usrc/haskell-mode-2.8.0/haskell-site-file.el")
;;   ;; (find-haskellmodefile "inf-haskell.el" "haskell-program-name")
;;   ;; (setq haskell-program-name "hugs \"+.\"")
;;   (setq haskell-program-name "ghci")
;;   (load "haskell-site-file")
;;   (add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode)
;;   (add-hook 'haskell-mode-hook 'turn-on-haskell-indentation)
;;   )

;; «hoogle»  (to ".hoogle")
;; (find-es "haskell" "hoogle")
(defun find-hoogle (str &rest rest)
  (apply 'find-sh (concat "hoogle --count=2000 " str) rest))

;; (find-es "emacs" "eval-after-load")
(setq haskell-hoogle-command "hoogle")
(eval-after-load "haskell-mode"
  '(define-key haskell-mode-map "\C-ch" 'haskell-hoogle))


;; «ghc»  (to ".ghc")
;; (find-es "ghc" "ghc-8.10.3")
(code-c-d "ghc"     "~/bigsrc/ghc-8.10.3/")
(code-c-d "ghcbase" "~/bigsrc/ghc-8.10.3/libraries/base/")
;; (find-ghcfile "")
;; (find-ghcbasefile "")
;;
;; (find-es "haskell" "ghc6")
(code-c-d "ghcdoc"  "/usr/share/doc/ghc6-doc/html/")
(code-c-d "ghcusrh" "/usr/share/doc/ghc6-doc/html/users_guide/")
;; (find-ghcdocfile "")
;; (find-ghcusrhfile "")
;; (find-ghcusrhw3m  "index.html")
;; (find-ghcusrhw3m  "ghci.html")
;; (find-libhugsfile "libraries/Hugs/Prelude.hs")




;; «hugs»  (to ".hugs")
;; (find-es "haskell" "hugs")
;; (code-c-d "hugsbase" "/usr/lib/hugs/packages/hugsbase/Hugs/")
;; (code-c-d "hugsoldlib" "/usr/lib/hugs/oldlib/")
;; (code-c-d "hugsuserguide" "/usr/share/doc/hugs/users_guide/")
;; (defun eepitch-hugs   () (interactive) (eepitch-comint "hugs" "hugs"))
;; (defun eepitch-hugs98 () (interactive) (eepitch-comint "hugs" "hugs -98"))
;; (find-hugsbasefile "")
;; (find-hugsbasefile "Prelude.hs")
;; (find-hugsoldlibfile "")
;; (find-hugsuserguidefile "")
;; (find-hugsuserguidew3m  "index.html")
;; (find-libhugsfile "")
;; (find-es "haskell" "eepitch-hugs")



;; «ocaml»  (to ".ocaml")
;; (find-es "ocaml" "ocaml-doc")
(code-pdf-page "ocamlref" "/usr/share/doc/ocaml-doc/ocaml-4.11-refman.pdf")
(code-pdf-text "ocamlref" "/usr/share/doc/ocaml-doc/ocaml-4.11-refman.pdf" 2)
;; (find-ocamlrefpage)
;; (find-ocamlreftext)

;; (find-es "ocaml" "tuareg-git")
(code-c-d "tuareg" "~/.emacs.d/elpa/tuareg-20220104.2039/")
(code-c-d "tuareggit" "~/usrc/tuareg/")
;; (find-tuaregfile "")
;; (find-tuareggitfile "")
;; (find-es "ocaml" "opam")
(code-pdf-page "opam" "/usr/share/doc/opam-docs/dev-manual.pdf")
(code-pdf-text "opam" "/usr/share/doc/opam-docs/dev-manual.pdf")
(code-c-d      "opam" "~/.opam/")
(code-c-d "opamsources" "~/.opam/default/.opam-switch/sources/")
;; (find-opamfile "")
;; (find-opamsourcesfile "")

;; (find-fline "/usr/share/doc/ocaml-doc/ocaml-3.10-refman.txt.gz")
(code-c-d "ocaml"    "/usr/share/doc/ocaml-doc/ocaml.html/libref/" "ocaml")
(code-c-d "ocamlref" "/usr/share/doc/ocaml-doc/ocaml.html/libref/" "ocaml")
;; (find-ocamlnode "")
;; (find-ocamlfile "")



;; «plzoo»  (to ".plzoo")
;; (find-es "ml" "plzoo")
;; (find-es "ocaml" "plzoo-git")
(code-c-d "plzoo" "~/usrc/plzoo/")
;; (find-plzoofile "")

;; «levy» (to ".levy")
;; (find-es "ml" "levy")
(code-c-d "levy" "~/usrc/levy/")
;; (find-levyfile "")
(defun eepitch-levy () (interactive)
  (eepitch-comint-at "~/usrc/levy/" "levy" "levy.byte"))

;; (find-angg ".emacs.papers" "levy")
;; http://www.cs.bham.ac.uk/~pbl/papers/ctcs02journal.pdf
;; (find-fline "$S/http/www.cs.bham.ac.uk/~pbl/papers/")
(code-xpdf     "cbpvadj" "$S/http/www.cs.bham.ac.uk/~pbl/papers/ctcs02journal.pdf")
(code-pdf-text "cbpvadj" "$S/http/www.cs.bham.ac.uk/~pbl/papers/ctcs02journal.pdf")
;; (find-cbpvadjpage)
;; (find-cbpvadjtext)



;; «picolisp»  (to ".picolisp")
;; (find-es "lisp" "picolisp")
(code-c-d "picolisp" "~/usrc/picoLisp/")
(defun eepitch-picolisp () (interactive)
  (eepitch-comint "picolisp" (ee-picolispfile "bin/picolisp")))
(defun eepitch-picolisp () (interactive)
  (eepitch-comint-at ee-picolispdir "picolisp" "bin/picolisp"))

;; (find-es "lisp" "slime-cvs-run")
;; (find-slimefile "slime.el" "CONTRIBS is a list")
;; (find-slimefile "slime.el")
(code-c-d "slime" "~/usrc/slime/" "slime")

;; (defun eepitch-sbcl  () (interactive) (eepitch-comint "sbcl" "sbcl"))
;; (defun eepitch-gcl   () (interactive) (eepitch-comint "gcl"  "gcl"))

;; (find-es "lisp" "dpans2texi")
;; (find-ansiclnode "")
;; (find-ansiclnode "Index")
(code-c-d "ansicl" "~/usrc/dpans2texi-1.05/" "ansicl")

;; (find-es "lisp" "sbcl")
(code-c-d "sbcl" "/usr/share/sbcl-source/" "sbcl")

;; «clcookbook»  (to ".clcookbook")
;; (find-es "lisp" "cookbook")
;; (code-c-d "clcookbook" "~/usrc/cl-cookbook/")


;; (find-es "lexyacc")
(code-c-d "bison" "~/BISON/" "bison")


;; «ee-backup-lua-locals»  (to ".ee-backup-lua-locals")
;; (find-efunction 'ee-split)
;; A test:
;; (find-elinks '((bll "foo bar  plic")))

(defun ee-backup-lua-locals (vars)
  (let* ((vars  (ee-split vars))
	 (vars,  (mapconcat 'identity vars ",  "))
	 (vars_, (mapconcat 'identity vars "_, ")))
    (concat "    local " vars_, "_ =\n"
	    "          " vars, "\n"
	    "    " vars, "  =\n"
	    "    " vars_, "_\n")))

(defun bll (vars) (insert "\n" (ee-backup-lua-locals vars)))

(seen 11980)




;; (find-efunction 'find-pdftotext)
;; (find-efunction 'ee-code-pdftotext)
;; (find-efunction 'code-pdftotext)
;; (find-efunction 'find-callprocess0)
;; (find-man "djvutxt")
;; (find-man "djvused")

;; (defun find-djvutotext (fname &rest rest)
;;   (apply 'find-sh (format "djvutxt %s" fname) rest))
;; (defun ee-code-djvutotext (code djvufile)
;;   (format "
;;     (defun find-%stext (&rest rest) (interactive)
;;       (apply 'find-djvutotext %S rest))
;;   " code djvufile))
;; (defun code-djvutotext (c f) (eval (ee-read (ee-code-djvutotext c f))))


;; (find-node "(eev)Top")


;; «xmonad»  (to ".xmonad")
;; (find-es "haskell" "xmonad")
(code-c-d "xmonad" "~/usrc/xmonad-0.9/")

(defun find-eepitch-buffer (cmd &optional body &rest rest)
  (interactive (list "shell"))
  (apply 'find-estring
	 (format "\n* (eepitch-%s)\n* (eepitch-kill)\n* (eepitch-%s)\n%s"
		 cmd cmd (or body ""))
	 rest))
(defun find-eeshell (&optional body &rest rest)
  (apply 'find-eepitch-buffer "shell" body rest))
(defun find-eeshell-here (&optional body &rest rest)
  (apply 'find-eeshell (format "cd %s\n%s" default-directory body) rest))

;; (find-eepitch-buffer "shell" "foo")
;; (find-eeshell "foo")
;; (find-eeshell-here "foo")


(code-c-d       "853" "~/LATEX/2008graphs.tex" :anchor)
(code-dvi       "853" "~/LATEX/2008graphs.dvi")
(code-pdftotext "853" "~/LATEX/2008graphs.pdf")
;; (find-853file  "")
;; (find-853file  "" "LT-modalities")
;; (find-853      "" "LT-modalities")
;; (find-853page  21 "internal-diagram")
;; (find-853text  21 "Lawvere-Tierney Modalities\n")

;; «unilog-current»  (to ".unilog-current")
;; (find-TH "math-b" "internal-diags-in-ct")
;; (find-TH "math-b" "internal-diags-in-ct" "2010unilog-current.pdf")
;; (find-LATEX "2010unilog-current.tex")
;; (find-dvipage  "~/LATEX/2010unilog-current.dvi")
(code-c-d       "854" "~/LATEX/2010unilog-current.tex" :anchor)
(code-dvi       "854" "~/LATEX/2010unilog-current.dvi")
(code-pdftotext "854" "~/LATEX/2010unilog-current.pdf")
(code-c-d       "unilogcurr" "~/LATEX/2010unilog-current.tex" :anchor)
(code-dvi       "unilogcurr" "~/LATEX/2010unilog-current.dvi")
(code-pdftotext "unilogcurr" "~/LATEX/2010unilog-current.pdf")
;; (find-854file  "")
;; (find-854     "" "internal-diagram")
;; (find-854page  9 "internal-diagram")
;; (find-854     "" "phys-notation")
;; (find-854page 11 "phys-notation")
;; (find-854     "" "cheap-and-exp-adjs-2")
;; (find-854page 30 "cheap-and-exp-adjs-2")
;; (find-854     "" "yoneda-lemma")
;; (find-854page 32 "yoneda-lemma")
;; (find-854     "" "CCCs")
;; (find-854page 43 "CCCs")
;; (find-854text)

;; «idarct» (to ".idarct")
;; (find-es "dednat" "idarct")
;; (find-idarctfile "Makefile")
;; Links to the preliminary versions:
(code-c-d       "idarct0" "~/LATEX/idarct/" :anchor)
(code-c-d       "idarct" "~/LATEX/idarct/2010diags-body.tex" :anchor)
(code-dvi       "idarct" "~/LATEX/idarct/idarct-preprint.dvi")
(code-pdftotext "idarct" "~/LATEX/idarct/idarct-preprint.pdf" 0)
(code-dvi       "idarct" "~/LATEX/idarct-preprint.dvi")
(code-pdftotext "idarct" "~/LATEX/idarct-preprint.pdf" 0)
;; (find-idarct0file "")
;; (find-idarct0file "Makefile")
;;
;; «idarct-preprint»  (to ".idarct-preprint")
;; (find-angg ".emacs" "idarct-preprint")
;; (find-LATEX "catsem-ab.bib" "bib-IDARCT")
;; (find-books "__cats/__cats.el" "ochs")
;; (find-TH "math-b" "internal-diags-in-ct")
;; (find-TH "math-b" "internal-diags-in-ct" "idarct-preprint.pdf")
;; http://anggtwu.net/math-b.html#idarct
;; http://anggtwu.net/LATEX/idarct-preprint.pdf
(code-pdf-page "idarct" "$S/http/anggtwu.net/LATEX/idarct-preprint.pdf")
(code-pdf-text "idarct" "$S/http/anggtwu.net/LATEX/idarct-preprint.pdf")
;; (find-idarct     "")
;; (find-idarctpage)
;; (find-idarcttext)
;; (find-idarctpage  1 "1. Mental Space and Diagrams")
;; (find-idarcttext  1 "1. Mental Space and Diagrams")
;; (find-idarctpage  2 "2. Projections and Liftings")
;; (find-idarcttext  2 "2. Projections and Liftings")
;; (find-idarctpage  3 "3. Downcased Types")
;; (find-idarcttext  3 "3. Downcased Types")
;; (find-idarctpage  4 "4. The Dictionary")
;; (find-idarcttext  4 "4. The Dictionary")
;; (find-idarctpage  5 "5. Internal Diagrams")
;; (find-idarcttext  5 "5. Internal Diagrams")
;; (find-idarctpage  6 "6. Parallel Notations")
;; (find-idarcttext  6 "6. Parallel Notations")
;; (find-idarctpage  7 "7. Functors")
;; (find-idarcttext  7 "7. Functors")
;; (find-idarctpage  9 "8. Natural Transformations")
;; (find-idarcttext  9 "8. Natural Transformations")
;; (find-idarctpage  9 "9. Adjunctions")
;; (find-idarcttext  9 "9. Adjunctions")
;; (find-idarctpage 12 "10. Transmission")
;; (find-idarcttext 12 "10. Transmission")
;; (find-idarctpage 13 "11. Intuition")
;; (find-idarcttext 13 "11. Intuition")
;; (find-idarctpage 15 "12. Skeletons of proofs")
;; (find-idarcttext 15 "12. Skeletons of proofs")
;; (find-idarctpage 15 "13. Hyperdoctrines")
;; (find-idarcttext 15 "13. Hyperdoctrines")
;; (find-idarctpage 19 "14. Preservations, Frobenius, Beck-Chevalley")
;; (find-idarcttext 19 "14. Preservations, Frobenius, Beck-Chevalley")
;; (find-idarctpage 21 "15. The Eq-Elim rule")
;; (find-idarcttext 21 "15. The Eq-Elim rule")
;; (find-idarctpage 23 "16. Archetypal Models")
;; (find-idarcttext 23 "16. Archetypal Models")
;; (find-idarctpage 24 "17. Cartesian Closed Categories")
;; (find-idarcttext 24 "17. Cartesian Closed Categories")
;; (find-idarctpage 26 "18. Objects of Line Type")
;; (find-idarcttext 26 "18. Objects of Line Type")
;; (find-idarctpage 27 "19. The syntactical world")
;; (find-idarcttext 27 "19. The syntactical world")
;; (find-idarctpage 28 "20. The problem with toposes")
;; (find-idarcttext 28 "20. The problem with toposes")
;; (find-idarctpage 28 "21. Formalizing diagrams (in Type Theory)")
;; (find-idarcttext 28 "21. Formalizing diagrams (in Type Theory)")
;; (find-idarctpage 29 "22. A Database of Categorical Theorems")
;; (find-idarcttext 29 "22. A Database of Categorical Theorems")
;; (find-idarctpage 31 "23. Epilogue")
;; (find-idarcttext 31 "23. Epilogue")

;; (find-idarct "2010diags-body.tex" "build-scripts")



;; «idct» (to ".idct")
;; (find-LATEX "2010diags.tex")
;; http://anggtwu.net/math-b.html#internal-diags-in-ct
;; http://anggtwu.net/LATEX/2010diags.pdf
(code-c-d       "idct" "~/LATEX/2010diags.tex" :anchor)
(code-xpdf      "idct" "~/LATEX/2010diags.pdf")
(code-dvi       "idct" "~/LATEX/2010diags.dvi")
(code-pdftotext "idct" "~/LATEX/2010diags.pdf")
;; (find-idct     "" "olts")
;; (find-idctpage 25 "17. Objects of Line Type")
;; (find-idcttext)

;; «minicats»  (to ".minicats")
;; (find-angg "LATEX/2012minicats.tex")
(code-c-d       "minicats" "~/LATEX/2012minicats.tex" :anchor)
(code-dvi       "minicats" "~/LATEX/2012minicats.dvi")
(code-pdftotext "minicats" "~/LATEX/2012minicats.pdf")
;; (find-minicatspage 2  "Program (1)")
;; (find-minicats     "" "lambda-intro")
;; (find-minicatspage 25 "17. Objects of Line Type")
;; (find-minicatstext)

;; «eblslides»  (to ".eblslides")
;; (find-angg "LATEX/2011ebl-slides.tex")
(code-c-d       "eblslides" "~/LATEX/2011ebl-slides.tex" :anchor)
(code-dvi       "eblslides" "~/LATEX/2011ebl-slides.dvi")
(code-pdftotext "eblslides" "~/LATEX/2011ebl-slides.pdf")
;; (find-eblslides     "" "fav-top-space")
;; (find-eblslidespage  7 "Essential arrows")
;; (find-eblslidespage 10 "Our favorite topological space: V")
;; (find-eblslides     "" "evil-presheaf")
;; (find-eblslidespage 13 "The evil presheaf")
;; (find-eblslidestext)

;; «eblsheaves»  (to ".eblsheaves")
;; (find-angg "LATEX/2011ebl-abs.tex")
(code-c-d       "eblsheaves" "~/LATEX/2011ebl-abs.tex" :anchor)
(code-dvi       "eblsheaves" "~/LATEX/2011ebl-abs.dvi")
(code-pdftotext "eblsheaves" "~/LATEX/2011ebl-abs.pdf")
;; (find-eblsheaves     "")
;; (find-eblsheavespage  5 "Priming")
;; (find-eblsheavespage  9 "int-and-coint")
;; (find-eblsheavespage 13 "thinness")
;; (find-eblsheavespage 17 "Heyting Algebras")
;; (find-eblsheavestext)

;; (code-c-d       "34" "~/LATEX/2011ebl-abs.tex" :anchor)
;; (code-dvi       "34" "~/LATEX/2011ebl-abs.dvi")
;; (code-pdftotext "34" "~/LATEX/2011ebl-abs.pdf")
;; (find-34     "" "thinness")
;; (find-34page 13 "thinness")

;; «sheavesforchildren» (to ".sheavesforchildren")
;; (find-angg "sheavesforchildren/")
;; (find-TH "sheavesforchildren")
(defun eejump-56 () (find-TH "sheavesforchildren"))
(code-c-d "sfc" "~/sheavesforchildren/" :anchor)
;; (find-sfcfile "")

;; (defun eejump-57 () (find-LATEX "2014-resposta.tex"))





;; «find-2»  (to ".find-2")
;; Rewritten: (find-eev "eev-multiwindow.el" "find-2a")

;; (defun find-2 (sexp1 sexp2)
;;   (eek "C-x 1")
;;   (eval sexp1) (eek "C-x 2  M-o")
;;   (eval sexp2))
;;
;; (defun find-22o (sexp1 sexp2 sexp3)
;;   (eek "C-x 1")
;;   (eval sexp1) (eek "C-x 2  M-o")
;;   (eval sexp2) (eek "C-x 2  M-o  C-x +")
;;   (eval sexp3) (eek "C-x o"))
;;
;; (defun find-3 (sexp1 sexp2)
;;   (eek "C-x 1")
;;   (eval sexp1) (eek "C-x 3  M-o")
;;   (eval sexp2))
;;
;; (defun find-3o2 (sexp1 sexp2 sexp3)
;;   (eek "C-x 1")
;;   (eval sexp1) (eek "C-x 3  M-o")
;;   (eval sexp2) (eek "C-x 2  M-o")
;;   (eval sexp3))
;;
;; (defun find-3o2o2 (sexp1 sexp2 sexp3 sexp4)
;;   (eek "C-x 1")
;;   (eval sexp1) (eek "C-x 3  M-o")
;;   (eval sexp2) (eek "C-x 2  M-o")
;;   (eval sexp3) (eek "C-x 2  M-o")
;;   (eval sexp4) (eek "C-x +")
;;   (eek "M-0 C-l  M-o")
;;   (eek "M-0 C-l  M-o")
;;   (eek "M-0 C-l  M-o")
;;   (eek "M-0 C-l  M-o"))
;;
;; ' (find-3o2o2
;;    '(find-TH "2010.2-MD" "resumos-das-aulas")
;;    '(find-es "puro" "ementa-e-programa-MD")
;;    '(find-TH "2010.2-MD" "diario-de-classe")
;;    '(find-TH "2010.2-MD" "plano-de-aulas")
;;    )



;; «chaui»  (to ".chaui")
;; (find-fline "~/SCANS/univ_form_cid/chaui.txt")
;; Marilena Chaui: "As Humanidades contra o Humanismo", e:
;; Eduardo Rinesi: "Universidade Reflexiva e Cidadania Crítica"
(code-djvu "hch" "~/SCANS/univ_form_cid/hch_e_rinesi.djvu")
;; M-vrr M-vzw F11
;; (find-hchpage (+ -14 15) "Chaui")
;; (find-hchpage (+ -76 87) "Rinesi")
;; (find-hchpage (+ -77 89) "a universidade" "pensa por nosso intermédio")
;; (find-hchpage (+ -78 92) "a universidade replica")
;; (find-hchpage (+ -80 95) "os indivíduos tendem a se voltar para o espaço da sua privacidade")
;; (find-hchpage (+ -80 95) "a própria noção que as universidade têm de sua tarefa e de sua função")

;; (find-LATEX "chaui-hch.tex")


;; (defun ee-wrap-zsh (&optional n)
;;   (interactive "p")
;;   (ee-delete-extract-wrap (lambda (str) `((find-zsh ,str))) n))

;; (define-key eev-mode-map "\M-Z" 'ee-wrap-zsh)


;; «metapost»  (to ".metapost")
;; (find-angg ".emacs.papers" "metapost")
;; (find-es "tex" "metapost")
;; (find-metapostfile "")
;; (find-metapostfile "base/")
;; (find-metapostdocfile "")
;; (find-metapostdocfile "base/")
;; (find-metapostdocfile "base/source-manual/")
;; (find-metapostdocfile "base/source-tutorial/")
(code-c-d "metapost"    "/usr/share/texmf-texlive/metapost/")
(code-c-d "metapostdoc" "/usr/share/doc/texlive-metapost-doc/metapost/")
(code-c-d "featpostdoc" "/usr/share/doc/texlive-metapost-doc/metapost/featpost/")
(defun eepitch-mpost () (interactive) (ee-eepitch-comint "/tmp/" "mpost" "mpost"))
(defun eepitch-mf    () (interactive) (ee-eepitch-comint "/tmp/" "mf"    "mf"))
;; (find-efile "progmodes/meta-mode.el")

;; (find-angg ".emacs" "dn4-block")
(defun mp-block ()
  (interactive)
  (insert "
* (eepitch-mpost)
* (eepitch-kill)
* (eepitch-mpost)
null
outputtemplate:=\"/tmp/mp-%3c.mps\"; prologues:=3;
beginfig(1);
endfig;
% (find-pspage \"/tmp/mp-001.mps\")
"))



;; «projeto»  (to ".projeto")
(code-c-d "projeto"  "/scp:projeto@projeto.twu.net:/home/projeto/")
(code-c-d "projetop" "/scp:projeto@projeto.twu.net:/home/projeto/public_html/")
;; (find-projetofile "")
;; (find-projetopfile "")
;; (find-projetopfile "index.html")
;; http://projeto.twu.net/


;; «find-luac»  (to ".find-luac")
;; (find-es "lua5" "vmmerge5.lua")
;; (find-luac                "a.b.c.d.__mt = mt")
;; (find-luac   "setmetatable(a.b.c.d,       mt)")
;; (find-luac              "p(a.b.c.d.__mt)")
;; (find-luac "p(getmetatable(a.b.c.d))")
(defun find-luac0 (luacode)
  (ee-write-string luacode (ee-expand "$EEVTMPDIR/ee.luac"))
  (find-callprocess0 "luac51 -p -l $EEVTMPDIR/ee.luac"))
(defun find-luac (luacode &rest rest)
  (apply 'find-eoutput-reuse
	 (format "*luac: %s*" luacode)
	 `(insert ,(find-luac0 luacode))
	 rest))


;; «find-lua51ev»  (to ".find-lua51ev")
;; Tests: (find-lua51ev "print 'foo'")
;;        (find-lua51c  "print 'foo'")
;; See: (find-lua51w3m "doc/luac.html")
;;      (find-sh "luac51 -p -l - <<'%%%'\nprint 'foo'\n%%%")
;;      (find-es "lua-intro" "bytecode:captures")
(defun find-lua51ev (code &rest rest)
  (apply 'find-estring (find-callprocess0 `("lua51" "-e" ,code)) rest))
(defun find-lua51c (code &rest rest)
  (apply 'find-sh (concat "luac51 -p -l - <<'%%%'\n" code "\n%%%") rest))




;; «gs»  (to ".gs")
;; (find-es "ps" "eepitch-gs")
;; (find-es "ps" "ps-intro")
(defun eepitch-gs () (interactive) (eepitch-comint "gs" "gs -r45"))
(defun eepitch-gs () (interactive) (eepitch-comint "gs" "gs -r48"))
(defun eepitch-gs () (interactive) (eepitch-comint "gs" "gs -r60"))
(code-c-d "gslib" "/usr/share/ghostscript/8.62/lib/")
;; (find-gslibfile "")
;; (find-gslibfile "gs_cmdl.ps" "command line")
;; (find-gslibfile "acctest.ps")
;; (find-gslibfile "gs_init.ps")
;; (find-gslibfile "gs_init.ps" "/=== ")
;; (find-gslibfile "gs_init.ps" "/pstack")
;; (find-gslibfile "gs_init.ps" "/prompt")
;; (find-gslibfile "gs_init.ps" "countexecstack")
;; (find-gslibfile "gs_init.ps" "Operand stack:")
;; (find-gslibfile "opdfread.ps")
;; (find-gslibfile "ppath.ps" "print the current path")
;; (find-gslibfile "showchar.ps")
;; (find-gslibfile "wrfont.ps" "unless you have loaded unprot.ps first")
;; (find-gslibfile "unprot.ps")
;; (find-gslibfile "type1enc.ps")
;; (find-gslibfile "type1ops.ps")
;; (find-gslibfile "gs_init.ps" "prints dictionaries")
;; (find-gslibfile "uninfo.ps" "printing")

;; «gforth»  (to ".gforth")
;; (find-es "gforth" "gforth-basics")
(defun eepitch-gforth  () (interactive) (eepitch '(run-forth "gforth")))
(defun eepitch-gforth  () (interactive) (eepitch-comint "gforth" "gforth"))
(code-c-d "gforth" "/usr/share/gforth/0.7.0/" "gforth")
;; (find-gforthfile "")
;; (find-gforthnode "")

;; «erlang»  (to ".erlang")
;; (find-es "erlang")
;; (find-eev "eepitch.el" "eepitch-erl")
;; (defun eepitch-erl () (interactive) (eepitch-comint "erl" "erl"))


;; «google-dns»  (to ".google-dns")
;; (eesteps '("C-n M-e" "C-n M-e" "C-n M-e" "C-n M-e" "C-n # C-a C-n C-y"))
;; (find-sh0 "cat /etc/resolv.conf")
;; (find-sh0 "sudo chmod 666 /etc/resolv.conf")
;; (find-fline "/etc/resolv.conf")
;;
;; (kill-new "nameserver 8.8.8.8\n")
;; (find-fline "$ASROOT/etc/resolv.conf")
;;
(defun google-dns () (interactive)
  (find-angg ".emacs" "google-dns"))



;; «google»  (to ".google")
;;; Old version:
;;; (find-efunctiondescr 'url-hexify-string)
;;; (find-efunction      'url-hexify-string)
;;
;; (defun google-maps-url (query)
;;   (concat "http://maps.google.com/maps?f=q&q="
;;            (url-hexify-string query)
;;           ))
;; (defun gmap (query &rest rest)
;;   (brm (google-maps-url query)))
;;
;; (find-blogme3 "anggdefs.lua" "cgiquote")
;; (find-google-links "Eduardo Ochs")
;;
;; TODO/See:
;; (find-eaproposf "^url-")
;; (find-eaproposf "^url-.*string")

(defun ee-wrap-google-maps- (li)
  (format "http://maps.google.com/maps?f=q&q=%s,+London"
	  (replace-regexp-in-string " " "+" li)))
(defun ee-wrap-google-maps () (interactive)
  (ee-wrapc '(li) '(insert (ee-wrap-google-maps- li))))

(defun find-google-links (&optional str &rest rest)
  "Visit a temporary buffer containing hyperlinks for google."
  (interactive)
  (setq str (or str "{str}"))
  (let ((qstr (replace-regexp-in-string " " "+" str)))
    (apply 'find-elinks `(
      ;; Convention: the first sexp always regenerates the buffer.
      (find-google-links ,str ,@rest)
      ;; Body:
      ""
      ,(ee-template0 "\
http://www.google.com/search?q={qstr}
http://www.google.com.br/search?tbm=isch&q={qstr}
http://www.google.com.br/search?tbm=isch&hl=en&safe=off&q={qstr}
http://maps.google.com/maps?f=q&q={qstr}

https://duckduckgo.com/?t=h_&q={qstr}&ia=web
")
    ) rest)))






(code-c-d "initd" "/etc/init.d/")
;; (find-initdfile "")


;; (find-es "ubuntu" "thttpd")

(defun monep () (interactive) (find-TH "monep"))

;; «fv»  (to ".fv")
;; (find-angg ".fvwm/.fvwm2rc")
;; (find-es "fvwm")
(defun fv () (interactive) (find-angg ".emacs" "fv"))


;; «scan»  (to ".scan")
;; (find-es "scan" "xsane-needs-root")
;; (find-fline "/tmp/dejours/")
(defun edrx ()
  (interactive)
  ;; (find-sh0 "sudo chown edrx:edrx /tmp/dejours/")
  ;; (find-sh0 "sudo chown edrx:edrx /tmp/dejours/*")
  ;; (find-sh0 "sudo chmod 666       /tmp/dejours/*")
  (find-sh0 "sudo chown edrx:edrx .")
  (find-sh0 "sudo chown edrx:edrx *")
  (find-sh0 "sudo chmod 666       *")
  (revert-buffer)
  )
(defun xz (fname &rest rest)
  (interactive (list (ee-dired-to-fname)))
  (find-bgprocess `("xzgv" "--geometry" "1012x572+0+0" ,fname)))

;; (find-br-links "xz" "xz")
(code-brfile 'xz :local 'brxzl)

;; «rotate» (to ".rotate")
;; (find-eev "eev-brxxx.el")
(defun rot90 (fname)
  (interactive (list (ee-dired-to-fname)))
  (find-callprocess `("convert" ,fname "-rotate" "90" ,fname)))
(defun rot180 (fname)
  (interactive (list (ee-dired-to-fname)))
  (find-callprocess `("convert" ,fname "-rotate" "180" ,fname)))
(defun rot270 (fname)
  (interactive (list (ee-dired-to-fname)))
  (find-callprocess `("convert" ,fname "-rotate" "270" ,fname)))

;; (find-es "imagemagick" "exif-orientation")
(defun rot-ao (fname)
  (interactive (list (ee-dired-to-fname)))
  (find-callprocess `("convert" ,fname "-auto-orient" ,fname)))
(defun rot0 (fname)
  (interactive (list (ee-dired-to-fname)))
  (find-callprocess `("convert" ,fname "-rotate" "0" "-auto-orient" ,fname)))
(defun rot180 (fname)
  (interactive (list (ee-dired-to-fname)))
  (find-callprocess `("convert" ,fname "-rotate" "180" "-auto-orient" ,fname)))
(defun rotleft (fname)
  (interactive (list (ee-dired-to-fname)))
  (find-callprocess `("convert" ,fname "-rotate" "270" "-auto-orient" ,fname)))
(defun rotright (fname)
  (interactive (list (ee-dired-to-fname)))
  (find-callprocess `("convert" ,fname "-rotate" "90" "-auto-orient" ,fname)))

;; (xz "/tmp/dejours/0030.jpeg")
;; (rot180 "/tmp/dejours/0030.jpeg")
;; (find-fline "~/SCANS/dejours/")
;; (find-fline "~/SCANS/moyses2/")

(code-c-d "tclmagick" "~/usrc/TclMagick/")
;; (find-es "tcl" "tclmagick")
;; (find-es "imagemagick")


;; «tex-def-many»  (to ".tex-def-many")
;; (find-es "tex" "more-than-9-args")
;; (find-angg "LUA/defwithmanyargs.lua" "run")
;; (find-angg "LUA/defwithmanyargs.lua" "test-run")
;; Tests: (find-tex-def-many "nam" 19)
;;        (find-tex-def-many "nam" 20 "% bbooddyy\n")
;;
(defun tex-def-many (name n &optional body)
  (find-callprocess00-ne
    (list (ee-expand "~/LUA/defwithmanyargs.lua")
          "--longdef" name (format "%s" n) (or body "% body\n"))))
(defun find-tex-def-many (name n &optional body)
  (find-estring (tex-def-many name n body)))


;; «process-coding-system»  (to ".process-coding-system")
;; (find-es "emacs" "process-coding-system")
;; (setq default-process-coding-system '(undecided-unix . utf-8-unix))
(setq default-process-coding-system '(utf-8-unix . utf-8-unix))


;; «agda»  (to ".agda")
;; Moved to: (find-angg ".emacs.agda")
' (load "~/.emacs.agda" 'noerror)
;;
;; (find-angg ".emacs.papers" "agda")
;; (find-agdagitfile "")
;; (find-agdausermanualpage)
;; (find-agdausermanualtext)

;; «agda-cabal»  (to ".agda-cabal")
;; (code-c-d "agda"     "~/.cabal/unpack/Agda-2.6.2/")
;; (code-c-d "agdamode" "~/.cabal/unpack/Agda-2.6.2/src/data/emacs-mode/")
;; (code-c-d "agdag"    "~/.cabal/store/ghc-8.8.4/Agda-2.6.2-b2f8eb43cd09b8b95a6e2958c006bc2f47b9966435e6f21d09b053b958e4fc43/")
;; (code-c-d "agdastdlib" "~/usrc/agda-stdlib-1.7/")
;; (find-agdagfile "")
;; (find-agdafile "")
;; (find-agdamodefile "")
;; (find-agdastdlibfile "")

;; «agda-stack»  (to ".agda-stack")
;; «agda-plfa»  (to ".agda-plfa")




;; «idris»  (to ".idris")
;; (find-es "idris" "idris-git")
;; (find-es "idris" "idris-doc-complete")
(code-pdf-page "idrisdocc" "~/usrc/Idris-dev/docs/_build/latex/idris-documentation-complete.pdf")
(code-pdf-text "idrisdocc" "~/usrc/Idris-dev/docs/_build/latex/idris-documentation-complete.pdf" 1)
(code-c-d      "idrisgit"  "~/usrc/Idris-dev/")
;; (find-idrisdoccpage)
;; (find-idrisdocctext)

;; «idris2»  (to ".idris2")
;; (find-es "idris" "idris2")
;; (find-es "idris" "idris2-git")
(code-c-d "idris2"    "~/usrc/Idris2-0.2.1/")
(code-c-d "idris2git" "~/usrc/Idris2/")

(code-c-d "idrislibs" "~/.cabal/share/x86_64-linux-ghc-8.0.1/idris-1.3.2/libs/")
;; (find-idrislibsfile "")

;; «idris-ct»  (to ".idris-ct")
;; (find-es "idris" "idris-ct")
(code-c-d      "idrisct" "~/usrc/idris-ct/")
(code-pdf-page "idrisct" "~/usrc/idris-ct/docs/main.pdf")
(code-pdf-text "idrisct" "~/usrc/idris-ct/docs/main.pdf")
;; (find-idrisctfile "")
;; (find-idrisctpage)
;; (find-idriscttext)

;; «idris-bradytdd»  (to ".idris-bradytdd")
;; (find-books "__comp/__comp.el" "brady")
(code-pdf-page "bradytdd" "~/books/__comp/brady__type-driven_development_with_idris.pdf")
(code-pdf-text "bradytdd" "~/books/__comp/brady__type-driven_development_with_idris.pdf" 26)
;;
;; (find-es "idris" "bradys-book-examples")
(code-c-d "bradytdd" "~/usrc/TypeDD-Samples/")
;; (find-bradytddfile "")

;; «idris2-tutorial»  (to ".idris2-tutorial")
;; (find-angg ".emacs" "idris2-tutorial")
;; (find-es "idris" "idris2-git")
(code-pdf-page "idris2tut" "~/usrc/Idris2/docs/build/latex/idris-tutorial.pdf")
(code-pdf-text "idris2tut" "~/usrc/Idris2/docs/build/latex/idris-tutorial.pdf")
;; (find-idris2tutpage)
;; (find-idris2tuttext)

;; «idris2-mode»  (to ".idris2-mode")
;; (find-es "idris" "idris2-mode")
;;
(add-to-list 'load-path "~/usrc/idris2-mode/")
(add-to-list 'auto-mode-alist '("\\.idr\\'" . idris2-mode))
(autoload 'idris2-mode "idris2-mode" "Idris2 Mode." t)




;; «racket»  (to ".racket")
;; (find-es "racket" "racket-mode")
(code-c-d "racketlocal" "~/.local/share/racket/7.9/")
;; (find-racketlocalfile "")
;; (find-racketlocalsh "find * | sort")
;; (find-racketlocalfile "pkgs/sicp/sicp-pict/")

;; «cabal-path»  (to ".cabal-path")
;; (find-angg ".zshrc" "cabal")
;; (find-es "haskell" "cabal-PATH")
;; (find-fline "~/.cabal/bin/")
;; (find-epp (getenv "PATH"))
;; (setenv "PATH" (format "%s/.cabal/bin:%s" (getenv "HOME") (getenv "PATH")))

;; «luarocks»  (to ".luarocks")
;; (find-es "lua5" "luarocks-deb")
(code-c-d "luarocks"      "/usr/share/lua/5.1/luarocks/")
(code-c-d "luarocksl"     "~/.luarocks/lib/luarocks/rocks/")
;; (find-luarocksfile "")
;; (find-luarockslfile "")

;; (find-es "lua5" "luarocks")
;; (find-angg "LUA/lua50init.lua" "userocks")
(code-c-d "luarockssrc"   "~/usrc/luarocks-2.0.4/")
(code-c-d "luarocks"      "~/usrc/luarocks/")
(code-c-d "luarocksbin"   "~/usrc/luarocks/bin/")
(code-c-d "luarocksrocks" "~/usrc/luarocks/lib/luarocks/rocks/")
(code-c-d "luarocks51"    "~/usrc/luarocks/share/lua/5.1/luarocks/")
;; (find-luarockssh "find * | sort")
;; (find-luarocksfile "")
;; (find-luarocksfile "etc/luarocks/config.lua")

;; «ltcltk»  (to ".ltcltk")
;; (find-es "lua5" "ltcltk")
;; (find-luarocks-links "ltcltk")
;; (find-luarocks-links "ltcltk" "0.9-2" "")
(code-c-d "ltcltk" "~/usrc/ltcltk-0.9-2/")
;; (find-ltcltkfile "")

;; (find-lposixfile "")
(code-c-d "lposix" "~/usrc/posix/")
;; (find-luarocksfile "lib/luarocks/rocks/lposix/20031107-1/lposix-20031107-1.rockspec")

(code-c-d "penlight" "~/usrc/penlight/Penlight/")
(code-c-d "pluto" "~/usrc/pluto-2.4/")
(code-c-d "serpent" "~/usrc/serpent/")
(code-c-d "ldoc" "~/usrc/ldoc-1.4.2/LDoc/")
;; (find-penlightfile "")
;; (find-plutofile "")
;; (find-serpentfile "")
;; (find-ldocfile "")

;; (find-luarocks-links "alien" "0.5.0-1")
;; (find-luarocks-links "copas" "1.1.6-1")
;; (find-luarocks-links "coxpcall" "1.13.0-1")
;; (find-luarocks-links "lpeg" "0.10-1")
;; (find-luarocks-links "lposix" "" "20031107-1")
;; (find-luarocks-links "ltcltk" "0.9-1")
;; (find-luarocks-links "luafilesystem" "1.5.0-1")
;; (find-luarocks-links "luagl" "1.01-1")
;; (find-luarocks-links "luasocket" "2.0.2-3")
;; (find-luarocks-links "xavante" "2.2.1-1")



;; «inkscape»  (to ".inkscape")
;; (find-es "inkscape" "save-tutorials-to-pdfs")
(code-pdf-page   "inkscapetut1" "~/INKSCAPE/tut_inkscape_basic.pdf")
(code-mupdf-page "inkscapetut1" "~/INKSCAPE/tut_inkscape_basic.pdf")
(code-pdf-text   "inkscapetut1" "~/INKSCAPE/tut_inkscape_basic.pdf")
(code-pdf-page   "tutinkscape2" "~/INKSCAPE/tut_inkscape_shapes.pdf")
(code-mupdf-page "tutinkscape2" "~/INKSCAPE/tut_inkscape_shapes.pdf")
(code-pdf-text   "tutinkscape2" "~/INKSCAPE/tut_inkscape_shapes.pdf")
(code-pdf-page   "tutinkscape3" "~/INKSCAPE/tut_inkscape_advanced.pdf")
(code-mupdf-page "tutinkscape3" "~/INKSCAPE/tut_inkscape_advanced.pdf")
(code-pdf-text   "tutinkscape3" "~/INKSCAPE/tut_inkscape_advanced.pdf")
;; (find-inkscapetut1page)
;; (find-inkscapetut1text)
;; (find-inkscapetut1page 2 "Panning the canvas")
;; (find-inkscapetut1text 2 "Panning the canvas")
;; (find-inkscapetut1page 5 "with a blue fill and a black stroke")
;; (find-inkscapetut1text 5 "with a blue fill and a black stroke")
;; (find-inkscapetut1page 10 "Grouping")
;; (find-inkscapetut1text 10 "Grouping")
;; (find-inkscapetut1page 12 "Fill and stroke")
;; (find-inkscapetut1text 12 "Fill and stroke")
;; (find-inkscapetut1page 13 "the color picker is updated")
;; (find-inkscapetut1text 13 "the color picker is updated")
;; (find-tutinkscape2page)
;; (find-tutinkscape2text)
;; (find-tutinkscape2page 2 "Rectangles")
;; (find-tutinkscape2text 2 "Rectangles")
;; (find-tutinkscape2page 4 "Scale rounded corners")
;; (find-tutinkscape2text 4 "Scale rounded corners")
;; (find-tutinkscape3page)
;; (find-tutinkscape3text)
;; (find-tutinkscape3page 2 "Paste Style (Shift+Ctrl+V)")
;; (find-tutinkscape3text 2 "Paste Style (Shift+Ctrl+V)")
;; (find-tutinkscape3page 3 "Drawing freehand and regular paths")
;; (find-tutinkscape3text 3 "Drawing freehand and regular paths")
;; (find-tutinkscape3page 4 "click and drag creates a smooth Bezier")
;; (find-tutinkscape3text 4 "click and drag creates a smooth Bezier")
;; (find-tutinkscape3page 5 "Editing paths")
;; (find-tutinkscape3text 5 "Editing paths")
;; (find-tutinkscape3page 6 "A node can be made cusp (Shift+C)")
;; (find-tutinkscape3text 6 "A node can be made cusp (Shift+C)")

(defun find-inks (fname) (find-bgprocess `("inkscape" ,fname)))
(defun find-inkv (fname) (find-bgprocess `("inkview" ,fname)))

(code-brfile 'find-inks :local 'brinksl :dired 'brinksd)
(code-brfile 'find-inkv :local 'brinkvl :dired 'brinkvd)

(defun find-nautilus (fname) (find-bgprocess `("nautilus" ,fname)))
(code-brfile 'find-nautilus :local 'brnaul :dired 'brnaud)






;; http://www.uff.br/eleicoesreitoria2006/normas/rgce.pdf
;;(code-xpdf      "rgce" "$S/http/www.uff.br/eleicoesreitoria2006/normas/rgce.pdf")
;;(code-pdftotext "rgce" "$S/http/www.uff.br/eleicoesreitoria2006/normas/rgce.pdf")
;; (find-rgcepage 1 "Contents")
;; (find-rgcetext "")



;; «rubyforth»  (to ".rubyforth")
;; (find-es "rubyforth" "rubyforth")
(code-c-d "rubyforth" "~/usrc/rubyforth/" :anchor)
(defun eepitch-rubyforth () (interactive)
  (ee-eepitch-comint (ee-rubyforthfile "") "rubyforth" "./rubyforth"))

;; (defun eepitch-rubyforth (&optional rubyforthargs)
;;   (interactive)
;;   (ee-eepitch-comint (ee-rubyforthfile "")
;;                      (format   "rubyforth%s" (or rubyforthargs ""))
;;                      (format "./rubyforth%s" (or rubyforthargs ""))))
;;
;; «pythonforth»  (to ".pythonforth")
;; (defun eepitch-pythonforth (&optional pythonforthargs)
;;   (interactive)
;;   (ee-eepitch-comint (ee-pythonforthfile "")
;;                      (format   "pythonforth%s" (or pythonforthargs ""))
;;                      (format "./pythonforth%s" (or pythonforthargs ""))))


;; «eepitch-rubyforth»  (to ".eepitch-rubyforth")
;; (find-es "fortho")
;; (find-es "fortho" "rubyforth-demos")
;; (find-es "fortho" "rubyforth")
;; (find-es "fortho" "rubyforth-angg")
;; (code-c-d "rubyforth" "/tmp/rubyforth/rubyforth-0.18/" :angg)
;; (find-rubyforthfile "")
;;   (ee-rubyforthfile "")
;; (code-c-d "rubyforth" "~/usrc/rubyforth-0.23/" :anchor)



;; «eepitch-dednat4»  (to ".eepitch-dednat4")
;; (find-angg "LUA/lua50init.lua" "load_dednat4")
;; (find-es "xypic" "eepitch-dednat4")
;; (find-es "dednat" "eepitch-dednat4")
;; (eepitch-kill)
;; (eepitch-dednat4)
(defun eepitch-dednat4 () (interactive)
  (eepitch-comint "dednat4" "lua51 -e load_dednat4() -i"))


;; «duoforths»  (to ".duoforths")
(code-c-d "duoforths" "~/duoforths/" :anchor)
;; (find-duoforthsfile "")

;; «rubyforth»  (to ".rubyforth")
;; (find-es "rubyforth" "rubyforth")

;; «dflua»  (to ".dflua")
;; (find-es "rubyforth" "dflua")
(code-c-d "dflua" "~/usrc/df-lua-0.0.3/")
(defun eepitch-dflua () (interactive)
  (ee-eepitch-comint ee-dfluadir "dflua" "lua51 forth.lua"))
;; (find-dfluafile "")
;; (find-es "rubyforth" "dflua")

;; «zbforth»  (to ".zbforth")
;; (find-es "rubyforth" "zbforth")
(code-c-d "zbforth" "~/usrc/zbforth-0.0.1d/")
(defun eepitch-zbforth () (interactive)
  (ee-eepitch-comint ee-zbforthdir "zbforth" "zbforth"))



;; «pulseaudio»  (to ".pulseaudio")
;; (find-es "pulseaudio" "pacmd")
;; (find-es "alsa" "pulseaudio")
;; (find-es "sound" "pulseaudio")
(defun eepitch-pacmd () (interactive) (eepitch-comint "pacmd" "pacmd"))
(defun find-pacmd0 (cmd)
  (apply 'find-sh0 (format "echo '%s' | pacmd" cmd) rest))
(defun find-pacmd (cmd &rest rest)
  (apply 'find-sh (format "echo '%s' | pacmd" cmd) rest))
;;
;; (find-pacmd "help")
;; (find-pacmd "play-file /usr/share/sounds/question.wav 0")





(defun eepitch-turquia () (interactive)
  (eepitch '(find-comintprocess "ssh turquia" "ssh llarc@turquia")))
(defun eepitch-brasil () (interactive)
  (eepitch '(find-comintprocess "ssh brasil"  "ssh llarc@brasil")))
(defun eepitch-jamaica () (interactive)
  (eepitch '(find-comintprocess "ssh jamaica" "ssh llarc@jamaica")))
(defun eepitch-canada () (interactive)
  (eepitch '(find-comintprocess "ssh canada"  "ssh llarc@canada")))
(defun eepitch-gana () (interactive)
  (eepitch '(find-comintprocess "ssh gana"    "ssh llarc@gana")))
(defun eepitch-papua () (interactive)
  (eepitch '(find-comintprocess "ssh papua"   "ssh llarc@papua")))

(code-c-d "turquia" "/scp:llarc@turquia:")
(code-c-d "brasil"  "/scp:llarc@brasil:")
(code-c-d "jamaica" "/scp:llarc@jamaica:")
(code-c-d "canada"  "/scp:llarc@canada:")
(code-c-d "gana"    "/scp:llarc@gana:")
;; (find-ganafile "")
(code-c-d "papua"   "/scp:llarc@papua:")

(defun eepitch-persephone () (interactive)
  (eepitch '(find-comintprocess "ssh persephone" "ssh edrx@persephone")))
(defun eepitch-horses () (interactive)
  (eepitch '(find-comintprocess "ssh horses" "ssh edrx@horses")))
(defun eepitch-gwen () (interactive)
  (eepitch '(find-comintprocess "ssh gwen" "ssh edrx@gwen")))
(defun eepitch-gwenv () (interactive)
  (eepitch '(find-comintprocess "ssh gwen" "ssh valeria@gwen")))
(defun eepitch-reef () (interactive)
  (eepitch-de '(find-comintprocess "ssh reef" "ssh edrx@reef")))

(code-c-d "persephone" "/scp:edrx@persephone:")
(code-c-d "horses" "/scp:edrx@horses:")
(code-c-d "gwen"  "/scp:edrx@gwen:")
(code-c-d "gwenv" "/scp:valeria@gwen:")
(code-c-d "reef" "/scp:edrx@reef:")


;; (find-persephonefile "")
;; (find-horsesfile "")
;; (find-gwenfile "")
;; (find-reeffile "")


;; «tramp-2.1.9»  (to ".tramp-2.1.9")
;; (find-es "emacs" "tramp-2.1.9")
;; (find-fline "~/usrc/tramp-2.1.9/lisp/")
;; (find-fline "~/usrc/tramp-2.1.9/info/")
;; (find-trampnode "Password caching")
;; (find-trampnode "Password caching" "`password.el'")
;; (find-node "(tramp)Password handling")
;; (find-trampfile "contrib/")
;; (find-trampfile "contrib/password.el")
;; (find-trampnode "Multi-hops")
;; (find-trampnode "Multi-hops" "\\\\`root\\\\'")
;; (find-evardescr 'tramp-default-proxies-alist)
;;
(code-c-d "tramp" "~/usrc/tramp-2.1.9/" "tramp")
(code-c-d "tramp" "~/usrc/tramp-2.1.9/" "~/usrc/tramp-2.1.9/info/tramp")
(require 'info)
;; (add-to-list         'Info-directory-list "~/usrc/tramp-2.1.9/info/")
;; (add-to-list 'Info-default-directory-list "~/usrc/tramp-2.1.9/info/")
;; (add-to-list 'load-path           "~/usrc/tramp-2.1.9/lisp/")
;; (add-to-list 'load-path           "~/usrc/tramp-2.1.9/contrib/")
;;
(setq tramp-default-proxies-alist nil)
(add-to-list 'tramp-default-proxies-alist '("\\.k8\\.com\\.br\\'" "\\`root\\'" "/ssh:%h:"))
(setq password-cache-expiry nil)
;;
;; (require 'tramp)
;; tramp-version
;; ^ should be 2.1.9
;; (find-efile "net/trampver.el" "defconst tramp-version")
;; ^ in cvs-emacs tramp is 2.0.55.



;; «varda»  (to ".varda")
(defun eepitch-varda () (interactive)
  (eepitch '(find-comintprocess "varda" "ssh edrx@varda")))
(defun eepitch-vardav () (interactive)
  (eepitch '(find-comintprocess "varda" "ssh valeria@varda")))
(code-c-d "varda"  "/scp:edrx@varda:/")
(code-c-d "varda"  "/ssh:edrx@varda:/")
(code-c-d "vardar" "/ssh:root@varda:/")
(code-c-d "vardav" "/scp:valeria@varda:")
;;
;; (find-vardafile "")
;; (find-vardarfile "")
;; (setenv "VA" "/ssh:edrx@varda:")
;; (setenv "VR" "/ssh:root@varda:")
;; (find-fline "$VR/")
;;
;; (find-es "emacs" "multi-hop")
;;(setq         tramp-default-proxies-alist nil)
;;(add-to-list 'tramp-default-proxies-alist '("varda\\'" "\\`root\\'" "/ssh:%h:"))
;;(add-to-list 'tramp-default-proxies-alist '("lugao\\'" "\\`root\\'" "/ssh:%h:"))
;; (find-angg ".emacs.templates" "find-newhost-links")

;; «find-newhost-links»  (to ".find-newhost-links")
;; (find-fline "/etc/hosts")
;; (find-newhost-links "gwen"  "192.168.1.101" "GW")
;; (find-newhost-links "varda" "192.168.1.100" "VA")
;; (find-newhost-links "flaviobia" "192.168.0.198")
;; (find-newhost-links "flaviobia" "192.168.1.126")

;; «apt-cacher»  (to ".apt-cacher")
;; (find-es "debrepository" "apt-cacher")
;; (to "LR-and-RE-and-RR")
(code-c-d "aptcacher" "/var/cache/apt-cacher/")
;; (find-aptcacherfile "")
;; (find-aptcacherfile "packages/")
;; (find-aptcachersh "find * | sort")
;; (find-aptcachersh "du -c")
;; (find-fline "/var/log/apt-cacher/")
;; (find-sh "ps ax")
;; (find-sh "ps ax | grep cache")
;; (find-sh "sudo /etc/init.d/apt-cacher restart")




(code-c-d "RETRO" "~/RETRO/" :anchor)


;; This is useful for some situations in which tramp has bugs
;; (find-node "(emacs)Backup")
(defun bup () (interactive)
  (make-local-variable 'backup-inhibited)
  (setq backup-inhibited (not backup-inhibited))
  (message "backup-inhibited is now %S" backup-inhibited))







;; «blogme4-texi»  (to ".blogme4-texi")
;; (find-blogme4 "doc/blogme4.b4texi")
;; (find-efunction 'ee-gformat)

(defun ee-delete-and-extract-line-body ()
  (ee-no-trailing-nl
   (ee-no-properties
    (ee-delete-and-extract-line 1))))

(defun ee-gformat00 (pat fmt)
  `(lambda (str) (replace-regexp-in-string ,pat ,fmt str 'fixedcase)))

(defun ee-gformat1 (fmt)
  (ee-gformat00 "\\`[ \t]*\\([^ \t]+\\)[ \t]+\\(.*\\)\\'" fmt))

(defun ee-wrap-line (fun)
  (insert (funcall fun (ee-delete-and-extract-line-body)))
  (next-line 1))

(defun nd () (interactive)
  (ee-wrap-line (ee-gformat1
" # «.\\1»	(to \"\\1\")
\[ANODE «\\1»  (to \".\\1\")
  (find-blogme4node \"\\2\")
  [J \\2]
\[LE'
]
]\n
")))


;; (find-blogme4 "doc/blogme4.b4texi")
;; (find-find-links-links "b4texi" "dir stem")
;; (find-b4texi-links)
;; (find-b4texi-links "blogme4/doc/" "eev")

(defun find-b4texi-links (&optional dir stem &rest rest)
  "Visit a temporary buffer containing hyperlinks for b4texi."
  (interactive)
  (setq dir (or dir "{dir/}"))
  (setq stem (or stem "{stem}"))
  (apply 'find-elinks `(
    ;; Convention: the first sexp always regenerates the buffer.
    (find-b4texi-links ,dir ,stem ,@rest)
    (find-angg ,(format "%s%s.b4texi" dir stem))
    ;; Body:
    ""
    ,(ee-template `(dir stem ("foo" ,"AAA")) "\
\[#
\(defun c () (interactive)
  (find-sh \"cd ~/{dir} &&
            blogme4.lua -o {stem}.texi -i {stem}.b4texi &&
            makeinfo {stem}.texi\"))
\(defun i () (interactive) (find-node \"({stem})Top\"))
\(defun ii () (interactive) (find-angg \"{dir}{stem}.b4texi\"))
;;
;; (find-sh0 \"cd ~/info/ && rm -v {stem}.info\")
;; (find-sh0 \"cd ~/info/ && ln -s ../{dir}{stem}.info .\")
;; (find-angg \"info/\")
;; (find-node \"({stem})Top\")
;;
;; (find-blogme4 \"texinfo.lua\")
;; (find-angg \".emacs\" \"nd\")
#]
\[# Nodes:
#]


\[TOP {stem} [J The {stem} manual]
  body
\]
\[lua:
  tt.srclink_fmt  = '(find-angg \"{dir}{stem}.b4texi\" \"%s\")'
  tt.infolink_fmt = '(find-node \"({stem})%s\")'
\]

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

;; (find-b4texi-links "blogme4/doc/" "eev")
;; (find-angg "blogme4/doc/eev.b4texi")



(code-c-d "apachedoc" "/usr/share/doc/apache2-doc/manual/en/")
;; (find-apachedocfile "")
;; (find-apachedocfile "mod/")
;; (find-apachedocw3m "mod/mod_rewrite.html")

;; «quadro»  (to ".quadro")
;; «olympus»  (to ".olympus")
;; (find-books "__comp/__comp.el" "gersting")
(code-c-d "olymp" "/tmp/pen/DCIM/100OLYMP/")
(code-c-d "QUADRO" "~/FOTOS/QUADRO/")
(defun find-QUADRO (fname &rest rest) (xz (ee-QUADROfile fname)))
;; (find-QUADROfile "")
;; (find-QUADRO "")
;; (find-QUADRO "2011-09-29-MD-1.jpg")
;; (find-QUADRO "2011-09-29-MD-2.jpg")
;; (find-QUADRO "2011-09-29-MD-3.jpg")
;; (find-QUADRO "2011-09-30-GA-1.jpg")
;; (find-QUADRO "2011-09-30-GA-2.jpg")
;; (find-QUADRO "2011-10-05-MD-1.jpg")
;; (find-QUADRO "2011-10-05-MD-2.jpg")
;; (find-QUADRO "2011-10-05-MD-3.jpg")
;; (find-QUADRO "2011-10-06-MD-1.jpg")
;; (find-QUADRO "2011-10-06-MD-2.jpg")
;; (find-QUADRO "2011-10-06-MD-3.jpg")
;; (find-QUADRO "2011-10-06-MD-4.jpg")
;;
;; (find-QUADRO "2011-10-13-MD-1.jpg")
;; (find-QUADRO "2011-10-13-MD-2.jpg")
;; (find-QUADRO "2011-10-13-MD-3.jpg")
;; (find-QUADRO "2011-10-13-MD-4.jpg")
;; (find-QUADRO "bel-subconjunto.jpg")
;; (find-QUADRO "bel-tabela-pertinencia.jpg" "tabela" "diagrama de arvore")
;; (find-olympfile "")
;; (find-pen-links)
;; (find-sh "dmesg | grep sd")
;; (find-sh "sudo mount -o uid=$UID /dev/sdb1 /tmp/pen/")
;; (find-sh0 "sudo umount /tmp/pen")
' (find-3 ' (find-olympfile "")
	  ' (find-QUADROfile "")
            )
;; (find-QUADROfile "" "2011-10-06-MD-1")


;; «scala»  (to ".scala")
;; (find-es "scala")
(defun eepitch-scala () (interactive)
  (eepitch-de '(find-comintprocess "scala" "scala")))

;; «clojure»  (to ".clojure")
;; (find-es "clojure")
(defun eepitch-clojure () (interactive)
  (eepitch '(find-comintprocess "clojure" "clojure -r")))

;; «J»  (to ".J")
;; (to "ee-rstdoc-:J")
;; (find-es "apl" "J")
;; (find-es "apl" "J-primer")
;; (find-es "apl" "learning-J")
(code-c-d "J"         "~/usrc/j9.5/")
(defun eepitch-J () (interactive)
  (eepitch-comint "J" "~/usrc/j9.5/jconsole.sh"))

;; (code-c-d "Jlearning" "~/usrc/j/j701/addons/docs/help/learning/")
(code-c-d "Jhelp" "$S/https/www.jsoftware.com/help/")
(code-c-d "Jsrc"  "~/usrc/jgplsrc/")
;; (find-Jhelpfile "")
;; (find-Jprimerfile "")

;; (find-Jfile "")
;; (find-Jdocsfile "")
;; (find-Jhelpfile "")
;; (find-Jprimerfile "")
;; (find-Jsrcfile "")
;; (find-Jlearningfile "")
;; (find-Jlearningw3m "contents.htm")
;; (find-Jhelpfile "")
;; (find-Jhelpw3m "dictionary/contents.htm")
;; (find-Jhelpw3m "jforc/contents.htm")
;; (find-Jhelpw3m "phrases/contents.htm")
;; (find-Jhelpw3m "user/boxdraw.htm")
;; (find-Jhelpw3m "user/contents.htm")
;; (find-Jhelpw3m "user/emacs.htm")


;; «octave»  (to ".octave")
;; (find-es "octave")
(code-c-d "octave"    "/usr/share/octave/6.2.0/m/" "octave")
(code-c-d "octavefaq" "/usr/share/octave/6.2.0/m/" "Octave-FAQ")
(defun eepitch-octave () (interactive) (eepitch-comint "octave" "octave"))
;; (find-octavefile "")
;; (find-octavenode "")
;; (find-octavenode "Matrix Manipulation")
;; (find-octavefaqnode "")

;; «R»  (to ".R")
;; (find-es "r" "pager")
;; (find-es "r" "R-sample")
' (defun eepitch-R () (interactive)
    (eepitch `(let ((process-environment `("PAGER=cat" . ,process-environment)))
                (find-comintprocess "R" "R"))))

;; «joy»  (to ".joy")
;; (find-es "joy" "joy")
;; (find-joyfile "")
(code-c-d "joy" "~/usrc/joy/")
(defun eepitch-joy () (interactive)
  (eepitch-comint-at ee-joydir "joy" "joy"))




;; «cc-mode»  (to ".cc-mode")
;; (find-es "emacs" "C-mode")
(code-c-d "ccmode" (ee-efile "progmodes/") "ccmode")
(setq-default c-electric-flag nil)




;; ;; «eevbuild»  (to ".eevbuild")
;; ;; (find-es "eev" "dh-make-2")
;; ;; (find-dhmake-links "eev" "eevbuild" "20110612")
;; ;; (find-dhmake-links "eev" "eevbuild" "20120404")
;; (code-c-d "eevbuild"   "~/usrc/eev/eev-0.1.20110612/")
;; (code-c-d "eevbuildd"  "~/usrc/eev/eev-0.1.20110612/debian/")
;; (code-c-d "eevbuilddd" "~/usrc/eev/eev-0.1.20110612/debian/eev/")
;; (code-c-d "eevbuildu"  "~/usrc/eev/eev-unpacked/")
;; ;; (find-eevbuildfile   "")
;; ;; (find-eevbuilddfile  "")
;; ;; (find-eevbuildddfile "")
;; ;; (find-eevbuildufile  "")
;; ;; (find-eevbuildddsh "find * | sort")
;; ;; (find-eevbuildush  "find * | sort")
;; ;; (find-status   "eev")
;; ;; (find-vldifile "eev.list")
;; ;; (find-udfile   "eev/")
;; ;; (find-fline "/etc/emacs/site-start.d/90eev.el")
;; 
;; ;; «eev-puro»  (to ".eev-puro")
;; ;; (find-angg ".emacs.templates" "find-dhmake-links")
;; ;; (find-dhmake-links "eev-puro" "eevpuro" "20111114")
;; ;; (find-dhmake-links "eev-puro" "eevpuro" "20111204")
;; ;; (find-dhmake-links "eev-puro" "eevpuro" "20111230")
;; ;; (find-eepitch-buffer "shell" "ssh -X valeria@gwen emacs")
;; 
;; ;; «eev-puro-deb»  (to ".eev-puro-deb")
;; ;; (find-angg "eev-puro/do-build.sh")
;; ;; (find-sh "~/eev-puro/do-build.sh")
;; ;; (find-angg "eev-puro/do-install.sh")
;; ;; (find-sh "~/eev-puro/do-install.sh")
;; ;; (find-eepitch-buffer "eshell" "cp -v ~/usrc/eev-puro/eev*.deb $RE/tmp/")
;; ;; (find-eepitch-buffer "RE" "sudo dpkg -i /tmp/eev*.deb")
;; ;; (find-eepitch-buffer "shell" "ssh -X valeria@gwen emacs")
;; ;; (find-anggfile "eev-puro/.emacs")
;; ;; (find-fline "$RE/usr/share/eev-puro/.emacs")
;; ;;
;; ;; (find-status   "eev-puro")
;; ;; (find-vldifile "eev-puro.list")
;; ;; (find-udfile   "eev-puro/")
;; ;; (find-angg "eev-puro/")
;; ;; (find-angg "eev-puro/debian/")
;; ;; (find-angg "eev-puro/debian/rules")
;; ;;
;; ;; (find-dhmake-links "eev-puro" "eevpuro" "20111204")
;; ;; (find-dhmake-links "eev-puro" "eevpuro" "20111114")
;; ' (ee-cp     "~/usrc/eev-puro/eev-puro_0.1.20111114_all.deb"
;; 	 (ee-twusfile "debian/eev-puro_0.1.20111114_all.deb")
;; 	 'over)
;; ;; (find-angg "eev-puro/")
;; ;; (find-angg "eev-puro/.emacs")
;; ;; (find-fline "/usr/share/eev-puro/")
;; ;; (find-fline "/usr/share/eev-puro/mini-lua-intro.e")
;; (code-c-d "eevpuro"    "~/usrc/eev-puro/eev-puro-0.1.20111114/")
;; (code-c-d "eevpurod"   "~/usrc/eev-puro/eev-puro-0.1.20111114/debian/")
;; (code-c-d "eevpurodd"  "~/usrc/eev-puro/eev-puro-0.1.20111114/debian/eev-puro/")
;; (code-c-d "eevpurounp" "~/usrc/eev-puro/eev-puro-unpacked/")
;; ;; (find-eevpurofile    "")
;; ;; (find-eevpurodfile   "")
;; ;; (find-eevpuroddfile  "")
;; ;; (find-eevpurounpfile "")
;; ;; (find-eevpurodsh   "find * | sort")
;; ;; (find-eevpuroddsh  "find * | sort")
;; ;; (find-eevpurounpsh "find * | sort")
;; ;; (find-status   "eev-puro")
;; ;; (find-vldifile "eev-puro.list")
;; ;; (find-udfile   "eev-puro/")


;; «LR-and-RE-and-RR»  (to ".LR-and-RE-and-RR")
;; (to "apt-cacher")
;; (find-es "emacs" "multi-hop")
;; (find-es "kernel" "lugao")
;; (find-es "debrepository" "apt-cacher")
;; LR: localhost as root
;; RE: remote as edrx
;; RR: remote as root

;; (find-fline "/etc/hosts")

;; (setenv "LR" "/sudo::")
;; (setenv "RE"  "/ssh:edrx@lugao:")
;; (setenv "RR" "/sudo:root@lugao:")
;; (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 "lugao" "ssh edrx@lugao"))
;; (defun eepitch-RR () (interactive) (eepitch-comint "lugao/R" "ssh edrx@lugao"))

;; (find-LRfile "etc/")
;; (find-REfile "etc/")
;; (find-RRfile "etc/")
;; (find-lugaorfile "")
(defun eepitch-lugao () (interactive) (eepitch-comint "lugao" "ssh edrx@lugao"))

;; «ee-tramp-proxy»  (to ".ee-tramp-proxy")
(defun ee-tramp-proxy (host proxy)
  (setq         tramp-default-proxies-alist nil)
  (add-to-list 'tramp-default-proxies-alist
	       `(,(format "\\`%s\\'" host) "\\`root\\'" ,proxy))
  tramp-default-proxies-alist)

;; (describe-variable 'tramp-default-proxies-alist)
(defun find-RR3 (fname &rest rest)
  (find-3 `(find-fline ,(format "/%s" fname) . ,rest)
	  `(find-RRfile ,fname)))

(defun eepitch-comint-de-at (dir name program-and-args)
  (ee-at0 dir `(eepitch-comint-de ,name ,program-and-args)))

(defun eepitch-gdb-lua () (interactive)
  (eepitch-comint-de "gdb lua" `("gdb" ,(ee-lua51file "bin/lua"))))

;; (find-efunction 'find-dn4tex-links)
;; (find-dn4tex-links)
(defun wrobak (n code)
  "With the rest of this buffer as a new kill, execute CODE"
  (next-line n)
  (eek "C-a C-SPC M-> C-x C-x M-w")
  (eval code))


(seen 13050)


;; «ee-splitn»  (to ".ee-splitn")
;; «ee-wrapt»  (to ".ee-wrapt")
;; «ee-wrapc»  (to ".ee-wrapc")

;; (describe-function 'ee-splitn)
;; (describe-function 'ee-zip)
;; (describe-function 'ee-wrapt)
;; (describe-function 'ee-wrapc)
;; (find-efunction 'ee-wrap-file)
;; (find-efunction 'ee-pph)
;; (find-efunction 'ee-pp0)
;; (find-efunction 'find-elinks)
;;
;; (find-efunction 'ee-pp0)
;; (find-efunction 'ee-pph)
;; (find-efunction 'find-elinks)

;; (find-eev "eev-insert.el" "ee-wrap-file")
;; (find-eev "eev-insert.el" "ee-delete-extract-wrap")
;; (find-eev "eev-insert.el" "ee-delete-and-extract-line")
;; (find-eev "eev-insert.el" "ee-links-to-string")

;; mkto needs to be rewritten.
;; find-elinks needs to be rewritten.
;; ee-zipp is a wild hack, incomplete.
;; intention: uppercase -> quoted in patterns
(defun ee-zipp (list1 list2)
"Example: (ee-zipp '(\"a\" \"b\") '(\"aa\" \"bb\"))
            --> ((a aa) (b bb) (c cc))?"
  (if list1
      `((,(car list1)          ,(car list2))
	(,(upcase (car list1)) ,(car list2))
	. ,(ee-zip (cdr list1) (cdr list2)))))



(code-c-d "libc" "/usr/share/doc/glibc-doc-reference/html/" "libc")
;; (find-libcfile "")
;; (find-libcnode "")





;; «binutils»  (to ".binutils")
;; (find-es "anatocc" "binutils")
(code-c-d "binutils" "/usr/lib/ldscripts/" "binutils")
;; (find-binutilsfile "")
;; (find-binutilsnode "")

;; «wget»  (to ".wget")
;; (find-es "wget")
(code-c-d "wget" "$S/" "wget")
;; (find-wgetnode "")




;; «ee-popup»  (to ".ee-popup")
;; (find-es "fvwm" "style:bare")
;; (find-es "x" "xpad" "ffee99")
;; (find-es "console" "terminfo")
;; (find-man "5 terminfo" "cursor_invisible")
;; (find-man "1 infocmp")
;; (find-sh "infocmp xterm" "civis=")
;;
(defun ee-popup-prepare (delay str)
  (ee-write-string str "/tmp/msg")
  (ee-write-string
   (format "#!/bin/sh
       cat /tmp/msg
       echo -n '\e[?25l'
       sleep %f" delay)
   "/tmp/msg.sh" "755"))

(defun ee-popup-run (args)
  (find-sh0 (format "xterm -class Bare %s -e /tmp/msg.sh" args)))

(defun ee-popup-size (str)
  (let ((width (apply 'max (mapcar 'length (split-string str "\n"))))
	(height (+ 1 (length (replace-regexp-in-string "[^\n]+" "" str)))))
    (format "%dx%d" width height)))

(defun ee-popup-args (where str)
  (format "-bg '#ffee99' -fg black -geometry %s%s"
	  (ee-popup-size str) where))

(defun ee-popup0 (delay where str)
  (ee-popup-prepare (or delay 1) str)
  (ee-popup-run (ee-popup-args where str)))

;; (ee-popup0 2 "+0+0" "foo\nbar plic")
;; (ee-popup0 1 "+100+30" "foo\nbar plic")



;; «find-wset»  (to ".find-wset")
;; (find-eev "eev-multiwindow.el" "find-wset")



;; «inet-addr»  (to ".inet-addr")
;; (find-angg "bin/etc.lua" "inet_addr")
;; (inet-addr)
(defun inet-addr (&optional interface)
  (find-sh0 (format "/sbin/ifconfig %s | etc.lua inet_addr"
                    (or interface "wlan0"))))


;; «cleanindex»  (to ".cleanindex")
;; (find-angg "bin/etc.lua" "cleanindex")
(defun cleanindex (start end)
  (interactive "r")
  (shell-command-on-region
   start end
   (format "etc.lua cleanindex %s %s" ee-page-stem ee-page-offset)
   nil 'replace))




;; «virtualbox»  (to ".virtualbox")
;; (find-es "qemu" "virtualbox")
(code-xpdf      "virtualboxmanual" "/usr/share/doc/virtualbox/UserManual.pdf")
(code-pdftotext "virtualboxmanual" "/usr/share/doc/virtualbox/UserManual.pdf" 0)
;; (find-virtualboxmanualpage 1 "Contents")
;; (find-virtualboxmanualpage 2 "Index")
;; (find-virtualboxmanualtext "")




;; «gab»  (to ".gab")
;; (find-angg "gab/")
;; (find-angg "eev-puro/.emacs")
;; (find-fline "/usr/share/eev-puro/gab.lua")
;; (find-fline "/usr/share/eev-puro/gab-tests.lua")
;; (find-dn5 "gab.lua")
;; (find-dn5 "gab-tests.lua")
;;
(defun eepitch-gab () (interactive)
  (eepitch-comint-at "~/dednat5/" "gab.lua" "lua5.1 -l gab"))
(defun eepitch-gab () (interactive)
  (eepitch-comint-at "~/gab/" "gab.lua" "lua5.1 -l gab"))

(code-c-d "gab" "~/gab/" :anchor)
;; (find-gab "")



;; «find-rawcat»  (to ".find-rawcat")
;; (find-efunction 'find-eoutput-reuse)
;; (find-rawcat "~/eev-puro/mini-lua-intro.e")
;; (find-rawcat "~/eev-puro/mini-lua-intro.e" "intro:PP")
;;
(defun find-rawcat (fname &optional tag &rest rest)
  (apply
   'find-eoutput-reuse
   (format "*cat %s*" fname)
   `(progn
      (set-buffer-file-coding-system 'raw-text-unix 'force)
      (set-buffer-multibyte nil)
      (insert (ee-read-file ,fname)))
   (if (stringp tag) (ee-format-as-anchor tag))
   rest))


(defun raw-text-unix0 () (interactive)
  (set-buffer-file-coding-system 'raw-text-unix 'force)
  (set-buffer-multibyte nil))

(defun raw-text-unix (&optional arg) (interactive "P")
  (set-buffer-file-coding-system 'raw-text-unix 'force)
  (set-buffer-multibyte nil)
  (insert (format "
%sLocal Variables:
%scoding: raw-text-unix
%sEnd:
" ee-hyperlink-prefix ee-hyperlink-prefix ee-hyperlink-prefix)))






;; (find-efunction 'ee-wrap-code-c-d)
(defun ee-wrap-mkdir ()
  (interactive)
  (ee-wrapt "d" "\
rm -Rv {d}
mkdir  {d}
cd     {d}"))


;; (find-status   "coreutils")
;; (find-vldifile "coreutils.list")
;; (find-udfile   "coreutils/")
(code-c-d "coreutils" "/usr/share/doc/coreutils/" "coreutils")
;; (find-coreutilsfile "")
;; (find-coreutilsnode "")

(defun card () (interactive) (find-angg ".asoundrc"))


;; «estagios»  (to ".estagios")
;; (code-c-d "purouff-tk-"
;; 	  "/ftp:purouff@estagios.purouff.tk:/public_html/")
;; (code-c-d "estagios-purouff-tk-"
;; 	  "/ftp:purouff@estagios.purouff.tk:/public_html/estagios/")
;; (setenv   "ESTAGIOS"
;; 	  "/ftp:purouff@estagios.purouff.tk:/public_html/estagios/")
;; (defun eepitch-ftpestagios ()
;;   (interactive) (eepitch-comint "ftp estagios" "pftp estagios.purouff.tk"))
;; (find-purouff-tk-file          "")
;; (find-estagios-purouff-tk-file "")
;; (find-puroufftkfile "")
;; (find-puroufftkfile "estagios/")






(defun ee-evincepage (fname &optional page)
  `("evince"
    ,@(if page (list (format "--page-label=%d" page)))
    ,fname))

(defun find-evincepage  (fname &optional page &rest rest)
  (find-bgprocess (ee-evincepage fname page)))


;; «chomsky» (to ".chomsky")
;; (find-fline "/sda5/torrents/Consenso_fabricado/")
;; (find-fline "/sda5/videos/" "Consenso_Fabricado_-_Chomsky_e_a_M_dia_TVE_VHS-1IFKcdwCpwM.mp4")
;; (find-fline "/sda5/videos/Consenso_Fabricado_-_Chomsky_e_a_M_dia_TVE_VHS-1IFKcdwCpwM.mp4")

(code-video "chomskyleg" "/sda5/DVDs/chomsky-leg/chomsky-leg.avi")
(code-video "consenso" "/sda5/torrents/Consenso_fabricado/Consenso Fabricado - Chomsky e a Midia (TVE, VHS).avi")
(code-video "cf"       "/sda5/torrents/Consenso_fabricado/Consenso Fabricado - Chomsky e a Midia (TVE, VHS).avi")
(code-video "cf"       "/sda5/videos/Consenso_Fabricado_-_Chomsky_e_a_M_dia_TVE_VHS-1IFKcdwCpwM.mp4")
(code-video "cf"  "/sda1/home/videos/Consenso_Fabricado_-_Chomsky_e_a_M_dia_TVE_VHS-1IFKcdwCpwM.mp4")
;; (find-chomskyleg)
;; (find-consenso)
;; (find-consenso "12:53" "Foucault")

;; (eev-avadj-mode 1)
;; (find-consenso t)
;; (find-cf t)
;; 12:53 foucault
;; 2:00:00

;; (find-anggfile "manufacturing.srt" "but, at the core, sort of similar values")
(defun find-mcsrt (&rest pos) (apply 'find-fline "~/manufacturing.srt" pos))
;; (find-mcsrt "but, at the core, sort of similar values")
;; (find-es "chomsky")




;; «ee-rmprefix» (to ".ee-rmprefix")
;; «ee-killurl» (to ".ee-killurl")
(defun ee-rmprefix (prefix fname &optional newprefix)
  (setq prefix (ee-expand prefix))
  (setq fname  (ee-expand fname))
  (if (ee-prefixp prefix fname)
      (concat (or newprefix "")
	      (ee-remove-prefix prefix fname))))

(defun ee-fname-to-url0 (fname)
  (or (ee-rmprefix  "$S/http/" fname "http://")
      (ee-rmprefix "$S/http/s" fname "https://")
      (ee-rmprefix   "~/TH/L/" fname "http://anggtwu.net/")
      (ee-rmprefix   "~/TH/R/" fname "http://anggtwu.net/")
      (ee-rmprefix        "~/" fname "http://anggtwu.net/")
      (ee-rmprefix  ee-twusdir fname "http://anggtwu.net/")
      (ee-rmprefix  ee-twupdir fname "http://anggtwu.net/")
      ))

(defun ee-fname-here ()
  (or (and (eq major-mode 'dired-mode) (ee-dired-to-fname))
      buffer-file-name
      default-directory))

(defun kill-and-message (string)
  (if (not (stringp string))
      (error "Not a string: %S" string))
  (kill-new string)
  (message "Killing: %S" string))

(defun kill-pwd () (interactive)
  (kill-and-message default-directory))
(defalias 'kd 'kill-pwd)

(defun kill-url (fname)
  (interactive (list (ee-fname-here)))
  (kill-and-message (ee-fname-to-url0 fname)))




(defun ee-suffixp (suffix str)
  "Return t if STR ends with PREFIX."
  (let ((len (length suffix)))
    (and (<= len (length str))
	 (equal suffix (substring str (- len) (length str))))))

(defun ee-remove-suffix (suffix str)
  "Example: (ee-remove-prefix \"EF\" \"abcdef\") --> \"abcd\""
  (substring str 0 (- (length suffix))))

(defun ee-rmsuffix (suffix str)
  (and str
       (ee-suffixp suffix str)
       (ee-remove-suffix suffix str)))

(defun ee-rmprefixsuffix (prefix suffix fname)
  (let* ((fname-  (and fname  (ee-rmprefix prefix fname)))
	 (fname-- (and fname- (ee-rmsuffix suffix fname-))))
    fname--))

' (

;; (find-angg ".emacs.templates" "find-angg-upload-links")
;; (find-angg ".emacs.templates" "find-escript-upload-links")

(defun ee-fname-to-astem (fname)
  (ee-rmprefixsuffix "~/" "" fname))
(defun ee-fname-to-bstem (fname)
  (ee-rmprefixsuffix "~/TH/" ".blogme" fname))
(defun ee-fname-to-estem (fname)
  (ee-rmprefixsuffix "~/TH/" ".blogme" fname))

)



(defun kill-but-last-word () (interactive)
  (insert (car (nreverse (ee-split (ee-this-line-extract))))))



;; «cow-and-mow» (to ".cow-and-mow")
;;
(defun copy-line-to-other-window () (interactive)
  (let ((line-move-visual nil))
    (eek "C-a C-SPC <down> M-w M-o C-a C-y <<recenter>> M-- M-1 M-o")))

(defun move-line-to-other-window () (interactive)
  (let ((line-move-visual nil))
    (eek "C-a C-SPC <down> C-w M-o C-a C-y <<recenter>> M-- M-1 M-o")))

(defalias 'cow 'copy-line-to-other-window)
(defalias 'mow 'move-line-to-other-window)

;; «cuow» (to ".cuow")
(defun cuow () (interactive)
  "Copy URL to other (i.e., next) window"
  (let* ((fname (ee-dired-to-fname))
	 (url (ee-rmprefix "~/" fname "http://anggtwu.net/")))
    (eek "M-o C-a")
    (insert (format "  %s\n" url))
    (eek "M-- M-o <down>")
    ))






;; (find-angg ".zshrc" "makeL")
;;
(defun ee-in-eepitch-target (code)
  (eepitch-prepare)
  (save-selected-window
    (select-window (eepitch-target-window))
    (eval code)))

(defun makeR1C (relfname)
  (eepitch-shell)
  (ee-in-eepitch-target '(eek "M->"))
  (eev (format "makeR1C %s" relfname))
  (eepitch-line "ee"))

;; (makeR1C "tmp.html")

(defun eepitch-shell12 () (interactive)
  (find-wset "_13o_2o_o"
    ' (progn (eepitch-shell)
	     (eepitch-kill)
	     (eepitch-shell2)
	     (eepitch-kill)
	     (eepitch-shell)
	     (eepitch-shell2)
	     )
    ' (find-ebuffer "*shell*")
    ' (find-ebuffer "*shell 2*")
    )
  )

;; (find-enode "Useless Whitespace")
(defun show-trailing-whitespace () (interactive)
  (setq show-trailing-whitespace (not show-trailing-whitespace))
  (message "%S" `(setq show-trailing-whitespace ,show-trailing-whitespace)))



;; «tramp-no-remote-shells» (to ".tramp-no-remote-shells")
;; From: https://gist.github.com/4002203
;;       https://gist.github.com/legumbre
;;
'
(defadvice shell (around prevent-remote-shells-from-tramp compile activate)
  (let ((default-directory (if (file-remote-p default-directory)
                               "~/" default-directory)))
    ad-do-it))



;; «screencasts» (to ".screencasts")
;; (find-es "emacs" "adjust-geometry")
;; (find-es "emacs" "frame-geometry")
;; (find-es "fvwm" "resize")
;; x--: (find-sh0 "FvwmCommand 'Current Resize w-1c keep'")
;; x++: (find-sh0 "FvwmCommand 'Current Resize w+1c keep'")
;; y--: (find-sh0 "FvwmCommand 'Current Resize keep w-1c'")
;; y++: (find-sh0 "FvwmCommand 'Current Resize keep w+1c'")
;;      (find-sh0 "FvwmCommand 'Current Resize keep w+1c'")
;;      (find-sh0 "FvwmCommand 'Current Resize  80c 37c'")
;;      (find-sh0 "FvwmCommand 'Current Resize 167c 46c'")
;;      (find-sh0 "FvwmCommand 'Current Resize 123c 38c'")
;; (frame-parameter (selected-frame) 'width)
;; (frame-parameter (selected-frame) 'height)

(defun frame-width-height ()
  (format "%dc %dc"
	  (frame-parameter (selected-frame) 'width)
	  (frame-parameter (selected-frame) 'height)))
(defun frame-width-height-set (str)
  (find-sh0 (format "FvwmCommand 'Current Resize %s'" str)))
(defun frame-width--  () (frame-width-height-set "w-1c keep"))
(defun frame-width++  () (frame-width-height-set "w+1c keep"))
(defun frame-height-- () (frame-width-height-set "keep w-1c"))
(defun frame-height++ () (frame-width-height-set "keep w+1c"))
(defun framegeom (&optional h v)
  (interactive "P")
  (cond ((and (numberp h) (num