|
Warning: this is an htmlized version!
The original is across this link, and the conversion rules are here. |
; Edrx's .emacs
; 2008dec07
;; (getenv "HOME")
;; default-directory
;; (setenv "HOME" default-directory)
;; (find-sh "grep -n '«.*»' ~/.emacs")
;; «.autoloads» (to "autoloads")
;; «.add-to-alist» (to "add-to-alist")
;; «.auto-mode-alist» (to "auto-mode-alist")
;; «.mode-variables» (to "mode-variables")
;; «.w3m-el» (to "w3m-el")
;; «.same-window-buffer-names» (to "same-window-buffer-names")
;; «.emacs-cvs» (to "emacs-cvs")
;; «.my-mode» (to "my-mode")
;; «.eev» (to "eev")
;; «.eev-block» (to "eev-block")
;; «.find-code-c-d» (to "find-code-c-d")
;; «.find-grep-at-dir» (to "find-grep-at-dir")
;; «.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")
;; «.dired-find-w3m» (to "dired-find-w3m")
;; «.dired-find-planner» (to "dired-find-planner")
;; «.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")
;; «.remote-machines» (to "remote-machines")
;; «.upload-changes» (to "upload-changes")
;; «.upload-this» (to "upload-this")
;; «.code-c-ds» (to "code-c-ds")
;; «.k22» (to "k22")
;; «.python» (to "python")
;; «.find-xxxpage» (to "find-xxxpage")
;; «.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")
;; «.fooi» (to "fooi")
;; «.fooi-re» (to "fooi-re")
;; «.key_bindings» (to "key_bindings")
;; «.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-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")
;; «.favourite-modes» (to "favourite-modes")
;; «.isearch-faces» (to "isearch-faces")
;; «.obsolete» (to "obsolete")
;; «.lua-mode» (to "lua-mode")
;; «.guest_users» (to "guest_users")
;; «.info-path» (to "info-path")
;; «.lilypond» (to "lilypond")
;; «.passwds-tcl-get» (to "passwds-tcl-get")
;; «.eechannel-send-passwd» (to "eechannel-send-passwd")
;; «.erc» (to "erc")
;; «.erc-freenode-join» (to "erc-freenode-join")
;; «.ee-send-to-erc-channel» (to "ee-send-to-erc-channel")
;; «.find-fsbot-answer» (to "find-fsbot-answer")
;; «.lforth» (to "lforth")
;; «.eepdj» (to "eepdj")
;; «.ee-el» (to "ee-el")
;; «.dout» (to "dout")
;; «.load-.emacs-tex» (to "load-.emacs-tex")
;; «.modes-safe-local» (to "modes-safe-local")
;; «.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")
;; «.lua-manual» (to "lua-manual")
;; «.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")
;; «.my-modes» (to "my-modes")
;; «.emacs-ascii-screenshots» (to "emacs-ascii-screenshots")
;; «.my-screenshot» (to "my-screenshot")
;; «.linuxconfvar» (to "linuxconfvar")
;; «.code-c-d-linux26» (to "code-c-d-linux26")
;; «.intermail» (to "intermail")
;; «.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")
;; «.eevnow» (to "eevnow")
;; «.dotemacs.private» (to "dotemacs.private")
;; «.find-w3m-links» (to "find-w3m-links")
;; «.safe-local-variable» (to "safe-local-variable")
;; «.source2e» (to "source2e")
;; «.classes.dtx» (to "classes.dtx")
;; «.find-source2epage» (to "find-source2epage")
;; «.find-texbookpage-old» (to "find-texbookpage-old")
;; «.find-texbookpage» (to "find-texbookpage")
;; «.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")
;; «.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")
;; «.hh» (to "hh")
;; «.find-eunicode» (to "find-eunicode")
;; «.find-eunicodeucs» (to "find-eunicodeucs")
;; «.diagxy» (to "diagxy")
;; «.libgtk-docs» (to "libgtk-docs")
;; «.find-firefox-bg» (to "find-firefox-bg")
;; «.luamanual» (to "luamanual")
;; «.luamanual-51» (to "luamanual-51")
;; «.find-luamanual-ff» (to "find-luamanual-ff")
;; «.smalltalk» (to "smalltalk")
;; «.color-theme» (to "color-theme")
;; «.my-make-face» (to "my-make-face")
;; «.myxpm» (to "myxpm")
;; «.find-xpm» (to "find-xpm")
;; «.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")
;; «.ee-comint» (to "ee-comint")
;; «.ee-telnet» (to "ee-telnet")
;; «.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")
;; «.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")
;; «.bash» (to "bash")
;; «.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-rcirc-channel-sexps» (to "find-rcirc-channel-sexps")
;; «.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")
;; «.tramp-2.1.9» (to "tramp-2.1.9")
;; «.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")
;; «..emacs.papers» (to ".emacs.papers")
;; «..emacs.templates» (to ".emacs.templates")
;; «.find-urlretrieve» (to "find-urlretrieve")
;; «.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")
;; «.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")
;; «.eev-traffic-light-glyphs» (to "eev-traffic-light-glyphs")
;; «.no-super-key» (to "no-super-key")
;; «.eepitch-rubyforth» (to "eepitch-rubyforth")
;; «.eepitch-sisrotlua» (to "eepitch-sisrotlua")
;; «.eepitch-dednat4» (to "eepitch-dednat4")
;; «.qt» (to "qt")
;; «.maut» (to "maut")
;; «.brecp» (to "brecp")
;; «.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-pen-links» (to "find-pen-links")
;; «.find-dn4tex-links» (to "find-dn4tex-links")
;; «.find-euboutput» (to "find-euboutput")
;; «.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")
;; «.ee-replace-regexp» (to "ee-replace-regexp")
;; «.ee-demo-4» (to "ee-demo-4")
;; «.coq» (to "coq")
;; «.find-lua51ev» (to "find-lua51ev")
;; «.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")
;; «.maxima» (to "maxima")
;; «.maxima-gpdraw» (to "maxima-gpdraw")
;; «.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")
;; «.find-mplayer» (to "find-mplayer")
;; «.lua-5.2» (to "lua-5.2")
;; «.caderno» (to "caderno")
;;;;;
;;
;; «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)
;; (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)
;; (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")
;;
;;;;;
;; From:
;; <http://mail.gnu.org/archive/html/bug-gnu-emacs/2001-02/msg00066.html>,
;; <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"))
(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))
;;;;;
;;
;; «auto-mode-alist» (to ".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))
;; This is for OpenOffice files, but is not working:
;; (add-to-alist 'auto-mode-alist '("\\.sxw$" . archive-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)
;; (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)
;; (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)
;; (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-enode "Force Same Window")
(setq same-window-buffer-names
(append '("*Help*" "*compilation*" "*Occur*")
same-window-buffer-names))
(setq pop-up-windows nil) ; but this disturbs GUD
(setq planner-use-other-window nil)
;; (find-efacedescr 'default)
;; (find-angg ".Xdefaults")
;; (set-face-background face bg)
;; (set-face-foreground face bg)
;;;;;
;;
;; «emacs-cvs» (to ".emacs-cvs")
;;
;;;;;
;; See: http://www.emacswiki.org/cgi-bin/wiki/EmacsCvsAndDebian
;; This makes emacs-cvs aware of all the add-on -el packages in my debian box.
;; (find-progoutput "dpkg -l")
;; (find-angg ".zshrc" "emacs-cvs")
(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 'emacs21)
(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)))))
;; «my-mode» (to ".my-mode")
;; 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...
(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)))
(define-key my-mode-map "\M-o" 'other-window)
;; (find-sh "locate snarf | grep jpg | grep -v xvpics | sort")
;;;;;
;;
;; «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)
;; Beginning of the eev block:
;; See: (find-eev "eev-rctool" "new_block_emacs")
;; (find-eev-update-links)
;;
(add-to-list 'load-path "~/eev-current")
(require 'eev-all) ; (find-eev "eev-all.el")
(eev-mode 1)
;;
;; End of the eev block.
(autoload 'eev-math-glyphs-edrx "eev-math-glyphs" nil t)
;; (eev-math-glyphs-edrx)
;; (find-eev "eev-math-glyphs.el")
;; For the unicode-2 branch (merged with head cvs emacs in 2008feb):
;; (require 'disp-table)
;; (when (fboundp 'make-glyph-code)
;; (defun eev-set-glyph (pos &optional char face)
;; (aset standard-display-table pos
;; (if char (vector (make-glyph-code char face)))))
;; (eev-set-default-glyphs)
;; )
;; (defalias 'code-c-d 'code-c-d-old)
;; (defalias 'find-code-c-d 'find-code-c-d-old)
;; (defalias 'ee-code-c-d 'ee-code-c-d-old)
(defalias 'code-c-d 'code-c-d-new)
(defalias 'find-code-c-d 'find-code-c-d-new)
;; (defalias 'ee-code-c-d 'ee-code-c-d-new)
;; (require 'eev-bounded)
(put 'ee-charset-indicator 'safe-local-variable 'stringp) ;; obsolete
;; (defalias 'find-dvipage 'eebg-xdvi)
;; (defalias 'find-pspage 'eebg-gv)
;; (autoload 'eev-math-glyphs-edrx "eev-math-glyphs" nil t)
;; (find-eev "eev-math-glyphs.el")
;; (eev-math-glyphs-edrx)
;; (defun code-pdftotext (code pdffile)
;; (ee-eval-read-format
;; "(defun find-%stext (&rest pos-spec-list) (interactive)
;; (apply 'find-pdfpage-pdftotext
;; (ee-expand %S)
;; pos-spec-list))" code pdffile))
;; «find-code-c-d» (to ".find-code-c-d")
;; (defun ee-code-c-d (&rest rest)
;; (with-temp-buffer
;; (let ((ee-arg 1))
;; (apply 'code-c-d rest)
;; (buffer-substring (point-min) (point-max)))))
;; (defun find-code-c-d (&rest rest)
;; (find-estring (apply 'ee-code-c-d rest)))
;; «find-grep-at-dir» (to ".find-grep-at-dir")
;; We call this `find-grep-at-dir' because the name `find-grep' is taken.
;; A simple (apply 'ee-goto-position pos-spec-list) after the grep
;; wouldn't work, because grep runs asyncronously, so for the moment
;; we just drop the pos-spec-list.
(defun find-grep-at-dir (dir grep-command-args &rest pos-spec-list)
"Example: (find-grep-at-dir ee-eetcdir \"grep -niH -e tetris *\")
Note: the POS-SPEC-LIST arguments are currently not used."
(let ((default-directory (ee-expand (or dir default-directory))))
(grep grep-command-args)))
(add-to-alist 'code-c-d-keywords
'(:grep
(ee-eval-read-format "
(defun find-%sgrep (grep-command-args &rest pos-spec-list)
(apply 'find-grep-at-dir ee-%sdir grep-command-args pos-spec-list))"
c c)))
(code-c-d "es" "$ES/" :grep)
;; «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")
(code-c-d "woman" (ee-efile "") "woman")
;; 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)))
;; «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-woman (manfile &rest rest)
(woman-find-file manfile)
(apply 'ee-goto-position rest))
(defun ee-code-c-d-:woman (&rest rest)
(cons (format "
(defun find-%swoman (manfile &rest pos-spec-list)
(apply 'find-woman (ee-%sfile manfile) pos-spec-list))
" c c) (ee-code-c-d-rest 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 (&rest rest)
(cons (format "
(defun find-%sffox (semiurl &rest pos-spec-list)
(find-firefox (ee-%surl semiurl)))
" c c) (ee-code-c-d-rest rest)))
;; (find-evariable 'code-c-d-keywords-new)
(add-to-alist 'code-c-d-keywords-new '(:ffox . ee-code-c-d-:ffox))
;; «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))
;; «dired-find-w3m» (to ".dired-find-w3m")
;; «dired-find-planner» (to ".dired-find-planner")
;; 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)
))
;; (find-evardescr 'dired-load-hook)
;; (find-efile "wdired.el")
(autoload 'wdired-change-to-wdired-mode "wdired")
(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))))
;; «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)
;;-------------------------------------------
;; «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-es "emacs" "erc")
;; (find-es "emacs" "rcirc")
(defun to-erc () (interactive) (find-es "emacs" "erc"))
;; (find-fline "~/usrc/erc/")
;; (add-to-list 'load-path "~/usrc/erc/")
(add-to-list 'load-path "~/usrc/erc-5.0/")
;; http://www.emacswiki.org/cgi-bin/wiki/ErcCvsFeatures
(setq erc-nick "edrx"
erc-user-full-name "Eduardo Ochs <http://angg.twu.net/>"
erc-prompt-for-password nil
erc-send-whitespace-lines t
erc-auto-query t
)
;; (setq erc-autojoin-channels-alist
;; '(("freenode.net"
;; "#emacs"
;; "#debian-br"
;; )))
(defun erc-freenode ()
(interactive)
(erc-select :server "irc.freenode.net" :port 6667))
(defun erc-bitlbee ()
(interactive)
(erc-select :server "im.bitlbee.org" :port 6667))
;; Btw, my uin is 250604577,
;; my jabber id is edrx@jabber.org
;; my MSN is eduardoochs@hotmail.com
;; Currently this doesn't work due to an erc bug
(defun erc-freenode2 ()
(interactive)
(erc-select :nick '("edrx" "edrx2" "edrx3")
:server "irc.freenode.net" :port 6667))
;; «erc-freenode-join» (to ".erc-freenode-join")
;; (to "rcirc")
;;
' (progn
(freenode-join "#emacs")
(freenode-join "#emacs-br")
(freenode-join "#eev")
;; (freenode-join "#fvwm")
;; (freenode-join "#lua")
;; (freenode-join "#debian")
(freenode-join "#debian-br")
(freenode-join "#debian-rj")
;; (freenode-join "#debian-br-cdd")
;; (freenode-join "#squeak")
;; (freenode-join "#gnu-smalltalk")
;; (freenode-join "#gimp")
;; (freenode-join "#uclibc") ; discussions on busybox
;; (freenode-join "#concatenative") ; Forth, etc
;; (freenode-join "Txt2tags")
)
;;
(defun erc-steps ()
"Load the steps to connect to freenode and bitlbee."
(interactive)
(find-efunction 'erc-steps) ; show this function
(message "%S"
(eesteps '((erc-freenode)
(erc-freenode-join)
(eek "M-e")
(erc-bitlbee)
;; (eek0 "identify xxx\r")
(eek0 (format "identify %s\r" (passwds-tcl-get "bitlbee")))
))))
;;
(defun erc-freenode-join () (interactive)
(find-angg ".emacs" "erc-freenode-join" " )"))
(defun freenode-join (channelname)
(with-current-buffer "irc.freenode.net:6667"
(insert (concat "/join " channelname))
(call-interactively (key-binding "\r"))))
;;
(defun freenode-join (channelname)
(with-current-buffer "irc.freenode.net:6667"
(erc-cmd-JOIN channelname)))
;;
(defun find-freenode-channel (channel &rest lines)
(freenode-join channel)
(if lines (kill-new (mapconcat 'identity lines "\n"))))
;; A test:
;; (find-freenode-channel "#gimp" "/msg Wilber alpha")
;; (find-freenode-channel "#emacs" "/msg fsbot erc?")
;; «ee-send-to-erc-channel» (to ".ee-send-to-erc-channel")
;; «find-fsbot-answer» (to ".find-fsbot-answer")
;;
(defun ee-send-to-erc-channel (channel line)
(if (not (get-buffer channel))
(error "There's no buffer called \"%s\"" channel))
(if (not (eq 'erc-mode (with-current-buffer channel major-mode)))
(error "The buffer \"%s\" is not an ERC buffer"))
(switch-to-buffer channel)
(goto-char (point-max))
(insert line)
(erc-send-current-line))
;;
(defun find-fsbot-answer (question)
(interactive "sQuestion: ")
(ee-send-to-erc-channel "fsbot" question))
;;
(defun find-apt-br-answer (question)
(interactive "sQuestion: ")
(ee-send-to-erc-channel "apt-br" question))
;;
(defun find-dpkg-answer (question)
(interactive "sQuestion: ")
(ee-send-to-erc-channel "dpkg" question))
;;
(defun find-apt-answer (question)
(interactive "sQuestion: ")
(ee-send-to-erc-channel "dpkg" question))
;;
;; Example: (find-fsbot-answer "conkeror?")
;; Example: (find-apt-br-answer "jahnke?")
;; Example: (find-dpkg-answer "udeb")
;; Example: (find-apt-answer "nodm?")
;; (eev "echo false > /etc/X11/default-display-manager")
;; (find-efunction 'erc-part-from-channel)
;; (defun erc-my-part-from-channel () (interactive)
;; (erc-part-from-channel "->http://angg.twu.net/"))
(defun switch-to-irc ()
"Switch to an IRC buffer, or run `erc-select'.
When called repeatedly, cycle through the buffers."
(interactive)
(let ((buffers (and (fboundp 'erc-buffer-list) (erc-buffer-list))))
(when (eq (current-buffer) (car buffers))
(bury-buffer)
(setq buffers (cdr buffers)))
(if buffers
(switch-to-buffer (car buffers))
(erc-select))))
;; (defvar erc-next-modified-buffer-none nil)
;; (defun erc-next-modified-buffer () (interactive)
;; (if (not (eq major-mode 'erc-mode))
;; (setq erc-next-modified-buffer-none (current-buffer)))
;; (if erc-modified-channels-alist
;; (switch-to-buffer (car (car erc-modified-channels-alist)))
;; (switch-to-buffer erc-next-modified-buffer-none)))
;;
;; (global-set-key [f2] 'erc-next-modified-buffer)
;; http://www.emacswiki.org/cgi-bin/wiki?ErcChannelTracking
;;
(global-set-key [f2] 'erc-track-switch-buffer)
(global-set-key [f14] 'switch-to-irc)
;;;;;
;;
;; «browse-url» (to ".browse-url")
;;
;;;;;
;; (find-efile "net/browse-url.el")
;; (defun to-browse-url () (interactive) (find-angg ".emacs" "browse-url"))
;;
;; (defun browse-url-eevlynx (url &rest rest)
;; (eev (concat "lynx " url)))
;;
;; (defun browse-url-eevedrxmozilla (url &rest rest)
;; (eev (concat "edrxmozilla " url " &")))
;;
;; (setq browse-url-browser-function 'browse-url-eevlynx)
;; (setq browse-url-browser-function 'browse-url-eevedrxmozilla)
;; (setq browse-url-browser-function 'find-w3m)
;;;;;
;;
;; «brwl-and-friends» (to ".brwl-and-friends")
;;
;;;;;
;; (defun bru-url-to-local (url)
;; (replace-regexp-in-string "^\\(http\\|ftp\\)://" "$S/\\1/" url))
;;
;; (defun find-edrxmozilla (url &rest ignore)
;; (interactive (browse-url-interactive-arg "URL: "))
;; (shell-command-to-string
;; (format ". ~/.zshrc; sudo -u edrx mozilla \"%s\"; echo $?" url)))
;;
;; (defun find-mozilla (url &rest ignore)
;; (interactive (browse-url-interactive-arg "URL: "))
;; (shell-command-to-string
;; (format ". ~/.zshrc; firefox \"%s\"; echo $?" url)))
;;
;; (defun find-lynx (url &rest ignore)
;; (interactive (browse-url-interactive-arg "URL: "))
;; (eev (format "lynx \"%s\"" url)))
(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)))
;;
;; (defun eemozilla (url &rest ignore)
;; (interactive (browse-url-interactive-arg "URL: "))
;; (eev (format "firefox \"%s\" &" url)))
;;
;; (defmacro my-def-browse-url-remote (newfun fun)
;; `(defun ,newfun (url &rest ignore)
;; (interactive (browse-url-interactive-arg "URL: "))
;; (setq browse-url-browser-function ',newfun)
;; (list ',fun url '-> (,fun url))))
;;
;; (defmacro my-def-browse-url-local (newfun fun)
;; `(defun ,newfun (url &rest ignore)
;; (interactive (browse-url-interactive-arg "URL: "))
;; (setq browse-url-browser-function ',newfun)
;; (setq url (bru-url-to-local url))
;; (list ',fun url '-> (,fun url))))
;;
;; (defmacro my-def-browse-url-local-remote (localfun remotefun fun)
;; `(list (if ',localfun (my-def-browse-url-local ,localfun ,fun))
;; (if ',remotefun (my-def-browse-url-remote ,remotefun ,fun))))
;; (my-def-browse-url-local-remote brwl brw find-w3m)
;; ;; (my-def-browse-url-local-remote brml brm find-edrxmozilla)
;; (my-def-browse-url-local-remote brml brm find-mozilla)
;; (my-def-browse-url-local-remote brmbgl brmbg eemozilla)
;; (my-def-browse-url-local-remote nil brp eepsne)
;; (my-def-browse-url-local-remote brfl nil find-fline)
;; (my-def-browse-url-local-remote bril nil find-eimage)
;; (my-def-browse-url-local-remote nil brtmpwget eetmpwget)
;;
;; (my-def-browse-url-local-remote brlynxl brlynx find-lynx)
;; (find-efunctionpp 'brwl)
;; (find-efunctionpp 'brm)
;; (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 "")
;; (defun brmd () (interactive)
;; (if (eq major-mode 'dired-mode)
;; (let* ((fname (file-name-sans-versions (dired-get-filename) t))
;; (url (concat "file://" fname)))
;; (find-mozilla url)
;; (message (format "%S" `(find-mozilla ,url))))))
;;
;; (defun brgvd () (interactive)
;; (if (eq major-mode 'dired-mode)
;; (let* ((fname (file-name-sans-versions (dired-get-filename) t)))
;; (find-pspage fname 1)
;; (message (format "%S" `(find-pspage ,fname 1))))))
;; «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*")
; «tramp»
; (find-es "emacs" "tramp")
; (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/")
;; Basic `code-c-d's
;; «code-c-d_e» (to ".code-c-d_e")
'(
(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/")
)
(code-c-d "calc" (concat ee-emacs-lisp-directory "calc/") "calc")
;; (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)
(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>)
;;;;;
;;
;; «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" "/angg.twu.net:")
(defun eevt (s e) (interactive "r")
(eev s e (ee-twufile "bin/ee.sh")))
;; 2006nov16
;; (code-c-d "twu" "/ftp:edrx@angg.twu.net:")
;; (code-c-d "twup" "/ftp:edrx@angg.twu.net:public_html/")
;; (code-c-d "twu" "/scp:edrx@angg.twu.net:")
;; (code-c-d "twup" "/scp:edrx@angg.twu.net:public_html/")
(code-c-d "twu" "/scp:edrx@angg.twu.net:/home/edrx/")
(code-c-d "twup" "/scp:edrx@angg.twu.net:/home/edrx/public_html/")
(code-c-d "twus" "/scp:edrx@angg.twu.net:/home/edrx/slow_html/")
;; (find-twufile "")
;; (find-twupfile "")
;; (find-twupfile "tmp/")
;; (find-twusfile "")
;; «upload-changes» (to ".upload-changes")
(defun upload-changes () (interactive) (find-es "page" "upload-rsync"))
;; (ee-expand "~")
;; (ee-remove-prefix "/home/foo/" "/home/foo/bar")
;;
(defun ee-remove-prefix (prefix str)
(and (<= (length prefix) (length str))
(equal prefix (substring str 0 (length prefix)))
(substring str (length prefix))))
(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://angg.twu.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://angg.twu.net/%s" stem-home)
(format "http://angg.twu.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://angg.twu.net/%s" stem-homeL)
(format "http://angg.twu.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")
;; (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)))
(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))))
;;;;;
;;;;; «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 "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/")
(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-dvi "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" "$S/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 "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)
;
; 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))
;; (find-status "grub")
;; (find-vldifile "grub.list")
;; (find-udfile "grub/")
;; (find-grubnode "")
(code-c-d "grub" "/usr/share/doc/grub/" "grub")
;
; gcc / low-level things
;(code-c-d "xd" "/usr/src/xduel-2.14/")
;(code-c-d "libc" "/usr/src/redhat/BUILD/libc-5.3.12/")
;(code-c-d "ldso" "/usr/src/redhat/BUILD/ld.so-1.7.14/")
;(code-c-d "svgalib" "/usr/src/svgalib-1.2.13/")
;(code-c-d "gcc" "/usr/src/gcc-2.95.2/" "gcc-3.3")
(code-c-d "gcc" "/usr/lib/gcc/i486-linux-gnu/4.1.2/include/" "gcc-4.1")
;(code-c-d "gdb" "/usr/src/gdb-4.18.19990928/")
;(code-c-d "gdbts" "/usr/src/gdb-4.18.19990928/gdb/testsuite/")
;(code-c-d "glibc" "/usr/src/glibc-2.1.3/glibc-2.1.3/")
;(code-c-d "binu" "/usr/src/binutils-2.9.1.0.19a/")
;(code-c-d "mk" "/usr/src/make-3.77/")
;(code-c-d "ldso" "/usr/src/ld.so-1.9.11/")
;(code-c-d "libvfw" "/usr/src/libvforkwrap-0.1/")
;
; Debian:
;; (code-c-d "dpkg" "/usr/src/dpkg-1.6.14/")
;(code-c-d "bfsrc" "/usr/src/boot-floppies-2.2.13/")
;(code-c-d "bf" "/usr/src/boot-floppies-2.2.13/")
;(code-c-d "bfdb" "/usr/src/boot-floppies-2.2.13/utilities/dbootstrap/")
;(code-c-d "disksc" "$SLINKB1/dists/slink/main/disks-i386/current/")
;(code-c-d "aptsrc" "/usr/src/apt-0.3.11/")
;(code-c-d "deblists" "$S/http/www.debian.org/Lists-Archives/")
;(code-c-d "deblists" "$S/http/lists.debian.org/")
(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/")
;
;(code-c-d "dpkg" "/usr/src/dpkg-1.9.16/")
;(code-c-d "apt" "/usr/src/apt-0.5.3/")
;
; RedHat / boot / dos:
;(code-c-d "spec" "/usr/src/redhat/SPECS/")
;(code-c-d "source" "/usr/src/redhat/SOURCES/")
;(code-c-d "B" "/usr/src/redhat/BUILD/")
;(code-c-d "rpm" "/usr/src/redhat/BUILD/rpm-2.3.11/")
;(code-c-d "yard" "/home/root/AX/yard-1.9/")
;(code-c-d "Y" "/home/root/YARD/")
;(code-c-d "yard" "/usr/src/yard-1.13/" "Yard_doc")
;(code-c-d "rhi" "/big/a42/misc/src/install/")
;(code-c-d "demu" "/usr/src/dosemu-0.97.5/" "dosemu")
;(code-c-d "demu" "/usr/src/dosemu-0.66.7/" "dosemu")
;(code-c-d "demu" "/usr/src/dosemu-0.98.8/")
;
; functional languages, automatic reasoning systems, ...
;(code-c-d "ot" "/usr/src/otter-3.0.4/")
;(code-c-d "maple" "/usr/local/maple/")
;(code-c-d "hbc" "/usr/src/hbc/")
;(code-c-d "hugslib" "/usr/share/hugs98/lib/")
;(code-c-d "TH" "/usr/src/TclHaskell/")
;(code-c-d "holdoc" "/usr/src/hol/")
;(code-c-d "gcl" "/usr/src/redhat/BUILD/gcl-2.2/")
;(code-c-d "fp" "/usr/src/fptools/")
;(code-c-d "fudg" "/usr/src/fptools/Fudgets/")
;(code-c-d "smls" "/usr/src/sml-nj-110/")
;(code-c-d "hol" "/usr/src/hol90.10/")
;(code-c-d "tkhol" "/usr/src/TkHol.0.3c/")
;(code-c-d "mosml" "/usr/src/mosml/")
;(code-c-d "hol98" "/usr/src/hol98/")
(code-c-d "hask98report"
"/usr/share/doc/haskell98-report/html/haskell98-report-html/")
(code-c-d "hask98tut" "/usr/share/doc/haskell98-tutorial/html/")
;;
;; (find-es "haskell" "eepitch-hugs")
;; (find-libhugsfile "libraries/Hugs/Prelude.hs")
(code-c-d "libhugs" "/usr/lib/hugs/")
(code-c-d "hugsuserguide" "/usr/lib/hugs/docs/users_guide/")
; 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/")
;
; «python» (to ".python")
; (find-es "python" "python-on-lenny")
(code-c-d "pyapi" "" "python2.5-api")
(code-c-d "pydist" "" "python2.5-dist")
(code-c-d "pyext" "" "python2.5-ext")
(code-c-d "pylib" "/usr/lib/python2.5/" "python2.5-lib")
(code-c-d "pyref" "" "python2.5-ref")
(code-c-d "pytut" "" "python2.5-tut")
(code-c-d "pyex" "/usr/share/doc/python2.5/examples/")
(code-c-d "pyexd" "/usr/share/doc/python2.5/examples/Demo/")
;; (find-pyapinode "")
;; (find-pydistnode "")
;; (find-pyextnode "")
;; (find-pylibnode "")
;; (find-pyrefnode "")
;; (find-pytutnode "")
;;
;; (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")
;
; 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-old "lua" "~/usrc/lua-5.0.2/" :gdb :grep)
(code-c-d-old "lua5" "~/usrc/lua-5.0.2/" :gdb :grep)
(code-c-d-old "lua50" "~/usrc/lua-5.0.2/" :gdb :grep)
(code-c-d-old "lua511" "~/usrc/lua-5.1.1/" :gdb :grep)
(code-c-d-old "lua512" "~/usrc/lua-5.1.2/" :gdb :grep)
(code-c-d-old "lua51" "~/usrc/lua-5.1.2/" :gdb :grep)
(code-c-d-old "lua51" "~/usrc/lua-5.1.4/" :gdb :grep)
(code-c-d "compat51" "~/usrc/compat-5.1r4/")
;; (find-es "lua5" "lpeg-0.9")
(code-c-d "lpeg" "~/usrc/lpeg-0.9/")
;; (find-lpegfile "")
;; (find-lpegw3m "lpeg.html")
(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/")
(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")
;; «find-xxxpage» (to ".find-xxxpage")
;; (find-angg ".emacs.papers")
;; (find-es "ps" "gv-starting-page")
;;
;; (defun find-zdvipage (fname n)
;; (let ((command (format "zxdvi %s +%d &" fname n)))
;; (eev command) command))
;; (defun find-badpdfpage (fname n)
;; (let ((command (format "acroread %s &" fname)))
;; (eev command) command))
;;
;; (defun find-xpdfpage (fname n)
;; (find-callprocess0 "xpdf" (ee-expand fname) (format "%s" n)))
;; (defun find-xpdfpage (fname &optional n)
;; (start-process
;; "xpdf" "*Messages*"
;; "xpdf" (ee-expand fname) (format "%s" (or n 1))))
;;
;; (defun code-zdvi (code zdvifile)
;; (ee-eval-read-format
;; "(defun find-%spage (n &rest comments)
;; (interactive (list 1))
;; (find-zdvipage %S n))"
;; code zdvifile))
;; (defun code-xpdf (code pdffile)
;; (ee-eval-read-format
;; "(defun find-%spage (n &rest comments)
;; (interactive (list 1))
;; (find-xpdfpage %S n))"
;; code pdffile))
(defun code-badpdf (code pdffile)
(ee-eval-read-format
"(defun find-%spage (n &rest comments)
(interactive (list 1))
(find-badpdfpage %S n))"
code pdffile))
;; (defun find-amsldocpage (n &rest comments)
;; (find-zdvipage "/usr/share/doc/texmf/latex/amslatex/amsldoc.dvi.gz" n))
(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-dvi "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-ps "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)
;; «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")
;; (find-iconbooktext)
;; (find-iconbooktext "case Event() of")
;; (find-iconbooktext "Event(), 155-156")
;; (find-iconbookpage (+ 22 155))
(defun find-iconbooktext (&rest rest)
(apply 'find-pdfpage-pdftotext
(ee-expand "$S/http/www.cs.arizona.edu/icon/ftp/doc/lb1up.pdf")
rest))
(defun find-hurdPackage (&rest rest)
(apply 'find-Package "$SSIDMB/Packages" rest))
(defun find-hurdalphaPackage (&rest rest)
(apply 'find-Package "$SALPHASIDMB/Packages" rest))
;; (find-evardescr 'interpreter-mode-alist)
(setq interpreter-mode-alist
(append interpreter-mode-alist
'(("tclsh8.0" . tcl-mode)
("expectk" . tcl-mode)
("expect" . tcl-mode))))
;; (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 "lisp/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"))
;; «lilypond» (to ".lilypond")
;; (find-fline "/etc/emacs/site-start.d/50lilypond.el")
;; (find-fline "/usr/share/emacs/site-lisp/lilypond-mode.el" "lilypond-indent")
;; The library lilypond-indent.el does not exist, so we fake it.
;; (find-angg "LILYPOND/lilypond-indent.el")
;; (find-es "music" "lilypond-src")
(add-to-list 'load-path "~/LILYPOND/")
;; (add-to-list 'Info-additional-directory-list "/usr/share/info/lilypond/")
;; (find-node "(lilypond)Top")
;; (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)
(if (locate-library "ibuffer")
(global-set-key [f1] 'ibuffer)
(global-set-key [f1] 'buffer-menu))
(global-set-key [f4] 'redraw-display)
(global-set-key [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)
(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)
;; «fooi» (to ".fooi")
(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)))))))
;; «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://angg.twu.net/eev-current/eev.el.html#find-echarsetchars
;; http://angg.twu.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)))))
; (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))
;; (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"))
(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")
;; «lua-mode» (to ".lua-mode")
;; (find-es "lua5" "lua-mode.el")
;; (find-fline "~/elisp/lua-mode.el")
(setq lua-indent-level 2)
(setq lua-electric-flag nil)
;; (find-fline "~/elisp/lua-mode.el" "\"else\" \"else\" lua-indent-line 0")
;; (find-fline "~/elisp/lua-mode.el" "defun lua-indent-line")
;; (find-evariable 'lua-mode-abbrev-table)
;; (find-evardescr 'lua-mode-abbrev-table)
;; (find-elnode "Abbrev Tables")
(defun lua-abbrev-mode-off () (abbrev-mode 0))
(add-hook 'lua-mode-hook 'lua-abbrev-mode-off)
;; (find-efile "files.el" "Save abbrevs in %s?")
;; (find-efile "files.el" "and save-abbrevs abbrevs-changed")
(setq save-abbrevs nil)
;; (find-fline "$S/http/lua-users.org/files/wiki_insecure/editors/")
' (noerr (load-file
"$S/http/lua-users.org/files/wiki_insecure/editors/testing/lua-mode.el"))
' (progn
(setq luaerr "3: f...n `process_stuff' at line 185 [file `dednat.lua']")
(list
(string-match "line \\([0-9]+\\) \\[file `\\(.*\\)'\\]" luaerr)
(match-string 2 luaerr)
(read (match-string 1 luaerr))))
' (buffer-substring
(ee-search-backward "\n")
(ee-search-forward "\n"))
(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)
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(canlock-password "9ea3d6ab441ededa5760d05aba1cf44d2912255a")
'(org-enable-table-editor nil)
'(safe-local-variable-values (quote ((Package . Maxima) (Syntax . Common-Lisp) (Base . 10) (TeX-master . t) (TeX-command-default . "CJKLaTeX") (TeX-master . "lshort2e") (backup-by-copying . t) (sql-product . SQLite) (sql-sqlite-options . "/tmp/music.sqlitedb") (sh-indentation . 2) (folded-file . t) (encoding . raw-text-unix) (modes org-mode emacs-lisp-mode lua-mode) (ee-charset-indicator . "\x08d1")))))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(comint-highlight-prompt ((t (:foreground "LightSteelBlue"))))
'(dired-ignored ((t (:inherit shadow :foreground "DarkSalmon"))))
'(emacs-wiki-link-face ((t (:foreground "lime green" :underline "lime green" :weight bold))))
'(erc-input-face ((t (:foreground "orange"))))
'(lazy-highlight ((((type tty pc) (class color)) (:background "yellow" :foreground "black"))))
'(makefile-shell-face ((t (:foreground "goldenrod"))))
'(makefile-space ((((class color)) (:background "maroon"))))
'(makefile-space-face ((((class color)) (:background "maroon"))))
'(makefile-targets-face ((t (:inherit font-lock-function-name-face))))
'(outline-1 ((t (:foreground "OrangeRed"))))
'(outline-2 ((t (:foreground "Goldenrod2"))))
'(outline-3 ((t (:foreground "LimeGreen"))))
'(outline-4 ((t (:foreground "Dodger Blue"))))
'(sh-heredoc ((t (:foreground "gold1" :weight bold)))))
;; '(comint-highlight-prompt ((((min-colors 88) (background dark)) (:foreground "LightSteelBlue"))))
;; '(makefile-shell-face ((((class color) (min-colors 88) (background dark)) (:foreground "goldenrod"))))
;; '(sh-heredoc ((((min-colors 88) (class color) (background dark)) (:foreground "gold1" :weight bold))))
;; '(font-lock-constant-face ((((class color) (min-colors 88) (background dark)) (:foreground "OrangeRed2"))))
;; (find-elnode "Disabling Commands")
(put 'downcase-region 'disabled nil)
;; (custom-set-faces
;; ;; custom-set-faces was added by Custom -- don't edit or cut/paste it!
;; ;; Your init file should contain only one such instance.
;; '(default ((t (:background "black" :foreground "#99aaff"))))
;; «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)
;; «load-.emacs-tex» (to ".load-.emacs-tex")
;; (find-angg ".emacs-tex.el")
(load-library "~/.emacs-tex.el")
;; (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))
;; (defun find-efunctionpp (symbol &rest rest)
;; (interactive (find-function-read))
;; (apply 'find-eevalread (format "(symbol-function '%S)" symbol) rest))
;; (defun find-etpat (&rest rest) (interactive)
;; (apply 'find-eevalread "(text-properties-at (point))" 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)))
;; (find-efile "mouse.el")
;; (find-evariable 'x-fixed-font-alist "Font menu")
;;-------------------------------------------
;; «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))
;; «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)
;;;;;
;;
;; «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 "
*›«»")
(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")
(if (fboundp 'menu-bar-mode) (menu-bar-mode 0))
(if (fboundp 'tool-bar-mode) (tool-bar-mode 0))
(if (fboundp 'auto-image-file-mode) (auto-image-file-mode 1))
;; «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)))
;; For the lua manual
;; «lua-manual» (to ".lua-manual")
;;
(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"))
;; «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-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-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")
;; (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))))
;; «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")
(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"))
;;-------------------------------------------------
;; «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-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)
;; (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."
nil
" 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")
;;
;; 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 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"))
(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)
;;---------------------
;; «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)
;;-----------------------------
;; «eeblogme» (to ".eeblogme")
;;
;; (find-blogmefile "")
(code-c-d "blogme" "~/blogme/" :anchor)
(code-c-d "blogme3" "~/blogme3/" :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))
;;------------------------------------------------/
(defun u8-to-l1 (s e)
(interactive "r")
(shell-command-on-region s e "recode u8..l1" nil t))
(defun find-file-this-line () (interactive)
(find-file (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 "")
;;---------------------------------------------
;; «dotemacs.private» (to ".dotemacs.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-elnode "Testing Accessibility" "file-readable--p")
; (find-fline "~/.emacs.private")
(if (file-readable-p "~/.emacs.private")
(load-library "~/.emacs.private"))
;;-----------------------------------------
;; «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 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-links-for-findxxxw3m (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-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)
(code-c-d-anchor "eeva" "$EEVDIR/article/")
(code-c-d-old "eeva" "$EEVDIR/article/" :anchor :xdvi)
;; (find-eevafile "")
;;-----------------------------
;; «source2e» (to ".source2e")
;; «classes.dtx» (to ".classes.dtx")
;; (find-es "tex" "source2e.dvi")
;; (find-es "tex" "classes.dtx-dvi")
(code-c-d "source2e" "~/usrc/latex/base/")
(code-dvi "source2e" "~/usrc/latex/base/source2e.dvi")
(code-pdftotext "source2e" "~/usrc/latex/base/source2e.pdf")
(code-dvi "lclasses" "~/usrc/latex/base/classes.dvi")
(code-pdftotext "lclasses" "~/usrc/latex/base/classes.pdf")
;; (find-source2efile "")
;; (find-source2epage 1)
;; (find-source2etext)
;; (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")
'(
;; Old:
(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'.")
;; «find-source2epage» (to ".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")
(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-pdftotext "texbook" (ee-texbookfile "texbook.pdf"))
;; (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-fline (ee-amslmathfile ""))
;; (find-pspage (ee-amslmathfile "amsldoc.pdf"))
;; (find-pspage-links '(ee-amslmathfile "amsldoc.pdf"))
(code-ps "amsldoc" (ee-amslmathfile "amsldoc.pdf"))
(code-pdftotext "amsldoc" (ee-amslmathfile "amsldoc.pdf"))
;; (find-amsldocpage 1)
;; (find-amsldoctext)
;; (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/")
;; (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 *")
;;---------[ 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")
(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)))
;;---------------------------------
;; «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)
;;-----------------------
;; «rcirc» (to ".rcirc")
;; (to "erc-freenode-join")
;; (find-es "emacs" "rcirc")
;;
(code-c-d "rcirc" "~/usrc/rcirc/")
;; (add-to-list 'load-path "~/usrc/rcirc/")
;; (add-to-list 'load-path "~/usrc/rcirc/" 'append)
(require 'rcirc nil 'no-error)
(defun rcirc-freenode-old () (interactive)
(rcirc "irc.freenode.net" 6667 "edrx"
'("#debian-rj" "#eev" "#emacs" "#rcirc")))
;; (find-node "(rcirc)Configuration")
;; (rcirc-freenode)
;; (find-efunction 'rcirc)
;; (find-efunction 'rcirc-connect)
;; (rcirc-connect server port nick user-name full-name startup-channels)
;; (find-node "(rcirc)Configuration")
;; http://freenode.net/irc_servers.shtml
;;
(defun rcirc-freenode () (interactive)
(rcirc-connect "irc.freenode.net" "6667" "edrx"
"Eduardo Ochs <http://angg.twu.net/>"
"Eduardo Ochs <http://angg.twu.net/>"
'("#eev" "#emacs" "#lua" ;; "#forth"
"##forth" "#coq" "#maxima" ;; "#forthcafe" "#tcl"
;; "#truta.org" "#omnisys"
;; "#rcirc"
;; "#fvwm"
;; "#ruby-lang"
;; "#debian-rj"
;; "#concatenative" "#debian-br" "#fvwm" "#gimp"
;; "#gnu-smalltalk" "#squeak" "#uclibc" "Txt2tags"
)))
(defun rcirc-oftc () (interactive)
(rcirc-connect "irc.oftc.net" "6667" "edrx"
"Eduardo Ochs <http://angg.twu.net/>"
"Eduardo Ochs <http://angg.twu.net/>"
'("#swig")))
(defun rcirc-bitlbee () (interactive)
(rcirc-connect "im.bitlbee.org" "6667" "edrx"))
(defun rcirc-steps ()
(interactive)
(find-angg ".emacs" "rcirc")
(require 'rcirc)
(global-set-key [f2] 'rcirc-next-active-buffer)
;; (define-key rcirc-mode-map (kbd "C-c C-s") 'rcirc-save-buffer)
(define-key rcirc-mode-map (kbd "C-x C-s") 'save-buffer-keep-buffer-name)
(setq rcirc-time-format "")
(setq rcirc-read-only-flag nil)
(setq rcirc-user-full-name "Eduardo Ochs <http://angg.twu.net/>")
;; (find-efunction 'rcirc)
;; (find-efile "net/rcirc.el")
(setq rcirc-prompt "(%n) ")
;; (find-ecolors)
;; (set-face-background 'rcirc-prompt-face bg)
(when (= emacs-major-version 21)
(make-face 'rcirc-prompt-face)
(set-face-foreground 'rcirc-prompt-face "sienna") ;; old rcirc
)
(when (>= emacs-major-version 22)
(rcirc-track-minor-mode 1) ;; new rcirc
(make-face 'rcirc-mode-line-nick)
(set-face-foreground 'rcirc-prompt "sienna") ;; new rcirc
(set-face-foreground 'rcirc-mode-line-nick "sienna") ;; new rcirc
(set-face-bold-p 'rcirc-mode-line-nick nil) ;; new rcirc
(setq rcirc-show-maximum-output nil)
(make-face 'rcirc-track-nick)
(set-face-foreground 'rcirc-track-nick "sienna")
(set-face-inverse-video-p 'rcirc-track-nick nil)
(make-face 'rcirc-nick-in-message-full-line)
(set-face-bold-p 'rcirc-nick-in-message-full-line nil)
)
;; (progn (setq rcirc-prompt "<%n> ") (rcirc-set-prompt))
(message "%S"
(eesteps '(
(rcirc-freenode)
(rcirc-bitlbee)
(switch-to-buffer "&bitlbee@im.bitlbee.org")
;; (eek0 "identify xxx\r")
(eek0 (format "identify %s\r" (passwds-tcl-get "bitlbee")))
))))
;; (find-rcircfile "")
;; (find-rcircfile "rcirc.el")
;; (find-efunction 'save-buffer)
;; (find-eCfunction 'rename-buffer)
;; (find-elnode "Buffer File Name")
;; (find-elnode "Buffer File Name" "Command: set-visited-file-name")
;; Hackish, mainly for rcirc
;;
(defun save-buffer-keep-buffer-name (&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)
;; Fossils - for old rcircs only
'(
(make-face 'rcirc-special-modeline-face)
(set-face-foreground 'rcirc-special-modeline-face "sienna")
(defun rcirc-activity-string-for-buffer (b)
"Return how the name of a buffer B looks in the mode-line string."
(let ((s (rcirc-short-buffer-name b)))
(with-current-buffer b
(if (not (eq rcirc-activity-type 'nick))
s
(rcirc-facify s 'rcirc-special-modeline-face)))))
;; (find-rcircfile "rcirc.el" "defun rcirc-update-activity-string")
(defun rcirc-update-activity-string ()
"Update mode-line string."
(setq rcirc-activity-string
(if (not rcirc-activity)
""
(concat " [" (mapconcat 'rcirc-activity-string-for-buffer
rcirc-activity ",") "]"))))
)
;; Abbreviations for channel names
;; From ayrnieu - 2005aug05
;; http://paste.lisp.org/display/10527
'(
;;; added to rcirc.el
(defvar rcirc-abbreviated-channels nil
"Alist of channels to specially abbreviate in the modeline.
Each element looks like (CHANNEL . ABBREVIATION).
E.g., ((\"#vectorprogramming\" . \"#vp\")).")
;;; modified in rcirc.el
(defun rcirc-short-buffer-name (buffer)
"Return a short name for BUFFER to use in the modeline indicator."
(with-current-buffer buffer
(let ((bn (or rcirc-target (process-name rcirc-process))))
(or (cdr (assoc bn rcirc-abbreviated-channels)) bn))))
;;; added to ~/.emacs
(add-to-list 'rcirc-abbreviated-channels '("#emacs-br" . "#eb"))
(add-to-list 'rcirc-abbreviated-channels '("#opensolaris" . "#os"))
)
;;---------------------------------------------------------------
;; 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
;; 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)
(setq ibuffer-default-sorting-mode 'major-mode)
;; (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))
(defun find-ecolors (&rest pos-spec-list)
(interactive)
(apply 'find-ebuffer-or-output "*Colors*" '(list-colors-display)
pos-spec-list))
;; «find-eunicode» (to ".find-eunicode")
;; «find-eunicodeucs» (to ".find-eunicodeucs")
;; Inspired by:
;; http://www.kollektiv-hamburg.de/~forcer/unicode-helper.el
;; Try it on this: (find-echarsetchars 'mule-unicode-0100-24ff "733x")
;; Try also this: (eesteps '((find-eoutput '(ucs-insert "203D")) "M-h M-n"))
;;
;; (find-efunction 'ucs-insert)
;; (find-efile "international/ucs-tables.el")
;;
;; (find-debpkg-links "unicode-data")
(setq ee-unicode-data-file "/usr/share/unicode/UnicodeData.txt") ; <- for etch
(defvar ee-unicode-data-file "/usr/share/unidata/UnicodeData-4.0.1d1b.txt")
(defun find-eunicode (&rest pos-spec-list)
(apply 'find-fline ee-unicode-data-file pos-spec-list))
(defun find-eunicodeucs (c &rest pos-spec-list)
(interactive (list (char-after (point))))
(apply 'find-eunicode (format "\n%04X" (encode-char c 'ucs)) pos-spec-list))
(define-key eev-mode-map "\M-h\M-n" 'find-eunicodeucs)
;; (find-echarsetchars 'mule-unicode-0100-24ff "272x")
;;
(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)))
;; (global-set-key (kbd "s-s") 'scroll-bar-mode)
(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-d") 'display-time-mode)
(defalias 'sbm 'scroll-bar-mode)
(defun myskel-diag (name)
(format "\
%%D diagram %s
%%D 2Dx 100
%%D 2D 100
%%D 2D
%%D 2D
%%D 2D
%%D 2D +20
%%D 2D
%%D ((
%%D
%%D ))
%%D enddiagram
$$\\diag{%s}$$" name name))
(defun idiagskel () (interactive)
(let (name)
(beginning-of-line)
(setq name (buffer-substring (point) (point-at-eol)))
(delete-region (point) (point-at-eol))
(insert (myskel-diag name))))
;; (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>")
;; «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/")
;; «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 "#string.len")
;; «luamanual-51» (to ".luamanual-51")
;; (find-lua51file "doc/")
(code-c-d "luamanual" (ee-lua51file "doc/manual.html"))
;; (find-lua50file "")
;; (find-lua50file "doc/manual.html")
;; (find-lua50w3m "doc/manual.html")
;; (find-lua50w3m "doc/manual.html#vararg")
;; (find-lua50manualw3m "#vararg" "arg={2, 3; n=2}")
(code-c-d "lua50manual" (ee-lua50file "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)))
(define-key eev-mode-map "\M-h\M-l" 'find-luamanualw3m+)
(define-key eev-mode-map "\M-h\M-L" 'find-luamanual-ff)
(code-c-d "luagtk" "~/usrc/lua-gtk2-0.3/")
;; (find-luagtkfile "")
;; (find-es "lua5" "luagtk")
;; (find-es "lua5" "luagtk_pixmaps")
(defun re (&rest rest) (interactive)
(apply 'find-sh "wget -q -O - http://angg.twu.net/re" rest))
;; (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))))
;; (find-rcircfile "rcirc.el" "defface rcirc-prompt-face")
(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/angg.twu.net/math/2002cms.dvi.gz")
(code-dvi "2002fmcs" "$S/http/angg.twu.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))))
;; «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)))
(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.
;;;;;;
;;
;; 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"))
;; «smalltalk» (to ".smalltalk")
(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
;; (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"
))
;; «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")
(defvar eejump-alist ())
(defun eejump-define (number sexp)
(if sexp
(setq eejump-alist (ee-aset eejump-alist number sexp))
(setq eejump-alist (ee-adel eejump-alist number))
sexp))
;; An example:
' (eejump-define
2 ' (progn (eek "C-x 1")
(find-mediadorparatifile "billing/ivr/carga_billing.sh")
(eek "C-x 3 C-x o")
(find-mediadorparatifile "billing/sms/carga_billing.sh")
)
)
;; «eejump-plists» (to ".eejump-plists")
;;
(defun has-prefix (prefix numberorstring)
"Return t if NUMBERORSTRING begins with PREFIX."
(ee-prefixp (format "%s" prefix) (format "%s" numberorstring)))
(defun eejump-to-plist (arg plistvar)
(let* ((plist (symbol-value plistvar))
(entry (plist-get plist arg)))
(if entry (eval entry)
(find-evariable plistvar))))
;; (defvar eejump-plist-2 nil)
;; (setq eejump-plist-2 '(
;; 2 (find-fline "~/HALLOWEEN/2.lua")
;; 21 (find-fline "~/HALLOWEEN/libs.lua")
;; 22 (find-fline "~/HALLOWEEN/main.lua")
;; 23 (find-fline "~/HALLOWEEN/porttoc.c")
;; 233 (find-fline "~/HALLOWEEN/porttoc.lua")
;; 24 (find-fline "~/HALLOWEEN/hallnotes.org")
;; 26 (fs)
;; ))
;; ((eq arg 20) (find-es "tcl"))
;; ((eq arg 29) (find-fline "~/bin/bscat.lua"))
;; 33 (progn (eek "C-x 1") (find-miniforthfile "miniforth3.lua")
;; (eek "C-x 3 C-x o") (find-blogmefile "blogme2-inner.lua")
;; (eek "C-x 2 C-x o") (find-blogmefile "blogme2-inner.lua")
;; (eek "C-x o"))
;; 34 (progn (eek "C-x 1") (find-miniforthfile "miniforth3.lua")
;; (eek "C-x 3") (eepitch-miniforth))
;; 35 (find-anggfile "CV/cv-edrx-2006-pt.tex")
;; 36 (find-anggfile "CV/cv-edrx-2006-en.tex")
;; 38 (find-angg ".zshrc" "music_dirs")
;; 330 (find-miniforthfile "miniforth3.lua")
;; 31 (find-es "lua5" "lpeg-quickref")
;; 311 (find-lpegfile "lpeg.c")
;; 314 (find-lpegw3m "doc.html")
(defvar eejump-plist-2 nil)
(setq eejump-plist-2 '(
20 (find-booksfile "")
;20 (find-blogme3file "")
200 (find-angg "TH/blogme3.blogme")
204 (find-angg "TH/blogme3-angg.blogme")
21 (find-blogme3file "anggdefs.lua")
22 (find-blogme3file "brackets.lua")
23 (find-blogme3file "charset.lua")
24 (find-es "davinci")
241 (find-angg "DAVINCI/intro.lua")
242 (find-angg "TH/davinci.blogme")
;; 24 (find-blogme3file "definers.lua")
25 (find-es "iup")
251 (find-blogme3file "elisp.lua")
252 (find-blogme3file "escripts.lua")
26 (find-blogme3file "anggmake.lua")
266 (find-angg "TH/Files.tcl")
27 (find-blogme3file "angglisp.lua")
29 (find-blogme3file "blogme3.lua")
299 (find-blogme3file "notes.e.lua")
))
(defvar eejump-plist-3 nil)
(setq eejump-plist-3 '(
30 (find-es "lua5")
300 (find-angg "LUA/lua50init.lua")
301 (find-es "lua-intro")
302 (find-es "lua-intro" "bytecode:captures")
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")
377 (find-angg "LUA/interactive.lua")
38 (find-angg "TH/luainteractive.blogme")
39 (find-angg "elisp/cheap-face.el")
))
(defvar eejump-plist-4 nil)
(setq eejump-plist-4 '(
4 (find-angg ".zshrc")
;; 40 (find-rumifile "RUMI/")
;; 41 (find-rumifile "RUMI/index.blogme")
;; 42 (find-rumifile "RUMI/notes.e")
42 (find-angg "LATEX/2009dnc-in-coq.tex")
43 (find-TH "math-b")
;44 (find-es "netbsd" "cvs-emacs-at-caramelo")
;44 (find-dn4 "dednat4.el")
44 (find-dn4 "dednat4.lua")
45 (find-dn4 "experimental.lua")
455 (find-dn4 "examples/")
46 (find-dn4 "Makefile")
48 (find-dn4ex "edrx08.sty")
))
(defvar eejump-plist-5 nil)
(setq eejump-plist-5 '(
5 (find-angg ".emacs")
51 (find-angg "TEXINFO/eev.texi.lua")
511 (find-node "(eev)introduction")
508 (find-dn4ex "edrx08.sty")
52 (find-angg ".emacs.papers")
53 (find-angg ".emacs.templates")
;53 (find-eev "eev-mini.el")
535 (find-eev "eev-mini-steps.el")
;54 (find-TH "eev-article")
54 (find-eev "eev-math-glyphs.el")
55 (find-eev "eev.el")
;56 (find-eev "eev-sshot.el")
56 (find-es "eev")
590 (find-eev "eev-code-old.el")
59 (find-eev "eev-code.el")
554 (find-es "eev" "dh-make-2")
555 (find-eev "")
5554 (find-eev "debian/")
))
;; not being used yet
(defvar eejump-plist-7 nil)
(setq eejump-plist-7 '(
70 (find-fline "~/ORG/Lyrics.org")
71 (find-LATEX "")
72 (find-ebuffer "#lua@irc.freenode.net")
75 (find-ebuffer "#emacs@irc.freenode.net")
76 (find-ebuffer "#eev@irc.freenode.net")
))
;; «eejump» (to ".eejump")
(define-key eev-mode-map "\M-j" 'eejump)
;;
;; (rcirc-steps)
;; (find-efunction 'rcirc-steps)
(defun eejump (arg) (interactive "P")
(cond ((ee-aref eejump-alist arg) (eval (ee-aref eejump-alist arg)))
((eq arg 1) (find-fline (or (getenv "TODOFILE") "~/TODO")))
((eq arg 12) (eek "C-x 1 C-x rja C-x 3 C-x o C-x rjb"))
((eq arg 141) (find-es "coq"))
((eq arg 144) (find-ebuffer "#coq@irc.freenode.net"))
((eq arg 15) (find-LATEX "2009dnc-in-coq.tex"))
((eq arg 15) (find-omnisys-links))
((eq arg 155) (find-es "blogme" "a2html-at-zumbi"))
((eq arg 125) (find-es "lua5"))
((eq arg 16) (find-es "print" "print-tmp.dvi-dvired"))
;; ((eq arg 17) (find-fline "~/LATEX/sisrot-pdsw-2.tex"))
((eq arg 17) (find-sidebyside
;; ' (find-fline "$S/http/zumbi/wiki/note.engsoft.PDSw")
' (find-fline "~/LATEX/sisrot-pdsw-2.tex")
' (find-fline "~/LATEX/sisrot-pdsw-3.txt")
))
((eq arg 18) (find-sidebyside
;; ' (find-fline "~/LATEX/sisrot-pdsw-workplan.txt")
' (find-fline "~/ORG/index.org")
' (find-fline "~/LATEX/sisrot-pdsw-5.tex")
;; '(find-fline "~/LATEX/sisrot-da-1.tex")
))
;; ((eq arg 18) (find-sidebyside '(eek "M-0 M-j") '(find-es "sisrot")))
((eq arg 19) (psne-log))
((has-prefix "2" arg) (eejump-to-plist arg 'eejump-plist-2))
((has-prefix "3" arg) (eejump-to-plist arg 'eejump-plist-3))
((has-prefix "4" arg) (eejump-to-plist arg 'eejump-plist-4))
((has-prefix "5" arg) (eejump-to-plist arg 'eejump-plist-5))
((has-prefix "7" arg) (eejump-to-plist arg 'eejump-plist-7))
;; ((eq arg 41) (find-eevfile "slides/"))
;; ((eq arg 42) (find-eevfile "slides/dec2006-pt.txt"))
((eq arg 6) (find-es "gforth"))
((eq arg 8) (find-es "page" "upload-edrx.tgz-with-rsync"))
((eq arg 80) (find-TH "2010.1"))
((eq arg 81) (find-TH "2010.1-MD"))
((eq arg 82) (find-TH "2010.1-C2"))
((eq arg 83) (find-LATEX "2009-micropol.tex"))
((eq arg 811) (find-LATEX "2009-2-MD-prova-1.tex"))
((eq arg 812) (find-LATEX "2009-2-MD-prova-1-notas.tex"))
((eq arg 813) (find-LATEX "2009-2-MD-comparacao.tex"))
((eq arg 814) (find-LATEX "2009-2-MD-prova-2.tex"))
((eq arg 821) (find-LATEX "2009-2-C2-prova-1.tex"))
((eq arg 822) (find-LATEX "2009-2-C2-prova-1-notas.tex"))
((eq arg 823) (find-LATEX "2009-2-C2-lista-1.tex"))
((eq arg 824) (find-LATEX "2009-2-C2-prova-2.tex"))
((eq arg 841) (find-LATEX "2009-2-C4-prova-1.tex"))
((eq arg 842) (find-LATEX "2009-2-C4-prova-1-notas.tex"))
((eq arg 843) (find-LATEX "2009-2-C4-prova-2.tex"))
;; ((eq arg 8245) (find-LATEX "2009-2-C4-lista-P2.tex"))
((eq arg 84) (find-TH "2009.2-C4"))
((eq arg 85) (find-LATEX "2009unilog-dnc.tex"))
((eq arg 855) (find-LATEX "2010-1-MD-aulas.tex"))
((eq arg 850) (find-LATEX "2010-1-MD-plano-de-aulas.tex"))
((eq arg 851) (find-TH "2009-cola"))
((eq arg 852) (find-LATEX "forest.tex"))
;; ((eq arg 851) (find-LATEX "2008filterp.tex"))
;; ((eq arg 852) (find-LATEX "2008sheaves.tex"))
((eq arg 853) (find-LATEX "2008graphs.tex"))
((eq arg 857) (find-LATEX "2009-nd-in-hyps.tex"))
((eq arg 858) (find-LATEX "2009dnc-monads.tex"))
((eq arg 87) (find-LATEX "2009-defesa.tex"))
;; ((eq arg 82) (find-TH "plurall"))
;; ((eq arg 85) (find-es "plurall"))
((eq arg 88) (find-pen-links))
((eq arg 888) (find-es "lenny" "syncing-the-edrx.tgzs"))
;; ((eq arg 88) (find-es "page" "rumi_dl_angg_install"))
;; ((eq arg 88) (find-es "page" "download-edrx.tgz-and-sync"))
;; ((eq arg 888) (find-es "page" "upload-o.tgz"))
;; ((eq arg 8888) (find-es "page" "download-o.tgz-and-sync"))
((eq arg 9) (find-LATEX "2009-planodetrabalho.tex"))
;; ((eq arg 9) (find-fline "~/ORG/projects.org"))
((eq arg 91) (find-TH "2009.1-C1"))
((eq arg 911) (find-LATEX "2009-1-C1-prova-2.tex"))
((eq arg 92) (find-TH "2009.1-C2"))
((eq arg 94) (find-TH "2009.1-MD"))
((eq arg 93) (find-LATEX "catsem.bib"))
((eq arg 96) (find-LATEX "filters.bib"))
;; ((eq arg 9) (find-es "icon"))
;; ((eq arg 90) (find-angg "ICON/iconlua.c"))
((eq arg 99) (find-orgfiles))
((eq arg 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")
((eq arg 100) (set-frame-font "nil2"))
;; ((eq arg 10) (set-frame-font "micro"))
;; (find-fline "/usr/share/fonts/X11/misc/fonts.alias")
((eq arg 10) (ee-set-frame-font "5x7" t))
((eq arg 11) (ee-set-frame-font "fixed" t))
((eq arg 13) (ee-set-frame-font "9x15" t))
((eq arg 14) (ee-set-frame-font "10x20" t))
((eq arg 22) (set-frame-font "terminus-16"))
;; ((eq arg 33) (set-frame-font "terminus-bold-16"))
(t (find-efunction 'eejump))))
;; ((eq arg 4) (find-es "dvd"))
;; ((eq arg 5) (find-eev "eev.el"))
;; ((eq arg 6) (find-fline "~/elisp/sshot.el"))
;; ((eq arg 6) (find-eev "eev-mini.el"))
;; ((eq arg 44) (eek "C-x 1") (find-fline "/tmp/.files.there.e"))
;; ((eq arg 50) (find-eev "eev-sshot.el"))
;; ((eq arg 66) (find-fline "~/ORG/Mediador.org"))
;; ((eq arg 77) (find-fline "~/ORG/Titan.org"))
;; ((eq arg 12) (set-frame-font "8x13"))
;; ((eq arg 13) (set-frame-font "9x15"))
;; ((eq arg 2) (find-fline "~/.emacs"))
;; ((eq arg 3) (find-anchor "~/.emacs" "eejump"))
;; ((eq arg 2) (find-fline "~/org/blogme.org"))
;; ((eq arg 4) (find-fline (org-today-file-name)))
;; ((eq arg 4) (find-ebuffer "#debian-rj@irc.freenode.net"))
;; ((eq arg 6) (find-eev "eev-bounded.el"))
;; ((eq arg 5) (find-ebuffer "#eev@irc.freenode.net"))
;; ((eq arg 8) (upload-changes))
;; 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-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))))
;; 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/")
(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)
(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))
'(
(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)))
)
(defun eepitch-Twu () (interactive) (eepitch-comint "Twu" "Twu"))
(defun eepitch-Twu () (interactive) (eepitch-comint "Twu" "autopasswd ssh -C edrx@angg.twu.net"))
;; (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"))
;; (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))
;; (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)
(if (= emacs-major-version 22)
(add-to-list 'load-path "~/usrc/tramp/lisp/"))
;; «ruby» (to ".ruby")
;;
(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-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))
(code-c-d "e" ee-emacs-lisp-directory "emacs" :grep)
(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 "")
;; 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-old "psql" "~/usrc/postgresql-7.4.13/src/bin/psql/" :gdb :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")
(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))
(define-key eev-mode-map "\M-hc" 'find-C-links)
;; Test with M-h c on this: printf
;; «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")))
(eeurl-define-from :fname->action: 'find-a2ps-file
:local: 'bra2psl
:dired: 'bra2psd)
(eeurl-define-from :fname->action: '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)
;; 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))))))
;; (find-eevfile "eev.el" "'eemklinks-yank-pos-spec")
;;
(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")
;;
(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))
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-pdftotext (fname &rest rest)
(apply 'find-sh (format "pdftotext -layout %s -" fname) rest))
(defun find-pdfpage-pdftotext (fname &rest rest)
(apply 'find-sh (format "pdftotext -layout %s -" fname) rest))
(eeurl-define-from :fname->action: 'find-pdftotext
:local: 'brpdftxtl
:dired: 'brpdftxtd)
(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))
;; «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-old "mediadorsj" "~/usrc/mediador/" :grep :tkdiff :foo)
(code-c-d "dialogex" "/usr/share/doc/dialog/examples/" :grep)
;; «bash» (to ".bash")
;; (find-es "bash" "bash-3.1-info")
;; (find-es "bash" "bashfaq")
(code-c-d "bashfaq" "$S/ftp/ftp.cwru.edu/pub/bash/")
(code-c-d "bashsrc" "~/usrc/bash-3.1/")
;; (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")
(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
(defun figlet-region (s e)
(interactive "r")
(shell-command-on-region s e "figlet -f standard | gsub.lua '' '--- %1'" nil t))
(defun figlet-region (s e)
(interactive "r")
(shell-command-on-region s e "figlet -f standard | gsub.lua '' ';;; %1'" nil t))
(defun figlet-region (s e)
(interactive "r")
(shell-command-on-region s e "figlet -f standard | gsub.lua '' '%% %1'" nil t))
(defun figlet ()
"Run `figlet-region' on the current line."
(interactive)
(figlet-region (ee-bol) (1+ (ee-eol))))
;; «eshell» (to ".eshell")
;; 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-blogmefile "blogme2-outer.lua" "unaccent_from, unaccent_to =")
;; (find-efunction 'translate-region)
;; (find-node "(recode)Concept Index")
(defun unaccent (s e)
(interactive "r")
(let ((coding-system-for-read 'latin-1-unix)
(coding-system-for-write 'latin-1-unix))
(shell-command-on-region
s e
(concat "tr 'ÀÁÂÃÄÅÇÈÉÊËÌÍÎÏÑÒÓÔÕÖØÙÚÛÜÝàáâãäåçèéêëìíîïñòóôõöøùúûüý'"
" 'AAAAAACEEEEIIIINOOOOOOUUUUYaaaaaaceeeeiiiinoooooouuuuy'")
nil t)))
;; «flip-psne-ness» (to ".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-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-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)
;; «find-ekbmacro-links» (to ".find-ekbmacro-links")
(define-key eev-mode-map "\M-hM" 'find-ekbmacro-links)
(defun find-ekbmacro-links () (interactive)
(find-elinks `(
(find-ekbmacro-links)
""
(format-kbd-macro last-kbd-macro)
(setq last-kbd-macro (kbd ,(format-kbd-macro last-kbd-macro)))
)))
;; «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.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")
(eeurl-define-from :url->action: 'find-dpkg-build-escript
:remote: 'brdsc
:dired: 'brdscd)
;; 2006sep09 - overrides the default
;; «find-file-links» (to ".find-file-links")
;; (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://angg.twu.net/%s" homeless-fname)
,(format "http://angg.twu.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 ee-split (str) (if (stringp str) (split-string str "[ \t]+") str))
(defun ee-unsplit (list) (if (listp list) (mapconcat 'identity list " ") list))
(defun ee-split-and-expand (str) (mapcar 'ee-expand (ee-split str)))
(defun ee-no-trailing-nl (str) (replace-regexp-in-string "\n$" "" str))
(defun find-bgprocess-ne (program-and-args)
(let ((argv (ee-split program-and-args)))
(apply 'start-process (car argv) "*Messages*" argv)))
(defun find-callprocess00-ne (program-and-args)
(let ((argv (ee-split program-and-args)))
(with-output-to-string
(with-current-buffer standard-output
(apply 'call-process (car argv) nil t nil (cdr argv))))))
(defun find-callprocess0-ne (program-and-args)
(ee-no-trailing-nl (find-callprocess00 program-and-args)))
(defun find-comintprocess-ne (name program-and-args)
(let ((argv (ee-split program-and-args)))
(apply 'make-comint name (car argv) nil (cdr argv))
(switch-to-buffer (format "*%s*" name))))
(defun find-bgprocess (program-and-args)
(find-bgprocess-ne (ee-split-and-expand program-and-args)))
(defun find-callprocess00 (program-and-args)
(find-callprocess00-ne (ee-split-and-expand program-and-args)))
(defun find-callprocess0 (program-and-args)
(find-callprocess0-ne (ee-split-and-expand program-and-args)))
(defun find-comintprocess (name program-and-args)
(find-comintprocess-ne name (ee-split-and-expand program-and-args)))
)
;;
(defun find-xzgv (dir)
(find-bgprocess `("xzgv" ,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-ps "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-bigdvdcopy-script "/oldfs/dvds/senhordasarmas.iso" 9)
;; (find-bigdvdcopy-script "/oldfs/dvds/noitescomsol.iso" 10)
;; (find-bigdvdcopy-script "/oldfs/dvds/cache.iso" 30)
;; (find-bigdvdcopy-script "/oldfs/dvds/solaris1.iso" 10)
;; (find-bigdvdcopy-script "/oldfs/dvds/solarisdossier.iso" 10)
;; (find-bigdvdcopy-script "/oldfs/dvds/sacrificio.iso" 10)
;; (find-bigdvdcopy-script "/oldfs/dvds/ozu.iso" 99)
;; (find-bigdvdcopy-script "/oldfs/dvds/medea.iso" 99)
;; (find-bigdvdcopy-script "/oldfs/dvds/muppetshow1.iso" 10)
;; (find-bigdvdcopy-script "/oldfs/dvds/muppetshow2.iso" 10)
;; (find-bigdvdcopy-script "/oldfs/dvds/meaningoflife.iso" 10)
;; (find-bigdvdcopy-script "/oldfs/dvds/thunderbirds6.iso" 10)
;; (find-bigdvdcopy-script "/oldfs/dvds/thunderbirdsarego.iso" 53)
;; (find-bigdvdcopy-script "/oldfs/dvds/felakuti.iso" 13)
;; (find-bigdvdcopy-script "/oldfs/dvds/florespartidas.iso" 53)
;; (find-bigdvdcopy-script "/oldfs/dvds/lavoura.iso" 9)
;; (find-bigdvdcopy-script "/oldfs/dvds/lavoura2.iso" 9)
;; (find-bigdvdcopy-script "/oldfs/dvds/ran.iso" 10)
;; (find-sh0 "sudo umount /tmp/dvd/; rmdir /tmp/dvd/; rm /tmp/dvd")
;; (find-sh0 "ln -s /oldfs/dvds/ran /tmp/dvd")
;; (find-fline "/tmp/dvd/")
;; (find-bigdvdcopy-script "/oldfs/dvds/tagliaferro.iso" 13)
;; (find-bigdvdcopy-script "/oldfs/dvds/noivasiria.iso" 10)
;; (find-bigdvdcopy-script "/oldfs/dvds/capote.iso" 13)
;; (find-bigdvdcopy-script "/oldfs/dvds/brancaleone.iso" 13)
;; (find-bigdvdcopy-script "/oldfs/dvds/ultimotango.iso" 99)
;; ^libdvdread: Error cracking CSS key for /VIDEO_TS/VTS_01_0.VOB (0x000006b5)
;; (find-bigdvdcopy-script "/oldfs/dvds/ytumamatambien.iso" 99)
;; (find-bigdvdcopy-script "/oldfs/dvds/querelle.iso" 99)
;; (find-bigdvdcopy-script "/oldfs/dvds/fightclub.iso" 99)
;; http://www.tac.mta.ca/tac/volumes/17/1/17-01.dvi
;; http://www.tac.mta.ca/tac/volumes/18/2/18-02.dvi
(code-dvi "ragsgames" "$S/http/www.tac.mta.ca/tac/volumes/18/2/18-02.dvi")
(code-dvi "barrchu2006" "$S/http/www.tac.mta.ca/tac/volumes/17/1/17-01.dvi")
;; (find-barrchu2006page 1)
;; (find-ragsgamespage 1)
;; (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")
;; «slime» (to ".slime")
;; (find-es "lisp" "slime")
;;
;; 2007mar17:
;; <lisppaste> edrx pasted "problem with M-x slime" at
;; http://paste.lisp.org/display/38274
;;
(add-to-list 'load-path "~/usrc/slime-2.0/")
(setq inferior-lisp-program "/usr/bin/sbcl")
(autoload 'slime "slime" nil t)
(eval-after-load "slime" '(slime-setup :autodoc t))
;; «find-template-untgz» (to ".find-template-untgz")
;; «bruntgz» (to ".bruntgz")
;; (bruntgz "http://common-lisp.net/project/slime/slime-2.0.tgz")
(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)))
(defun ee-template-untgz (url &optional c)
(let* ((shortlurl (eeurl-u-to-f 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))
(eeurl-define-from :url->action: 'find-template-untgz
: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))
(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))
(eeurl-define-from :url->action: '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)))
(eeurl-define-from :url->action: 'find-code-ps-url-links
:remote: 'brcps)
(eeurl-define-from :url->action: 'find-code-xpdf-url-links
:remote: 'brcxpdf)
;; «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)
(eeurl-define-from :url->action: '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")
;; «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")
;;
(defun ee-shrink-sexp (sexp)
(if (eq (car sexp) 'find-esfile)
`(find-es ,(substring (nth 1 sexp) 0 -2) ,@(cddr sexp))
(let* ((headname (symbol-name (car sexp)))
(last4chars (substring headname -4))
(-last4chars (substring headname 0 -4)))
(if (equal last4chars "file")
`(,(intern -last4chars) ,@(cdr sexp))))))
(defun ee-shrink-hyperlink-at-eol ()
(interactive)
(end-of-line)
(let* ((beg (save-excursion (eek-backward-sexp)))
(sexp (read (buffer-substring beg (point))))
(shrunksexp (ee-shrink-sexp sexp)))
(when shrunksexp
(delete-region beg (point))
(insert (ee-pp0 shrunksexp)))))
(define-key eev-mode-map "\M-h\M--" '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 ee-concat (list &optional sep)
(mapconcat 'identity list (or sep "")))
(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-efunction 'find-face-definition)
;; (find-efunction 'find-definition-noselect)
;; (find-egrep "grep -nH -e find-face-definition C*")
;;
(defun find-eface (face &rest pos-spec-list)
"Hyperlink to the result of running `find-face-definition' on FACE.
The `find-face-definition' function of Emacs can be used as a hyperlink
- it finds the Elisp source code of SYMBOL -, but it doesn't
support a POS-SPEC-LIST like this function does."
(interactive (find-function-read 'defface))
(apply 'find-ebufferandpos (find-definition-noselect face 'defface)
pos-spec-list))
;; «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:")))
(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-old "rubysrc" "~/usrc/ruby1.8/ruby1.8-1.8.5/" :grep :gdb)
(code-c-d-old "rubysrc" "~/usrc/ruby1.8/ruby1.8-1.8.5/build-tree/ruby-1.8.5/" :grep :gdb)
;; (find-rubyri "Test::Unit")
(defun find-rubyri (name &rest rest)
(apply 'find-sh (format "PAGER=cat ri1.8 '%s'" name) rest))
(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-ps "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-ps "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-ps "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"))))
;; «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-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.
;; «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://angg.twu.net/%s" fnamestem)
,(format "# http://angg.twu.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)
)))
(eeurl-define-from :fname->action: 'find-unpack-chm-links
:local: 'brunchml
:dired: 'brunchmd)
;;; _
;;; ___ ___ _ __ (_) ___
;;; / _ \/ _ \ '_ \| |/ __|
;;; | __/ __/ |_) | | (__
;;; \___|\___| .__/|_|\___|
;;; |_|
;;
;; «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" "gpic")
(code-ps "esrpic" "/usr/share/doc/groff-base/pic.ps.gz")
(defun find-esrpictext (&rest rest)
(apply 'find-sh "zcat /usr/share/doc/groff-base/pic.txt.gz | col -b" rest))
;;
;; (find-esrpicpage 12 "9. Naming Objects")
;; (find-esrpictext "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)
(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)
""
"* (eechannel-xterm \"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")
""
(find-fline ,homedir)
,(format "cd %s" homedir)
,(format "su - %s" username)
,(format "%s" password)
,(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")
(defun find-galeon (url &optional rest)
(interactive "sURL: ")
(find-bgprocess `("galeon" ,url))
url)
(eeurl-define-from :url->action: 'find-galeon
:remote: 'brg
:local: 'brgl
:dired: 'brgd)
;; (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)
(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-old "scite174" "~/usrc/scite174/" :grep :gdb)
;; «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-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-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")
;; 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)
(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)
;; «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))
(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)
;; «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))
;; "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/")
(code-c-d "dotfirefox" "~/.mozilla/firefox/c6mxiweo.default/")
;; (code-c-d "dotfirefox" "~/.mozilla/firefox/z84co3t8.default/")
;; (code-c-d "dotfirefox" "~/.mozilla/firefox/ftc9fs06.default/")
;; (find-dotfirefoxfile "")
;; (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")
;; «mozrepl» (to ".mozrepl")
;; (find-es "javascript" "mozrepl")
;; 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
(code-c-d "mozlab" (ee-dotfirefoxfile "extensions/mozlab@hyperstruct.net/"))
(code-c-d "mozlab" (ee-dotfirefoxfile "extensions/mozrepl@hyperstruct.net/"))
(code-c-d "mozrepl" (ee-dotfirefoxfile "extensions/mozrepl@hyperstruct.net/"))
;; (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-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)
(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-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")
;;
(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))
(defun find-sh0-if (okmsg command)
(let ((output (find-sh0 command)))
(if (equal output okmsg) (message "ok") (find-estring output))))
;; «blogme3» (to ".blogme3")
(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)))
;; «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))))
;; «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)
;; «.emacs.papers» (to "..emacs.papers")
;; (find-angg ".emacs.papers")
(load "~/.emacs.papers")
;; «.emacs.templates» (to "..emacs.templates")
;; (find-angg ".emacs.templates")
(load "~/.emacs.templates")
;; «find-urlretrieve» (to ".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**)
;; This block is several hours older than the one below -
;; ignore this one.
;; (find-efunction 'find-callprocess0-ne)
;; (setq myurl "http://angg.twu.net/eev-current/eev-math-glyphs.el")
;; (find-eoutput '(insert (find-wget00u myurl)))
(defun ee-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-raw-text-unix `(find-wget00 ,url)))
;; «find-wget» (to ".find-wget")
;; «brwget» (to ".brwget")
;; (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://angg.twu.net/eev-current/eev-math-glyphs.el")
;; (find-wget "http://angg.twu.net/eev-current/eev-math-glyphs.el")
;; (find-wget "http://angg.twu.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))
(eeurl-define-from :url->action: '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 (colorstr &rest rest)
(interactive (list 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
")
;; «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 (eek-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 (eek-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://angg.twu.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)))
(message "Line 8706")
;; «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:edrsh@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-ps "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-ps "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-ps "pdsw_AO" "$S/http/zumbi/~andre/_/resources/project/ArchitectureOverview.pdf")
(code-pdftotext "pdsw_AO" "$S/http/zumbi/~andre/_/resources/project/ArchitectureOverview.pdf")
(code-ps "pdsw_PMG" "$S/http/zumbi/~andre/_/resources/project/ProjectMgtGuidelines.pdf")
(code-pdftotext "pdsw_PMG" "$S/http/zumbi/~andre/_/resources/project/ProjectMgtGuidelines.pdf")
(code-ps "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-ps "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://angg.twu.net/>"
"Eduardo Ochs <http://angg.twu.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
;; Moved to:
;; (find-eev "eev-browse-url.el" "find-psne-links")
'(
;; «find-psne-links» (to ".find-psne-links")
;; «brep» (to ".brep")
;; Tests:
;; (ee-psne-wget-lines "http://angg.twu.net/index.html")
;; (find-psne-links "http://angg.twu.net/index.html")
;; (brep "http://angg.twu.net/index.html")
(defun ee-psne-wget-lines (url)
(let* ((localurl (replace-regexp-in-string
"^\\(https?\\|ftp\\)://" "$S/\\1/" url))
(localdir (file-name-directory localurl)))
(list (format "mkdir -p %s" localdir)
(format "cd %s" localdir)
(format "wget %s" url)
(format "echo '%s' >> ~/.psne.log" url))))
(defun find-psne-links (url &rest rest)
(find-elinks `(
(find-psne-links ,url ,@rest)
,(ee-addhp url)
nil
"* (eepitch-shell)"
,@(ee-psne-wget-lines url)
)))
(eeurl-define-from :url->action: 'find-psne-links
:remote: 'brep)
;; «ee-cp» (to ".ee-cp")
;; http://article.gmane.org/gmane.emacs.bugs/17178
(defun ee-cp (from to &optional ok-flag)
(require 'dired)
(let ((tramp-verbose 0))
(dired-copy-file from to ok-flag)))
;; «find-ecp0» (to ".find-ecp0")
(defalias 'find-ecp0 'ee-cp)
)
;; «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))
(message "Line 9074")
;; «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...
;; (find-edrx-update-links)
;; Based on: (find-eev-update-links)
;; (find-efunction 'find-eev-update-links)
(defun find-edrx-update-links (&rest rest)
(interactive)
(apply 'find-elinks `(
(find-edrx-update-links ,@rest)
(find-efunction 'find-edrx-update-links)
""
,(format "* (eepitch-shell)")
,(format "cd")
,(format "mv -v edrx.tgz edrx-old.tgz")
,(format "wget http://angg.twu.net/edrx.tgz")
,(format "tar -xvzf edrx.tgz")
""
(find-es "emacs" "emacs-from-cvs")
(find-es "lua5" "install-5.1.2")
(find-es "lua5" "install-5.1.2" "mkdir")
(find-es "lua5" "install-5.1.2" "cp -iv lua ~/bin/lua51")
(find-es "lua5" "lpeg-0.7")
) rest))
;; (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@angg.twu.net:/home/edrx/public_html/"
:wget "http://angg.twu.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" "")
(eev-math-glyphs-set 'eev-glyph-face-cfont-b "^b" "^b" "")
(eev-math-glyphs-set 'eev-glyph-face-cfont-c "^c" "^c" ""))
;; «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-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)
(defun eepitch-rubyforth (&optional rubyforthargs)
(interactive)
(ee-eepitch-comint (ee-rubyforthfile "")
(format "rubyforth%s" (or rubyforthargs ""))
(format "./rubyforth%s" (or rubyforthargs ""))))
(defun eepitch-pythonforth (&optional pythonforthargs)
(interactive)
(ee-eepitch-comint (ee-pythonforthfile "")
(format "pythonforth%s" (or pythonforthargs ""))
(format "./pythonforth%s" (or pythonforthargs ""))))
;; «eepitch-sisrotlua» (to ".eepitch-sisrotlua")
;; (find-angg "sisrot/")
(defun eepitch-sisrotlua (&optional rubyforthargs)
(ee-eepitch-comint "~/sisrot/" "sisrotlua" "lua51"))
;; «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"))
;; «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)
))))
(eeurl-define-from :url->action: '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://angg.twu.net/")
;; (find-eevfile "eev-browse-url.el" "'browse-url-firefox")
' (eeurl-define-from :url->action: 'find-windowsfirefox
:remote: 'brm
:local: 'brml
:dired: 'brmd)
(message "Line 9317")
;; «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
;; «metalua» (to ".metalua")
;; (find-es "lua5" "metalua")
(code-c-d "metalua" "~/usrc/metalua/")
(code-ps "metalua" (ee-metaluafile "doc/manual/metalua-manual.pdf"))
(code-pdftotext "metalua" (ee-metaluafile "doc/manual/metalua-manual.pdf"))
;; (find-metaluafile "")
;; (find-metaluapage 1)
;; (find-metaluatext 1)
;; «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 "*
"))
;; (cdr (assoc 15 (ee-unglyph-alist "*
")))
;;
' (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))
)
;; «sqlite» (to ".sqlite")
;; (find-es "sqlite")
(code-c-d "sqlitedoc" "/usr/share/doc/sqlite3-doc/")
(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)
;; «find-pen-links» (to ".find-pen-links")
;; (find-pen-links)
;; (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 (&rest rest)
"Visit a temporary buffer containing hyperlinks for pen drive operations."
(interactive)
(apply 'find-elinks `(
(find-pen-links ,@rest)
(find-man "8 mount" "Mount options for fat" "uid=value")
(find-sh "dmesg")
"
* (eepitch-shell)
mkdir /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/
# (find-fline \"/tmp/pen/\")
sudo umount /tmp/pen"
) 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-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))
(code-c-d "LATEX" "~/LATEX/" :anchor)
;; (find-code-c-d "LATEX" "~/LATEX/" :anchor :xdvi)
(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))
(message "Line 9730")
;; 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")
(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")
;;
(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 "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)
(cons (format "
(defun find-%sdvi (fname &rest rest)
(apply 'find-dvipage (ee-%sfile fname) rest))
" c c) (ee-code-c-d-rest rest)))
(code-c-d "LATEX" "~/LATEX/" :anchor :dvi)
;; (find-eevfile "eev.el" "\"\\M-S\"")
(define-key eev-mode-map "\M-L" 'ee-wrap-LATEX)
(defun ee-wrap-LATEX (&optional n)
(interactive "p")
(ee-delete-extract-wrap
(lambda (fname)
(let ((dvifname (replace-regexp-in-string "\\.tex$" ".dvi" fname)))
`((find-LATEX ,fname)
(find-LATEXdvi ,dvifname))))
n))
;; (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")
;;
(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"))
;;
(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-es "luatex" "luatex")
(code-c-d "luatex" "~/usrc/luatex-beta-0.30.1/")
(code-ps "luatexref" (ee-luatexfile "manual/luatexref-t.pdf"))
(code-pdftotext "luatexref" (ee-luatexfile "manual/luatexref-t.pdf"))
;; (find-luatexfile "")
;; (find-luatexfile "obsl")
;; (find-luatexrefpage 1)
;; (find-luatexreftext)
(defun eepitch-luatex () (interactive)
(ee-eepitch-comint
"/tmp/" "luatex"
(ee-luatexfile "linux/texk/web2c/luatex")))
;; «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)))
;; (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/angg.twu.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