Warning: this is an htmlized version!
The original is across this link,
and the conversion rules are here.
#######
#
# E-scripts on emacs things
#
# Note 1: use the eev command (defined in eev.el) and the
# ee alias (in my .zshrc) to execute parts of this file.
# Executing this file as a whole makes no sense.
#
# Note 2: be VERY careful and make sure you understand what
# you're doing.
#
# Note 3: If you use a shell other than zsh things like |&
# and the for loops may not work.
#
# Note 4: I always run as root.
#
# Note 5: some parts are too old and don't work anymore. Some
# never worked.
#
# Note 6: the definitions for the find-xxxfile commands are on my
# .emacs.
#
# Note 7: if you see a strange command check my .zshrc -- it may
# be defined there as a function or an alias.
#
# Note 8: the sections without dates are always older than the
# sections with dates.
#
# This file is at <http://angg.twu.net/e/emacs.e>
#           or at <http://angg.twu.net/e/emacs.e.html>.
#        See also <http://angg.twu.net/emacs.html>,
#                 <http://angg.twu.net/.emacs[.html]>,
#                 <http://angg.twu.net/.zshrc[.html]>,
#                 <http://angg.twu.net/escripts.html>,
#             and <http://angg.twu.net/>.
#
#######





This file is being reorganized.

# «.installing»		(to "installing")
# «.indexing»		(to "indexing")

On documentation:
# «.zcatinfo»		(to "zcatinfo")
# «.etc»		(to "etc")
# «.eetc»		(to "eetc")
# «.emacs-faq»		(to "emacs-faq")
# «.saving_index_pages»	(to "saving_index_pages")
# «.elintro-nondeb»	(to "elintro-nondeb")
# «.elispman-nondeb»	(to "elispman-nondeb")
# «.elispman-nondeb-nonroot»  (to "elispman-nondeb-nonroot")
# «.elintro-nondeb-nonroot»  (to "elintro-nondeb-nonroot")
# «.help-gnu-emacs»	(to "help-gnu-emacs")
# «.tutorials»		(to "tutorials")

Keyboard, glyphs, X, input modes, macros:
# «.key_bindings»	(to "key_bindings")
# «.key_name»		(to "key_name")
# «.meta-shift-letter»  (to "meta-shift-letter")
# «.iso-accents»	(to "iso-accents")
# «.keymap2isoacc»	(to "keymap2isoacc")
# «.saving_emacs_macros»  (to "saving_emacs_macros")
# «.fontsets»		(to "fontsets")
# «.coding:»		(to "coding:")
# «.coding-systems»	(to "coding-systems")
# «.glyphs_X»		(to "glyphs_X")
# «.xmath-toggle»	(to "xmath-toggle")
# «.X_resources»	(to "X_resources")
# «.old_glyph_stuff»	(to "old_glyph_stuff")

The C source:
# «.emacs20-src»	(to "emacs20-src")
# «.tracing_the_glyph_bug»  (to "tracing_the_glyph_bug")
# «.emacs21»		(to "emacs21")
# «.emacs21-gdb»	(to "emacs21-gdb")
# «.emacs21-gdb_1»	(to "emacs21-gdb_1")

Other:
# «.interactive»	(to "interactive")
# «.tcsh_export»	(to "tcsh_export")
# «.debugging»		(to "debugging")
# «.debug.el»		(to "debug.el")
# «.edebug»		(to "edebug")
# «.call-interactively»	(to "call-interactively")
# «.easy-mmode»		(to "easy-mmode")
# «.replacing_in_strings»  (to "replacing_in_strings")
# «.temp-buffer»	(to "temp-buffer")
# «.scrolling_one_line»  (to "scrolling_one_line")
# «.ignoring_errors»	(to "ignoring_errors")
# «.pretty-printing»	(to "pretty-printing")
# «.mouse-select-window»  (to "mouse-select-window")
# «.gnuserv»		(to "gnuserv")

Parts of eev, or variations:
# «.inn-old»		(to "inn-old")
# «.eelatex-old»	(to "eelatex-old")
# «.mkto»		(to "mkto")
# «.new_goto-position»	(to "new_goto-position")

File variables:
# «.file-variables»	(to "file-variables")
# «.file-variables:eval»  (to "file-variables:eval")
# «.compile-command»	(to "compile-command")
# «.safe-local-variable»  (to "safe-local-variable")
# «.buffer-local»	(to "buffer-local")

# «.checkdoc»		(to "checkdoc")

Packages:
# «.w3»			(to "w3")
# «.C_indentation»	(to "C_indentation")
# «.calc»		(to "calc")
# «.life»		(to "life")
# «.nnml»		(to "nnml")
# «.hyperbole»		(to "hyperbole")
# «.dismal»		(to "dismal")
# «.packages»		(to "packages")

Interactive demos:

Etc/unclassified:
# «.describe-xxx_hyperls»  (to "describe-xxx_hyperls")
# «.customization-buffers»  (to "customization-buffers")
# «.man»		(to "man")
# «.xemacs21»		(to "xemacs21")
# «.faces»		(to "faces")
# «.split_eev»		(to "split_eev")
# «.ffap»		(to "ffap")
# «.erc»		(to "erc")
# «.erc-accents»	(to "erc-accents")
# «.spreadsheets»	(to "spreadsheets")
# «.ses»		(to "ses")
# «.spread»		(to "spread")
# «.emacspeak»		(to "emacspeak")
# «.emacspeak-eflite»	(to "emacspeak-eflite")
# «.setenv»		(to "setenv")
# «.menu-bar»		(to "menu-bar")
# «.menu-bar-entries»	(to "menu-bar-entries")
# «.beep-music»		(to "beep-music")
# «.dired»		(to "dired")
# «.SAR»		(to "SAR")
# «.syntax-tables»	(to "syntax-tables")
# «.trailing-whitespace-bug»	(to "trailing-whitespace-bug")
# «.face-glyph-bug»	(to "face-glyph-bug")
# «.backspaces»		(to "backspaces")
# «.ee-isearch»		(to "ee-isearch")
# «.ee-isearch-regexp»	(to "ee-isearch-regexp")
# «.calendar»		(to "calendar")
# «.diary»		(to "diary")
# «.emacs21-string-glyph-bug»	(to "emacs21-string-glyph-bug")
# «.customize-face»	(to "customize-face")
# «.kill-ring»		(to "kill-ring")
# «.regexp-syntax»	(to "regexp-syntax")
# «.C-h-after-prefix»	(to "C-h-after-prefix")
# «.emacs-from-git»	(to "emacs-from-git")
# «.emacs-from-cvs»	(to "emacs-from-cvs")
# «.texinfo-4.6»	(to "texinfo-4.6")
# «.autoconf-2.59»	(to "autoconf-2.59")
# «.eshell»		(to "eshell")
# «.font-and-geometry»	(to "font-and-geometry")
# «.w3m»		(to "w3m")
# «.w3m-forcing-html»	(to "w3m-forcing-html")
# «.w3m-upstream»	(to "w3m-upstream")
# «.find-face»		(to "find-face")
# «.c-mode-M-e»		(to "c-mode-M-e")
# «.eeplow»		(to "eeplow")
# «.gnus»		(to "gnus")
# «.http-emacs»		(to "http-emacs")
# «.tetris»		(to "tetris")
# «.tron»		(to "tron")
# «.planner-nondebian»	(to "planner-nondebian")
# «.planner»		(to "planner")
# «.loop»		(to "loop")
# «.overlays»		(to "overlays")
# «.enriched-mode»	(to "enriched-mode")
# «.outline-mode»	(to "outline-mode")
# «.emms»		(to "emms")
# «.max-lisp-eval-depth»  (to "max-lisp-eval-depth")
# «.writing-primitives»	(to "writing-primitives")
# «.mode-line»		(to "mode-line")
# «.generic-x»		(to "generic-x")
# «.key-translations»	(to "key-translations")
# «.propertize»		(to "propertize")
# «.keymap-property»	(to "keymap-property")
# «.frames»		(to "frames")
# «.scroll-bars»	(to "scroll-bars")
# «.ebnf2ps»		(to "ebnf2ps")
# «.find-eCfunction»	(to "find-eCfunction")
# «.keywords»		(to "keywords")
# «.timers»		(to "timers")
# «.hooks»		(to "hooks")
# «.apt-cache-pkgsearch»	(to "apt-cache-pkgsearch")
# «.color-theme.el»		(to "color-theme.el")
# «.fontify-whole-buffer»	(to "fontify-whole-buffer")
# «.key-sequence-echo-message»	(to "key-sequence-echo-message")
# «.ee-stuff-around-point»	(to "ee-stuff-around-point")
# «.datatypes»			(to "datatypes")
# «.disassemble»		(to "disassemble")
# «.erc-bugs»			(to "erc-bugs")
# «.rcirc»			(to "rcirc")
# «.htmlfontify»		(to "htmlfontify")
# «.htmlfontify-old»		(to "htmlfontify-old")
# «.mkhtml»			(to "mkhtml")
# «.emacs-bidi»			(to "emacs-bidi")
# «.kill-buffer-protect»	(to "kill-buffer-protect")

# «.x-symbol»			(to "x-symbol")
# «.buttons»			(to "buttons")
# «.bhl»			(to "bhl")
# «.with-output-to-temp-buffer»	(to "with-output-to-temp-buffer")
# «.find-wottb-call»		(to "find-wottb-call")
# «.flet»			(to "flet")
# «.iswitchb»			(to "iswitchb")
# «.help-C-file-name»		(to "help-C-file-name")
# «.arabic-fonts»		(to "arabic-fonts")
# «.dont-font-lock-this»	(to "dont-font-lock-this")
# «.transparence-in-keymaps»	(to "transparence-in-keymaps")
# «.greek»			(to "greek")
# «.greek-input-methods»	(to "greek-input-methods")
# «.math-chars-in-X»		(to "math-chars-in-X")
# «.fontsets-cvs»		(to "fontsets-cvs")
# «.hello-world-eval-buffer»	(to "hello-world-eval-buffer")
# «.find-ekeymapdescr»		(to "find-ekeymapdescr")
# «.find-node_index»		(to "find-node_index")
# «.edb»			(to "edb")
# «.prefix-macro»		(to "prefix-macro")
# «.prefix-region»		(to "prefix-region")
# «.mode-line-face-borderless»	(to "mode-line-face-borderless")
# «.window-configurations»	(to "window-configurations")
# «.emacs-wget»			(to "emacs-wget")
# «.load-history»		(to "load-history")
# «.dired-and-tar-mode»		(to "dired-and-tar-mode")
# «.box-chars»			(to "box-chars")
# «.emacsclient-and-multi-tty»	(to "emacsclient-and-multi-tty")
# «.palette»			(to "palette")
# «.letf»			(to "letf")
# «.fontset-math-chars-bug»	(to "fontset-math-chars-bug")
# «.emacs-cvs-mkto-bug»		(to "emacs-cvs-mkto-bug")
# «.creating-utf8-files»	(to "creating-utf8-files")
# «.skeletons»			(to "skeletons")
# «.Help:IPA»			(to "Help:IPA")
# «.display-table-latin-1»	(to "display-table-latin-1")
# «.sony-fixed»			(to "sony-fixed")
# «.find-fontset-links»		(to "find-fontset-links")
# «.ee-font-unalias»		(to "ee-font-unalias")
# «.ee-set-frame-font»		(to "ee-set-frame-font")
# «.font-log»			(to "font-log")
# «.glyphs-as-conses»		(to "glyphs-as-conses")
# «.case-in-replace-regexp»	(to "case-in-replace-regexp")
# «.time-stamp»			(to "time-stamp")
# «.anchors-in-latin-1»		(to "anchors-in-latin-1")
# «.anchors-in-latin-1-2»	(to "anchors-in-latin-1-2")
# «.gdb-ing-emacs»		(to "gdb-ing-emacs")
# «.lenny-emacs-init»		(to "lenny-emacs-init")
# «.bitmap-mule»		(to "bitmap-mule")
# «.rudel»			(to "rudel")
# «.comint-gets-stuck»		(to "comint-gets-stuck")
# «.comint-process-echoes»	(to "comint-process-echoes")
# «.ee-gformat»			(to "ee-gformat")
# «.gdb-mi»			(to "gdb-mi")
# «.C-mode»			(to "C-mode")
# «.tramp»			(to "tramp")
# «.tramp-from-git»		(to "tramp-from-git")
# «.load-new-tramp»		(to "load-new-tramp")
# «.tramp-2.1.9»		(to "tramp-2.1.9")
# «.tramp-plink»		(to "tramp-plink")
# «.password-cache»		(to "password-cache")
# «.multi-hop»			(to "multi-hop")
# «.cua-mode»			(to "cua-mode")
# «.undo-boundary»		(to "undo-boundary")
# «.backup-inhibited»		(to "backup-inhibited")
# «.defvaralias»		(to "defvaralias")
# «.gud-fringe»			(to "gud-fringe")
# «.frame-geometry»		(to "frame-geometry")
# «.adjust-geometry»		(to "adjust-geometry")
# «.fontify-as-info»		(to "fontify-as-info")
# «.adjust-PATH»		(to "adjust-PATH")
# «.emacsconf»			(to "emacsconf")
# «.smie»			(to "smie")
# «.define-minor-mode»		(to "define-minor-mode")
# «.eww»			(to "eww")
# «.term»			(to "term")
# «.emacsconf-2013»		(to "emacsconf-2013")
# «.elscreen»			(to "elscreen")
# «.emacs-web-server»		(to "emacs-web-server")




# This was a primitive version of "mkto":

(setq last-kbd-macro
  (read-kbd-macro "C-a 3*<right> NUL C-e <left> ESC w C-e 2*SPC (to SPC \".
		   C-y \") C-a <down> RET <up> # SPC C-q \\256 . C-y C-q \\257
		   2*SPC (to SPC \" C-y \") C-a <down>"))



#####
#
# Installing Emacs and friends on a Potato system
# 2001jan07
#
#####

# «installing»  (to ".installing")
apt-get install emacs20 emacs20-el gnuserv elisp-manual emacs-lisp-intro
apt-get install w3-el-e20 w3-el-doc w3-el-lisp

# «indexing»  (to ".indexing")
cd /usr/share/emacs/20.7/lisp/
etags $(find * -name '*.el')
glimpseindex -H . -y $(find * -name '*.el')
#
#cd /usr/share/emacs/19.34/lisp/
#etags *.el term/*.el
#glimpseindex -H . -y *.el term/*.el


#
emacs20
emacs20-el
gnuserv
elisp-manual
emacs-lisp-intro
w3-el-e20
w3-el-doc
w3-el-lisp




#####
#
# grepping emacs' info docs
# 2004feb11
#
#####

# «zcatinfo»  (to ".zcatinfo")
# (find-angg ".zshrc" "zcatinfo")
#*
# zcatinfo /usr/share/info/emacs-e20      > /tmp/emacs20.info
zcatinfo /usr/share/info/emacs-21/emacs   > /tmp/emacs.info
zcatinfo /usr/share/info/elisp            > /tmp/elisp.info
zcatinfo /usr/share/info/emacs-lisp-intro > /tmp/elintro.info
#*

#*
# Very old:
zcatinfo /usr/share/info/elisp     > /tmp/elisp.info
zcatinfo /usr/share/info/emacs-lisp-intro > /tmp/elintro.info
#*
# (find-fline "/tmp/emacs.info")
# (find-fline "/tmp/elisp.info")
# (find-fline "/tmp/elintro.info")

# (to "buffer-local")




#####
#
# The "etc" dir
# 2000dec02
#
#####

# «etc»  (to ".etc")
# (find-status "emacs20")
# (find-vldifile "emacs20.list")
# (find-fline "/usr/doc/emacs20/")

# (find-eetcfile "")
# (find-eetcfile "" "OOOOONEWS")
# (find-eetcfile "OOOOONEWS" "Changes in Emacs 1.1\n")
# (find-eetcfile "OOOOONEWS" "Changes in Emacs 1.12")
# (find-eetcfile "OOOOONEWS" "Changes in Emacs 13")
# (find-eetcfile "OOOONEWS")
# (find-eetcfile "OOONEWS")
# (find-eetcfile "OONEWS")
# (find-eetcfile "ONEWS")
# (find-eetcfile "NEWS")

# (find-eetcfile "")
# (find-eetcfile "GNU")
# (find-eetcfile "INTERVIEW")
# (find-eetcfile "MOTIVATION")
# (find-eetcfile "MOTIVATION" "old joke")
# (find-eetcfile "WHY-FREE")
# (find-eetcfile "copying.paper")

#*
cd /usr/share/emacs/20.7/etc/
cp -v refcard.tex /tmp/
cd /tmp/
tex refcard.tex
xdvi refcard.dvi &
#*

# (find-eetcfile "refcard.tex")
# (find-eetcfile "")




#####
#
# The "etc" dir of emacs21 and emacs-cvs
# 2004apr05
#
#####

# «eetc»  (to ".eetc")
# (find-status "emacs21")
# (find-vldifile "emacs21.list")
# (find-fline "/usr/doc/emacs21/")

# (code-c-d "eetc21"  "/usr/share/emacs/21.2/etc/")
# (code-c-d "eetccvs" "~/bigsrc/emacs/etc/")
# (find-eetc21file "")
# (find-eetccvsfile "")




#####
#
# emacs faq
# 2000mar02
#
#####

# «emacs-faq»  (to ".emacs-faq")
# (find-fline "$S/http/www.lerner.co.il/emacs/faq.texinfo.gz")
# (find-fline "/usr/share/info/emacs-21/")
# (find-node "(emacs-21/efaq)Top")

#*
rm -Rv /tmp/efaq/
mkdir /tmp/efaq/
cd /tmp/efaq/
cp -iv $S/http/www.lerner.co.il/emacs/faq.texinfo.gz .
gzip -dv faq.texinfo.gz
makeinfo -o emacs-faq.info faq.texinfo
gzip -9v *.info *.info-*
cp -v *.gz /usr/info/

# (find-node "(/tmp/efaq/emacs-faq)Top")

# (find-es "dpkg" "install-info")
cd /tmp/efaq/
install-info --section "Emacs" "Emacs-FAQ:" --description="Emacs FAQ." \
  /usr/info/emacs-faq

#*

# (find-efaqnode "Top")

# But there's a textmode version in Emacs' "etc" dir:
# (find-e20file "help.el" "view-emacs-FAQ")
# (find-e20file "help.el" "defun view-emacs-FAQ")
# (view-emacs-FAQ)
# (find-eetcfile "FAQ")





#####
#
# Saving the index pages of the Emacs manuals
# 2000oct10
#
#####

# «saving_index_pages»  (to ".saving_index_pages")

(progn (find-elnode "Index")
       (ee-write (point-min) (point-max) "" "" "/tmp/el")
       (find-enode "Key Index")
       (ee-write (point-min) (point-max) "" "" "/tmp/ek")
       (find-enode "Command Index")
       (ee-write (point-min) (point-max) "" "" "/tmp/em")
       (find-enode "Variable Index")
       (ee-write (point-min) (point-max) "" "" "/tmp/ev")
       (find-enode "Concept Index")
       (ee-write (point-min) (point-max) "" "" "/tmp/en"))

# (find-fline "/tmp/ek")
# (find-fline "/tmp/el")
# (find-fline "/tmp/em")
# (find-fline "/tmp/en")
# (find-fline "/tmp/ev")




#####
#
# The elisp and emacs-lisp-intro manuals (on crappy RedHat boxes)
# 2001nov17
#
#####

# «elispman-nondeb»  (to ".elispman-nondeb")
# «elintro-nondeb»  (to ".elintro-nondeb")
# anonftp ftp://ftp.unicamp.br/pub/gnu/emacs/
#*
cd ~/tmp/
wget -c ftp://ftp.unicamp.br/pub/gnu/emacs/emacs-lisp-intro-1.05.tar.gz
wget -c ftp://ftp.unicamp.br/pub/gnu/emacs/elisp-manual-20-2.5.tar.gz

#*
rm -Rv $usr_src/emacs-lisp-intro-1.05/
cd $usr_src/
tar -xvzf ~/tmp/emacs-lisp-intro-1.05.tar.gz
cd $usr_src/emacs-lisp-intro-1.05/

makeinfo emacs-lisp-intro.texi
gzip -v9 emacs-lisp-intro.info*

#*
cd $usr_src/emacs-lisp-intro-1.05/
rm -v /usr/share/info/emacs-lisp-intro.info*
cp -v emacs-lisp-intro.info* /usr/share/info/

#*
rm -Rv $usr_src/elisp-manual-20-2.5/
cd $usr_src/
tar -xvzf ~/tmp/elisp-manual-20-2.5.tar.gz
cd $usr_src/elisp-manual-20-2.5/

gzip -v9 elisp elisp-*

#*
rm -v /usr/share/info/elisp*
cp -v elisp.gz elisp-* /usr/share/info/

#*
# «elispman-nondeb-nonroot»  (to ".elispman-nondeb-nonroot")
# «elintro-nondeb-nonroot»  (to ".elintro-nondeb-nonroot")
# Or, to install everything in ~/info/:
# (find-angg ".emacs" "info-path")
# (find-elnode "Top")
# (find-elinode "Top")
mkdir ~/info/

cd $usr_src/emacs-lisp-intro-1.05/
rm -v ~/info/emacs-lisp-intro.info*
cp -v emacs-lisp-intro.info* ~/info/

cd $usr_src/elisp-manual-20-2.5/
rm -v ~/info/elisp*
cp -v elisp.gz elisp-* ~/info/

#*
# Usually the index of the available info files is kept in a file with
# one of the four names below (the find-file constructs are hyperlinks):
#
# (find-file "/usr/info/dir")
# (find-file "/usr/info/dir.gz")
# (find-file "/usr/share/info/dir")
# (find-file "/usr/share/info/dir.gz")

# You may want to add the following entries to the "dir" file,
# possibly in the section "GNU Emacs" (note that the entries start
# with a "*"!):

* Elisp: (elisp).          Emacs Lisp Reference Manual.
* Emacs-lisp-intro: (emacs-lisp-intro). Elementary introduction to programming
                             in Emacs Lisp.

# Note: if you are trying to edit a dir.gz file and Emacs20 isn't
# decompressing .gz files transparently you may need to run this:
#
# (load-library "jka-compr")

# These are direct links to the info pages of these manuals:
# (Info-goto-node "(elisp)Top")
# (Info-goto-node "(emacs-lisp-intro)Top")





#####
#
# help-gnu-emacs archives
# 2000aug12
#
#####

# «help-gnu-emacs»  (to ".help-gnu-emacs")
#*
rm -Rv /tmp/help-gnu-emacs/
mkdir  /tmp/help-gnu-emacs/
cd $S/ftp/ftp-mailing-list-archives.gnu.org/mailing-lists/help-gnu-emacs/
cp -iv * /tmp/help-gnu-emacs/
cd /tmp/help-gnu-emacs/
gzip -dv *

#*
cd /tmp/help-gnu-emacs/
grep -i glyph *
#*
cd /tmp/help-gnu-emacs/
mutt -R -f help-gnu-emacs.20000101
#*

# (find-fline "/tmp/help-gnu-emacs/help-gnu-emacs.20000101")




#####
#
# Tutorials
# 2001jan21
#
#####

# «tutorials»  (to ".tutorials")
# (find-htetfile "Emacs-Beginner-HOWTO.txt.gz")




#####
#
# key bindings
# 2000oct22
#
#####

# «key_bindings»  (to ".key_bindings")
# (find-angg ".emacs" "key_bindings")
# (find-elnode "Keymaps")
# (find-elnode "Active Keymaps")
# current-local-map

# (find-elnode "Changing Key Bindings" "`(control ?a)'")

# But what is the clean way to make c-mode not override eev's M-e?
# (find-efile "progmodes/")
# (find-efile "progmodes/cc-langs.el")
# (find-efile "progmodes/cc-langs.el" "\"\\ee\"")
# (find-elnode "Active Keymaps" "`local-set-key'")
# (find-elnode "Active Keymaps" "current-local-map")

# The dirty way is to place a line like this in each C file with
# hyperlinks, and execute it by hand.
# (define-key c-mode-base-map "\ee" nil)

# I don't understand hooks well yet, but this trick from Luke (from
# the #emacs IRC channel) works ok:
#
# (find-angg ".emacs" "c-mode-hook")





#####
#
# Getting the name of a key
# 2000oct24
#
#####

# «key_name»  (to ".key_name")
# «call-interactively»  (to ".call-interactively")
# (to "pretty-printing")

# (find-enode "Function Keys")
# (find-enode "Function Keys" "`C-h c'")
# (find-enode "Function Keys" "vector\nsyntax")
# (find-enode "Function Keys" "[?\\C-x next]")
# (find-enode "Init Rebinding" "?\\C-=")

# Hey, why does this docstring say "KEY is a string"?
# (find-etag "describe-key")

# (find-elnode "Interactive Call" "Function: call-interactively")
# (describe-key [f3])
# (key-binding [f3])

(defun foo (key)
  "Display the internal representation of KEY as a Lisp object."
  (interactive "kKey: ")
  (message (format "%S" key)))

(call-interactively 'foo nil nil)

(call-interactively
  (lambda (key) "Get the representation of KEY as a Lisp object."
    (interactive "kKey: ")
    key)
  nil nil)




#####
#
# Locating the code that converts M-B to M-b when M-B is undefined
# 2000sep16
#
#####

# «meta-shift-letter»  (to ".meta-shift-letter")
# (find-angg "eev-extras.el" "eeg_in_emacs")

# 2005sep24:
# (find-enode "Key Sequence Input" "converted to lower case")

# These evaluate to different strings even in Emacs in console mode, see:
# "\M-b"
# "\M-B"
# (find-fline "~/MTA/Makefile" "loadkeys math850.map")
# (find-fline "~/MTA/math850.map" "48 = b")
# (eeman "5 keymaps" "action code is an ASCII char")

cd /usr/src/emacs20-20.7/
find | grep key

# (find-e20srcfile "src/" "key")
# (find-e20srcfile "src/keyboard.c")
# (find-e20srcfile "src/keyboard.c" "use the corresponding unshifted")
# (find-e20srcfile "src/keyboard.h")
# (find-e20srcfile "src/keymap.c")

# (find-e20srcfile "src/keymap.c" "define-key")




#####
#
# iso-accents (new)
# 2000oct19
#
#####

# «iso-accents»  (to ".iso-accents")
# (find-angg ".emacs" "iso-accents")

; (load-library "iso-acc")
; (find-efile "international/iso-acc.el")
; (iso-accents-customize "latin-1")
; (describe-variable 'iso-languages)
; (iso-accents-mode)

; (find-node "(elisp)Creating Strings")
; (aref [3 4 5 6] 2)
; (aref "3456" 2)
; (substring "abcdefg" 2)
; (describe-variable 'iso-languages)

(iso-accents-customize "latin-1")
(iso-accents-mode 1)
(iso-accents-mode nil)

; (describe-variable 'iso-languages)

(find-etag "iso-accents-accent-key")
(find-etag "iso-accents-compose")
(debug-on-entry 'iso-accents-compose)

international/mule-cmds.el:

; (find-etag "iso-accents-insert-offset")
; (describe-variable 'nonascii-insert-offset)

(setq iso-accents-insert-offset 0)


e20glimpse nonascii-insert-offset

; (find-efile "international/mule-cmds.el" "nonascii-insert-offset")
; (find-efile "international/mule-cmds.el" '* 2 "nonascii-insert-offset")
; (find-efile "international/mule-cmds.el" '* 3 "nonascii-insert-offset")
(find-etag "nonascii-insert-offset")

(insert-char (+ 2048 130) 1)

(iso-accents-compose "'"


Hi people,

I've found that iso-accents-mode has a strange behaviour when pushed
beyond its limits and I would like your advice on how to deal with it
elegantly. My two solutions at this moment are either to redefine the
function `iso-accents-compose' in my .emacs or to change the .el and
recompile the .elc, and I'm wondering if there's a better solution...
Please, this is only a *stylistic* question, and I *know* that I'm
being pretentious and futile, so by flaming me about that you won't be
telling me anything new... Directing me to other lists would be ok,
though. :-)

Here goes the description. Sorry for its length.

I have some MBs of notes in files written using a tweaked codepage 850
font in which some useless chars are replaced by mathematical symbols.
To edit these files I use GNU Emacs 20.7.2 in unibyte mode in a Linux
text console, setting the screen font to this font and adding some
"compose pairs" to the console keymap. When I enter a composite
character, for example by typing the sequence "<compose> ' e", Emacs
receives a "C-q" followed by the character 130.

I'm now trying to make these files editable under X-Windows, and for
that I'm adding a new language to iso-accents-mode. But there is a
problem: my font uses characters in the (deprecated!) range 128--159
and Emacs doesn't like them; when I type "'e" I get a beep, exactly as
if I had entered a char 130 without entering a C-q before.

The fix is to replace

	(vector
	 (if (and enable-multibyte-characters
		  (>= entry ?\200))
	     (+ iso-accents-insert-offset entry)
	   entry))

in the definition of `iso-accents-compose' by

        (vector (+ iso-accents-insert-offset entry))

to make all the composed characters be quoted; then 130 -> 2048+130,
that AFAIK in unibyte mode is inserted as a plain 130 instead of being
interpreted as a sort of C-M-b, and with that trick I can even use the
positions 0--31 of my font...

So, does anybody have any better ideas for working around that bug?
Ideally I would like to get something that worked in all recent GNU
Emacsen, as I use 20.7.2 on Debian GNU/Linux and BSDs, 20.3 on Debian
GNU/Hurd, and 20.4 on an Emacs-phobic RedHat box; I also use 19.34 in
smaller GNU/Linux machines, but in 19.34 there isn't even an
`iso-accents-insert-offset' variable...

Any ideas are welcome.



;; Fossils.

(load-library "iso-acc")

(setq iso-languages-orig iso-languages)

; (find-efile "international/iso-acc.el" "minor mode indicated")
(or (assq 'iso-accents-mode minor-mode-alist)
    (setq minor-mode-alist
 	  (append minor-mode-alist
 		  '((iso-accents-mode " ISO")))))

(defun iso-string-to-pairs (str)
  (if (equal str "") nil
    (let ((letter (aref str 0))
	  (accented-char (aref str 1))
	  (rest (substring str 2)))
      (cons (cons letter accented-char) (iso-string-to-pairs rest)))))

(defun iso-accents-by-strings (langname &rest pseudo-accent-strings)
  (setq iso-languages iso-languages-orig)
  (add-to-list
   'iso-languages
   (cons langname (mapcar (lambda (pseudo-accent-string) 
			    (cons (aref pseudo-accent-string 0)
				  (iso-string-to-pairs
				   (substring pseudo-accent-string 1))))
			  pseudo-accent-strings)))
  (iso-accents-customize langname)
  (iso-accents-mode 1))

(defun iso-math () (interactive)
  (if iso-accents-mode (iso-accents-mode 0)
    (iso-accents-by-strings "math850"
			    "'aáeéiíoóuúAÁEÉIÍOÓUÚcçCÇ<«>»"
			    "^aâeêoôuûAÂEÊOÔ"
			    "`aàeèiìoòuùAÀEÈOÒUÙ"
			    "~aãoõAÃOÕ"
			    "\"aäeëiïoöuüAÄOÖUÜ")))

(defalias 'iso- 'iso-math)
;;; Two important fossils: my original definitions for iso-math and
;; iso-alt-list; the present ones may not be working correctly (I'm in
;; the middle of the conversion from math850 to latinmath).
;;
'(defun iso-math () (interactive)
  (if iso-accents-mode (iso-accents-mode 0)
    (iso-accents-by-strings "math850"
			    "'a e‚i¡o¢u£AµEIÖOàUéc‡C€<®>¯"
			    "^aƒeˆo“u–A⊃EÒOâ"
			    "`a…eŠio•u—A·EÔOãUë"
			    "~aÆoäAÇOå"
			    "\"a„e‰i‹o”uAŽO™Uš")))
'(setq iso-alt-list
  '("&&" ?¥ "--" ?ª "-1" ?ü "-o" ?÷ ".." ?ö "/O" ? "88" ?ò "<<" ?®
    ">=" ?¸ ">>" ?¯ "AE" ?’ "CC" ?€ "In" ? "NN" ?¥ "Om" ?˜ "PP" ?ç
    "TT" ?õ "_a" ?¦ "_o" ?§ "ae" ?‘ "am" ? "bf" ? "bl" ?ð "bo" ?©
    "bq" ?Œ "ca" ?Þ "cc" ?‡ "cu" ?ç "dd" ? "ee" ? "ex" ?í "fa" ?ì
    "in" ?× "ka" ?† "ku" ?Ó "la" ? "ll" ?Ð "lo" ?∨ "na" ?¨ "nn" ?¤
    "nu" ?ê "o+" ?¾ "oo" ?½ "ot" ? "ox" ?Ï "pa" ?Ø "pe" ?Ñ "pp" ?è
    "ro" ? "ss" ?á "te" ? "to" ? "xx" ?ž))

;; «iso-accents-compose_redef»  (to ".iso-accents-compose_redef")

;; Redefine iso-accents-mode to make it treat some characters in weird
;; ranges in the right way; this is a workaround for a semi-bug that I
;; stumbled on.

(defun iso-accents-compose (prompt)
  (let* ((first-char last-input-char)
	 (list (assq first-char iso-accents-list))
	 ;; Wait for the second key and look up the combination.
	 (second-char (if (or prompt
			      (not (eq (key-binding "a")
				       'self-insert-command))
			      ;; Not at start of a key sequence.
			      (> (length (this-single-command-keys)) 1)
			      ;; Called from anything but the command loop.
			      this-command)
			  (progn
			    (message "%s%c"
				     (or prompt "Compose with ")
				     first-char)
			    (read-event))
			(insert first-char)
			(prog1 (read-event)
			  (delete-region (1- (point)) (point)))))
	 (entry (cdr (assq second-char list))))
    (if entry
	;; Found it: return the mapped char (* quoted! *)
	(vector (+ iso-accents-insert-offset entry))
      ;; Otherwise, advance and schedule the second key for execution.
      (setq unread-command-events
	    (cons (list second-char) unread-command-events))
      (vector first-char))))







'aáeéiíoóuúAÁEÉIÍOÓUÚcçC
^aâeêoôuûAÂEÊO
`aàeèiìoòuùAÀEÈOÒU
~aãoõAÃO
\"aäeëiïoöuüAÄOÖU



# (find-status "emacs19-el")
# (find-vldifile "emacs19-el.list")
# (find-fline "/usr/doc/emacs19-el/")

# (find-efile "international/iso-acc.el" "nonascii-insert-offset")
# (find-e19file "iso-acc.el")




#####
#
# keymap -> iso-acc compose tables
# 2001oct08
#
#####

# «keymap2isoacc»  (to ".keymap2isoacc")
# (find-angg "glyphs.el" "iso-alt")
#*
cat ~/vtutil/mathlatin.map \
  | grep '^compose' \
  > /tmp/oc
cat /tmp/oc | sort | uniq -d
cat /tmp/oc | cut -b-16 | sort | uniq -d
cat > /tmp/p <<'---'
  if (m/compose '\\?(.)' '\\?(.)' to '\\?(.)'/) {print "$1$2$3"}
  else {print $_}
---
cat /tmp/oc | perl -nl /tmp/p | sort | uniq > /tmp/oc2

cat /tmp/oc2 | grep    "^[\"'^\`~]"
#*
cat /tmp/oc2 | grep -v "^[\"'^\`~]"
#*
perl -e '
  sub qu { print "<$_[0]>\n"; return 0 }
  print qu("a");
  print qu("\""), "\n";
'
#
# cat /tmp/oc2 | grep    "^[\"'^\`~]" \
cat /tmp/oc2 | grep -v "^[\"'^\`~]" \
  | perl -nle '
      sub qu { $_=$_[0]; s/"/\\"/; $_ }
      if (($n++ % 8)==0) { printf "\n   " }
      m/(.)(.)(.)/; printf " \"%s%s\" ?%s", qu($1), qu($2), qu($3);
    ' \
  | tee ~/o
#*




#####
#
# Saving macros
# 00jan04
#
#####

# «saving_emacs_macros»  (to ".saving_emacs_macros")

# (find-enode "Save Kbd Macro")

# (find-efunction 'insert-kbd-macro)
# (find-efunction 'read-kbd-macro)
# (find-efunctiondescr 'execute-kbd-macro)
# (find-elnode "Creating Symbols")

# (find-efile "edmacro.el" "insert-kbd-macro")
# (find-efile "edmacro.el" "defun insert-kbd-macro")
# (find-efile "edmacro.el" "defun format-kbd-macro")
# (find-efile "macros.el" "defun insert-kbd-macro")
# (load-library "edmacro")
# (load-library "macros")

# (find-elnode "Keyboard Macros")
(execute-kbd-macro "hello")
(read-kbd-macro "C-x 2")
(format-kbd-macro "\C-x2")
(format-kbd-macro "\C-x2" t)

# (format-kbd-macro last-kbd-macro)

# (insert-kbd-macro (make-symbol ""))
# (insert (format "(setq last-kbd-macro (read-kbd-macro %S))" (format-kbd-macro)))

# (setq last-kbd-macro (read-kbd-macro "# SPC (find-vldifile SPC \" NUL C-e ESC w .list\") C-a <down> RET <up> # SPC (find-fline SPC \"/usr/doc/ C-y /\") C-a <down>"))

# (setq last-kbd-macro (read-kbd-macro "NUL <down> C-w <down> C-y 2*<up> ESC z SPC ESC z SPC { \\ al SPC C-a <down> ESC z 3*SPC C-a <down>"))


# (find-node "(elisp)Keyboard Macros")
# (find-eev "eev-mklinks.el" "dff")

(defun dff () (interactive)
  (execute-kbd-macro
   (read-kbd-macro "C-a # SPC (find-vldifile SPC \" NUL C-e ESC w .list\")
		    C-a <down> RET <up> # SPC (find-fline SPC \"/usr/doc/
		    C-y /\") C-a <down>")))




#####
#
# fontsets
# 2000oct12
#
#####

# «fontsets»  (to ".fontsets")
# (find-es "chinese" "chinese_and_fontset")

# (find-e20file "international/fontset.el")

# (set-frame-font "fontset-standard")
# (let ((default-enable-multibyte-characters t)) (find-eetcfile "HELLO"))

cp /usr/share/emacs/20.7/etc/HELLO ~/tmp/HELLO
# (let ((default-enable-multibyte-characters t)) (find-fline "~/tmp/HELLO"))

# (find-etag "describe-fontset")

# (list-fontsets 1)
# (describe-fontset)
# (describe-fontset "fontset-standard")
# (find-enode "Defining Fontsets")




#####
#
# coding systems
# 2005jan25
#
#####

# «coding-systems»  (to ".coding-systems")
# (find-eapropos "coding")
# buffer-file-coding-system

(describe-coding-system 'latin-1)
(describe-coding-system 'latin-9)

(describe-character-set 'ascii)
(progn (describe-character-set 'latin-iso8859-1)
       (ee-goto-position "Internal multibyte sequence: 81 XX"))

(find-efunctiondescr  ' unify-8859-on-encoding-mode)
(find-efunctiondescr  ' unify-8859-on-decoding-mode)




#####
#
# coding:
# 2000oct22
#
#####

# «coding:»  (to ".coding:")
# (to "buffer-local")
# (to "file-variables")
# (find-es "escripts" "adding_coding:")
# (find-enode "Coding Systems" "With `raw-text',")
# (find-enode "Coding Systems" "the coding system `no-conversion'")
# (find-fline "~/00jul21.popmail" "`coding:'")
# (find-enode "Recognize Coding" "-*-mode: C; coding:")





#####
#
# Notes on making my colored glyphs work on X
# 2000jun10
#
#####

# «glyphs_X»  (to ".glyphs_X")

gnudoit '(+ 1 2)'
gnudoit '(xxx-undefined)'

# (find-fline "~/glyphbug")

; For cp850:
;
(aset standard-display-table 174
      (vector (create-glyph (format "\e[32m%c\e[m" 174))))
(aset standard-display-table 175
      (vector (create-glyph (format "\e[32m%c\e[m" 175))))
(insert (format "%c%c" 174 175))

; Working version for X, using Gerd's hint:
;
(make-face 'eev-green)
(set-face-foreground 'eev-green "green")
(make-face 'eev-red)
(set-face-foreground 'eev-red "red")
(aset standard-display-table
  174 (vector (logior 171 (ash (face-id 'eev-green) 19))))
(aset standard-display-table
  175 (vector (logior 187 (ash (face-id 'eev-green) 19))))
(aset standard-display-table
  15 (vector (logior ?* (ash (face-id 'eev-red) 19))))
(insert (format "%c%c%c" 171 187 15))

# (find-e20file "term.el")
# (find-e20file "term.el" "\"yellow\"")
# (find-e20file "disp-table.el")

# Who is controlling the gnuserv?
#   window-system
gnudoit 'window-system'

(face-list)

# (find-enode "Faces")
# (find-elnode "Glyphs" "524288")
# (find-angg ".emacs" "glyphs512")

# (find-elnode "Face Functions")
# (find-elnode "Overlay Properties")
# (find-elnode "Overlay Properties" "`face'")
# (find-elnode "Overlay Properties" "foreground-color")
# (find-elnode "Overlay Properties" "overlay-get")
# (find-elnode "Managing Overlays")
# (find-elnode "Overlay Properties" "overlay-put")

# Works:
(overlay-put
  (make-overlay (point) (+ (point) 2) nil nil nil)
  'face 'edrx)
(overlays-in 0 (point-max))

# (find-elnode "Glyphs" "524288")
(aset standard-display-table ?« ?<)

# (find-e20file "disp-table.el")
# (find-e20file "disp-table.el" "defun create-glyph")
glyph-table





#####
#
# emacs20.7 source
# 2000aug12
#
#####

# «emacs20-src»  (to ".emacs20-src")
#
pdsc $SDEBIAN/dists/potato/main/source/editors/emacs20_20.7-2.dsc
cd /usr/src/emacs20-20.7/
  sleep 2; touch .stamp0; sleep 2
  find * | sort > .files
# rm -Rv $(find * | grep '\.elc$')
debian/rules binary	|& tee odrb
  find * -newer .stamp0 | sort > .files.post.stamp0
#

# (find-e20srcfile "")
# (find-e20srcfile "odrb")
# (find-e20srcfile "lisp/loadup.el")
# (find-e20srcfile ".files")
# (find-e20srcfile ".files.post.stamp0")
# (find-efile "loadup.el")

# (find-fline "$SDEBIAN/dists/potato/main/source/editors/")
# Try to regenerate all ".elc"s, the docstrings files, etc:

pdsc $SDEBIAN/dists/potato/main/source/editors/emacs20_20.7-2.dsc
cd /usr/src/emacs20-20.7/
find * | sort > ~/tmp/oemacs-files
# (find-fline "~/tmp/oemacs-files")

# (find-status "emacs20")
# (find-vldifile "emacs20.list")
# (find-fline "/usr/doc/emacs20/")

# (find-elnode "Documentation Basics")
# (find-fline "/usr/share/emacs/20.7/etc/DOC-20.7.2")

# Copy the .tar.gz to my freebsd partition (because its default emacs
# is broken).

cd $SDEBIAN/dists/potato/main/source/editors/
tar -tvzf emacs20_20.7.orig.tar.gz
mount -o remount,rw /freebsd/var
cp -iv emacs20_20.7.orig.tar.gz /freebsd/var/src/




#####
#
# interactive
# 2000oct22
#
#####

# «interactive»  (to ".interactive")
# (to "call-interactively")
# (find-elnode "Interactive Call")
# (find-elnode "Using Interactive")
# (find-elnode "Interactive Codes")
# (find-elnode "Interactive Examples")
# (find-elinode "Interactive")
# (describe-function 'interactive)
# (find-efile "help.el")
# (find-elnode "Sets And Lists" "Function: member")


(defun itest (&rest args) (interactive "r") (insert (format "%S\n" args)))
(defun itest (&rest args) (interactive "s") (insert (format "%S\n" args)))
(global-set-key "\M-g" 'itest)

(defun itest (&rest args) (interactive "sTwo-character code: ")
  (insert (format "%S\n" args)))





#####
#
# Notes on adapting eev.el to tcsh
# 2000febxx
#
#####

# «tcsh_export»  (to ".tcsh_export")
#*
cd /tmp/
expect -c 'spawn tcsh; puts "\n"; foreach li [split {\
echo $foo
foo=bar
set foo bar
echo $foo
set foo=bar
echo $foo
tcsh
  echo $foo
  exit
setenv foo bar
echo $foo
tcsh
  echo $foo
  exit
exit} "\n"] {
  expect "#"; send $li\n
}' | tee ~/o
#*
l -rf ~/o
#*




#####
#
# the "gawk" description of eev
# 2000mar14
#
#####

# (find-node "(emacs-e20)Lisp Libraries")
# «eev-gawkdescr»


  Hi. I have an Emacs Lisp package (eev.el) that is meant to let
  people share *nix tricks more easily and to make them addicted to
  source code and free software... here goes an example of how to use
  it: suppose that we're editing an ascii version of this text in an
  Emacs that has eev.el loaded (it was loaded with `(load-library
  "~/eev.el")', say). Then some portions of the block below can be
  interpreted in special ways:


# (code-c-d "gawk" "/usr/src/gawk-3.0.3/" "gawk")

rm -Rv /usr/src/gawk-3.0.3/
cd /usr/src/
dpkg-source -sn -x \
  /big/slinks2/dists/slink/main/source/interpreters/gawk_3.0.3-1.dsc
cd /usr/src/gawk-3.0.3/
debian/rules binary	|& tee odrb
etags *.[chy]

# (find-gawkfile "odrb" "strip")
# (find-gawkfile "debian/rules" "strip")
# In the top gawk dir there's a non-stripped binary; we use it.

# (find-gawknode "Numeric Functions")
# (find-gawkfile "awktab.c" "\"cos\"")
# (find-gawktag "do_cos")

cat > /tmp/awkprog <<'---'
BEGIN { print cos(0); }
---

%
br do_cos
set args -f /tmp/awkprog
run
p *tree
%
p *(tree->sub.nodep.l.lptr)
%
p *(tree->sub.nodep.l.ll)
%

# (gdb "gdb /usr/src/gawk-3.0.3/gawk")
# (find-gawktag "lnode")

# (find-angg "eev.el" "eev")
# (find-angg "eev.el" "code-c-d")
# (find-angg "eev.el" "code-c-d-explan1")
# (find-angg "eev.el" "code-c-d-explan2")
# (find-angg "eev.el" "gdb")
# (find-angg "eev.el" "bounded")


  Each expression within parentheses in a "#" line is in fact a block
  of Emacs Lisp code, that can be executed by placing the cursor just
  after the ")" and then typing C-x C-e (eval-last-sexp). The first of
  these expressions, the one that starts with "code-c-d", when
  executed will define many Lisp functions with "gawk" in their names,
  for example "find-gawkfile"; the third expression, `(find-gawkfile
  "debian/rules" "strip")', will open the file
  /usr/src/gawk-3.0.3/debian/rules and place the cursor right after
  the first occurrence of the string "strip"; the "find-gawknode"
  expression will open the info page named "(gawk)Numeric Functions";
  the one with "find-gawktag" finds, in the gawk source files, the
  definition of the funtion "do_cos". That is, these expressions work
  as hyperlinks.

  # (find-node "(emacs-e20)Tags")
  # (find-node "(emacs-e20)Lisp Eval")
  # (find-node "(emacs-lisp-intro)Run a Program")

  The first block of text without "#"s is meant to be executed by a
  shell; if you set the mark at one end of it, place the cursor at the
  other end, type M-x eev, and, at a shell, run "ee", then the lines
  in the block will be executed by the shell almost as if they were
  being typed directly on the keyboard, i.e., respecting "cd"s, "set"s
  and "alias"es (the block is executed with "source"; details at ...).
  On a Debian system this block opens the Debian source package for
  gawk, recompiles it and runs etags on the relevant source files, to
  create the index that will be used by "find-gawktag".

  # (find-node "(emacs-e20)Mark")
  # (find-node "(bash)Bourne Shell Builtins" "`.'")

  The block with the "%*"s has three sequences of gdb commands; they
  can be sent to gdb with M-x eeg, which is similar to M-x eev, or
  with eegdb-bounded, that sends everything between the first "%*"
  before the cursor and the first "%*" after it. As with eev, we need
  to give the command "ee" to gdb to execute the commands sequences.

  # (find-node "(gdb)Command Syntax")
  # (find-angg "eev.el" "bounded")
  # (find-fline "~/.gdbinit")

  The command `(gdb "gdb /usr/src/gawk-3.0.3/gawk")' opens a gdb
  session in an Emacs window to debug /usr/src/gawk-3.0.3/gawk.

  # (find-node "(emacs-e20)Starting GUD")
  # (find-node "(emacs-e20)Debuggers")
  # (find-node "(emacs-e20)Basic Window")

  So, the block above can be used to uncompress and install the gawk
  source code, to recompile it keeping the debugging symbols, to start
  a gdb session on it, and to trace its execution up to a certain
  point and then to show the values of some variables.






#####
#
# w3
# 2000may27
#
#####

# «w3»  (to ".w3")
# (find-status "w3-el-doc")
# (find-status "w3-el-e20")
# (find-status "w3-el-lisp")
# (find-vldifile "w3-el-doc.list")
# (find-vldifile "w3-el-e20.list")
# (find-vldifile "w3-el-lisp.list")
# (find-fline "/usr/share/doc/w3-el-doc/")
# (find-fline "/usr/doc/w3-el-e20/")
# (find-fline "/usr/doc/w3-el-lisp/")
# (find-fline "/usr/share/w3-el/")

# (find-fline "/usr/share/w3-el/devices.el" "\"XEmacs\" (emacs-version)")

cd /usr/share/emacs/site-lisp/w3-el/
etags *.el

# (find-node "(w3)Top")
# (find-node "(w3)Basic Usage")
# (find-node "(w3)Information")
# (find-node "(w3)Information" "current document's URL")

# (find-w3elfile "")
# (w3-fetch "http://127.0.0.1/cgi-tcl/")

# (find-w3eltag "w3-download-this-url")
# (find-w3eltag "w3-save-url")
# (find-w3eltag "w3-view-this-url")
# (find-w3eltag "url-view-url")
# (find-fline "/usr/doc/w3-el-doc/")
# (find-node "(elisp)Mode Help")
# (find-w3elfile "w3.el" "(defun w3-fetch ")
# (find-w3file "url.el" "Save history in")
# (find-w3file "w3.el" "Reuse URL")







#####
#
# old notes on w3 and glyphs
# 2000sep23
#
#####

; (find-node "(w3)Display Variables")
; (find-w3elfile "")
; (find-w3elfile "w3-cus.el")
;(setq w3-link-start-delimiter '("[" . "{{"))
;(setq w3-link-end-delimiter '("]" . "{{"))
;(setq w3-link-start-delimiter '("«" . ""))
;(setq w3-link-end-delimiter '("»" . ""))
(setq mew-mail-domain-list '("mat.puc-rio.br"))






#####
#
# LCD (the emacs lisp code directory)
#
#####

# export LCD=/snarf/ftp/gatekeeper.dec.com/pub/GNU/elisp-archive
# export ELISP=/usr/share/emacs/19.34/lisp

(find-fline "$LCD/LCD-datafile")
(find-fline "$LCD/lispdir.el")
(setq lisp-code-directory "$LCD/LCD-datafile")
(load-library "$LCD/lispdir")
(format-lisp-code-directory)

$LCD/packages/dismal-0.92.tar.Z

describe
describe-perl-symbol
maple-mode
spread
sokoban

cp -iv $LCD/modes/maple.el.Z $ELISP/
gzip -dv $ELISP/maple.el.Z
# (find-efile "maple.el")

cp -iv $LCD/modes/spread.el.Z $ELISP/
gzip -dv $ELISP/spread.el.Z
# (find-efile "spread.el")

lynx $LCD/





#####
#
# Debugging
# 2000nov13
#
#####

# «debugging»  (to ".debugging")

# (find-elinode "Debug")
# (find-elnode "Debugger")
# (find-elinode "debug-on-entry")

(defun triangle-bugged (number)
  "Return sum of numbers 1 through NUMBER inclusive."
  (let ((total 0))
    (while (> number 0)
      (setq total (+ total number))
      (setq number (1= number)))      ; Error here.
    total))

(triangle-bugged 4)
(debug-on-entry 'triangle-bugged)
(triangle-bugged 4)
(cancel-debug-on-entry 'triangle-bugged)
(triangle-bugged 4)

# The most important keys in debugger-mode:
# d - "descend"  - (find-etag "debugger-step-through")
# c - "continue" - (find-etag "debugger-continue")
# q - "quit"     - qui debugging mode

# (find-etag "debugger-mode-map")
# (find-efile "emacs-lisp/debug.el" "\"d\"")


# Is there a way to execute a programmed number of "d"s in
# debugger-mode? The following does not work:
#
(defun D (n) (interactive "p") (execute-kbd-macro "d" n))
(define-key debugger-mode-map "D" 'D)

# (find-elnode "Keyboard Macros")
# (execute-kbd-macro "d" 40)




#####
#
# debug
# 2004jul25
#
#####

# «debug.el»  (to ".debug.el")

(find-efunction 'debug)
(find-efile "emacs-lisp/debug.el")

(backtrace-frame 3)
(backtrace-frame 2)
(backtrace-frame 1)
(backtrace-frame 0)

(find-elnode "Internals of Debugger")

(find-efunction 'debugger-step-through)
(find-efunction 'debugger-continue)

(find-efile "emacs-lisp/debug.el" "--returning value:")
(find-efile "emacs-lisp/debug.el" "<debugger-mode-map>")




#####
#
# edebug
# 2000nov13
#
#####

# «edebug»  (to ".edebug")
# (find-elinode "edebug")
# (find-elnode "Edebug")
# (find-efile "emacs-lisp/edebug.el")
# (find-efile "emacs-lisp/edebug.el" "\"q\"")
# (find-efile "emacs-lisp/edebug.el" "evaluate a defun with C-M-x")
# (find-efile "emacs-lisp/edebug.el" "Global GUD bindings")
# (find-etag "edebug-defun")
# (find-efunction 'edebug-defun)

# An edebug session doesn't seem as easy to start as a
# "debug-on-entry" session - I found no command that would be a sort
# of "instrument-defuns-in-region", and so we need to place the cursor
# somewhere inside a defun and type M-x edebug-defun; I got no simple
# eval-last-sexp'able substitute, but we can assign a key for that:

(global-set-key "\M-D" 'edebug-defun)

# After the instrumentation if we execute a call to the instrumented
# function Emacs will enter edebug-mode; then the main keys will be
# [space] for "descend", "n" for "next", and "q" for "quit" (=
# top-level).

(defun triangle-recursively-bugged (number)
  "Return sum of numbers 1 through NUMBER inclusive.
Uses recursion."
  (if (= number 1)
      1
    (+ number
       (triangle-recursively-bugged
        (1- number)))))               ; Error here.

(triangle-recursively-bugged 3)
(top-level)


# A variation that makes it easier to run...
# (find-efunction 'edebug-defun)
# (find-efile "emacs-lisp/edebug.el" "through the code with SPC")
#
(global-set-key
 "\M-D" (lambda (dont-run-it) (interactive "P")
	  (let ((fun (save-excursion (beginning-of-defun)
				     (edebug-eval-defun 'edebug-it))))
	    (if (not dont-run-it) (apply fun ())))))

(defun test ()
  (+
   (+ 1000 200)
   (+ 30 4)
  )
)






#####
#
# old notes about debugging
#
#####

# (find-etag "debug-on-entry")
# (find-etag "debugger-mode")

# (find-elinode "Top")
# (find-elinode "Debugging")
# (find-elnode "Vectors")

# (find-elnode "Control Structures")
# (find-elnode "Catch and Throw")
# (find-etag "point-to-register")

# (debug-on-entry 'eelatex-bounded)

%
foo bar
%

(setq debug-on-error t)
(calendar)

(find-efile "calendar.el")

(find-fline "~/.emacs" "shrink-window")
(describe-function 'shrink-window)





#####
#
# Life
#
#####

# «life»  (to ".life")
# (find-efile "play/life.el")

(progn
  (setq my-rectangle
   '("@@ "
     " @@"
     " @ "
     ))
  (setq my-rectangle
   '(" @          "
     "@           "
     "@          @"
     "@          @"
     "@@@@@@@@@@@@"))
  (setq my-rectangle '("@@@@@@@@@@"))
  (life 0.15))

(defun life-insert-random-pattern ()
  (insert-rectangle my-rectangle)
  (insert ?\n))

(life 0.15)

(life 0)




#######
#
# etags hacking (pure)
#
#######

cd /usr/share/emacs/19.34/lisp/
agrep \" etags.el | sort
agrep \" etags.el | agrep \\\\ | sort
agrep -n \" etags.el | agrep \\\\
l -f $(locate '*TAGS')

(find-demutag "YYSTYPE")
(find-demufile "TAGS")

A parte antes do del (a subregexp 1) é sempre um segmento inicial de
uma linha?

(find-efile "etags.el")

(find-etag "find-tag-default")
(find-etag "etags-file-of-tag")
(find-etag "tag-re-match-p")

(find-elnode "Syntax of Regexps")

(find-etag "etags-tags-completion-table")

      ;; This monster regexp matches an etags tag line.
      ;;   \1 is the string to match;
      ;;   \2 is not interesting;
      ;;   \3 is the guessed tag name; XXX guess should be better eg DEFUN
      ;;   \4 is not interesting;
      ;;   \5 is the explicitly-specified tag name.
      ;;   \6 is the line to start searching at;
      ;;   \7 is the char to start searching at.

"^\\(\\([^\177]+[^-a-zA-Z0-9_$\177]+\\)?\\([-a-zA-Z0-9_$?:]+\\)\

   …  …	ˆ„„„„„‰ˆ„„„„„„„„„„„„„„„„„‰ … … ˆ3
   …  ˆ(2)
   ˆ1„„„........................................................


\[^-a-zA-Z0-9_$?:\177]*\\)\177\\(\\([^\n\001]+\\)\001\\)?\


                        …      …  ˆ5
 ........„„„„„„„„„„„„„„1‰      ˆ(4)


\\([0-9]+\\)?,\\([0-9]+\\)?\n"

 ˆ6„„„„„„„„‰  ˆ7




#####
#
# etags hacking (applied)
#
#####

(describe-function 'skip-chars-forward)
(describe-function 'looking-at)

(defun forth-word-at-cursor ()
  (save-excursion
    (buffer-substring
     (progn (skip-chars-backward "!-~") (point))
     (progn (skip-chars-forward "!-~") (point)))))




#####
#
# Old glyph stuff (many notes, and some tests)
# 2000dec14
#
#####

# «old_glyph_stuff»  (to ".old_glyph_stuff")

;;;;
;;;; Some further info on the display hacks.
;;;;
;
; First the credits: I got the coloured glyph trick from an old
; version of w3, a www browser for emacs:
; (find-fline "/usr/share/w3-el/w3-about.el" "<dt> Author")
; and I first learned how to use 512 char fonts by inspecting the
; output of showcfont on the ethiopic fonts...
;
; ...then I wrote a program to set up 512 char fonts, to modify 256
; char fonts, and other niceties; it is called vtutil, look for it in
; my Emacs page. It is still in the "ugly" stage, but that's because
; no one ever showed interest in it except me. :-)
;
; The crucial hint for making glyphs using faces came from Gerd
; Moellmann.
;
; (find-etag "create-glyph")
;
; (eeman "console_codes" "0x9B")
; (eeman "charsets" "xxxxyyyy")
;
; 155=128+27=0x9B is CSI (= esc[) on linux consoles.
; We'd better make the 155s as visually piercing as possible.
;
; We use unicode to display chars 0..31 and 155.
;   110xxxxx 10yyyyyy		-> 00000xxx xxyyyyyy
;   1110xxxx 10yyyyyy 10zzzzzz 	-> xxxxyyyy yyzzzzzz
;   11101111 100000yy 10zzzzzz 	-> 11110000 yyzzzzzz
;   (find-k22file "drivers/char/console.c" "into Unicode")
;   (find-k22file "drivers/char/consolemap.c" "direct font mapping")
;   (find-k22file "drivers/char/console.c" "direct-to-font")
;   (find-k22file "drivers/char/console.c" "case ESpercent:")
;   (find-elnode "Character Type")
;
;   (defun wrstr (s) (write-region s nil "/dev/tty1"))
;   (defun wruni (s) (wrstr (concat "\e%G" s "\e%@")))
;   (wrstr "\e%G\357\200\215\e%@")
;   (wruni "\357\200\215")
;   (wrstr (unichar 13))
;
; (find-e20file "")
; (find-e20file "startup.el" "standard-display-european")
; (find-e20file "term/internal.el" "standard-display")
; (find-e20file "disp-table.el")

; Old stuff commented out:
;
;(if (or (= emacs-major-version 19) (>= emacs-minor-version 4))
;    (progn
;      (standard-display-8bit 128 254)
;      (load-library "disp-table"))
;  (progn
;    ;; emacs20:
;    '(setq-default enable-multibyte-characters nil) ;I use cp850, not unicode.
;    '(setq enable-multibyte-characters t) ; for the default behaviour (?)
;    (standard-display-8bit 160 254)     ; Rendering of chars 128-159 as
;    (let ((i 128))                      ; "8bit" is broken on early emacs20's,
;      '(while (< i 160)                 ; so we use g1 glyphs for them.
;        (aset standard-display-table i
;              (vector (create-glyph (char-to-string i))))
;        ;;(standard-display-g1 i i)
;        (setq i (+ i 1))))
;    ))

; (debug-on-entry 'setglyphs)
; (find-elnode "Debugger Commands" "`b'")
; (find-elinode "debug")
; (find-elinode "Top")




#####
#
# Emacs20 bug - old notes
#
#####

# (find-node "(emacs)Single-Byte European Support")
set-language-environment

cd /usr/share/emacs/20.2/lisp/
find * -name '*.el' > .files.el
etags $(<.files.el)
glimpseindex -H . -y $(<.files.el)

# (code-c-d "e20" "/usr/share/emacs/20.2/lisp/" "emacs")
# (code-c-d "e20s" "/usr/src/emacs20-20.2/")
# (find-e20tag "set-language-environment")
# (find-e20tag "set-terminal-coding-system")
# (find-e20tag "standard-display-european")
# (find-e20tag "standard-display-8bit")

# (find-fline "/usr/share/emacs/20.2/etc/")
# (find-fline "/usr/share/emacs/20.2/etc/FAQ" "Using Emacs with Alternate Character Sets")

(standard-display-8bit 128 255)
(standard-display-default 128 255)
Problema:
  ~
acao
 '
ação

# (find-e20tag "standard-display-european")
# (find-e20file "international/fontset.el")

(list-coding-systems)
(list-coding-systems 1)

set-language-environment

and specify `Latin-N'.

   Emacs can display those characters provided the terminal or font in
use supports them.  Use the `M-x standard-display-european' command to
enable or disable European display mode.  With a numeric argument, `M-x
standard-display-european' enables European character display if and
only if the argument is positive.

(standard-display-european 1)

/usr/doc/expect5.24/examples/autoexpect emacs20 --no-windows ~/CRIM/010ideas
# (find-fline "~/script.exp")

pdsc /debian/main/source/editors/emacs20_20.2-7.dsc
debian/rules binary	|& tee odrb

cd /usr/src/emacs20-20.2/
find * -type f -and -not -name '*.elc' > .files
glimpseindex -H . -F < .files

e20sglimpse Fredraw_frame

# (find-e20sfile "src/.gdbinit")
# set args --no-windows
# source ~/e

# (find-e20sfile "src/dispnew.c")
# (find-e20sfile "src/dispnew.c" "redraw-frame")
# (find-elnode "Index")

# (find-node "(gdb)Attach")
# (find-node "(gdb)Command Files")

# (find-elnode "Terminal Output" "send-string-to-terminal")
# (find-enode "Choosing Modes" "-*-")
# (find-enode "File Variables")

# (find-e20sfile "etc/NEWS" "Displaying international")
# (find-e20sfile "etc/NEWS" "fontset")
# (find-e20sfile "etc/NEWS" "browse-url-lynx-emacs")
# (find-e20sfile "etc/NEWS" "speedbar")
# (find-e20sfile "etc/NEWS" "unibyte-display-via-language-environment")
# (find-e20sfile "etc/NEWS" "0237")
# (find-e20sfile "etc/NEWS" "** Changes relating to multibyte characters")
# (find-e20sfile "etc/LNEWS" "Display tables")

# (find-e20file "emacs-lisp/")
# (find-e20file "emacs-lisp/trace.el" "ack ")
# (find-e20file "sregex.el")

# (find-e20file "international/fontset.el")
xlsfonts | grep -i mule





#####
#
# emacs 20.3.2 (slink), tracing the glyph bug.
#
#####

# «tracing_the_glyph_bug»  (to ".tracing_the_glyph_bug")

apti liblockfile-dev

pdsc /big/slinks1/dists/slink/main/source/editors/emacs20_20.3-7.dsc
cd /usr/src/emacs20-20.3/

find * -type f -and -not -name '*.elc' > .files
# glimpseindex -n -H . -F < .files
etags src/*.[ch]

debian/rules binary	|& tee odrb


laf	\
    /usr/bin/emacs*			\
    /usr/src/emacs20-20.3/src/emacs*	\
    /usr/src/emacs20-20.3/debian/tmp/usr/bin/emacs-20.3		\
    /usr/src/emacs20-20.3/debian/tmp/usr/bin/emacs20

# (find-fline "~/eev.el" "eegdb-bounded")
# (gdb "gdb /usr/src/emacs20-20.3/src/emacs")
# (gdb "gdbattach /usr/src/emacs20-20.3/src/emacs")

/usr/src/emacs20-20.3/src/emacs \
  --no-windows --unibyte --no-init-file /home/root/glyphbug

# (find-fline "~/bin/gdbattach")
gdbattach /usr/src/emacs20-20.3/src/emacs


strace -f -o ~/s \
/usr/src/emacs20-20.3/src/emacs \
  --no-windows --unibyte --no-init-file /home/root/glyphbug

# (find-e20node "Bugs")
# (find-e20node "Checklist" "hung")
# (find-e20node "Initial Options")

# (find-e20stag "write_glyphs")
# (find-e20stag "encode_terminal_code")
# (find-e20stag "encode_coding")
# (find-e20stag "encode_coding_iso2022")

write_glyphs



%
set args --no-windows --unibyte --no-init-file /home/root/glyphbug
br 405
br 507
run -geometry 300x300+20-20

p *argv
n
p xpos
p ypos
p width
p height
p dest_geom_mask
cont

p xpos
p ypos
p width
p height
p xswa
%
p *(xswa.win_gravity)
%










#####
#
# Emacs20, sending a bug report
#
#####

# (find-node "(gcc)Bugs")
# (find-node "(gcc)Bug Reporting")





######
#
# Trapping errors
#
######

# (find-node "(elisp)Handling Errors" "VAR PROTECTED-FORM")
# (find-efile "files.el" "condition-case")

eglimpse condition-case



#####
#
# Emacs20 fontsets
#
#####

# (find-vldifile "emacs20.list")
# (find-fline "/usr/doc/emacs20/")

# (find-fline "/usr/share/emacs/20.3/etc/")
# (find-fline "/usr/share/emacs/20.3/etc/HELLO")
# (find-fline "/usr/share/emacs/20.3/etc/NEWS" "HELLO")

cd ~/SLINK/
ls | grep font

# Potato:
apti xfonts-intl-phonetic

# (find-status "xfonts-intl-phonetic")
# (find-vldifile "xfonts-intl-phonetic.list")
# (find-fline "/usr/doc/xfonts-intl-phonetic/")

# Obsolete:
apti intlfonts-arabic intlfonts-asian intlfonts-chinese \
  intlfonts-chinese-big intlfonts-european intlfonts-japanese \
  intlfonts-japanese-big intlfonts-phonetic

# (find-fline "/usr/doc/intlfonts-arabic/")
# (find-fline "/usr/doc/intlfonts-asian/")
# (find-fline "/usr/doc/intlfonts-chinese-big/")
# (find-fline "/usr/doc/intlfonts-chinese/")
# (find-fline "/usr/doc/intlfonts-european/")
# (find-fline "/usr/doc/intlfonts-japanese-big/")
# (find-fline "/usr/doc/intlfonts-japanese/")
# (find-fline "/usr/doc/intlfonts-phonetic/")
# (find-vldifile "intlfonts-arabic.list")
# (find-vldifile "intlfonts-asian.list")
# (find-vldifile "intlfonts-chinese-big.list")
# (find-vldifile "intlfonts-chinese.list")
# (find-vldifile "intlfonts-european.list")
# (find-vldifile "intlfonts-japanese-big.list")
# (find-vldifile "intlfonts-japanese.list")
# (find-vldifile "intlfonts-phonetic.list")

# (find-e20node "Fontsets")
# (find-e20node "Defining Fontsets")
# (find-e20node "Mode Line" "CS states the coding system")
# (eeman "4 charsets" "ISO 2022 AND ISO 4873")
# (eeman "4 charsets" "UTF-8")
# (eeman "Tcl" "xhh")

# ranges
set r10   "\[\x80-\xBF\]"
set r110  "\[\xC0-\xDF\]"
set r1110 "\[\xE0-\xEF\]"

# (set-mstd-cchar 27 "31" "[")
# (find-fline "/usr/share/emacs/20.3/etc/HELLO")





######
#
# ISO 2022/4873
#
######

# (find-man "7 charsets" "ISO 2022 AND ISO 4873")

Switching  between  character sets is done using the shift
functions ^N (SO or LS1), ^O (SI or LS0),
ESC n (LS2),
ESC o (LS3),
ESC N (SS2),
ESC O (SS3),
ESC ~ (LS1R),
ESC } (LS2R),
ESC | (LS3R). The function LSn makes character set Gn the current one
for codes with high bit zero. The function LSnR makes character set Gn
the current one for codes with high bit one. The function SSn makes
character set Gn (n=2 or 3) the current one for the next character
only (regardless of the value of its high order bit).

A 94-character set is designated as Gn character set by an ESCape
sequence
ESC ( xx (for G0),
ESC ) xx (for G1),
ESC *  xx (for G2),
ESC + xx (for G3), where xx is a symbol or a pair of symbols found in
the ISO 2375 International Register of Coded Character Sets. For
example,
ESC ( @ selects the ISO 646 character set as G0,
ESC ( A selects the UK standard character set (with pound instead of
number sign),
ESC ( B selects ASCII (with dollar instead of currency sign),
ESC ( M selects a character set for African languages,
ESC ( ! A selects the Cuban character set, etc. etc.
A 96-character set is designated as Gn character set by an ESCape
sequence
ESC - xx (for G1),
ESC . xx (for G2) or
ESC / xx (for G3). For example,
ESC - G selects the Hebrew alphabet as G1.




#####
#
# The standard fontset
#
#####

# (find-node "(gawk)Command Line Field Separator")
# (find-eetcfile "CHARSETS")

#
grep '^##	' < /usr/share/emacs/20.7/etc/CHARSETS
awk -F: 'NF==10 {printf "%-23s %3d %d %d %d %d %d %d %d %s\n",
            $1, $2, $3, $4, $5, $6, $7, $8, $9, $10}' \
  < /usr/share/emacs/20.7/etc/CHARSETS
#

cd /usr/src/emacs20-20.3/
find * -type f -and -not -name '*.elc' > .files
glimpseindex -n -H . -F < .files

cd /usr/src/emacs20-20.3/
agrep -l 2022 $(<.files)

cd /usr/src/emacs20-20.3/
agrep -i UTF $(<.files)

# (find-e20sfile "src/coding.c" "** 2. Emacs internal format")
# (find-e20sfile "src/coding.c" "** 3. ISO2022 handlers")
# (find-e20sfile "src/coding.c" "  o coding-category-iso-7")
# (find-e20sfile "src/coding.c" "")
# (find-e20sfile "src/coding.h" "EMACS' INTERNAL FORMAT")
# (find-e20sfile "src/charset.h" "private dim1")






#####
#
# Making the files HELLOS and HELLOS2
#
#####

set mule1st  "\[\x80-\x9F\]"
set mulerest "\[\xA0-\xFF\]"
set string [exec cat /home/root/HELLO]
puts ";-*- coding: emacs-mule-unix -*-"
while {[regexp "($mule1st$mulerest+)(.*$)" $string {} mulestr string]} {
  puts $mulestr
}

eet | sort | uniq > ~/HELLOS


set highchar "\[\x80-\xFF\]"
set lines [split [exec cat /home/root/HELLOS] "\n"]
foreach li $lines {
  if {[regexp "$highchar+" $li highs]} {
    set mylist {}
    foreach c [split $highs {}] {
      scan $c "%c" code
      lappend mylist [format "%02x" $code]
    }
    puts "$li	$mylist"
  } else {
    puts $li
  }
}

eet > ~/HELLOS2



# (find-efile "simple.el" "what-cursor-position")



# (find-e20node "Coding Systems")
# (find-e20node "Specify Coding" "for the immediately following command")

# (find-e20file "")
# (find-e20file "language/")
# (find-e20file "international/")
# (find-e20file "international/quail.el")

# (find-e20tag "list-character-sets-1")
describe-current-coding-system-briefly

(set-buffer-file-coding-system 'emacs-mule-unix)

(defun ascstr32 (i lasti)
  (while (<= i lasti)
    (insert (format "%d: " i))
    (let ((j i)
	  (lastj (+ i 32)))
      (while (<= j lastj)
	(insert (format "%c" j))
	(setq j (+ j 1))))
    (setq i (+ i 32))
    (insert "\n")))

(ascstr32 32 128)

32:  !"#$%&'()*+,-./0123456789:;<=>?@
64: @ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`
96: `abcdefghijklmnopqrstuvwxyz{|}~
128:

    (princ (format "%c" i) (current-buffer))
    (setq i (+ i 32))))

emacs20 -fn fontset-standard /usr/share/emacs/20.3/etc/HELLO

# (find-e20file "international/fontset.el")

lynx $S/http/www.debian.org/~hp/tutorial/debian-tutorial.html/ch-editor.html#s-editor-vi
edrxnetscape $S/http/www.debian.org/~hp/tutorial/debian-tutorial.html/ch-editor.html#s-editor-vi

# (find-enode "Debuggers")





####
#
# X resources for emacs
# 2004feb11
#
####

# «X_resources»  (to ".X_resources")
# (find-angg ".Xdefaults" "emacs")
# (find-enode "Resources X" "`foreground'")
# (find-enode "Resources X" "`background'")
# (find-enode "Lucid Resources")
# (find-efaqnode "Valid X resources")
# (find-elnode "Startup Summary")

# (find-fline "/usr/share/emacs/19.34/etc/FAQ" "\n\n68:")

# (find-man "emacs" "emacs.keyword:value")

# (find-efile "term/x-win.el" "foreground")

! (info "(emacs)Lucid Resources")
! (shell-command "xrdb -load ~/.Xdefaults")
! (shell-command "xrdb -load ~/.Xdefaults; emacs")
Emacs.pane.menubar.font: fixed
Emacs.pane.menubar.verticalSpacing: 0





######
#
# Emacspeak
# 2001oct17
#
######

# «emacspeak»  (to ".emacspeak")
# (find-shttpw3 "emacswiki.org/cgi-bin/wiki.pl?EmacSpeak")
# (find-shttpw3 "www-4.ibm.com/software/speech/dev/ttssdk_linux.html")
# Go to the IBM site and register... you will be offered the following
# packages:
#   ViaVoice ASR SDK for Linux V3:
#     viavoice_asr_sdk_3.tar (3MB)
#   ViaVoice Dictation Run Time Kit for for Linux V3:
#     viavoice_dict_rtk_3.tar (78MB)
#   ViaVoice Command & Control Run Time Kit for Linux V2:
#     viavoice_command_rtk_2.tar (13MB)
#   ViaVoice TTS SDK for Linux V5.1:
#     viavoice_tts_sdk_5.tar (.5MB)
#   ViaVoice TTS Run Time Kit for Linux V5.1:
#     viavoice_tts_rtk_5.tar (1.3MB)
# Fetch the last two.
# (find-fline "~/tmp/viavoice_tts_rtk_5.tar")
# (find-fline "~/tmp/viavoice_tts_sdk_5.tar")
#*
rm -Rv /tmp/viavoice/
mkdir  /tmp/viavoice/
cd     /tmp/viavoice/
tar -xvf ~/tmp/viavoice_tts_rtk_5.tar
tar -xvf ~/tmp/viavoice_tts_sdk_5.tar
alien ViaVoice_TTS_rtk-5.1-1.2.i386.rpm
alien ViaVoice_TTS_sdk-5.1-1.2.i386.rpm
mv -v viavoice-tts-rtk_5.1-2.2_i386.deb ~/tmp/
mv -v viavoice-tts-sdk_5.1-2.2_i386.deb ~/tmp/

#*

# Old stuff:
Pgrep m/emacspeak/i

apti emacspeak
# (find-vldifile "emacspeak.list")
# (find-fline "/usr/doc/emacspeak/")

# (find-fline "/usr/doc/HOWTO/Emacspeak-HOWTO.gz")

ftp://vpsyc.nott.ac.uk/pub/ritter/dismal


# «emacspeak-eflite»  (to ".emacspeak-eflite")
# 2006oct30, #emacs:
<e1f`> ,emacspeak
<fsbot> emacspeak is [0] a package which lets you use Emacs with an
        auditory user interface.
<fsbot> [1] In Debian, apt-get install eflite; apt-get install
        emacspeak; Then just select eflite from the configuration
        menu.,
<fsbot> [2] at http://emacspeak.sf.net,
<fsbot> [3] at http://www.emacswiki.org/cgi-bin/wiki.pl/EmacSpeak,
        ..[Type ,more]





#####
#
# Signing papers for the FSF
# 99dec26
#
#####

# «fsf_papers»

# (find-fline "~/99dec26.popmail" "snail this page")
# (find-fline "~/LATEX/eevcontract.tex")

cd ~/LATEX/; make eevcontract.dvi
xdvi eevcontract.dvi &

cd ~/LATEX/; make eevcontract.p01


%

Hi,

Gerd Moellman, the Emacs maintainer, told me to send you the data on
this page and the assignment contract, for {\tt eev.el}-related
bureaucracy. I hope I've got everything right...

% Other data, for copyrights, correspondence, etc.:

\medskip

Full name, citizenship, date of birth:

\smallskip

Eduardo Nahum Ochs, Brazilian, 7/feb/1971.

\medskip

Snail-mail address:

\smallskip

Av.\ Lineu de Paula Machado, 117/101 - Lagoa

Rio de Janeiro, RJ

CEP 22470-040

Brazil

\medskip

E-mail addresses:

\smallskip

{\tt edrx@inx.com.br}

{\tt edrx@mat.puc-rio.br}

\medskip

Homepage:

\smallskip

{\tt http://angg.twu.net/}

% \noindent This data is also available though my homepage, {\tt
% http://angg.twu.net/}, and I'll send a copy to you by e-mail to
% minimize the risk of typing errors...

\bigskip

\noindent [\ ], Edrx.


\vskip 4cm

Richard Stallman

545 Tech Sq rm 425

Cambridge, MA 02139

USA


%





#####
#
# calc
# 2000nov13 / 2013jul29
#
#####

# «calc»  (to ".calc")
# (find-node "(calc)Top")
# (find-node "(calc)Embedded Mode")

<Ardonik> M-x calc RET d B
<Ardonik> ' a*x^4+b*x^3+c*x^2+d*x+e RET
<Ardonik> a S x RET
<Ardonik> C-x 1

# Old:
# (find-status "calc")
# (find-vldifile "calc.list")
# (find-fline "/usr/doc/calc/")

# (find-vldifile "" "calc")
# (find-vldifile "calc.postinst")
# (find-vldifile "calc.prerm")

gv -seascape -antialias /usr/doc/calc/calccard.ps.gz &

# (code-c-d "calc" "/usr/share/emacs/site-lisp/calc/" "calc")
# (find-calcnode "Top")
# (find-calcfile "")

# (find-fline "/usr/lib/emacsen-common/packages/remove/" "calc")





#####
#
# Cartão de visitas pra exposalt
# 00jan27
#
#####

%*
% (eelatex-bounded)
\catcode`œ=13 \defœ{$\blacksquare$}

Eduardo Ochs

% {\tt http://angg.twu.net/}

% {\tt http://angg.twu.net/emacs.html}

{\tt http://angg.twu.net/eev-manifesto.html}

{\tt http://angg.twu.net/e/escripts.html\#debugging\_gawk}


\tiny

\begin{verbatim}
# (code-c-d "gawk" "/usr/src/gawk-3.0.3/" "gawk")

rm -Rv /usr/src/gawk-3.0.3/
cd /usr/src/
dpkg-source -sn -x \
  /big/slinks2/dists/slink/main/source/interpreters/gawk_3.0.3-1.dsc
cd /usr/src/gawk-3.0.3/
debian/rules binary	|& tee odrb
etags *.[chy]

# (find-gawkfile "odrb" "strip")
# (find-gawkfile "debian/rules" "strip")
# In the top gawk dir there's a non-stripped binary; we use it.

# (find-gawknode "Numeric Functions")
# (find-gawkfile "awktab.c" "\"cos\"")
# (find-gawktag "do_cos")

cat > /tmp/awkprog <<'---'
BEGIN { print cos(0); }
---

%*
br do_cos
set args -f /tmp/awkprog
run
p *tree
%*
p *(tree->sub.nodep.l.lptr)
%*
p *(tree->sub.nodep.l.ll)
%*

# (gdb "gdb /usr/src/gawk-3.0.3/gawk")
# (find-gawktag "lnode")


# (find-angg "eev.el" "eev")
# (find-angg "eev.el" "code-c-d")
# (find-angg "eev.el" "code-c-d-explan1")
# (find-angg "eev.el" "code-c-d-explan2")
# (find-angg "eev.el" "gdb")
# (find-angg "eev.el" "bounded")
\end{verbatim}

%

# (find-fline "/usr/doc/texmf/generic/pstricks/")
cd /usr/doc/texmf/generic/pstricks/obsolete/


~/TCL/cartao -3.5 12 6 12   -3.5 -2 6 -2 > cartao1.tex ; make cartao1.dvi





mail -s 'Emacs e scripts' godoy@conectiva.com.br <<'---'
Oi Godoy! Eu conversei com o Roxo na ExpoSAlt hoje, acabei mostrando
pra ele uma coisa que eu acabo empurrando pra todo mundo, que e' um
truque de, no Emacs, mandar blocos de texto para o shell ou para
outros interpretadores, e de interpretar as linhas de comentarios como
hiperlinks (que na verdade sao expressoes em Emacs Lisp que a gente
executa com C-x C-e). Bom, o Roxo falou que voce e' um Emacszeiro
fanatico (ele e' vi-zeiro) e eu resolvi mandar o link do pacote pra
voce.

De^ uma olhada em algum desses enderecos aqui:

  http://angg.twu.net/eev-mails.html
  http://angg.twu.net/eev-manifesto.html
  http://angg.twu.net/emacs.html
  http://angg.twu.net/hacks.html

Cada um acaba te levando a todos os outros se voce for seguindo os
caminhos mais interessantes.

  Tomara que voce goste. Um abraco,

    Eduardo Ochs
    edrx@inx.com.br
    http://angg.twu.net/
---


mail linux-br-request@unicamp.br <<'---'
subscribe edrx@inx.com.br
---





#####
#
# linux-br
# 00feb01
#
#####

# «eev_linux-br_message»

mail -s 'eev: Hiperlinks no Emacs' linux-br@unicamp.br <<'--%%--'
Oi. Eu tenho um pacote em Emacs Lisp (eev.el) que serve pras pessoas
poderem trocar truques mais facilmente e pra fazer com que as pessoas
fiquem viciadas em codigo fonte e software livre; gostaria que os
interessados dessem uma olhada. (Na verdade eu gostaria de dizer "usem
o eev e ajudem a salvar o mundo", mas isso pegaria muito mal).

Um exemplo de uso: digamos que a gente esta' editando esta mensagem
num Emacs que ja' carregou a biblioteca eev.el (com `(load-library
"~/eev.el")', digamos). Entao varios pedacos do bloco abaixo podem ser
interpretados de modo especial:



# (code-c-d "gawk" "/usr/src/gawk-3.0.3/" "gawk")

rm -Rv /usr/src/gawk-3.0.3/
cd /usr/src/
dpkg-source -sn -x \
  /big/slinks2/dists/slink/main/source/interpreters/gawk_3.0.3-1.dsc
cd /usr/src/gawk-3.0.3/
debian/rules binary	|& tee odrb
etags *.[chy]

# (find-gawkfile "odrb" "strip")
# (find-gawkfile "debian/rules" "strip")
# In the top gawk dir there's a non-stripped binary; we use it.

# (find-gawknode "Numeric Functions")
# (find-gawkfile "awktab.c" "\"cos\"")
# (find-gawktag "do_cos")

cat > /tmp/awkprog <<'---'
BEGIN { print cos(0); }
---

%^
br do_cos
set args -f /tmp/awkprog
run
p *tree
%^
p *(tree->sub.nodep.l.lptr)
%^
p *(tree->sub.nodep.l.ll)
%^

# (gdb "gdb /usr/src/gawk-3.0.3/gawk")
# (find-gawktag "lnode")

# (find-angg "eev.el" "eev")
# (find-angg "eev.el" "code-c-d")
# (find-angg "eev.el" "code-c-d-explan1")
# (find-angg "eev.el" "code-c-d-explan2")
# (find-angg "eev.el" "gdb")
# (find-angg "eev.el" "bounded")



As expressoes entre parenteses nos comentarios sao expressoes em Emacs
Lisp; elas podem ser executadas pondo o cursor logo depois de uma
delas e batendo C-x C-e (eval-last-sexp). A primeira, a do "code-c-d",
define varias funcoes com "gawk" no nome; a terceira, `(find-gawkfile
"debian/rules" "strip")', por exemplo, abre o arquivo
/usr/src/gawk-3.0.3/debian/rules e posiciona o cursor logo depois da
primeira ocorrencia do string "strip"; a com "find-gawknode" abre a
pagina de info chamada "(gawk)Numeric Functions"; a com "find-gawktag"
encontra, na fonte do gawk, a definicao da funcao "do_cos". Moral,
essas funcoes funcionam como hiperlinks.

O primeiro bloco de texto sem "#"s e' pra ser executado por um shell;
a gente marca o bloco, bate M-x eev, vai prum shell em outra janela ou
em outro virtual console e roda "ee"; essas linhas vao ser executadas
quase como se estivessem sendo batidas diretamente no shell, i.e.,
"cd"s, "set"s e "alias"es sao respeitados (o bloco e' executado com
"source"; detalhes na pagina). Pra quem estranhou o "dpkg-source" e o
".dsc": esse bloco abre o pacote Debian com a fonte do gawk, recompila
e roda o etags nos arquivos-fonte relevantes.

O bloco com os "%^"s tem tres sequencias de comandos para o gdb. Eles
podem ser mandados para o gdb com M-x eeg, que e' similar ao M-x eev,
ou com M-x eegdb-bounded, que manda tudo o que esta entre dois
delimitadores "%^". Como no caso do eev, a gente precisa dar o comando
"ee" dentro do gdb pra que eles sejam executados.

O `(gdb "gdb /usr/src/gawk-3.0.3/gawk")' abre um gdb, numa janela do
Emacs, pra debugar o /usr/src/gawk-3.0.3/gawk.

Moral, o blocao acima serve pra abrir a fonte do gawk, recompila-lo
com os simbolos para debugamento ("-g"), pra disparar um gdb nele, pra
seguir a execucao ate' um determinado ponto e pra mostrar os valores
de algumas variaveis.

Quem se interessar por favor de^ uma olhada em:

  http://angg.twu.net/eev-mails.html    <-- o blocao, com mais informacoes
  http://angg.twu.net/eev-manifesto.html  <-- umas ideias por tras do eev.el
  http://angg.twu.net/emacs.html  <-- links pra mais docs e pra fonte do eev

La' voces vao encontrar tambem mais de 800k em arquivos de notas
feitos pra serem "executados" com os truques do eev.el.

  Um abraco, e desculpem a mensagem gigante,
    Eduardo Ochs
    edrx@inx.com.br
    http://angg.twu.net/


P.S.: me disseram que da' pra fazer algo parecido no vi. Alguem pode
me mostrar como?
--%%--





#####
#
# Keith Waclena's tutorial -> .th
# 2000mar01
#
#####

# «waclena1»
# (find-fline "$S/http/www.lib.uchicago.edu/keith/tcl-course/emacs-tutorial.html")

cd $S/http/www.lib.uchicago.edu/keith/tcl-course/
cp -v emacs-tutorial.html /tmp/
cd /tmp/
lynx -dump emacs-tutorial.html > emacs-tutorial.lynx

# (find-fline "/tmp/" "emacs-tutorial")
# (find-fline "/tmp/emacs-tutorial.lynx" "info2www")




#####
#
# info2www
# 2000mar01
#
#####

apti info2www
# (find-vldifile "info2www.list")
# (find-fline "/usr/doc/info2www/")

# (find-fline "~/TH/emacs-tutor.th")

lynx /usr/doc/info2www/info2www.html
lynx http://localhost/doc/info2www/
lynx 'http://localhost/cgi-bin/info2www?(emacs-e20)Top'




#####
#
# emacs unibyte paragraph bug
# 2000apr10
#
#####

# «unibyte_paragraph_bug»
# (find-fline "~/CRIM/013ideas" "Segunda, 10 de abril, 2000")

cd ~/tmp/
gzip -c6 < bug | uuencode bug.gz |& tee ~/o

# (find-e20node "Single-Byte European Support")
# (find-e20node "Understanding Bug Reporting")
# (find-e20node "Checklist")
# (find-e20node "Checklist" "Ffuncall")

mail -s 'undo working wrong after M-q on a certain unibyte file' \
  bug-gnu-emacs@gnu.org <<'%%%'

If we type M-q at the end of a certain paragraph with some single-byte
characters in the range 0-31 and 128-255 (given below, uuencoded), and
then type C-_ to undo the fill-paragraph command, the original
paragraph comes back as a single long line, without newlines.

The undo works ok if I change the characters in the range 128-255 to
ASCII chars.

This bug was observed on the standard compiled version of emacs-20.5
on an i386 running Debian 2.2 (package "emacs20.5a-2"); when I tried
it on emacs-20.2 on an i386 running RedHat 6.1, the bug didn't show
up.


cd /tmp/
uudecode <<'---'
begin 644 bug.gz
M'XL(`%_&]#@``W53L6[;,!`=LG'QX!\X("H2`XIA-YL`#1WZ!1UCNSU1)X>`
MJ%-(RA!@:&B7_D;;C\EW]:C4CE,[!T'2W;OW[HFDOM"V:TI,8;F`D@`+9^H4
M/BX6BTRIE<:@N:1OTWQY#ZN2JNE^93$\.CN\@E<"1NSJ>OF"%M7^>CD,2GT"
ML^VP+E&4?T!!]DZS;=D%+!'(0N"630K4:PH,`D!G$30;CQF@$5_0/+/2W'BQ
M:6!'#IXZ`O;@Z>D[-8$\!-,R)!GFF(!_9D%LZP@"L2.+?J[49Z\=[:@I.3(=
MM35JLL+V,LL"0O7'V:Y&X$:,LF8G?`3?%3Z8T)F?HBINM;&R3D(35'.M'TG&
M2T%:=^C,KQW51\[O:)WEL@3RZFCKA*L^9),X?C+=Q\<PB07=!<GE/J9RP1@/
MF/?K,;M[C<CZVH_5(M<IYH5\MS[0-GEPV/A3E4,\]#FNWU0OJ\9EC*@HBSIF
M18[_>SC$B5KT\=)Y4MPXJNI+7HZ>JEN<Y=5M/UN?]UP8>&[VGP#.1@]XDQX+
M1^AF]I[_"R&;<.8DZKY5.VO9Y..V1RA)Y$\H]^,^#$ERR.-2G*1CN^1R()29
/TSR50ZO47U9XI#&+`P``
`
end
---
gzip -dvf bug.gz

# Then:
/usr/bin/emacs-20.5 --no-windows --unibyte --no-init-file bug
# and go to the end of the last paragraph, type M-q and C-_.


  Eduardo Ochs
    edrx@inx.com.br
    edrx@twu.net
    http://angg.twu.net/
%%%




#####
#
# indented-text-mode in emacs20
# 2000may01
#
#####

# «indented-text-mode»

# (find-fline "/usr/share/emacs/20.5/etc/NEWS" "Indented Text")
# (find-e20file "textmodes/text-mode.el")
# (find-e20file "textmodes/text-mode.el" "paragraph-indent-text-mode")
# (find-e20node "Text Mode")
# (find-e20node "Adaptive Fill")
# (find-elnode "Defining Functions" "defalias")

(defalias 'indented-text-mode 'text-mode)
(defalias 'indented-text-mode 'paragraph-indent-text-mode)

# (describe-function 'paragraph-indent-text-mode)

Argh, not working




#####
#
# Changing goto-position to let it accept sequences of strings
# 2000may10
#
#####

# «new_goto-position»  (to ".new_goto-position")
# The code here was moved to my ".emacs".
# (find-angg "eev.el" "goto-position")
# (find-angg ".emacs" "new_goto-position")

# (find-node "(elisp)Type Predicates")
# (find-node "(elisp)Iteration")
# (find-es "emacs" "debugging")

# (find-elnode "The Echo Area")
# (find-elnode "Building Lists" "make-list")
# (find-fline "~/eev.el" "goto-position")
# (find-elnode "Formatting Strings")

(message "trap: n=%S s=%S rest=%S" n s rest)
(setq debug-on-error t)
(goto-position 2100 '* 2 "os")
(nthcdr 2 '(9040 * "os" 2))




#####
#
# ange-ftp bug
# 2000jun01
#
#####

# «ange-ftp-bug»

# ange-ftp bug: all of these treat ee.sh as if it was a directory.
# Writing on it with eevn works, though.
# Note that nautilus is a Debian potato box.

(find-fline "/rootroot@nautilus:/home/root/bin/ee.sh")
(find-fline "/nautilus:/home/root/bin/ee.sh")
(find-fline "/nautilus:home/root/bin/ee.sh")


(find-fline "/nautilus:")

(find-efile "ange-ftp.el")
(find-efile "ange-ftp.el" "directory-p")
(find-efile "ange-ftp.el" "defun ange-ftp-file-directory-p")
(find-efile "ange-ftp.el" "put 'file-directory-p")
(find-efile "ange-ftp.el" "defun ange-ftp-real-file-directory-p")

(find-fline "/localhost:/")
(find-fline "/localhost:/home/root/bin/ee.sh")
(find-fline "/localhost:bin/ee.sh")





#####
#
# emacs20: potato packages
# 2000jun17
#
#####

# (find-status "emacs20")
# (find-vldifile "emacs20.list")
# (find-fline "/usr/doc/emacs20/")

# (find-status "emacs20-el")
# (find-vldifile "emacs20-el.list")
# (find-fline "/usr/doc/emacs20-el/")




#####
#
# semi
# 2000jun22
#
#####

# «semi»
# (find-status "semi")
# (find-vldifile "semi.list")
# (find-fline "/usr/doc/semi/")

# (find-status "semi-gnus")
# (find-vldifile "semi-gnus.list")
# (find-fline "/usr/doc/semi-gnus/")




#####
#
# gnus
# 2000jun22
#
#####

# (find-status "gnus")
# (find-vldifile "gnus.list")
# (find-fline "/usr/doc/gnus/")

# (find-node "(gnus)Top")
# (find-node "(gnus)Getting Mail")
# (find-node "(gnus)Getting Started Reading Mail")
# (find-node "(gnus)Comparing Mail Backends" "nnbabyl")
# (find-node "(gnus)Comparing Mail Backends" "worst choice")




#####
#
# reading mail in emacs
# 2000jun22
#
#####

# (find-shttpw3 "www.messengers-of-messiah.org/~csebold/emacs/why.phtml")
# But VM doesn't work in the current Emacs20's.
#
grep-available -i emacs \
  | grep-dctrl -i mail \
  | tee ~/o
#
# (find-fline "~/o")




#####
#
# nnml
# 2000nov02
#
#####

# «nnml»  (to ".nnml")
# (find-node "(gnus-e20)Mail Spool")




#####
#
# compile-command and file variables
# 2000jun30 / 2012oct15
#
#####

# «file-variables»  (to ".file-variables")
# «compile-command»  (to ".compile-command")
# (to "coding:")
# (to "safe-local-variable")

cd /usr/src/linux-2.2/
agrep compile-command $(find | grep '\.c$') \
  |& tee ~/o

# (find-k22file "drivers/net/de620.c" "compile-command")
# (find-enode "Compilation" "compile-command")
# (find-enode "File Variables")
# (find-enode "File Variables" ";;; Local Variables:")
# (find-enode "File Variables" "`normal-mode'")
# (find-elnode "Byte Compilation" "no-byte-compile: t")

# (find-efunction 'normal-mode)
# (find-efunction 'hack-local-variables)
# (find-elnode "Index" "* normal-mode:")

# (find-e20tag "find-file")



####
#
# `eval' in file variables
# 2004mar17
#
####

# «file-variables:eval»  (to ".file-variables:eval")
# (find-enode "File Variables" "`eval'")

# (find-efunction 'find-file)
# (find-efunction 'find-file-noselect)
# (progn (find-efunction 'find-file-noselect)
         (ee-isearch "find-file-noselect-1"))
# (find-efunction 'find-file-noselect-1)
# (find-efunction 'find-file-noselect-1 "after-find-file")
# (find-efunction 'after-find-file)
# (find-efunction 'after-find-file "normal-mode")
# (find-efunction 'normal-mode)
# (find-efunction 'hack-local-variables)

# (find-efile "files.el" "(put 'eval 'risky-local-variable t)")
# (find-efunction 'hack-one-local-variable "Permit eval if not root and")

# (find-evariable 'enable-local-eval)





#####
#
# The "safe-local-variable" property
# 2000oct24
#
#####

# «safe-local-variable»  (to ".safe-local-variable")
# (to "file-variables")

# My first attempts to set "ee-temp-bounded-function" in the "Local
# Variables:" section of a file failed; here's why...

# (find-elnode "Invoking the Debugger")
# (find-e20tag "hack-one-local-variable")
# (find-e20file "files.el" "defun normal-mode")
# (find-e20file "files.el" "defun hack-local-variables ")
# (find-e20file "files.el" "defun hack-one-local-variable ")
# (find-e20file "international/mule.el" "defun set-auto-coding ")
# (find-e20file "international/mule.el" "defun make-coding-system ")
# (find-e20file "international/ccl.el")
# (find-fline "~/eev.el" "(put 'ee-temp-bounded-function")

(defun foo ()
  (hack-one-local-variable 'ee-hemp-bounded-function 'eediag-bounded))
(debug-on-entry 'foo)
(foo)

(defun foo ()
  (hack-one-local-variable 'ee-temp-bounded-function 'eediag-bounded))
(debug-on-entry 'foo)
(foo)





#####
#
# Controlling the indentation in C programs
# 2000jul10
#
#####

# «C_indentation»  (to ".C_indentation")
# Just some links, I'm still trying to learn how the make the "case"s
# stand two columns at the right of the "switch".

# (find-e20file "progmodes/")
# (find-e20file "progmodes/c-mode.el")
# (find-e20file "progmodes/c-mode.el" "c-style-alist")
# (find-e20file "progmodes/cc-styles.el")
# (describe-variable 'c-style-alist)
# (describe-function 'c-add-style)
# (setq c-indent-level 5)
# (setq c-label-offset 2)
# (describe-variable 'features)
# (describe-variable 'c-indentation-style)

# (find-e20file "progmodes/cc-compat.el")
# (require 'cc-compat)
# (c-set-style "BOCM")
# (find-e20node "Hooks")
# (find-elnode "Named Features")

(setq c-indent-level 4)
(setq c-continued-statement-offset 5)   ; empty?
(setq c-argdecl-indent 0)               ; empty?
(setq c-brace-offset -5)
(setq c-label-offset 2)

(setq c-indent-level 5)
(setq c-continued-statment-offset 5)
(setq c-argdecl-indent 0)
(setq c-brace-offset -5)
(setq c-label-offset -5)

(find-efile "progmodes/cc-cmds.el")
(find-efile "progmodes/cc-styles.el")
(find-efile "progmodes/cc-mode.el")
(find-efile "progmodes/cc-mode.el" "substitute-key-definition")
(find-evariable 'c-indentation-style)

# (find-node "(ccmode)Built-in Styles")
# (find-node "(ccmode)Styles" "The style variables are:")
# (find-node "(ccmode)Custom Brace and Colon Hanging")
# (find-node "(ccmode)Indentation Commands")








#####
#
# The kill ring
# 2000aug02
#
#####

# (find-e20node "Appending Kills")
# (find-e20node "Earlier Kills")





#####
#
# mailing lists
# 2000aug08
#
#####

# (find-fline "/usr/doc/emacs20/etc/")
# (find-fline "/usr/doc/emacs20/etc/FAQ")
# (find-fline "/usr/doc/emacs20/etc/MAILINGLISTS")

sendemail -s 'subscribe edrx@inx.com.br' help-gnu-emacs-request@gnu.org <<'---'
subscribe edrx@inx.com.br
---

# A list where I can ask questions about how to copyleft e-scripts:
# (find-fline "/usr/doc/emacs20/etc/MAILINGLISTS" "gnu-misc-discuss-request")




#####
#
# input methods
# 2000aug27
#
#####

# (find-e20node "Input Methods" "combines to form")
# (find-e20node "Select Input Method")

# (set-input-method "latin-1-prefix")
# (toggle-input-method)
# (describe-input-method "latin-1-prefix")
# (list-input-methods)




#####
#
# buffer-local variables
# 2000aug28
#
#####

# «buffer-local»  (to ".buffer-local")
# (to "coding:")
# (find-elnode "Creating Buffer-Local")
# (find-elnode "Creating Buffer-Local" "make-variable-buffer-local")
# (describe-function 'set)
# (set (make-local-variable 'ee-delimiter-hash) "\n#-\n")
# ee-delimiter-hash




#####
#
# checkdoc
# 2007aug30
#
#####

# «checkdoc»  (to ".checkdoc")
# This block was very old - I just updated the links.
# (find-efile "emacs-lisp/checkdoc.el")

# (find-elnode "Text Representations")
# (find-efile "")
# (find-efile "international/codepage.el" "defvar cp850-decode-table")
# (find-efile "international/codepage.el" "Windows-1250: ISO-8859-2")
# (find-efile "term/internal.el")
# (find-egrep "grep -niH -e codepage $(find * -name '*.el')")

# (find-enode "Easy Customization")
# (find-elnode "Customization")

# (find-node "(cl)Efficiency Concerns")
# (find-efile "emacs-lisp/cl-extra.el" "cl-prettyexpand")
# (find-efile "emacs-lisp/pp.el")

# (find-efile "international/mule.el")




#####
#
# Changing some symbols' names in eev
# 2000sep05
#
#####

# (find-efile "textmodes/texinfo.el" "(defun texinfo-define-common-keys")

ee-default-strbounded-function	-> ee-temp-bounded-function
ee-strbounded			-> ?
ee-write-bounded		-> ?
ee-fstrbounded			-> ee-meta-bounded
ee-default-strbounded		-> same, or ee-bounded

se-to-string			-> ee-se-to-string
octal-to-num			-> ee-octal-to-number
format-and-eval			-> ee-format-and-eval
ee-infofile-now			-> ee-temp-infofile
ee-code-now			-> ee-temp-code




#####
#
# Adding a minor mode with just some keybindings
# 2000sep07
#
#####

# «easy-mmode»  (to ".easy-mmode")
# (find-angg ".emacs" "gdbk-mode")

# (find-enode "Commands of GUD")
# (find-node "(gdb)Emacs")
# (find-enode "Minor Modes")
# (find-enode "Mode Line")
# (find-elnode "Minor Modes")
# (find-elnode "Easy-Mmode")
# (find-e20file "emacs-lisp/easy-mmode.el")
# (find-e20file "gud.el" "finish")




#####
#
# s/// in strings
# 2000oct06
#
#####

# «replacing_in_strings»  (to ".replacing_in_strings")
# From a posting by rsepulveda@linuxmty.org at the
# help-gnu-emacs@gnu.org list, 2000oct06:

(defun dos2unix ()
 "Convert a buffer from MS-DOS ^M end of lines to UNIX end of lines."
  (interactive)
    (goto-char (point-min))
      (while (search-forward "\r" nil t) (replace-match "")))
(defun unix2dos ()
  "Convert a buffer from UNIX end of lines to MS-DOS ^M end of lines."
  (interactive)
    (goto-char (point-min))
      (while (search-forward "\n" nil t) (replace-match "\r\n")))



#####
#
# temporary buffers
# 2000nov26
#
#####

# «temp-buffer»  (to ".temp-buffer")
# (find-elnode "Current Buffer" "with-temp-buffer")
# (find-etag "find-file")
# (find-etag "find-file-noselect")
# (find-efile "subr.el" "(defmacro with-temp-buffer")

(with-temp-buffer
  (insert-file-contents (substitute-in-file-name "$EEG"))
  (buffer-string))

# (pdb "/usr/share/doc/python/examples/Demo/tkinter/guido/hanoi.py")
# (pdb "/usr/lib/python1.5/pdb.py /usr/share/doc/python/examples/Demo/tkinter/guido/hanoi.py")

(setq ee-lines-list '("help" "b main" "run" "n" "n"))
(defun ee-comint-send-line () (interactive)
  (if ee-lines-list (progn (insert (car ee-lines-list))
			   (comint-send-input)
			   (setq ee-lines-list (cdr ee-lines-list)))))
(global-set-key "\M-L" 'ee-comint-send-line)






#####
#
# scrolling by one line at each time
# 2000oct06
#
#####

# «scrolling_one_line»  (to ".scrolling_one_line")
# (find-eetcfile "FAQ" "setq scroll-step")
# (setq scroll-step 1)
# (setq scroll-step 0)
# (find-node "(emacs-faq)Scrolling only one line")
# (find-enode "Scrolling")
# (find-enode "Scrolling" "`scroll-margin'")
# (find-elnode "Vertical Scrolling" "scroll-step")
# (find-elnode "Vertical Scrolling" "scroll-conservatively")

e20glimpse -i scroll
e20glimpse -i scroll-step
# (find-efile "terminal.el")
# (find-efile "follow.el")

(setq scroll-conservatively 1)
(setq scroll-step 1)

(setq scroll-conservatively nil)
(setq scroll-step nil)

(emacs-version)

#*
sendemail -s 'Scrolling line per line: bug' help-gnu-emacs@gnu.org<<'%%%'
> Try  (setq scroll-step 1)
>
> > -----Original Message-----
> > From: "Baenninger, Dominik" [SMTP:dominik.baenninger@ito.umnw.ethz.ch]
> > Sent: Monday, January 22, 2001 5:27 PM
> > To:	help-gnu-emacs@gnu.org
> > Subject: Scrolling line per line
> >
> > Can anyone say, how I can tell emacs, that when I scroll with the
> > cursor, he should not forwarding several lines per step but only
> > line by line?
> >
> > Thanks
> > Dominik
> >
> > _______________________________________________
> > Help-gnu-emacs mailing list
> > Help-gnu-emacs@gnu.org
> > http://mail.gnu.org/mailman/listinfo/help-gnu-emacs

  (Info-goto-node "(elisp)Vertical Scrolling")
  (setq scroll-step 1)
  (setq scroll-conservatively 1)

But this behaves somewhat strangely if we have wrapped lines. Example:

Suppose that we have a very long line, "foo....bar....baz....quux",
but with many more dots, between a line that says "(recenter -1)" and
one that says "(recenter 0)", i.e.,

(recenter -1)
foo.............................................................................bar.............................................................................baz.............................................................................quux
(recenter 0)

This would appear like

  +------------------+
  |                  |
  |                  |
  |                  |
  |(recenter -1)     |
  |foo..............\|
  |.bar.............\|
  |..baz............\|
  |...quux           |
  |(recenter 0)      |
  |                  |
  |                  |
  +------------------+

in a text window. Then in the following two situations we get a
half-screen of scrolling even with `scroll-step' (or
`scroll-conservatively' in newer Emacsen; see the info node "Vertical
Scrolling" in the Emacs Lisp manual) set to 1:


I) +------------------+       II) +------------------+ 
   |                  |           |(recenter 0)      |
   |                  |           |                  |
   |                  |           |                  |
   |                  |           |                  |
   |                  |           |                  |
   |                  |           |                  |
   |                  |           |                  |
   |                  |           |                  |
   |                  |           |                  |
   |(recenter -1)     |           |                  |
   |foo..............\|           |                  |
   +------------------+           +------------------+

with the cursor in the last     with the cursor in the
line and going down, and...     top line and going up.


Is there a known workaround for this? If not, should I file a bug
report? Or should I consider that this message will be already taken
as a bug report, even if it is being sent to the wrong list?

  Cheers,
  Buenas Salenas Cronopio Cronopio,
    Eduardo Ochs
    http://angg.twu.net/
    edrx@inx.com.br


P.S.: I've tested this on GNU Emacsen 19.34, 20.7.2 and 21.0.93, on an
i386 that runs a rather standard Debian 2.2 GNU/Linux distribution.
%%%

#*


































(This is a miniature of a text window, of course).







 that is, something that would appe



 then in
the following two situations we will get half-screen of scrolling even
with `scroll-step' (or `scroll-conservatively'; see the info node
"Vertical Scrolling" in the Emacs Lisp manual) set to 1:





whose text will  that appears as:

+------------------+
|      	       	   |
|		   |
|		   |
|		   |
|                  |
|(recenter -1)     |
|foo..............\|
+------------------+





+------------------+
|      	       	   |
|		   |
|                  |
|(recenter -1)     |
|foo..............\|
|.bar.............\|
|..baz............\|
|...quux           |
|(recenter 0)	   |
|		   |
|		   |
+------------------+






(before)
foo...........\
.bar..........\
..baz.........\
...quux
(after)





#####
#
# ignoring errors
# 2000oct13
#
#####

# «ignoring_errors»  (to ".ignoring_errors")
# (find-elnode "Catch and Throw")
# (find-elnode "Handling Errors" "condition-case nil")
# (find-elnode "Handling Errors" "Special Form: condition-case")
# (find-elnode "Error Symbols")
# (find-elnode "Standard Errors")

# (find-elnode "Simple Macro")
# (find-efile "emacs-lisp/cl-macs.el" "ignore-errors")
# (find-efile "emacs-lisp/cl-macs.el" "defun gensym")

(condition-case nil
    (+ 1 2)
  (error nil))

(condition-case nil
    (quagawagga)
  (error nil))

(defmacro ignore-errors (body) (list 'condition-case nil body '(error nil)))
(ignore-errors (+ 1 2))
(ignore-errors (quagawagga))

(defmacro ign-errors (body) (list 'condition-case nil body '(error nil)))
(ign-errors (+ 1 2))
(ign-errors (quagawagga))





#####
#
# Pretty-printing
# 2000oct24
#
#####

# «pretty-printing»  (to ".pretty-printing")
# (to "key_name")
# (find-efile "emacs-lisp/pp.el")
# (find-elnode "Function Cells")

# ee-temp-bounded-function
# (insert (pp (symbol-function 'ee-bounded)))
# (insert (pp (symbol-function (key-binding [f3]))))
# (insert (pp (symbol-function ee-temp-bounded-function)))




#####
#
# old version of `inn'
# 2000oct30
#
#####

# «inn-old»  (to ".inn-old")
# The function `inn' was replaced in 2000oct30 by one that could deal
# better with infofiles in non-standard paths; I'm keeping the old
# version here for reference, as it was a bit simpler.

(defun inn (arg)
  "Insert a hyperlink to the current info node.
With an argument try to use the short form, like `# (find-elnode \"Top\")'.
Without an argument always use long forms, like `(find-node \"(elisp)Top\")'."
  (interactive "P")
  (let (f node ee code s)
    (if (get-buffer "*info*")
	(progn
	  (save-excursion
	    (set-buffer "*info*")
	    (string-match "/\\([^/]*\\)$" Info-current-file)
	    (setq f (match-string 1 Info-current-file))
	    (setq node Info-current-node))
	  ;; For debugging:
	  ;; (insert (format "%s %s %s\n" f node ee-temp-infofile))
	  (insert (format ee-comment-format
			  (if (and arg (string= f ee-temp-infofile))
			      (format "(find-%snode \"%s\")" ee-temp-code node)
			    (format "(find-node \"(%s)%s\")" f node)))))
      (error "No curent info node"))))



#####
#
# old versions of `eelatex'
# 2000oct30
#
#####

# «eelatex-old»  (to ".eelatex-old")

;; Run `M-x eelatex' on a block of text and then do a "ee" on a shell;
;; a file ~/LATEX/tmp.tex will be written and "make" will be called to
;; generate a tmp.dvi from it... well, at least if you are on my
;; machine! The definition below is meant to be taken as an example
;; only, as it almost certainly won't work for you; it should be
;; trivial to redefine it in your .emacs, though.
;;
;; (find-fline "~/LATEX/tese2.sty")
;;
(defun eelatex (s e)
  "An `eev'-like function to run LaTeX on a block of text. (Please redefine!)"
  (interactive "r")
  (ee-write s e "cat > ~/LATEX/tmp.tex <<'--%%--'
                 \\input tese2.sty
                 \\begin{document}
                 % \\input mar99a.dnt
                 % \\input mar99b.dnt\n"
	    "\n\\end{document}\n--%%--
             cd ~/LATEX
             rm tmp.dvi
             make tmp.dvi\n"))


; (to "tese")
; An override for eev.el's eelatex
; (find-angg "eev.el" "eelatex")
; (find-es "tex" "edrxnotes")

' (defun eelatex (s e) (interactive "r")
    (ee-write s e "cat > ~/LATEX/tmp.tex <<'--%%--'
      \\input tese2.sty
      \\begin{document}\n"
	      "\n\\end{document}\n--%%--
      cd ~/LATEX
      rm tmp.dvi
      make tmp.dvi
      savetmptex\n"))




#####
#
# making `xmath' a toggle
# 2000nov01
#
#####

# «xmath-toggle»  (to ".xmath-toggle")
# (find-etag "set-frame-font")
# (find-elnode "Parameter Access")
# (find-elnode "Association Lists")

(frame-parameters (selected-frame))
(insert (format "\n%S\n" (frame-parameters (selected-frame))))
(pp (frame-parameters (selected-frame)))
(pp (frame-parameters (selected-frame)) (current-buffer))
(assoc 'font (frame-parameters (selected-frame)))




#####
#
# Making the first mouse click not move point
# 2000nov02
#
#####

# «mouse-select-window»  (to ".mouse-select-window")
# (find-efile "mouse.el" "[mode-line mouse-1] 'mouse-select-window")
# (find-efile "mouse.el" "defcustom mouse-yank-at-point")

# I want to make the mouse in an Emacs running on X behave as close as
# possible to how it does in VTs with gpm... The first two commands
# below still don't work as I wanted.

(global-set-key [mouse-1]		'mouse-select-window)
(global-set-key [double-mouse-1]	'mouse-set-point)
(setq mouse-yank-at-point t)

# (view-lossage)




#####
#
# mkto
# 2000nov11
#
#####

# «mkto»  (to ".mkto")

# (describe-function 'replace-regexp)
# (find-etag "replace-regexp")
# (find-efile "replace.el")
# (find-elnode "Index")
# (find-enode "Regexps")
# (find-enode "Regexps" "\n`^'")
# (describe-function 'narrow-to-region)
# (find-elnode "Narrowing")
# (find-elnode "Regexp Search")

# (find-angg ".emacs" "mkto")




#####
#
# emacs-21.1 (Debian source)
# 2001oct29
#
#####

# «emacs21»  (to ".emacs21")
#*
pdsc $SDEBIAN/pool/main/e/emacs21/emacs21_21.1-2.dsc
cd /usr/src/emacs21-21.1/

find * -name '*.[ch]' | sort > .files.ch
glimpseindex -H . -F < .files.ch
etags $(<.files.ch)

cd /usr/src/emacs21-21.1/lisp/
find * -name '*.el' | sort > .files.el
glimpseindex -H . -F < .files.el
etags $(<.files.el)

patch -b -p0 debian/control <<'%%%'
12c12
< Depends: emacsen-common (>= 1.4.10), dpkg (>= 1.9.0), ${shlibs:Depends}
---
> Depends: emacsen-common (>= 1.4.10), dpkg, ${shlibs:Depends}
%%%

patch -b -p0 debian/control.in <<'%%%'
12c12
< Depends: emacsen-common (>= 1.4.10), dpkg (>= 1.9.0), ${shlibs:Depends}
---
> Depends: emacsen-common (>= 1.4.10), dpkg, ${shlibs:Depends}
%%%

cd /usr/src/emacs21-21.1/
debian/rules binary	|& tee odrb

#*
# Random notes about installing emacs21:
aptrm calc	;# the emacs21 installation chokes on calc
cd /usr/src
dpkg -i \
  emacs21_21.1-2_i386.deb \
  emacs21-el_21.1-2_all.deb

# Errors:
#   install-info: unknown option `--remove-exactly'
#   grep: Unmatched ) or \)
# (find-man "1 grep" "lose their special meaning")

sh -x /var/lib/dpkg/info/emacs21.postinst |& tee ~/o
/usr/lib/emacsen-common/emacs-install emacs21 |& tee ~/o

# (find-fline "~/o")
# (find-fline "/var/lib/dpkg/info/emacs21.postinst" "ctags\\")
# (find-fline "/usr/lib/emacsen-common/packages/install/calc")
# (find-fline "/usr/lib/emacsen-common/emacs-install")

# (find-e21file "")
# (find-e21file "odrb")
# (find-e21file "debian/")
# (find-e21file "debian/changelog" "dpkg (>= 1.9.0)")
# (find-e21file "debian/emacs.postinst" "install-info")
# Note the "|| true"s; the install-info errors will be harmless.

#*
# (find-es "hurd" "emptyhurd_newdpkg")
cd /usr/src/
dpkg -i \
  dpkg-dev_1.9.16_all.deb \
  dpkg-doc_1.9.16_all.deb \
  dpkg_1.9.16_i386.deb
#*
cd /var/cache/apt/archives/
dpkg -i \
  dpkg-dev_1.6.15_all.deb \
  dpkg-doc_1.6.15_all.deb \
  dpkg_1.6.15_i386.deb
#*




#####
#
# emacs-21.0.103
# 2001jun26
#
#####

# (find-shttpw3 "www.mit.edu/afs/athena/astaff/project/emacs/beta/src/")
#*
cd /usr/src/
rm -Rv emacs-21.0.103/
tar -xvzf $S/http/www.mit.edu/afs/athena/astaff/project/emacs/beta/src/emacs-21.0.103.tar.gz

cd /usr/src/emacs-21.0.103/
find * -name '*.[ch]' | sort > .files.ch
glimpseindex -H . -F < .files.ch
etags $(<.files.ch)

cd /usr/src/emacs-21.0.103/lisp/
find * -name '*.el' | sort > .files.el
glimpseindex -H . -F < .files.el
etags $(<.files.el)

cd /usr/src/emacs-21.0.103/
chmod 755 configure move-if-change
./configure	|& tee oc

# With optimization I can't set a breakpoint at update_end, for example.
#make		|& tee om
#rm -v src/term.o; make CFLAGS=-g	|& tee om2

make CFLAGS=-g	|& tee om
#*




#####
#
# emacs-21.0.93
# 2001jan07
#
#####

# «emacs21-gdb»  (to ".emacs21-gdb")
# (to "emacs21-gdb_1")
# I'm having a problem with the rendering of certain textmode glyphs
# on Emacs21; I think that if I'm the only one using these glyphs then
# I should be in charge of fixing the support for them.
#*
cd /usr/src/
rm -Rv emacs-21.0.93/
tar -xvzf ~/tmp/emacs-21.0.93.tar.gz

cd /usr/src/emacs-21.0.93/
find * -name '*.[ch]' | sort > .files.ch
glimpseindex -H . -F < .files.ch
etags $(<.files.ch)

cd /usr/src/emacs-21.0.93/lisp/
find * -name '*.el' | sort > .files.el
glimpseindex -H . -F < .files.el
etags $(<.files.el)

cd /usr/src/emacs-21.0.93/
chmod 755 configure move-if-change
./configure	|& tee oc

# With optimization I can't set a breakpoint at update_end, for example.
#make		|& tee om
#rm -v src/term.o; make CFLAGS=-g	|& tee om2

make CFLAGS=-g	|& tee om

#*
/usr/src/emacs-21.0.93/src/emacs -nw ~/CRIM/015ideas

#*
# (gdbk-gdb t "/usr/src/emacs-21.0.93/src/emacs")
set args -nw /home/root/CRIM/014ideas
set env TERM linux
br Sredraw_screen

#*
# (gdbk-gdb t "/usr/src/emacs-21.0.93/src/emacs")
set args -nw /home/root/CRIM/014ideas
set env TERM linux
#tbr main
#tbr init_display
# tbr init_keyboard
# tbr init_sys_modes
#tbr Frecursive_edit
tbr recursive_edit_1
#tbr command_loop
run

#*
# (find-es "gdb" "invoking_gdbk")
cat > $EEG <<'---'
br Fredraw_frame
---

GNUCLIENT=no expect -c '
  spawn [set f /usr/src/emacs-21.0.93/src/emacs] -nw $env(HOME)/CRIM/014ideas
  interact "\033g" {catch {exec gnudoit "(gdbk-gdb nil \"$f [exp_pid]\")"}}
'



#####
#
# emacs21: debugging the display engine with eeg2
# 2001jan26
#
#####

# (find-es "console" "screen_demo_eeg2")
# (find-enode "Action Arguments")
# (to "gnuserv")
# (find-angg "EXPECT/eeg2" "read_EEG")
# (find-sitelispfile "gnuserv/gnuserv.el" "(defun gnuserv-start")

#*
cd /usr/src/emacs-21.0.93/
cd src/; rm term.o; make CFLAGS=-g

#*
# «emacs21-gdb_1»  (to ".emacs21-gdb_1")
# (to "emacs21-gdb")
# First we need to shut down the gnuserv of the current Emacs, because
# it is the emacs controlled by "screen" that should receive the
# commands.
gnudoit '(gnuserv-start 0)'

cat > /tmp/1.eeg <<'---'
tcl: # We're in emacs20; make sure the new Emacs will have a gnuserv.
tcl: ac {(gnuserv-start)} {^[E}
tcl: # Start a shell in a new "screen" window. Then use gnudoit to
tcl: # make our emacs20 visit this (!) e-script, and use expect to
tcl: # start an gnuservless emacs21; expect will trap `M-g' and make
tcl: # it do a gnudoit call to make emacs20 attach a gdb to the
tcl: # emacs21.
tcl: ac {^Ac}
gnudoit '(find-es "emacs" "emacs21-gdb_1")'
GNUCLIENT=no exec expect -c '
  spawn [set f /usr/src/emacs-21.0.93/src/emacs] -nw $env(HOME)/CRIM/014ideas
  interact "\033g" {catch {exec gnudoit "(gdbk-gdb nil \"$f [exp_pid]\")"}}
'
tcl: # Running `M-x cs' will switch to the evil display table and
tcl: # trigger the bug; the rendering will be wrong.
tcl: ac {^[xcs^M} 
tcl: # We will send the magical `M-g'. Warn the user.
tcl: am {Next key: M-g!}; ac {^[g}
tcl: # Switch back to emacs20, that has just entered GUD mode.
tcl: ac {^A0}
tcl: # We tell gdb to set a breakpoint at Fredraw_frame, and continue.
br Fredraw_frame
br update_end
cont
tcl: # Back to emacs21.
tcl: ac {^A1}
tcl: # Issue an F4 (redraw-screen). The breakpoint will be reached.
tcl: am {Next key: F4.}; ac {^[[[D}
tcl: # Back to emacs20, that will be showing e21 stopped at the breakpoint.
tcl: ac {^A0}
tcl: am {You're on your own now.}
---

eeg2 -c "allowtcl; set ee_generic /tmp/1.eeg; readlines; now_in screen" \
  screen emacs20 -nw

#*
cd /usr/src/emacs-21.0.93/
l +/update_end $(e21sglimpse -l update_end)

#*
# (eeg-bounded 'once)
# Argh, a breakpoint
br update_end

#*




# (find-e21file "")
# (find-e21tag "redraw_display")
# (find-e21tag "enable_glyph_matrix_rows")
# (find-e21file "src/term.c" "void\nupdate_end (f)")

# (code-c-d "e21" "/usr/src/emacs-21.0.93/" "/usr/src/emacs-21.0.93/info/emacs")
# (code-c-d "e21" "/usr/src/emacs-21.0.93/")
# (find-e21file "om")
# (find-e21file "src/dispnew.c" "call0 (intern (\"tty-set-up-")
# (find-e21file "src/keyboard.c" "Lisp_Object\nrecursive_edit_1 ()")

Idea for the gdbk calls: if the kbrd arg is non-nil, create a new frame

# (find-e21node "")
# (find-e21node "Tab Stops")
# (Info-goto-node "(emacs)Concept Index")






#####
#
# Hyperbole
# 2000jan08
#
#####

# «hyperbole»  (to ".hyperbole")
#
rm -Rv /usr/src/hyperbole/
cd /usr/src/
tar -xvzf $S/ftp/ftp.beopen.com/pub/hyperbole/beopen-hyperbole-4.18.tgz
cd /usr/src/hyperbole/
#

# (code-c-d "hypb" "/usr/src/hyperbole/")
# (find-hypbfile "")
# (find-hypbfile "HY-README" "To autoload Hyperbole")

(defvar hyperb:dir "/usr/src/hyperbole/")
(load (expand-file-name "hversion" hyperb:dir))
(load (expand-file-name "hyperbole" hyperb:dir))

(require 'hsite)

# Not ok yet






# (to "coding:")
# (find-fline "/tmp/emacs.info")
# (find-enode "Recognize Coding" "coding:")
# (find-enode "File Variables")

# (find-etag "universal-coding-system-argument" ":")
# (describe-function 'read-coding-system)
# (read-coding-system "Coding:")

# (find-fline "~/LATEX/desenhos.014")

e20glimpse unibyte | l -S
#

# (find-elfile "term/internal.el" "Let the unibyte version behave as Emacs 19 did.")


# (find-efile "ffap.el")


# (find-etag "Info-goto-emacs-key-command-node")
# (find-etag "Info-file-list-for-emacs")
# (find-etag "Info-find-emacs-command-nodes")
# (find-elnode "Symbol Plists")

(symbol-plist 'kill-line)






#####
#
# gnuserv
# 2001jan17
#
#####

# «gnuserv»  (to ".gnuserv")
# (find-angg ".emacs" "gnuserv")
# (gnuserv-start)

# (find-status "gnuserv")
# (find-vldifile "gnuserv.list")
# (find-fline "/usr/doc/gnuserv/")
# (find-fline "/usr/doc/gnuserv/README.gz")

# (find-fline "/usr/share/emacs/site-lisp/gnuserv/devices.el")
# (find-fline "/usr/share/emacs/site-lisp/gnuserv/gnuserv-compat.el")
# (find-fline "/usr/share/emacs/site-lisp/gnuserv/gnuserv.el")

# (eeman "1 gnuclient")
# (eeman "1 gnudoit")
# (eeman "1 gnuserv")

# (find-fline "/etc/emacs/site-start.d/50gnuserv.el")
# (find-sitelispfile "gnuserv/gnuserv.el")
# (find-sitelispfile "gnuserv/gnuserv.el" "(defun server-edit-files ")

#*
gnudoit '(pwd)'
gnudoit '(find-enode "Top")'
# gnuclient +4 ~/CRIM/011ideas
#*
# Interacting with code-c-d:
# (find-angg ".emacs" "code-c-ds")
cd $(gnudoit '(substitute-in-file-name (ee-knuthfile ""))')
echo $(gnudoit '(substitute-in-file-name (ee-knuthfile "tex/texbook.tex"))')
#*
lsof \
  | grep '^\(gnuserv\|emacs\)' \
  | cut -b1-8,26- \
  | grep -v /lib/ \
  | tee ~/o
# (find-fline "~/o")
#*

echo hello > /tmp/o
strace -o ~/s -s 90 -f gnuclient /tmp/o
# (find-fline "~/s")
#*
gnudoit "(server-edit-files '((1 . \"/tmp/o\")))"
#*
gnudoit "(server-edit-files '((1 . \"/tmp/o\")))\004"
#*





#####
#
# xemacs21
# 2000oct13
#
#####

# «xemacs21»  (to ".xemacs21")

# (find-node "(xemacs21)Top")
# (find-node "(xemacs-21.1.10/xemacs)Top")
# (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")

# (find-node "(xemacs21)Top")
# (find-xenode "")
# (find-xelnode "")
# (find-xeinode "")
# (find-xefaqnode "")

# (find-xelnode "Glyphs")

# (find-xemnode "Variable Index")

# (find-status "xemacs21")
# (find-status "xemacs21-basesupport")
# (find-status "xemacs21-bin")
# (find-status "xemacs21-mule")
# (find-status "xemacs21-mulesupport")
# (find-status "xemacs21-support")

# (find-vldifile "xemacs21.list")
# (find-vldifile "xemacs21-basesupport.list")
# (find-vldifile "xemacs21-bin.list")
# (find-vldifile "xemacs21-mule.list")
# (find-vldifile "xemacs21-mulesupport.list")
# (find-vldifile "xemacs21-support.list")





#####
#
# faces in terminals (emacs21)
# 2001feb15
#
#####

# «faces»  (to ".faces")
# (find-angg ".emacs" "faces")

# (find-elnode "Changing Properties")
# (find-elnode "Changing Properties" "To remove all text properties")
# (find-elnode "Overlay Properties" "`(foreground-color . COLOR-NAME)'")
# (find-efile "facemenu.el" "(cons 'foreground-color (car list))")
# (find-elnode "Examining Properties")
# (find-elnode "Face Functions")
# (find-ecvssrctag "Fput_text_property")
# (find-ecvsfile "src/fontset.c" "jit-lock-mode")

# (font-lock-mode)

What is the "fontified" text property, and why can't I change
properties of text when it is t?

# (find-efile "fast-lock.el")
# (find-efile "font-lock.el")
# (find-efile "lazy-lock.el")
# (find-e21file "lisp/jit-lock.el")

# (find-efile "faces.el")
# (symbol-plist 'eev-red)
# (symbol-plist 'font-lock-comment-face)
# (find-variable 'font-lock-comment-face)
# (find-efile "font-lock.el" "(defface font-lock-comment-face")

# (find-elnode "Faces for Font Lock")
# (sexp-face 'font-lock-comment-face)
# (sexp-face 'font-lock-string-face)
# (sexp-face 'font-lock-keyword-face)
# (sexp-face 'font-lock-builtin-face)
# (sexp-face 'font-lock-function-name-face)
# (sexp-face 'font-lock-variable-name-face)
# (sexp-face 'font-lock-type-face)
# (sexp-face 'font-lock-constant-face)
# (sexp-face 'font-lock-warning-face)


# (find-e21file "lisp/custom.el")
# (find-e21file "lisp/cus-edit.el")
# (find-e21file "lisp/cus-face.el")
# (find-e21file "lisp/widget.el")
# (find-e21file "lisp/wid-edit.el")
# (find-e21file "lisp/wid-browse.el")

# (find-elnode "Managing Overlays")
(defun oa () (interactive) (message "%S" (setq ovs (overlays-at (point)))))
(customize)

# (find-node "(widget)Introduction")
# (find-node "(widget)Setting Up the Buffer")





#####
#
# How Emacs implements hyperlinks in the `describe-{function,key}' pages
# 2001jun13
#
#####

# «describe-xxx_hyperls»  (to ".describe-xxx_hyperls")

(emacs-lisp-mode)
(load-library "help.el")
(progn (describe-key "\C-hl")
       (switch-to-buffer "*Help*")
       (ee-goto-position "`hel")
       (setq my-tpa (text-properties-at (point)))
       (kill-buffer (current-buffer))
       (insert (pp my-tpa)))

;; Here's the value of my-tpa that I got, pretty-printed:
;;
(setq my-tpa '(face underline
	       help-xref ((lambda (arg)
			    (let ((location (find-function-noselect arg)))
			      (pop-to-buffer (car location))
			      (goto-char (cdr location))))
			  view-lossage)
	       mouse-face highlight))

(progn (describe-key "\C-hl")
       (switch-to-buffer "*Help*")
       (describe-key "\r"))

(find-efile "help.el" "defun help-make-xrefs")
(find-efile "help.el" "defun help-follow ")
(find-efile "help.el" "defun find-function-noselect ")

(progn (describe-key "\C-hl")
       (switch-to-buffer "*Help*")
       (ee-goto-position "`hel")
       (debug) (help-follow (point)))

(symbol-file 'view-lossage)
(find-function-search-for-symbol 'view-lossage nil "help.el")
(find-function-noselect 'view-lossage)

(find-efile "help.el" "find-function-noselect")

(defun find-efunction (symbol)
  (let ((location (find-function-noselect symbol)))
    (switch-to-buffer (car location))
    (goto-char (cdr location))))

(defun find-evariable (symbol)
  (let ((location (find-function-noselect symbol)))
    (switch-to-buffer (car location))
    (goto-char (cdr location))))

(find-efunction 'view-lossage)
(find-efunction 'code-c-d)
(find-efunction 'find-efile)

(find-efile "emacs-lisp/find-func.el" "defun find-function-search-for-symbol")


(progn (describe-variable 'sentence-end-double-space)
       (switch-to-buffer "*Help*")
       (ee-goto-position "Defined in `text")
       (debug) (help-follow (point)))



#####
#
# How emacs implements the customization buffers
# 2001nov21
#
#####

# «customization-buffers»  (to ".customization-buffers")
# (to "describe-xxx_hyperls")
# (find-angg ".emacs" "isearch-faces")
# (find-e21file "lisp/")
# (find-e21file "lisp/isearch.el")
# (find-e21file "lisp/isearch.el" "defgroup isearch-faces")
# (find-e21file "lisp/isearch.el" "defface isearch-lazy-highlight-face")
# (find-efunction 'defface)
# (find-e21file "lisp/cus-edit.el")
# (find-elnode "Customization")

(progn (customize)
       (ee-goto-position "Editing group: [Go to")
       (describe-key "\r"))

(progn (customize)
       (ee-goto-position "Editing group: [Go to")
       (widget-button-press (point))
       (ee-goto-position "Matching group: [Go to")
       (widget-button-press (point))
       (ee-goto-position "Isearch group: [Go to")
       (widget-button-press (point))
       (ee-goto-position "Isearch Faces group: [Go to")
       (widget-button-press (point))
       (ee-goto-position "Isearch Lazy Highlight Face:(sample) ["))

(progn (customize)
       (ee-goto-position "Editing group: [Go to")
       (setq my-cp (get-char-property (point) 'button)))
(insert (pp my-cp))

(progn (customize)
       (ee-goto-position "Editing group: [Go to")
       (debug)
       (widget-button-press (point)))

(find-efunction 'widget-button-press)

(customize-group 'editing)
(customize-group 'isearch-faces)






#####
#
# man
# 2001jun10
#
#####

# «man»  (to ".man")
# (man "find")
#   (switch-to-buffer "*Man find*")
#   (switch-to-buffer "*Messages*")
#   (kill-buffer "*Man find*")
#   (man "find")
# (describe-function 'man)
# (describe-variable 'Man-notify-method)
# (find-efile "man.el")
# (find-efile "man.el" "defun man ")
# (find-efile "man.el" "defun Man-notify-when-ready ")
# (find-efile "man.el" "defun Man-bgproc-sentinel ")
# (find-efile "man.el" "(eq Man-notify-method 'friendly)")

# Reload the ".el" to make the functions more debuggable:
# (insert (pp (symbol-function 'man-follow)))
# (load-library "man.el")

# (progn (debug) (man "find"))

# (find-efile "man.el" "defun Man-getpage-in-background ")
# (kill-buffer "*Man find*")
# (Man-getpage-in-background "find")
# (progn (debug) (Man-getpage-in-background "find"))



# (global-set-key "\M-D" 'edebug-defun)
# (find-elnode "Edebug")
# Main edebug-mode keys: [space] for "descend", "n" for "next", "q"
# for "quit" (= top-level).

# (find-efile "man.el" "defun man ")
# (find-efile "man.el" "defun Man-bgproc-sentinel ")
# (man "find")
# (load-library "man.el")

# (find-angg ".emacs" "c-mode-hook")
# (describe-function 'add-hook)
# (find-efile "subr.el" "defun add-hook ")

# Man-notify-method is only used when the buffer already exists.
# (describe-variable 'Man-notify-method)
# (let ((Man-notify-method 'pushy)) (man "find"))

# (find-efile "man.el" "set-process-sentinel")
# (find-elnode "Process Information")
# (find-elnode "Defining Functions" "defalias")
# (find-elnode "Function Cells" "Function: fset")






# (switch-to-buffer "*Man find*")
# (switch-to-buffer "*Messages*")

# (find-fline "~/tmp/man.el")
# (find-efile "man.el")

# (load-library "man.el")

(progn
  (load-library "~/tmp/man.el")
  (fset 'Man-bgproc-sentinel-orig (symbol-function 'Man-bgproc-sentinel))
  (defun Man-bgproc-sentinel (process msg)
    (let ((Man-buffer (if (stringp process) (get-buffer process)
			(process-buffer process))))
      (eval 'bgproc-code1)
      (Man-bgproc-sentinel-orig process msg)
      (eval 'bgproc-code2)))
  ;;
  (fset 'Man-notify-when-ready-orig (symbol-function 'Man-notify-when-ready))
  (defun Man-notify-when-ready (man-buffer)
     (switch-to-buffer man-buffer)
     (ee-goto-position "made up"))
  )

a.7


(progn
  (condition-case nil
      (kill-buffer "*Man find*")
    (error nil))
  (setq bgproc-code1 nil)
  (setq bgproc-code2 nil)
  '(setq bgproc-code2
	'(progn
	   (message "Hello from code2!\n")
	   (switch-to-buffer Man-buffer)
	   (ee-goto-position "taken")
	   ))
  (man "find")
  ;; (switch-to-buffer "*Messages*")
  )



;; (find-fline "~/tmp/man.el")

(let ((Man-notify-method 'pushy)) (man "find"))

(let ((Man-notify-method 'bully))
  (man "find")
  (switch-to-buffer "*Man find*")
  (ee-goto-position "all files"))







# (find-fline "~/tmp/man.el" "defun Man-bgproc-sentinel")
# (find-elnode "Handling Errors")

(load-library "~/tmp/man.el")
(progn (find-fline "~/tmp/man.el" "defun man ") (edebug-defun))
(progn (find-fline "~/tmp/man.el" "defun Man-bgproc-sentinel ") (edebug-defun))
(kill-buffer "*Man find*")
(man "find")
(let ((Man-notify-method 'pushy)) (man "find"))

(let ((Man-notify-method 'bully))
  (man "find")
  (switch-to-buffer "*Man find*")
  (ee-goto-position "all files"))

man-follow









# (find-e21lfile "gnus/gnus-audio.el")
# (find-e21lfile "gnus/earcon.el")

(play-sound-file sound-file)
(play-sound-file "/snarf/ftp/ftp.funet.fi/pub/Linux/PEOPLE/Linus/SillySounds/english.au")

# (code-c-d "ttsound" "$S/http/www.bbc.co.uk/education/teletubbies/goodies/sounds/")
# (find-ttsoundfile "")
(play-sound-file (ee-ttsoundfile "po/ehoh.wav"))
(play-sound-file (ee-ttsoundfile "po/uhoh.wav"))


# (find-e21file "lisp/")
# (find-e21file "lisp/image.el")
# (find-e21file "lisp/image-file.el")
# (find-e21file "lisp/faces.el")



# (find-efile "emacs-lisp/find-func.el")
# (find-function 'eev)
# (find-variable 'ee-delimiter-hash)





# (find-node "(elisp)Overlay Arrow")
e20glimpse overlay-arrow
# (find-efile "gud.el")
# (find-efile "emacs-lisp/edebug.el")



(defun foo () (insert "foo!"))
(defun bar () (insert "bar!"))
;; This is like "(defun foo <definition of bar>)".
(defalias 'foo 'bar)
(foo)
(bar)






;; (find-elnode "Autoload" "magic autoload comment")
;; (find-elnode "Comment Tips")
;; (find-elnode "Library Headers")
;; (find-elnode "Documentation Tips")
;; (find-elnode "Documentation Tips" "single-quotes")
;; (find-elnode "Keys in Documentation")
;; (find-es "escripts" "eev-tutorial")

;; 2000aug28: I'm trying to move a lot of the documentation in this
;; file to "docstrings"; if you're reading this file in Emacs and you
;; have already loaded it as a library then you may execute the Lisp
;; hyperlinks below with C-x C-e, and they should give you a good
;; notion of how to use all this. The texts you'll meet may not be too
;; friendly, though.
;;
;; (describe-function 'find-fline)
;; (describe-function 'find-node)
;; (describe-function 'ee-goto-position)
;; (describe-function 'eev)
;; (describe-function 'eeman)
;; (describe-function 'eecd)
;; (describe-function 'eeg)
;; (describe-function 'eev-bounded)
;; (describe-function 'eelatex)
;; (describe-function 'eelatex-bounded)
;; (describe-function 'eeg-bounded)
;; (describe-function 'end-of-line-then-eval-last-sexp)
;; (describe-function 'ee-bounded)
;; (describe-function 'code-c-d)
;; (describe-function 'inn)
;; (describe-function 'dff)

;; The main use for this is in connection with an Expect script that
;; is also called 


The "generic interface" is so simple that it is very difficult
;; to describe... basically you save a block with `M-x eeg', and using
;; an Expect script that is also called eeg you can paste lines from
;; the saved block to an application one by one (it won't work easily
;; from shell-mode, however, as it needs to trap some keys). See the
;; docs in the script.




;;;;
;;;; «keys»  (to ".keys")
;;;; Convenient key shortcuts.
;;;; You need to unquote them to make them work, of course.
;;;; Note that by default M-e is `forward-sentence' and M-k is
;;;; `kill-sentence'; the default bindings will be overwritten
;;;; by these.
;;
;; (find-node "(elisp)Quoting")
;; (find-node "(elisp)Changing Key Bindings")





features


# (list-colors-display)
# (find-e21file "lisp/facemenu.el" "defun list-colors-display")
# (find-e21file "lisp/faces.el" "defun defined-colors")
# (find-e21file "lisp/term/tty-colors.el" "tty-color-alist")



cd /usr/src/emacs-21.0.93/
l +/yellow $(e21sglimpse -l yellow)



# (find-elnode "Documentation Basics")
# (find-e21file "lib-src/")
# (find-e21file "lib-src/make-docfile.c")

cd /usr/src/emacs-21.0.93/
lib-src/make-docfile lisp/simple.elc




#####
#
# splitting eev.el
# 2001jul11
#
#####

# «split_eev»  (to ".split_eev")
#*
rm -Rv /usr/src/eev/
mkdir  /usr/src/eev/
cd /usr/src/eev/
cp -v ~/eev-all.el .
filter EEV   < eev-all.el > eev.el
filter LINKS < eev-all.el > eev-links.el
filter SAVE  < eev-all.el > eev-save.el
filter MISC  < eev-all.el > eev-misc.el
laf

#*
# (find-fline "~/eev-all.el")
# (find-fline "/usr/src/eev/eev.el")
# (find-fline "/usr/src/eev/eev-links.el")
# (find-fline "/usr/src/eev/eev-save.el")
# (find-fline "/usr/src/eev/eev-misc.el")

# (find-fline "/usr/src/eev/")





#####
#
# ffap
# 2001jul26
#
#####

# «ffap»  (to ".ffap")
# (find-efile "ffap.el" "url from the text around")

/usr/share/emacs/20.7/lisp/ffap.el
ftp://127.0.0.1/

(require 'ffap)
(ffap-bindings)



#####
#
# erc
# 2001jul26
#
#####

# «erc»  (to ".erc")
# (find-angg ".emacs" "erc")
# (find-ewikipage "EmacsIRCClient")

# http://www.emacswiki.org/cgi-bin/wiki/CategoryChatClient
# http://www.emacswiki.org/cgi-bin/wiki/EmacsIRCClient
# http://www.emacswiki.org/cgi-bin/wiki/ErcEmacsChannel
# http://www.emacswiki.org/cgi-bin/wiki/ErcCvsFeatures
# http://www.emacswiki.org/cgi-bin/wiki/BitlBee
# Nightly CVS snapshots:          http://erc.sf.net/snaps
# Gateway to other chat services: http://www.bitlbee.org/

#*
# 2005jan10: erc-5.0
# http://voxel.dl.sourceforge.net/sourceforge/erc/erc-5.0.tar.gz
#
rm -Rv ~/usrc/erc-5.0/
tar -C ~/usrc/ \
  -xvzf $S/http/voxel.dl.sourceforge.net/sourceforge/erc/erc-5.0.tar.gz
cd     ~/usrc/erc-5.0/

#*
# rm -Rv /usr/src/erc/
cd $usr_src/
cvs     -d:pserver:anonymous@cvs.erc.sourceforge.net:/cvsroot/erc login 
cvs -z3 -d:pserver:anonymous@cvs.erc.sourceforge.net:/cvsroot/erc co erc
cd $usr_src/erc/

#*
# http://erc.sourceforge.net/snaps/
# http://erc.sourceforge.net/snaps/erc-2004-12-05.tar.gz
rm -Rv ~/usrc/erc/
tar -C ~/usrc/ -xvzf $S/http/erc.sourceforge.net/snaps/erc-2004-12-05.tar.gz
cd     ~/usrc/erc/

make clean	|& tee omclean
make 		|& tee om

#*
cd ~/usrc/erc/
make clean
make |& tee om

#*
(add-to-list 'load-path "~/usrc/erc/")
(load-library "erc-auto")
(setq erc-server "irc.freenode.net" ; changed, was irc.openprojects.net
      erc-port 6667 
      erc-nick '("edrx" "edrx2" "edrx3")
      erc-user-full-name "Eduardo Ochs <http://angg.twu.net/>"
      erc-coding-system-for-target '(("#debian-br" . utf-8))
      erc-pals '("jahnke" "edrx2")
      erc-current-nick-highlight-type 'keyword)
(erc-completion-mode 1)
(erc-select)

(erc-select "im.bitlbee.org")

(load-library "erc-match")
(load-library "erc-pcomplete")
#*

# (find-ercfile "erc-track.el")

# (find-fline "$usr_src/erc/")
# (find-fline "$usr_src/erc/erc.el")
# (find-fline "$usr_src/erc/erc.el" "defun erc ")

(add-to-list 'load-path (substitute-in-file-name "$usr_src/erc/"))
;; (load-library "$usr_src/erc/erc.el")
(load-library "erc.el")
(setq erc-server "irc.freenode.net" ; changed, was irc.openprojects.net
      erc-port 6667 
      erc-nick '("edrx" "edrx2" "edrx3")
      erc-user-full-name "Eduardo Ochs <http://angg.twu.net/>")
(load-library "erc-match")
(load-library "erc-pcomplete")
(setq erc-keywords '("edrx"))
(erc-select)
(erc)

# (find-fline "$usr_src/erc/erc.el" "M-x customize-group RET erc RET")
# (customize-group 'erc)
# (find-evariable 'erc-use-info-buffers)

# (find-ercfile "")
# (find-ercfile "erc-pcomplete.el")

# (find-ercfile "erc.el")
# (find-ercfile "erc.el" "erc-email-userid")
# (find-ercfile "erc.el" "erc-email-userid" "erc-email-userid")
(setq erc-email-userid "edrx_nospam@mat.puc-rio.br")
# (find-progoutput "ps ax | grep identd")
# (find-man "identd")



####
#
# accents in erc
# 2004apr04
#
####

# «erc-accents»  (to ".erc-accents")





#####
#
# setenv (with thanks to delYsid from #emacs)
# 2001nov22
#
#####

# «setenv»  (to ".setenv")

(list
  (setq a 20)
  (let ((a a)) (setq a 32))
  a)
;;
;; -> (20 32 20)

(list
  (progn (setenv "FOO" "FOO") (getenv "FOO"))
  (let ((process-environment process-environment))
    (progn (setenv "FOO" "BAR") (getenv "FOO")))
  (getenv "FOO"))
;;
;; -> ("FOO" "BAR" "BAR")

;; (find-elnode "Sequence Functions" "Function: copy-sequence")
;; (describe-variable 'process-environment)
;; (find-efunction 'setenv "setcdr")

(list
 (progn (setenv "FOO" "FOO") (getenv "FOO"))
 (let ((process-environment (copy-sequence process-environment)))
   (setenv "FOO" "BAR") (getenv "FOO"))
 (getenv "FOO"))
;;
;; -> ("FOO" "BAR" "FOO")



#####
#
# Fixing Info-find-emacs-command-nodes
# 2001nov29
#
#####

# (find-efunction 'Info-goto-emacs-key-command-node)
# (find-efunction 'Info-goto-emacs-command-node)
# (find-efunction 'Info-find-emacs-command-nodes "(info-file \"emacs")
# (find-evariable 'Info-file-list-for-emacs)
#
# (describe-key "\C-h\C-k")
# (Info-goto-emacs-key-command-node "\C-hk")
# (Info-find-emacs-command-nodes 'describe-key)

# (find-efunction 'Info-find-emacs-command-nodes "(info-file \"emacs")

# Must change "emacs" to "emacs-e20" on Debian systems... I haven't
# done it permanently, though, just tested that the new definition
# works.





#####
#
# speadsheets
# 2004apr05
#
#####

# «spreadsheets»  (to ".spreadsheets")
# http://www.emacswiki.org/cgi-bin/wiki/SpreadSheet



#####
#
# ses21
# 2004apr05
#
#####

# «ses»  (to ".ses")
#*
rm -Rv ~/usrc/ses21-031130/
tar -C ~/usrc/ \
   -xvzf $S/http/home.comcast.net/~jyavner/ses/ses21-031130.tgz
cd ~/usrc/ses21-031130/
#*
# (code-c-d "ses" "~/usrc/ses21-031130/")
# (find-sesfile "")
# (find-sesfile "ses.elc" "Emacs version 21.3.50.1")

(add-to-list 'load-path "~/usrc/ses21-031130/")
(autoload 'ses-mode "ses.el" "Spreadsheet mode" t)

(progn (find-sesfile "ses-example.ses")
       (ses-mode))




#####
#
# dismal
# 2000jan07
#
#####

# «dismal»  (to ".dismal")
#
rm -Rv /usr/src/dismal-0.92/
cd /usr/src/
tar -xvzf $S/ftp/ftp.dl.ac.uk/src/Unix/Gnu/EmacsBits/elisp-archive/packages/dismal-0.92.tar.Z
cd /usr/src/dismal-0.92/
make	|& tee om

#
rm -Rv /usr/src/dismal-1.4/
cd /usr/src/
tar -xvzf $S/http/ftp.nottingham.ac.uk/pub/lpzfr/dismal-1.4.tar.gz
cd /usr/src/dismal-1.4/

make	|& tee om
#


# (code-c-d "dismal" "/usr/src/dismal-1.4/" "/usr/src/dismal-1.4/dismal")
# (find-dismalfile "")
# (find-dismalnode "Top")
# (find-dismalfile "dismal-mode-defaults.el" "to the load-path")
# (find-dismalfile "dismal.el")
# (find-dismalfile "dismal-mode.doc")
# (find-dismalfile "om")

(load "/usr/src/dismal-1.4/dismal-mode-defaults.el")
(find-dismalfile "test.dis")

# Too old, messes up the keys on e20



#####
#
# packages
# 2013sep21
#
#####

# «packages» (to ".packages")
# (find-enode "Packages")
# (find-elnode "Packaging")
# (list-packages)

# (find-eev "eev-pkg.el")

# (find-efunction 'package-install)
# (find-enode "Package Installation")
# http://elpa.gnu.org/
# http://marmalade-repo.org/

# (find-eevfile "eev-blinks.el" "defun find-etp")
# (find-evardescr 'package-archives)

(require 'package)
(add-to-list 'package-archives 
    '("marmalade" .
      "http://marmalade-repo.org/packages/"))
(add-to-list 'package-archives
  '("melpa" . "http://melpa.milkbox.net/packages/") t)


(package-initialize)
(package-refresh-contents)

# (find-fline "~/.emacs.d/elpa/")
# (find-fline "~/.emacs.d/elpa/archives/")
# (find-fline "~/.emacs.d/elpa/archives/gnu/archive-contents")
# (find-fline "~/.emacs.d/elpa/archives/marmalade/archive-contents")
# (find-fline "~/.emacs.d/elpa/archives/melpa/archive-contents")
# (find-fline "~/.emacs.d/elpa/magit-1.2.0/")
# (find-fline "~/.emacs.d/elpa/magit-20130921.1716/")

(code-c-d "magit" "~/.emacs.d/elpa/magit-20130921.1716/")
;; (find-magitfile "")
;; (find-magitfile "magit-pkg.el")
;; (find-elnode "Multi-file Packages" "NAME-pkg.el")


(package-install 'magit)

M-x eval-buffer to evaluate it, and then do M-x
package-refresh-contents to load in the package listing.  You're good
to go!

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd
find | grep magit



#####
#
# spread
# 2001oct08
#
#####

# «spread»  (to ".spread")
# (find-shttpw3 "www.cis.upenn.edu/~bcpierce/papers/")
cp -v $S/http/www.cis.upenn.edu/~bcpierce/papers/spread.el ~/tmp/
# (load-library "~/tmp/spread.el")
# (find-fline "~/tmp/spread.el")
# (find-efunction 'describe-mode)
# (find-elnode "Current Buffer")
# (with-temp-buffer (spread-mode) (describe-mode))

# But it seems to need several updates to work with FSF Emacs20...




#####
#
# menu bar
# 2001dec29
#
#####

# «menu-bar»  (to ".menu-bar")
# (find-eev "eev-ALL.el" "menu-bar")
# (find-angg ".emacs" "key_bindings" "lambda")
# (find-efile "menu-bar.el" "define-key global-map [menu-bar tools]")
# (find-efile "menu-bar.el" "define-key menu-bar-tools-menu [speedbar]")
# (find-efile "menu-bar.el" "defvar menu-bar-tools-menu")
# (find-efile "menu-bar.el")
# (find-efile "subr.el" "global-map, esc-map, and ctl-x-map")
# (find-efile "subr.el")
# (find-efile "tmm.el" "defsubst tmm-add-one-shortcut")
# (find-efunction 'menu-bar-mode)
# (find-elnode "Creating Keymaps")
# (find-elnode "Index" "menu-bar")
# (find-elnode "Menu Bar" "'undefined")
# (find-elnode "Menu Bar")
# (progn (describe-bindings) (ee-goto-position ""))
# (progn (describe-variable 'global-map) (ee-goto-position "menu-bar"))

(menu-bar-mode t)
(menu-bar-mode nil)

(progn
  (defvar menu-bar-eev-menu (make-sparse-keymap "(eev)"))
  (define-key global-map [menu-bar eev] (cons "(eev)" menu-bar-eev-menu))
  (define-key menu-bar-eev-menu [end-of-line-then-eval-last-sexp]
    '("C-e + eval-last-sexp" . end-of-line-then-eval-last-sexp))
  (define-key menu-bar-eev-menu [eval-last-sexp]
    '("eval-last-sexp" . eval-last-sexp))
  (define-key menu-bar-eev-menu [tutorial-pt]
    '("Tutorial (pt_BR)" . (lambda () (interactive)
			     (find-eev "e/tutorial.pt.e"))))
  (define-key menu-bar-eev-menu [tutorial]
    '("Tutorial" . (lambda () (interactive)
		     (find-eev "e/tutorial.e"))))
  (define-key menu-bar-eev-menu [key-help]
    '("Key help" . (lambda () (interactive)
		     (find-eev "e/keys.e"))))
  ;;
  ;; Refresh the menu bar:
  (progn (menu-bar-mode nil) (menu-bar-mode nil))
  )



#####
#
# inspecting menu-bar entries
# 2004sep12
#
#####

# «menu-bar-entries»  (to ".menu-bar-entries")

(insert (format "%S\n" (read-key-sequence "Key: ")))

# (find-ekeydescr [(menu-bar) edit props rm])
# (find-efunctiondescr 'remove-text-properties)







#####
#
# Beep music
# 2002apr30
#
#####

# «beep-music»  (to ".beep-music")

;; (find-elnode "Math Functions")
;; (find-es "console" "setbell")
;; (find-efunctiondescr 'write-region)
;; Check permissions: (find-sh "ls -l /dev/tty /dev/tty?; echo; id")

(progn
  (defun myfreq (n) (* 440 (expt 2 (/ n 12.0)))) ; not used
  (defun mytone-a (n) (format "\e[10;%d]" (* 440 (expt 2 (/ n 12.0)))))
  (defun mytone (n) (mytone-a (+ n 3)))	; n is the number of semitones above C
  (defun myduration (secs) (format "\e[11;%d]" (* secs 1000.0)))
  (defun myecho (str &optional secs) (write-region str nil "/dev/tty0")
    (if secs (sit-for secs)))
  (defun myt (n secs) (myecho (concat (mytone n) (myduration secs) "\a") secs))
  (defun myts (n secs &rest rest)
    (myt n secs)
    (if rest (apply 'myts rest)))
)

;; A quick test: a scale
(progn (myt 0 0.1) (myt 2 0.1) (myt 4 0.1)
       (myt 5 0.1) (myt 7 0.1) (myt 9 0.1) (myt 11 0.1)
       (myt 12 0.1)
)

;; A very rough approximation to the "By This River" (by Brian Eno) -
;; just because I want to type the melodic lines into Lilypond and
;; practice them on the viola later.
;;
(let* ((do- -12) (re- -10) (mi- -8) (fa- -7) (sol- -5) (la- -3) (si- -1)
       (do 0) (re 2) (mi 4) (fa 5) (sol 7) (la 9) (si 11)
       (do+ 12) (re+ 14) (mi+ 16) (fa+ 17) (sol+ 19) (la+ 21) (si+ 23)
       (rest -60)					; very low -> inaudible
       (d 0.2) (d/2 (/ d 2)) (d/4 (/ d 4)) (2d (* 2 d))	; durations
       )
  (myts do+ d si d sol d mi d   la d do d re d mi d)
  (myts rest d do d rest d re d rest d mi d rest 2d)

  (myts do+ d si d sol d mi d   la d do d re d mi d)
  (myts rest d do d rest d re d rest d mi d rest 2d)

  (myts sol 2d fa d mi d rest d)
  (myts mi d mi d fa d sol d fa d mi d fa 2d mi d rest d)

  (myts sol 2d fa d mi d rest d)
  (myts mi d mi d fa d sol d)
  (myts fa d mi d fa d mi d)
  (myts re d do d re d
        mi (* 1.75 d) rest d/4
        re (* 1.75 d) rest d/4
        do (* 1.75 d) rest d/4
	)
  (myts do d si- d do d si- d do d la- 2d)
)



#####
#
# dired
# 2002may01
#
#####

# «dired»  (to ".dired")

;; In dired, to show only some files (walter's hint):
;; % m regexp RET t k

;; (find-efunction 'dired-do-kill-lines)
;; (find-efunction 'dired-mark-files-regexp)
;; (find-efile "dired.el" "define-key map \"%m\"")

(progn
  (find-fline "$ES/")
  (dired-mark-files-regexp "^a.*")
)

(progn
  (find-fline "$ES/")
  (dired-mark-files-regexp "^\\(a.*\\|c.*\\)")
  (dired-do-toggle)
  (dired-do-kill-lines)
)




#####
#
# a macro for debugging
# 2002may07
#
#####

# «SAR»  (to ".SAR")
# (find-elnode "Macros")
# (find-elnode "Expansion")
# (find-elnode "Eval During Expansion")
# (find-angg ".emacs" "macros")

(progn
  (defmacro SAR (&rest rest)
    (insert (format "%S\n" rest))
    rest)
  (SAR + (* 2 3) (* 4 5))
)

(progn
  (defmacro SAR (&rest rest)
    (message "%S\n" rest)
    rest)
  (SAR + (* 2 3) (* 4 5))
)

(switch-to-buffer "*Messages*")

;; Oops, the second def bugs on emacs21.2.1, but I've been told that
;; it works on the CVS'ed version



#####
#
# Syntax tables
# 2002aug19
#
#####

# «syntax-tables»  (to ".syntax-tables")
# «trailing-whitespace-bug»  (to ".trailing-whitespace-bug")
# A demo of the nasty bug that almost made me stay with emacs20:
#*
# (find-eevfile "eeg4")
# (find-eevfile "libeeg/k")

cat > $EEG <<'%%%'
loadeeglibs all ;# (find-angg "eev/libeeg/all")
k M-x p i c t u r e - m o d e ret
k C-q C-o
# k C-c C-c
k M-x d e l e t e - t r a i l i n g - w h i t e s p a c e ret
k M-x p i c t u r e - m o d e - e x i t ret
k C-x C-c
%%%

# (find-enode "Option Index")
# (find-efunction 'picture-mode-exit)
# (find-efunction 'delete-trailing-whitespace)
eeg4 emacs21 -nw /tmp/t
eeg4 emacs21 -nw --no-init-file /tmp/t

#*
# (find-elnode "Syntax Table Functions" "Function: char-syntax")
# (string (char-syntax ? ))
# (string (char-syntax ?å))
# (string (char-syntax ?-))
# (describe-syntax)
# (find-efunction 'make-syntax-table)
# (describe-function 'copy-syntax-table)
# (find-elnode "Standard Syntax Tables")
# (describe-function 'standard-syntax-table)
# (find-efile "case-table.el")
# (find-efile "case-table.el" "(modify-syntax-entry c syntax (standard-syntax-table))")

# (find-elnode "Function Cells")

(if (not (fboundp 'original-make-syntax-table))
  (defalias 'original-make-syntax-table 'make-syntax-table))
;; And then create a wrapper around this, which I'm not going to do now



# 2004jan19
# Two ways to get around the bug:
# First way: changing all the standard syntax tables.
#
# (find-elnode "Standard Syntax Tables")
# (find-elnode "Standard Syntax Tables" "standard-syntax-table")
# (find-elnode "Syntax Table Functions")
# (find-elnode "Syntax Table Functions" "modify-syntax-entry")

(defun fix-syntax-table (&optional sdescr) (interactive)
  (if (not sdescr)
      (setq sdescr "w"))
  (mapc (lambda (i) (modify-syntax-entry i sdesc))
	'(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))
  (let ((i 128))
    (while (< i 160)
      (modify-syntax-entry i sdesc)
      (setq i (1+ i)))))

(with-syntax-table (standard-syntax-table) (describe-syntax))
(with-syntax-table text-mode-syntax-table  (describe-syntax))

# (find-elnode "Iteration")

# (with-syntax-table (standard-syntax-table) (describe-syntax))
# (with-syntax-table text-mode-syntax-table  (describe-syntax))
# (find-ecvsfile "src/syntax.c" "DEFUN (\"standard-syntax-table\"")
# (find-efile "textmodes/text-mode.el" "setq text-mode-syntax-table")

# (find-elnode "Advising Functions")
# (find-efunction 'defadvice)





#####
#
# face glyphs on console mode: bug on line wrapping 
# 2002sep06
#
#####

# «face-glyph-bug»  (to ".face-glyph-bug")
#*
# (find-elnode "Non-ASCII in Strings")
# (find-elnode "Truncation" "`\\'")
cat > /tmp/bug <<'%%%'
(defun glyph-set-face (disptable disptablepos vtchar face)
  (aset disptable disptablepos
        (vector (if face (logior vtchar (ash (face-id face) 19))
                  vtchar))))

(progn (make-face 'glyph-face-red)
       (set-face-foreground 'glyph-face-red "red")
       (glyph-set-face standard-display-table 15 ?* 'glyph-face-red)
       )

(insert (concat "0123456789012345678901234567890123456789"
                "012345678901234567890123456789012345678" "\x0F"
                "0123456789"))
%%%
emacs21 --no-init-file -nw /tmp/bug

#*



#####
#
# Nuking backspaces (in manpages and such)
# 2002oct07
#
#####

# «backspaces»  (to ".backspaces")
# (find-efile "man.el" "defconst Man-sysv-sed-script")

# (find-es "mail" "mutt")




#####
#
# ee-isearch
# 2002nov24
#
#####

# «ee-isearch»  (to ".ee-isearch")
# (find-angg ".emacs" "ee-isearch")
# (key-binding "\C-s")
# (where-is 'isearch-forward)
# (find-efunction 'isearch-forward)
# (find-efunction 'isearch-repeat)
# (find-efunction 'isearch-update-ring)

(progn (isearch-update-ring "search-ring")
       (find-efile "isearch.el"))

(progn (isearch-update-ring "find")
       (isearch-forward))

# (describe-function 'isearch-forward)
# (find-efunction 'isearch-forward "isearch-mode t")
# (find-efunction 'isearch-mode)
# (find-evariable 'isearch-mode-map)
# (find-evariable 'isearch-mode-map "C-s")
# (find-efunction 'isearch-repeat-forward)

(progn (isearch-update-ring "find")
       (isearch-mode t nil nil t))

(progn (isearch-update-ring "find")
       (isearch-mode t nil nil nil)
       (isearch-repeat-forward))

(defun ee-isearch (string)
  (isearch-update-ring string)
  (isearch-mode t nil nil nil)
  (isearch-repeat-forward))

(ee-isearch "find")




#####
#
# ee-isearch-regexp
# 2003jul04
#
#####

# «ee-isearch-regexp»  (to ".ee-isearch-regexp")
# (find-angg ".emacs" "ee-isearch")
# (find-angg ".emacs" "ee-isearch-regexp")
# (find-efunction 'isearch-update-ring)
# (find-efunction 'isearch-forward-regexp)
# (find-evariable 'isearch-mode-map "Define M-C-s and M-C-r like")

(isearch-update-ring "find-e[lv]" t)
regexp-search-ring

(progn (isearch-update-ring "find-e[lv]" t)
       (isearch-mode t t)
       (isearch-repeat-forward))

(ee-isearch "find-e[lv]" t)
(ee-isearch-regexp "find-e[lv]")




#####
#
# calendar and diary
# 2002dec03
#
#####

# «calendar»  (to ".calendar")
# «diary»  (to ".diary")

# (find-node "(emacs)Calendar/Diary")
# (find-node "(emacs)Diary")
# (find-node "(emacs)Diary Commands")

# (find-evariable 'diary-file)
# (find-evariable 'diary-file "not in one the above formats are ignored")
# (find-elfile "calendar/calendar.el")
# (find-elfile "calendar/diary-lib.el")
# (find-elfile "calendar/cal-french.el" "Messidor")

# (find-fline "~/diary")

#*
# If you don't want to overwrite your real ~/diary then abort NOW!
read
cat > ~/diary <<'%%%'
# (find-es "emacs" "diary")
# (calendar)
# (diary 7)

dec 04, 2002: (quarta)
	18:00: aula de viola; combinar o lance do livro com o Beto

dec 06, 2002: (sexta)
	10:00: meu seminário na PUC
	14:00: Técnica Alexander

dec 07, 2002: (sábado)
	20:00: Sarau na casa do Thiers
	20:00-24:00: Jam session 
%%%

#*




#####
#
# string glyph bug on emacs21
# 2002sep06
#
#####

# «emacs21-string-glyph-bug»  (to ".emacs21-string-glyph-bug")
# (find-es "console" "glyphs512")
# (find-man "console_codes" "ECMA-48 Set Graphics Rendition")
# (find-man "console_codes" "ESC % @")
# (find-man "console_codes" "ESC % G")
# (find-man "7 utf-8")

#*
cat > /tmp/bug <<'%%%'
(progn

(defun glyph-needs-utf8 (vtchar)
  (or (< vtchar 32) (>= vtchar 256) (= vtchar 155)))

(defun glyph-as-utf8-string (vtchar)
  (if (glyph-needs-utf8 vtchar)
      (format "\e%%G\xef%c%c\e%%@"
              (+ 128 (logand (lsh vtchar -6) 7))
              (+ 128 (logand vtchar 63)))
    (format "%c" vtchar)))

(defun glyph-string (vtchar colorstr)
  (if colorstr (format "\e[%sm%s\e[m" colorstr (glyph-as-utf8-string vtchar))
    (glyph-as-utf8-string vtchar)))

(defun glyph-set-string (disptable disptablepos vtchar colorstr)
  (aset disptable disptablepos
        (vector (create-glyph (glyph-string vtchar colorstr)))))

(glyph-set-string standard-display-table 15 ?* "31")
(glyph-set-string standard-display-table 129 129 "34")
(insert "\x0F")
(insert "\x81")
)
%%%
emacs21 --no-init-file -nw /tmp/bug

#*
# Oops, this seems to work ok on 21.2.1...




#####
#
# Customizing font-lock-mode faces
# 2003jan03
#
#####

# «customize-face»  (to ".customize-face")
# (find-elfile "font-lock.el")
# (find-elfile "")
# (find-elfile "font-lock.el" "define-minor-mode font-lock-mode")
# (describe-function 'font-lock-mode)

# (customize-face)
# (progn (customize-face) (ee-goto-position "Font Lock"))

# (progn (customize-face) (ee-goto-position "Eev Blue"))
# (find-eev "glyphs.el" "face-glyphs")
# (describe-function 'customize-face)
# (find-efunction 'customize-face)

# (custom-unlispify-tag-name 'eev-yellow-on-red)

# (customize-face font-lock-builtin-face)
# (find-evariable 'font-lock-builtin-face)
# (find-elfile "font-lock.el" "(defface font-lock-builtin-face")




#####
#
# The kill ring
# 2003jan07
#
#####

# «kill-ring»  (to ".kill-ring")
# (find-enode "Kill Ring")
# (find-enode "Earlier Kills")

# (find-es "emacs")
# (describe-key [?\C-y])
# (describe-key [?\M-y])

# (find-efunction 'yank)
# (find-efunction 'yank-pop)
# (find-efunction 'kill-new)
# (find-evariable 'kill-ring)

(progn (setq kill-ring nil)
       (kill-new "An older kill")
       (kill-new "An old kill")
       (kill-new "A buried kill")
       (kill-new "The last kill"))

(describe-variable ' kill-ring)

(progn (yank) kill-ring)

(progn (yank 1) kill-ring)

(progn (yank 2) kill-ring)

(progn (yank 2) kill-ring)

# Not finished




#####
#
# Regexp syntax
# 2003jan08
#
#####

# «regexp-syntax»  (to ".regexp-syntax")
# (find-enode "Regexps")
# (find-elnode "Searching and Matching")
# (find-elnode "Syntax of Regexps")
# (find-elnode "Regexp Special")
# (find-elnode "Regexp Backslash")

# (find-elnode "Regexp Special" "\n`.'")
# (find-elnode "Regexp Special" "\n`*'")
# (find-elnode "Regexp Special" "\n`+'")
# (find-elnode "Regexp Special" "\n`?'")
# (find-elnode "Regexp Special" "\n`*?', `+?', `??'")
# (find-elnode "Regexp Special" "\n`[ ... ]'")
# (find-elnode "Regexp Special" "\n`[^ ... ]'")
# (find-elnode "Regexp Special" "\n`^'")
# (find-elnode "Regexp Special" "\n`$'")
# (find-elnode "Regexp Special" "\n`\\'")

# (find-elnode "Regexp Backslash" "\n`\\|'")
# (find-elnode "Regexp Backslash" "\n`\\{M\\}'")
# (find-elnode "Regexp Backslash" "\n`\\{M,N\\}'")
# (find-elnode "Regexp Backslash" "\n`\\( ... \\)'")
# (find-elnode "Regexp Backslash" "\n`\\(?: ... \\)'")

# Plus several other backslash sequences that I don't use often.

# (find-efile "emacs-lisp/sregex.el")



####
#
# Understanding how <prefix> C-h lists the key bindings with that prefix
# 2003jan15
#
####

# «C-h-after-prefix»  (to ".C-h-after-prefix")

# (find-elnode "Help Functions")
# (find-elnode "Help Functions" "Variable: help-char")
# (find-elnode "Help Functions" "Variable: prefix-help-command")
# (find-elnode "Help Functions" "Function: describe-prefix-bindings")
# (find-efunction 'describe-prefix-bindings)
# (describe-bindings "\C-x")




#####
#
# Emacs from Git
# 2013may25
#
#####

# «emacs-from-git» (to ".emacs-from-git")
# (find-es "git" "emacs-from-git")




#####
#
# emacs from the CVS
# 2004jan15
#
#####

# «emacs-from-cvs»  (to ".emacs-from-cvs")
# (code-c-d "emacscvs" "~/bigsrc/emacs/")
# (find-emacscvsfile "")
# (find-angg ".zshrc" "emacs-cvs")
# (find-fline "/var/lib/apt/lists/ftp.br.debian.org_debian_dists_testing_main_source_Sources" "Package: emacs21")
# (find-progoutput "apt-cache showsrc emacs21")
# http://ftp.debian.org/debian/pool/main/e/emacs21/emacs21_21.4a-1.dsc
#*
apt-get install libungif4-dev
#*
$SUDO apt-get build-dep emacs21

#*
# (find-node "(tar)gzip" "`-j'")
# (find-man "1 cvs")
# (find-node "(cvs)Top")
# (find-node "(cvs)Connecting via rsh")
# (find-node "(cvs)Connecting via rsh" "set `CVS_RSH' to `SSH'")
# (find-fsbot-answer "CvsEmacs")
# http://www.emacswiki.org/cgi-bin/wiki.pl/EmacsCVS
# http://www.emacswiki.org/cgi-bin/wiki.pl/EmacsCvsAndDebian
# http://angg.twu.net/.emacs.html#emacs-cvs
# (find-angg ".emacs" "emacs-cvs")
# (find-zsh "cd ~/bigsrc/; Pwd; df")
# (find-sh  "cd ~/bigsrc/; /bin/pwd; df")

# rm -Rv ~/bigsrc/emacs/
rm -Rf ~/bigsrc/emacs/
mkdir  ~/bigsrc/
cd     ~/bigsrc/
tar -C ~/bigsrc/ -xvjf ~/tmp/emacs-cvs.tar.bz2

cd     ~/bigsrc/
export CVS_RSH=ssh
cvs -z9 -d:pserver:anonymous@cvs.savannah.gnu.org:/cvsroot/emacs co emacs  \
  2>&1 | tee ocvs

cd     ~/bigsrc/
tar -cvjf ~/tmp/emacs-cvs.tar.bz2 emacs

cd     ~/bigsrc/emacs/
find *                | sort > .files0
./configure      2>&1 | tee oc
find * -name '*.[ch]' | sort > .files.ch
make bootstrap   2>&1 | tee omb
make TAGS        2>&1 | tee omT

#*
# (find-emacscvsfile "README" "need version 4.2 or later of Texinfo")
# (to "texinfo-4.6")

cd ~/bigsrc/emacs/
./configure    |& tee oc

find * -name '*.[ch]' | sort > .files.ch

# make MAKEINFO=$HOME/usrc/texinfo-4.6/makeinfo/makeinfo bootstrap |& tee omb
make bootstrap |& tee omb

make TAGS |& tee omT

#*
# How to create a .tar.gz that includes the .elc's?
# (find-emacscvsfile "make-dist" "Creating tar file")
# This does not work - make-dist requires 
# (to "autoconf-2.59")
# (find-emacscvsfile "make-dist")
# (find-emacscvsfile "make-dist" "autoheader")
# (find-emacscvsfile "omd")

cd ~/bigsrc/emacs/
PATH=$HOME/usrc/autoconf-2.59/bin:$PATH \
  ./make-dist --tar	|& tee omd

#*





# (find-emacscvsfile "lisp/emacs-lisp/bytecomp.el" "defvar no-byte-compile")
# (find-emacscvsfile "lisp/ChangeLog.9" "Don't compile if `no-byte-compile'")
# no-byte-compile: t
#*
eev-cd emacscvs lisp/
grep no-byte-compile *.el
#*
eev-cd emacscvs lisp/
l $(grep -l no-byte-compile *.el)
#*







#####
#
# texinfo 4.6
# 2004jan19
#
#####

# «texinfo-4.6»  (to ".texinfo-4.6")
# We need this to compile the CVS version of Emacs
# (find-status "texinfo")
# (find-vldifile "texinfo.list")
# (find-fline "/usr/doc/texinfo/")

#*
rm -Rv ~/usrc/texinfo-4.6/
cd     ~/usrc/
tar -xvzf $S/ftp/ftp.gnu.org/gnu/texinfo/texinfo-4.6.tar.gz
cd     ~/usrc/texinfo-4.6/
./configure	|& tee oc
make		|& tee om
make check	|& tee omc
#*

# (code-c-d "texinfo" "~/usrc/texinfo-4.6/")
# (find-texinfofile "")



#####
#
# autoconf 2.59
# 2004jan19
#
#####

# «autoconf-2.59»  (to ".autoconf-2.59")
# Apparently we need this to run "make-dist" on the CVS version of
# Emacs, but I couldn't make that to work
#*
rm -Rv ~/usrc/autoconf-2.59/
cd     ~/usrc/
tar -xvjf $S/ftp/ftp.gnu.org/gnu/autoconf/autoconf-2.59.tar.bz2
cd     ~/usrc/autoconf-2.59/
./configure	|& tee oc
make		|& tee om
make check	|& tee omc

#*

# (find-status "autoconf")
# (find-vldifile "autoconf.list")
# (find-fline "/usr/doc/autoconf/")

tar -tvjf $S/ftp/ftp.gnu.org/gnu/autoconf/autoconf-2.59.tar.bz2

# (find-elfile "international/mule-cmds.el")


anonftp ftp://ftp.gnu.org/gnu/automake/





(format "%c" (read (concat "?\\x" "40")))


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


# Splash screen:

# (find-e21file "lisp/gnus/gnus-ems.el")
# (find-e21file "lisp/startup.el")
# (find-e21file "lisp/startup.el" "fancy-splash-head")
# (find-e21file "etc/" "gnu.xpm")
# (find-e21file "etc/" "splash.xpm")
# (find-e21file "etc/splash.xpm")
# (find-shttpw3 "savannah.gnu.org/cgi-bin/viewcvs/emacs/emacs/etc/splash.xpm")
# (find-fline "~/tmp/emacs-21.0.93-splash.xpm")
#*
display ~/tmp/emacs-21.0.93-splash.xpm &
display /usr/src/emacs21-21.1/etc/splash.xpm &
#*




#####
#
# some interesting wiki pages
# 2004jan19
#
#####

# sudo -u edrx mozilla 'http://www.emacswiki.org/cgi-bin/wiki.pl?GenericMode' &
# sudo -u edrx mozilla 'http://www.emacswiki.org/cgi-bin/wiki.pl?MultiTTYSupport' &

# (find-elnode "Printed Representation" "Hash notation cannot be read\nat all")




#####
#
# eshell
# 2004feb11
#
#####

# «eshell»  (to ".eshell")
# (find-efile "eshell/")
# (find-ewikipage "CategoryEshell")
# (find-node "(eshell)Top")

# http://www.emacswiki.org/cgi-bin/wiki/EshellRedirection
# http://www.emacswiki.org/cgi-bin/wiki/EshellAndAngeFtp
# http://www.emacswiki.org/cgi-bin/wiki/EshellAndDired
# http://www.emacswiki.org/cgi-bin/wiki/EshellVisualCommands
# http://www.emacswiki.org/cgi-bin/wiki/CategoryEshell

lynx http://www.newartisans.com/johnw/eshell.html




#####
#
# font and geometry
# 2004feb11
#
#####

# «font-and-geometry»  (to ".font-and-geometry")
# (find-enode "Command Arguments")
# (find-enode "Window Size X" "-g WIDTHxHEIGHT")
# (find-enode "Font X" "`-fn NAME'")

xlsfonts | sort | grep '^[0-9]'
emacs -g 70x20 -fn 5x8

# (find-enode "Menu Mouse Clicks" "`S-Mouse-1'" "frame's principal font")
# (find-enode "Frame Parameters"  "frame's principal font" "`S-Mouse-1'")


(info "(emacs)Frame Parameters")



#####
#
# w3m
# 2004mar03
#
#####

# «w3m»  (to ".w3m")

# (find-status "w3m-el")
# (find-vldifile "w3m-el.list")
# (find-fline "/usr/doc/w3m-el/")

# (code-c-d "w3m" "/usr/share/emacs/site-lisp/w3m/")
# (find-w3mfile "")

To run ee-goto-position in a w3m-generated page I need a hack like the
one I did on find-man - ee-goto-position should run only when the page
is ready.

# (add-to-list 'load-path "/usr/share/emacs/site-lisp/w3m/")
# (find-efunction 'w3m)

w3m-info-like-map
w3m-lynx-like-map

describe-mode

(documentation major-mode)
(documentation 'w3m-mode)

(find-efunction 'documentation)
(find-efunctiondescr 'documentation)
(find-efunctiondescr 'substitute-command-keys)

(find-efunction 'w3m-mode)




#####
#
# w3m-forcing-html
# 2007jul23
#
#####

# «w3m-forcing-html»  (to ".w3m-forcing-html")
# http://emacs-w3m.namazu.org/
# http://emacs-w3m.namazu.org/info/emacs-w3m.html
# http://emacs-w3m.namazu.org/ml/
# http://emacs-w3m.namazu.org/ml/msg09438.html
# http://emacs-w3m.namazu.org/ml/msg09450.html

Visit these two urls:

  http://www.emacswiki.org/cgi-bin/emacs/rcirc-color.el
  http://www.emacswiki.org/cgi-bin/emacs/download/rcirc-color.el

The first one is HTML, the second one is not.
If I make local copies of these urls I will have

put these local copies at:

  file:///home/edrx/snarf/http/www.emacswiki.org/cgi-bin/emacs/rcirc-color.el
  file:///home/edrx/snarf/http/www.emacswiki.org/cgi-bin/emacs/download/rcirc-color.el

and then I will need some Apache trickery (involving CGIs, maybe?) to
let me access these local copies via HTTP, forcing the first one to be
treated as HTML...




#####
#
# w3m-upstream
# 2007jul23
#
#####

# «w3m-upstream»  (to ".w3m-upstream")
# (find-fline "~/tmp/emacs-w3m-cvs.tar.gz")
# (find-fline "~/.emacs" "~/usrc/emacs-w3m/")
#*
rm -Rv ~/usrc/emacs-w3m/
tar -C ~/usrc/ \
 -xvzf ~/tmp/emacs-w3m-cvs.tar.gz emacs-w3m
cd     ~/usrc/
export CVS_RSH=ssh
#   cvs -d :pserver:anonymous@cvs.namazu.org:/storage/cvsroot login
cvs -z9 -d :pserver:anonymous@cvs.namazu.org:/storage/cvsroot co emacs-w3m
tar -C ~/usrc/ \
 -cvzf ~/tmp/emacs-w3m-cvs.tar.gz emacs-w3m

#*
rm -Rv ~/usrc/emacs-w3m/
tar -C ~/usrc/ \
 -xvzf ~/tmp/emacs-w3m-cvs.tar.gz emacs-w3m
cd     ~/usrc/emacs-w3m/
autoconf
# ./configure |& tee oc
  ./configure --with-emacs=$HOME/bigsrc/emacs/src/emacs |& tee oc
make |& tee om

#*
# (code-c-d "emacsw3m" "~/usrc/emacs-w3m/" :grep)
# (find-emacsw3mfile "")

# Emacs-w3m of this version does not support Emacs 23; try the development version
# (find-emacsw3mgrep "grep -nH -e 'of this version' *.el")
# (find-emacsw3mgrep "grep -nH -e 'of this version' $(find *)")

(add-to-list 'load-path "~/usrc/emacs-w3m/")
# (find-evardescr 'load-path)




# (find-status   "w3m-el")
# (find-vldifile "w3m-el.list")
# (find-udfile   "w3m-el/")
# (find-node "(emacs-w3m)Top")




cvs -z9 -d:pserver:anonymous@cvs.savannah.gnu.org:/cvsroot/emacs co emacs  \
  2>&1 | tee ocvs

cd     ~/bigsrc/
tar -cvjf ~/tmp/emacs-cvs.tar.bz2 emacs







#####
#
# find-face
# 2004mar17
#
#####

# «find-face»  (to ".find-face")
;; (find-elnode "Examining Properties")

(defun ee-create-buffer (name)
  (if (bufferp name) (kill-buffer name))
  (switch-to-buffer name))

(defun ee-insert-code-and-pp (what whattopp &optional separator)
  (insert what)
  (insert (or separator "\n   ==>\n"))
  (pp whattopp (current-buffer))
  (insert "\n"))

(defun find-text-properties-at-point (&rest rest)
  (interactive)
  (let* ((code1 "(text-properties-at (point))")
	 (rslt1 (eval (read code1)))
	 (buffer-name (format "*%s*" code1)))
    (ee-create-buffer buffer-name)
    (ee-insert-code-and-pp code1 rslt1)
    (apply 'ee-goto-position rest)))


;; (find-enode "Force Same Window")
;; (ee-one-window "foo" (insert "body1") (insert "body2"))
;; (ee-one-window "foo" (find-evardescr 'same-window-buffer-names))
;; (find-elnode "Index" "with-output-to")
;; (find-elnode "Current Buffer")

(defmacro ee-same-window (samewindowbuffername &rest body)
  `(let ((same-window-buffer-names
	 (cons ,samewindowbuffername same-window-buffer-names)))
    . ,body))

(defun find-ekeydescr (key &rest rest)
  (ee-same-window "*Help*" (describe-key key))
  (apply 'ee-goto-position rest))

(defun find-efacedescr (face &rest rest)
  (ee-same-window "*Help*" (describe-face face))
  (apply 'ee-goto-position rest))

(defun find-efaces (&rest rest)
  (ee-same-window "*Faces*" (list-faces-display))
  (apply 'ee-goto-position rest))

(defun find-etpat (&rest rest)
  (interactive)
  (let ((tpat (text-properties-at (point)))
	(buffername "*(text-properties-at (point))*"))
    (if (bufferp buffername) (kill-buffer buffername))
    (switch-to-buffer buffername)
    (insert "(text-properties-at (point))\n   ==>\n")
    (pp tpat (current-buffer))
    (apply 'ee-goto-position rest)))

(defun find-eltpat (&rest rest)
  (interactive)
  (ee-same-window "*Text Properties*" (list-text-properties-at (point)))
  (apply 'ee-goto-position rest))


(with-output-to-temp-buffer "temp" (insert "foo"))



(find-efile "facemenu.el")
(list-faces-display)
(list-text-properties-at (point))
(list-colors-display)

(find-efunction 'point-to-register)

(find-efacedescr font-lock-function-name-face)

			font-lock-function-name-face
(facep			font-lock-function-name-face)
(internal-lisp-face-p	font-lock-function-name-face)
(face-documentation	font-lock-function-name-face)
(describe-face		font-lock-function-name-face)

# (find-efile "faces.el")
# (find-elnode "Faces")
# (find-elnode "Face Attributes" "`:weight'" "extra bright")
# (find-elnode "Attribute Functions" "set-face-bold-p")

# (find-efunction 'defface)
# (find-efunction 'custom-declare-face)

(find-text-properties-at-point)



####
#
# c-mode-M-e
# 2004mar25
#
####

# «c-mode-M-e»  (to ".c-mode-M-e")
# (find-angg ".emacs" "M-e-in-c-mode")

;; Don't let c-mode's `c-end-of-statement' take over my M-e binding
;; (find-elnode "Hooks for Loading")
;; (find-efunction 'eval-after-load)
;;   (find-efile "bindings.el" "'forward-sentence")
;;   (find-efile "progmodes/cc-mode.el" "c-mode-base-map" "'forward-sentence")
;;   (find-efile "progmodes/awk-mode.el")
;; (find-fline "/tmp/dummy.c")
;; (find-fline "/tmp/dummy.awk")
;; (find-evardescr 'c-mode-map   "101")
;; (find-evardescr 'awk-mode-map "101")
;;
(eval-after-load "cc-mode"
  '(define-key c-mode-base-map "\ee" nil))

;; Add a binding "w" -> `dired-find-w3m' to dired
;; (find-efunction 'dired-find-file)
;; (find-evardescr 'dired-mode-map)
;; (find-evariable 'dired-mode-map)
;;
(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)))
(eval-after-load "dired"
  '(define-key dired-mode-map "w" 'dired-find-w3m))



####
#
# eeplow
# 2004apr02
#
####

# «eeplow»  (to ".eeplow")

;; plow = past-line-other-window
;; (find-elnode "Window Configurations" "look inside of window configurations")
;; (find-elnode "Buffers and Windows" "Function: get-buffer-window")

(defvar ee-plow-target-buffer "#emacs")
(defvar ee-plow-lines-buffer "*plow*")

(defun ee-new-buffer (buffername &optional str)
  (get-buffer-create buffername)
  (with-current-buffer buffername
    (delete-region (point-min) (point-max))
    (when str (insert str) (goto-char (point-min))))
  buffername)

(defun ee-two-windows (buffertop bufferbottom)
  (switch-to-buffer buffertop)
  (delete-other-windows)
  (split-window-vertically)
  (other-window 1)
  (switch-to-buffer bufferbottom))

(defun ee-plow-send () (interactive)
  (if (not (= (point) (point-max)))
      (let ((linestr
	     (buffer-substring (progn (end-of-line) (point))
			       (progn (beginning-of-line) (point)))))
	(other-window 1)
	(insert linestr)
	(call-interactively (key-binding "\r"))
	(other-window -1)
	(ee-plow-next-line 1))))

(defun ee-plow-next-line (arg) (interactive "p")
  (let ((next-line-add-newlines nil))
    (next-line arg)))

;; (find-efunction 'next-line)

;; (setq ee-plow-mode-map nil)
;; (find-efunction 'define-minor-mode)

;; (fmakunbound 'ee-plow-mode)
;; (makunbound  'ee-plow-mode)
;; (makunbound  'ee-plow-mode-hook)
;; (makunbound  'ee-plow-mode-map)

(define-minor-mode ee-plow-mode
  "paste-line-other-window-mode mode" nil " plow"
  '(("\M-d" . ee-plow-send)
    ([down] . ee-plow-next-line)))

(defun eeplow (s e buffer) (interactive "r\nbTarget buffer: ")
  (ee-new-buffer ee-plow-lines-buffer (ee-se-to-string s e))
  (with-current-buffer ee-plow-lines-buffer
    (fundamental-mode)
    (ee-plow-mode))
  (setq ee-plow-target-buffer buffer)
  (ee-two-windows ee-plow-target-buffer ee-plow-lines-buffer))

;; (eeplow "test1\ntest2\ntest3" nil "*scratch*")
;; (eeplow "test1\ntest2\ntest3" nil "#emacs")




####
#
# self-insert-command
# 2004apr16
#
####

eev-cd ecvs src/
grep self-insert-command *.[ch]

# (find-ecvsfile "src/cmds.c" "self-insert-command")
# (find-elnode "Command Loop Info" "Variable: last-command-char")




####
#
# imenu
# 2004mar29
#
####

# (find-efile "imenu.el")




####
#
# dictionary
# 2004apr08
#
####

#*
rm -Rv ~/usrc/dictionary-1.8.5/
tar -C ~/usrc -xvzf $S/http/ftp.debian.org/debian/pool/main/d/dictionary-el/dictionary-el_1.8.5.orig.tar.gz
cd ~/usrc/dictionary-1.8.5/
#*
# (code-c-d "dictionary" "~/usrc/dictionary-1.8.5/")
# (find-dictionaryfile "")
# (find-dictionaryfile "dictionary.el")
# (find-dictionaryfile "connection.el")
# (find-dictionaryfile "link.el")
# (find-dictionaryfile "dictionary-init.el")

(add-to-list 'load-path "~/usrc/dictionary-1.8.5/")
(setq dictionary-server "127.0.0.1")
(setq dictionary-use-single-buffer t)
(load-library "dictionary")

# (find-dictionaryfile "dictionary.el")
# (find-dictionaryfile "dictionary.el" "defun dictionary ")
# (find-dictionaryfile "README")

(progn (find-enode "Manifesto")
       (dictionary))

(defun find-dictionary (str &rest rest)
  (interactive (list (read-string "Search word: " (current-word))))
  (ee-same-window "*Dictionary buffer*"
		  (dictionary-search str)
		  (apply 'ee-goto-position rest)))

(dictionary-search "fuck me harder")
(find-dictionary   "fuck me harder")

(find-efunction 'dictionary "switch-to-buffer-other-window")

ee-same-window




#####
#
# gnus
# 2004apr06
#
#####

# «gnus»  (to ".gnus")
# (find-planner "ImapPage")

# (find-status "gnus")
# (find-vldifile "gnus.list")
# (find-fline "/usr/doc/gnus/")
# (find-status "ucf")
# (find-vldifile "ucf.list")
# (find-fline "/usr/doc/ucf/")




#####
#
# http-emacs
# 2004apr26
#
#####

# «http-emacs»  (to ".http-emacs")
#*
rm -Rv ~/usrc/http-emacs/
#*
export CVS_RSH=ssh
cd ~/usrc/
cvs -z3 -d:ext:anoncvs@savannah.gnu.org:/cvsroot/http-emacs co http-emacs
#*
cd ~/usrc/http-emacs/

# (code-c-d "httpemacs" "~/usrc/http-emacs/")
# (find-httpemacsfile "")

(add-to-list 'load-path "~/usrc/http-emacs")
(load-library "http-get")
(find-efunction 'http-url-encode)
(http-url-encode "Major Modes" nil)






#####
#
# EmacsUserLocations
# 2004apr18
#
#####

apti xplanet xplanet-images

#*
# http://www.emacswiki.org/cgi-bin/wiki/EmacsUserLocations
wget -O /tmp/emacswiki.markerfile "http://www.emacswiki.org/cgi-bin/wiki.pl?action=browse&id=EmacsUserLocations&raw=1"

#*
# (find-fline "/tmp/emacswiki.markerfile")
xplanet -markerfile /tmp/emacswiki.markerfile

#*
# Just a few people:
cat > /tmp/epeople <<'%%%'
  35.28    -78.63     "bpt"        # BrianTempleton
 -22.9     -43.23     "edrx"       # EduardoOchs
  47.83      8.57     "kensanata"  # AlexSchroeder
  55.935921 -3.194687 "lawrence"   # LawrenceMitchell
  38.0010   23.4355   "pgas"       # PierreGaston
  65.8003   21.704    "shapr"      # ShaeErisson
%%%
xplanet -markerfile /tmp/epeople
#*
# (find-es "x" "default_background")
xsetroot -default

#*




#####
#
# tetris
# 2004may14
#
#####

# «tetris»  (to ".tetris")
# (find-efile "play/tetris.el")
# (find-efile "play/gamegrid.el")

(require 'tetris)
(find-evariable 'gamegrid-xpm)
(find-evariable 'gamegrid-xbm)

(find-efunction 'tetris)
(find-efunction 'gamegrid-init)
(find-efunction 'gamegrid-initialize-display)


(require 'gamegrid)

(setq gamegrid-glyph-height 8)
(setq gamegrid-xpm "/* XPM */
static char *noname[] = {
/* width height ncolors chars_per_pixel */
\"8 8 3 1\",
/* colors */
\"+ s col1\",
\". s col2\",
\"- s col3\",
/* pixels */
\"-------+\",
\"--+---++\",
\"--....++\",
\"--....++\",
\"--....++\",
\"--....++\",
\"-+++++++\",
\"++++++++\"
};
")
(tetris)

(tetris)
(setq tetris-display-table
      (save-excursion (set-buffer "*Tetris*")
		      buffer-display-table))


(defmacro with-buffer (buffer &rest body)
  `(save-excursion (set-buffer ,buffer) . ,body))

(setq tetris-display-table (with-buffer "*Tetris*" buffer-display-table))
(setq tetris-face (with-buffer "*Tetris*" gamegrid-face))

;; (find-evardescr 'tetris-display-table)
;; (find-efacedescr 'gamegrid-face-*Tetris*)

;; (find-efile "play/tetris.el")
;; (find-efile "play/gamegrid.el")




;; (find-progoutput "dpkg -l")
;; (find-ecvsfile "oc")
;; (find-fline "/usr/X11R6/include/X11/xpm.h")
;; width height ncolors chars_per_pixel
;;
(setq tron-xpm "/* XPM */
static char *noname[] = {
\"3 3 3 1\",
\"+ s col1\",
\". s col2\",
\"- s col3\",
\"--+\",
\"-.+\",
\"+++\"
};
")

(defun tron-make-glyph (col1 col2 col3)
  `(image :type xpm
	  :data ,tron-xpm
	  :ascent center
	  :color-symbols (("col1" . ,col1)
			  ("col2" . ,col2)
			  ("col3" . ,col3))))

(setq tron-display-table [nil nil nil nil])

;; Old-style IBM PC "SCREEN 1:COLOR 0,0" colors:
;; 0=black, 1=green, 2=red, 3=yellow
(aset tron-display-table 0 (tron-make-glyph "#000000" "#000000" "#000000"))
(aset tron-display-table 1 (tron-make-glyph "#009900" "#00cc00" "#00ff00"))
(aset tron-display-table 2 (tron-make-glyph "#990000" "#cc0000" "#ff0000"))
(aset tron-display-table 3 (tron-make-glyph "#999900" "#cccc00" "#ffff00"))

(make-face 'tron-face)
(set-face-attribute 'tron-face nil :height 3)

(defun tron-insert-char (c)
  (insert-image (aref tron-display-table c) c))

(mapc 'tron-insert-char '(1 2 2 3 2 2 1 0 1 2))

(x-list-fonts "*unreadable*")
(set-face-font 'tron-face "nil2")


(make-face 'tron-face)
(set-face-font 'tron-face "nil2")
(describe-face 'tron-face)

(find-eevalread "(x-font-family-list)")

set-face-attribute


;; Tetris colors
(aset tron-display-table 0 (tron-make-glyph "#000000" "#000000" "#000000"))
(aset tron-display-table 1 (tron-make-glyph "#000099" "#0000cc" "#0000ff"))
(aset tron-display-table 2 (tron-make-glyph "#6b0099" "#8e00cc" "#b200ff"))
(aset tron-display-table 3 (tron-make-glyph "#999900" "#cccc00" "#ffff00"))
(aset tron-display-table 4 (tron-make-glyph "#990099" "#cc00cc" "#ff00ff"))
(aset tron-display-table 5 (tron-make-glyph "#009999" "#00cccc" "#00ffff"))
(aset tron-display-table 6 (tron-make-glyph "#009900" "#00cc00" "#00ff00"))
(aset tron-display-table 7 (tron-make-glyph "#990000" "#cc0000" "#ff0000"))
(aset tron-display-table 8 (tron-make-glyph "#4c4c4c" "#666666" "#7f7f7f"))

(setq buffer-display-table tron-display-table)
(setq buffer-display-table tetris-display-table)

;; (find-efile "faces.el")



;; (find-eevfile "glyphs.el")
;; (find-efile "play/tetris.el")
;; (find-efile "play/gamegrid.el")
;; (find-efunction 'insert-image)

;; (find-node "(elisp)Overlay Properties")
(get-char-property

    (aset standard-display-table
	  position (vector (create-glyph str)))


(insert-image (tron-make-glyph "#990099" "#cc00cc" "#ff00ff"))
                  
(insert-image (aref tron-display-table 0) 0)
(insert-image (aref tron-display-table 1) 1)
(insert-image (aref tron-display-table 2) 2)
(insert-image (aref tron-display-table 3) 3)
(insert-image (aref tron-display-table 4) 4)
(insert-image (aref tron-display-table 5) 5)
(insert-image (aref tron-display-table 6) 6)
(insert-image (aref tron-display-table 7) 7)
(insert-image (aref tron-display-table 8) 8)

(defun tron-set-cell (x y c)
  (save-excursion
    (let ((buffer-read-only nil))
      (goto-char (tron-cell-offset x y))
      (delete-char 1)
      (insert-image (aref tron-display-table c) c))))

      (insert-char c 1)
      (gamegrid-set-face c))))



;; (find-efile "play/tetris.el")
;; (find-efile "play/gamegrid.el")
;; (find-efile "image.el")

;; (find-node "(elisp)Image Descriptors")
;; (find-node "(elisp)Display Property")
;; (find-node "(elisp)Other Display Specs")

;; (find-efunction 'gamegrid-set-cell)
;; (find-efunction 'gamegrid-set-timer)
;; (find-efunction 'gamegrid-colorize-glyph)
;; (find-eevalread "(tetris-display-options)")
;; (find-efunction 'xpm-convert-string)

(image-type-available-p 'xpm)

(defun tron-set-face (c)
  (add-text-properties (1- (point)) (point)
		       (list 'display (list (aref tron-display-table c)))))

(defun tron-cell-offset (x y)
  (+ tron-buffer-start
     (* (1+ tron-buffer-width) y)
     x))




      (loop for c from 0 to 255 do
	    (let ((glyph (aref gamegrid-display-table c)))
	      (when (and (listp glyph) (eq (car  glyph) 'image))
		(let ((height (cdr (image-size glyph))))
		  (if (or (null max-height)
			  (< max-height height))
		      (setq max-height height))))))




(with-buffer


;; (find-efunction 'gamegrid-setup-default-font)




#####
#
# tron
# 2004may15
#
#####

# «tron»  (to ".tron")
# (find-efile "play/tetris.el")
# (find-efile "play/gamegrid.el")

(require 'gamegrid)
(require 'tetris)

(defun tron-set-display-table ()
  (setq buffer-display-table tron-display-table))

;; (find-efunction 'gamegrid-setup-default-font)

(defun tron-setup-default-font (max-height)
  (set-face-attribute tron-face nil :height max-height))

;; (find-efunction 'gamegrid-display-type)
;; (find-eevalread "(tetris-display-options)")

(defun tron-initialize-display ()
  (setq tron-display-mode (tron-display-type))
  (setq tron-display-table (make-display-table))
  (setq tron-face-table (make-vector 256 nil))
  (loop for c from 0 to 255 do
    (let* ((spec (aref tron-display-options c))
	   (glyph (tron-make-glyph (car spec) (caddr spec)))
	   (face (tron-make-face (cadr spec) (caddr spec))))
      (aset tron-face-table c face)
      (aset tron-display-table c glyph)))
  (tron-setup-default-font)
  (tron-set-display-table)
  (setq cursor-type nil))


(defun tron-set-face (c)
  (if (eq tron-display-mode 'glyph)
      (add-text-properties (1- (point)) (point)
			   (list 'display (list (aref tron-display-table c))))
    (put-text-property (1- (point))
		       (point)
		       'face
		       (aref tron-face-table c))))


;; width height ncolors chars_per_pixel
;; colors
;; pixels

(setq tron-xpm "/* XPM */
static char *noname[] = {
\"6 6 3 1\",
\"+ s col1\",
\". s col2\",
\"- s col3\",
\"-----+\",
\"-....+\",
\"-....+\",
\"-....+\",
\"-....+\",
\"++++++\"
};
")
;; (find-e

(tetris)





#####
#
# planner from the ".tar.gz"s
# 2004apr05
#
#####

# «planner-nondebian»  (to ".planner-nondebian")
# http://www.emacswiki.org/cgi-bin/wiki/PlannerMode
# http://sacha.free.net.ph/notebook/emacs/sacha-stable.tar.gz
# http://sacha.free.net.ph/notebook/emacs/sacha-dev.tar.gz

psne http://sacha.free.net.ph/notebook/emacs/sacha-dev.tar.gz

#*
rm -Rv ~/usrc/sacha-stable/
rm -Rv ~/usrc/sacha-dev/
rm -Rv ~/usrc/emacs-wiki/
rm -Rv ~/usrc/planner/
rm -Rv ~/usrc/remember/
tar -C ~/usrc/ \
  -xvzf $S/http/sacha.free.net.ph/notebook/emacs/sacha-dev.tar.gz
cd ~/usrc/sacha-dev/
mv -v emacs-wiki planner remember ..

#*
(add-to-list 'load-path "~/usrc/emacs-wiki/")
(add-to-list 'load-path "~/usrc/planner/")
(code-c-d "emacswiki"   "~/usrc/emacs-wiki/")
(code-c-d "planner"     "~/usrc/planner/")
(require 'planner)





####
#
# planner on debian
# 2004mar16
#
####

# «planner»  (to ".planner")
# (find-fline "/etc/apt/sources.list")
deb     http://richip.dhs.org/~sachac/notebook/emacs/planner ./
deb-src http://richip.dhs.org/~sachac/notebook/emacs/planner ./
# (find-fline "/var/lib/apt/lists/")

apti emacs-wiki planner-el

# (find-status "emacs-wiki")
# (find-vldifile "emacs-wiki.list")
# (find-fline "/usr/doc/emacs-wiki/")
# (find-status "planner-el")
# (find-vldifile "planner-el.list")
# (find-fline "/usr/doc/planner-el/")

# (find-fline "/usr/share/emacs/site-lisp/emacs-wiki/emacs-wiki.el")
# (find-fline "/usr/share/emacs/site-lisp/planner-el/")

(customize-group 'emacs-wiki)
(customize-group 'planner)

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

(find-plannerfile "")
(find-plannerfile "planner.el" "planner-use-other-window")

(find-emacswikifile "emacs-wiki.el")

# (find-angg ".emacs" "brwl-and-friends")
# http://www.emacswiki.org/cgi-bin/wiki/PlannerModeQuickStart


    (if (emacs-wiki-link-at-point)
        (emacs-wiki-visit-link (match-string 0) buf other-window)

(progn (emacs-wiki-link-at-point) (match-string 0))

(progn (find-ebuffer "2004.04.04" "EmacsCvs")
       (find-ekeydescr "\r"))
(find-efunction 'emacs-wiki-follow-name-at-point)
(find-efunction 'emacs-wiki-visit-link)

(find-planner "EmacsCvsDebs")

EmacsCvs

    mkdir ~/Plans

    (add-to-list 'load-path "/directory/with/emacs-wiki")
    (require 'planner)
    (plan)




#####
#
# loop
# 2004may24
#
#####

# «loop»  (to ".loop")
# (find-node "(cl)Loop Basics")

# (find-node "(cl)Efficiency Concerns")
# (find-node "(cl)Creating Symbols" "gensym")

(defun fatorial (n)
  (if (> n 1)
      (* n (fatorial (- n 1)))
    1))
(defun combinacao (a b)
  (/ (fatorial a)
     (fatorial b)
     (fatorial (- a b))))
(defun triangulo (n)
  (loop for linha from 0 to n do
	(loop for coluna from 0 to linha do
	      (insert (format "%4d" (combinacao linha coluna))))
	(insert "\n")))

(triangulo 11)

   1
   1   1
   1   2   1
   1   3   3   1
   1   4   6   4   1
   1   5  10  10   5   1
   1   6  15  20  15   6   1
   1   7  21  35  35  21   7   1
   1   8  28  56  70  56  28   8   1
   1   9  36  84 126 126  84  36   9   1
   1  10  45 120 210 252 210 120  45  10   1
   1  11  55 165 330 462 462 330 165  55  11   1






#####
#
# overlays
# 2004jul09
#
#####

# «overlays»  (to ".overlays")
# (find-angg ".emacs" "highlight-temporarily")

# (find-elnode "Overlay Properties")
# (find-elnode "Managing Overlays")

(setq my-sexp-overlay (make-overlay (point) (- (point) 30)))
(overlay-put my-sexp-overlay 'face 'region)
(delete-overlay my-sexp-overlay)
(setq my-sexp-overlay nil)

(progn 
  (setq my-sexp-overlay (make-overlay (point) (- (point) 30)))
  (overlay-put my-sexp-overlay 'face 'region)
  (run-at-time 1.5 nil
    (lambda ()
      (delete-overlay my-sexp-overlay)
      (setq my-sexp-overlay nil)))
  )

(defun delete-overlays-at-point () (interactive)
  (mapcar 'delete-overlay (overlays-at (point))))




#####
#
# enriched mode
# 2004aug01
#
#####

# «enriched-mode»  (to ".enriched-mode")
# (find-enode "Requesting Formatted Text")
# (find-efile "textmodes/")
# (find-efile "textmodes/enriched.el")
# (find-efile "textmodes/paragraphs.el")
# (find-efile "textmodes/paragraphs.el" "use-hard-newlines")
# (find-eetcfile "enriched.doc")

# (find-file (expand-file-name "enriched.doc" data-directory))



#####
#
# outline mode
# 2004aug02
#
#####

# «outline-mode»  (to ".outline-mode")
# (find-enode "Outline Mode")
# (find-enode "Outline Format" "outline-regexp")
# (find-efunction 'outline-minor-mode)
# (find-efunctiondescr 'outline-mode)
# (find-efile "outline.el")

# (setq outline-minor-mode-prefix "\C-c")
# (load "outline")

# (outline-minor-mode 1)
# (outline-minor-mode 0)
# (find-evardescr 'outline-regexp)

# (make-local-variable 'outline-regexp)
# (setq outline-regexp "[#*%;]+")

C-c @ C-d	-- hide-subtree
C-c @ C-s	-- show-subtree

##### foo
mm
mm

##### bar




#####
#
# emms
# 2004aug13
#
#####

# «emms»  (to ".emms")
# http://www.gnu.org/software/emms/
# http://www.emacswiki.org/cgi-bin/wiki.pl/EMMS
# (code-c-d "emms" "~/usrc/emms/" "~/usrc/emms/emms")
# (code-c-d "emms" "/usr/share/emacs/site-lisp/emms/" "emms")
# (find-emmsfile "")
# (find-emmsfile "emms-player-simple.el")
# (find-emmsfile "README")
# (find-emmsnode "")

#*
rm -Rv ~/usrc/emms/
cd     ~/usrc/
cvs -z3 -d:ext:anoncvs@savannah.gnu.org:/cvsroot/emms co emms
cd     ~/usrc/emms/
make clean
make emms-auto.el emms.info

#*
mkdir /tmp/emms/

#*
;; (find-emmsfile "")
(add-to-list 'load-path "~/usrc/emms/")
(require 'emms-auto)

(require 'emms)
(require 'emms-player-simple)
(require 'emms-source-file)
(require 'emms-pbi)
(define-emms-simple-player bplay "\\.[wW][aA][vV]$" "bplay")
(setq emms-player-list '(emms-player-mpg321
                         emms-player-ogg123
                         emms-player-bplay))


;; (find-fline "/hdb2/CDs/rips/stooges/")
;;
(emms-play-file "/hdb2/CDs/rips/stooges/track05.cdda.ogg")
(emms-add-file  "/hdb2/CDs/rips/stooges/track04.cdda.wav")
(emms-pbi 1)



# (find-emmsnode "basic-commands")
(emms-stop)
(emms-play-file "/hdb2/CDs/rips/stooges/")
(emms-start)





#####
#
# max-lisp-eval-depth
# 2004aug25
#
#####

# «max-lisp-eval-depth»  (to ".max-lisp-eval-depth")
# (find-evardescr 'max-lisp-eval-depth)
# (find-elnode "Eval" "max-lisp-eval-depth")
#*
cd ~/bigsrc/emacs/
grep max.lisp.eval.depth $(<.files.ch)
grep     lisp.eval.depth $(<.files.ch)
#*
# max_lisp_eval_depth
# (find-ecvsfile "src/eval.c")
# (find-efile "emacs-lisp/byte-opt.el" "Tail-recursion elimination")




#####
#
# writing emacs primitives in C
# 2004aug25
#
#####

# «writing-primitives»  (to ".writing-primitives")
# (find-elnode "Writing Emacs Primitives")
# (find-ecvsfile "src/eval.c")
# (find-ecvsfile "src/Makefile.in" "eval.o floatfns.o")
# (find-ecvsfile "src/Makefile.in" "eval.o:")
# (find-ecvsfile "src/lisp.h" "#define DEFUN(")
# (find-ecvsfile "src/lisp.h" "#define DEFUN(" "#define DEFUN(")
# (find-ecvsfile "src/lisp.h" "XSETINT")
# (find-efunctiondescr 'point)
# (find-efunctiondescr '-)
# (find-ecvsfile "src/editfns.c" "Fpoint")
#*
cd ~/bigsrc/emacs/src/
if   [[ ! -e eval.c.orig   ]]; then cp -v eval.c   eval.c.orig;   fi
# if [[ ! -e Makefile.orig ]]; then cp -v Makefile Makefile.orig; fi
# chmod 644 Makefile

#*
# Patches to apply by hand:
# 1) after: (find-ecvsfile "src/eval.c" "defsubr (&Sbacktrace_frame);")
#      add: defsubr (&Slisp_eval_depth);
# 2) after: (find-ecvsfile "src/eval.c" "backtrace-frame" "\n}\n")
#      add:

/* LNAME, FNAME, SNAME, MIN, MAX, INTERACTIVE, DOC */
DEFUN ("lisp-eval-depth",
       Flisp_eval_depth,
       Slisp_eval_depth, 0, 0, 0,                 
       doc: /* Returns the value of the internal variable lisp_eval_depth. */)
     ()
{
  Lisp_Object temp;
  XSETINT (temp, lisp_eval_depth);
  return temp;
}

#*
# (find-ecvsfile "om-patched")
cd ~/bigsrc/emacs/
make |& tee om-patched

#*
cat > /tmp/l-e-d <<'%%%'
(find-efunctiondescr 'lisp-eval-depth)
(lisp-eval-depth)
(+ (lisp-eval-depth) 0)
%%%

emacs-cvs -nw /tmp/l-e-d

#*




#####
#
# hyperlinks to the C source of emacs's primitives
# 2004aug26
#
#####

# «find-eCfunction»  (to ".find-eCfunction")

(load "find-func.el")
(load "help-fns.el")
(find-efunctiondescr '-)

;; (help-args (- "src/data.c") category help-function-def-button)

(find-efunction 'find-function-C-source)
(find-efunction 'help-C-file-name)
(find-efunction 'describe-function-1 "'C-source")

(symbol-name 'point)
(subr-name (symbol-function '-))

(help-C-file-name "-" 'subr)
(help-C-file-name '- 'subr)

* (when (eq file (quote C-source)) (setq file (help-C-file-name ... ...)))

find-function-C-source is a compiled Lisp function in `find-func'.
(find-function-C-source FUN-OR-VAR FILE VARIABLE-P)

(let ((fname (expand-file-name "data.c" find-function-C-source-directory)))
  (find-function-C-source '- fname nil))



#####
#
# mode line
# 2004aug28
#
#####

# «mode-line»  (to ".mode-line")
# (find-elnode "Mode Line Format")
# (find-elnode "Mode Line Data")
# (find-evariable 'mode-line-modified)
# (find-evardescr 'mode-line-format)

# only in cvs emacs:
# (find-efunction 'format-mode-line)




#####
#
# generic modes
# 2013jul27
#
#####

# «generic-x»  (to ".generic-x")
# (find-efunction 'fvwm-generic-mode)
# (find-efile "emacs-lisp/generic.el")
# (find-efile "generic-x.el")
# (find-efile "generic-x.el" "declare-function")
# (find-elnode "Generic Modes")





#####
#
# key translations
# 2004aug28
#
#####

# «key-translations»  (to ".key-translations")
# There are things like
# M-[ [ 3 ~       <deletechar>
# in the output of C-h b - i.e., of (describe-bindings).
# How do I get those?

# (find-elnode "Translating Input")
# (find-elnode "Translating Input" "Variable: function-key-map")

(load "term/xterm.el")
(find-efile "term/xterm.el")

(find-eevfile "eev-dev.el" "define-key")
(define-key eev-mode-map [f3]   'eebd-function)
(define-key function-key-map "\M-[[3~" 'up)
(define-key function-key-map "\M-[[3~" 'deletechar)
(define-key function-key-map "\e[3~" [deletechar])

(progn (describe-bindings) (ee-isearch "3 ~"))
(progn (describe-bindings) (ee-isearch "<deletechar>"))




#####
#
# propertize
# 2004aug28
#
#####

# «propertize»  (to ".propertize")
# (find-angg "elisp/ptext.el")
# (find-elnode "Special Properties")
# (find-elnode "Face Attributes")
# (find-elnode "Display Property")

(equal (propertize "foo" 'face 'foo)
       "foo")

(insert
 (propertize "a"
   'face '(:foreground "red" :background "#223344")
   'mouse-face '(:foreground "green")
))

(insert (propertize "abcd" 'face '(:font "10x20")))

# (find-sh "xlsfonts | sort | grep    ^-")
# (find-sh "xlsfonts | sort | grep -v ^-")
xterm -fn 10x20 &

Q: how to set a piece of text to a specific (non-fontset-ish) font?



#####
#
# the `keymap' and `display' text properties
# 2004sep13
#
#####

# «keymap-property»  (to ".keymap-property")
# (find-elnode "Format of Keymaps")
# (find-elnode "Special Properties" "`keymap'")

(let ((action (lambda () (interactive)
		(highlight-temporarily
		 (previous-char-property-change (point))
		 (next-char-property-change (point))))))
  (insert (propertize "press `?' on me"
		      'keymap `(keymap (?? . ,action)))))

# «display-property»  (to ".display-property")
# (find-angg ".emacs" "show-as-image")
# (find-elnode "Special Properties" "`display'")
# (find-elnode "Other Display Specs")
# (find-elnode "Image Descriptors")

(let* ((fname "~/IMAGES/kaoya.png")
       (image-data (with-temp-buffer
		     (set-buffer-multibyte nil)
		     (insert-file-contents-literally fname)
		     (buffer-string)))
       (display-props `(image :type png :data ,image-data)))
  (insert (propertize "?" 'display display-props)))





#####
#
# elpoint
# 2004aug22
#
#####

# Not working yet - problems with the gothic fontset
# (find-status "elpoint")
# (find-vldifile "elpoint.list")
# (find-fline "/usr/share/doc/elpoint/")
# (find-fline "/usr/share/doc/elpoint/examples/")
# (find-fline "/usr/share/emacs/site-lisp/elpoint/ept-setup.el")
# (find-fline "/usr/share/emacs/site-lisp/elpoint/")
# (setq ept-use-kochi nil)
# (require 'ept-setup)
# (find-fline "/usr/share/doc/elpoint/examples/sample.ept.gz")
#*
rm -Rv /tmp/elpoint/
mkdir  /tmp/elpoint/

#*




#####
#
# frames
# 2004sep05
#
#####

# «frames»  (to ".frames")
# (find-elnode "Parameter Access")
# (find-eapropos "frame")
# (find-eapropos "window")

(set-frame-font "5x7")
(set-frame-font "fixed")
(set-frame-font "nil2")

(find-eapropos "frame")

(frame-list)
(selected-frame)
(frame-root-window)
(window-buffer (frame-root-window))
(buffer-file-name (window-buffer (frame-root-window)))

(frames-on-display-list)
(frame-parameter nil 'display)

(make-frame)
(find-evardescr 'frame-title-format)
modify-frame-parameters

# (find-eapropos "window")




#####
#
# scroll bars
# 2004sep06
#
#####

# «scroll-bars»  (to ".scroll-bars")
# (find-elnode "Standard Faces")
# (find-eapropos "scroll-bar")
# (find-eapropos "set-face")

(set-face-background 'scroll-bar "gray20")
(set-face-foreground 'scroll-bar "blue")
(set-face-foreground 'scroll-bar nil)
(find-efacedescr 'scroll-bar)

(toggle-horizontal-scroll-bar)
(toggle-scroll-bar nil)
(scroll-bar-mode nil)
(set-scroll-bar-mode nil)
(set-scroll-bar-mode 'left)
(set-scroll-bar-mode 'right)




#####
#
# ebnf2ps
# 2004sep15
#
#####

# «ebnf2ps»  (to ".ebnf2ps")
#*
cat > /tmp/foo.ebnf <<'%%%'
;; (find-efile "progmodes/ebnf2ps.el")
;; (require 'ebnf2ps)
;; (ebnf-print-buffer "/tmp/foo.ps")
;; (start-process "gv" nil "gv" "/tmp/foo.ps")
;;
EBNF = {production}+.
production = non_terminal "=" body ".".   ;; production
body = {sequence || "|"}*.                ;; alternative
sequence = {exception}*.                  ;; sequence
exception = repeat [ "-" repeat].         ;; exception
repeat = [ integer "*" ] term.            ;; repetition
term = factor
     | [factor] "+"                       ;; one-or-more
     | [factor] "/" [factor]              ;; one-or-more
     .
factor = [ "$" ] "\"" terminal "\""       ;; terminal
       | [ "$" ] non_terminal             ;; non-terminal
       | [ "$" ] "?" special "?"          ;; special
       | "(" body ")"                     ;; group
       | "[" body "]"                     ;; zero-or-one
       | "{" body [ "||" body ] "}+"      ;; one-or-more
       | "{" body [ "||" body ] "}*"      ;; zero-or-more
       | "{" body [ "||" body ] "}"       ;; zero-or-more
       .
non_terminal = "[!#%&'*-,0-:<>@-Z\\\\^-z~\\240-\\377]+".
terminal = "\\([^\"\\]\\|\\\\[ -~\\240-\\377]\\)+".
special = "[^?\\n\\000-\\010\\016-\\037\\177-\\237]*".
integer = "[0-9]+".
comment = ";" "[^\\n\\000-\\010\\016-\\037\\177-\\237]*" "\\n".
%%%

#*
# (find-fline "/tmp/foo.ebnf")




#####
#
# constant variables (keywords)
# 2004oct06
#
#####

# «keywords»  (to ".keywords")
# (find-elnode "Constant Variables")
(keywordp :foo)
(keywordp 'a)

# (find-eevfile "eev-dev.el" "ee-goto-position")
# (find-node "(elisp)Function Cells")

# To do: add support for `:ov' (overstring), before the name of the
# file (?) in find-fline and friends

(defun defun-backup-maybe (fun-symbol-orig fun-symbol)
  (or (fboundp fun-symbol-orig)
      (fset fun-symbol-orig (symbol-function fun-symbol))))

(defun-backup-maybe 'ee-goto-position-orig 'ee-goto-position)

(defun ee-goto-position (&rest pos-spec-list)
  (if 




#####
#
# timers
# 2004oct08
#
#####

# «timers»  (to ".timers")
# (find-elnode "Timers")
# (find-efunction 'run-at-time)
# (find-efunctiondescr 'run-at-time)

# (find-angg "elisp/tron.el")
# (find-efunction 'run-with-timer)





#####
#
# hooks
# 2000nov05
#
#####

# «hooks»  (to ".hooks")

(defun edrx-hook () (message "Hello!\n"))
(add-hook 'latex-mode-hook 'edrx-hook)
(add-hook 'LaTeX-mode-hook 'edrx-hook)

# (find-fline "~/LATEX/tese2.sty")
# (switch-to-buffer "*Messages*")

# My own autojoin for erc:
# 2004oct08

# (find-rfcfile "rfc2812.txt")
# (find-ercfile "erc.el" "end of MOTD")
# (find-evariable 'erc-after-connect)
# (find-evardescr 'erc-after-connect)
# (find-elnode "Hooks")
# (find-evariable 'erc-server-name)

;; (find-angg ".emacs" "freenode-join")

(defun erc-usermodelinux-joins (&rest rest)
  (message (format "erc-usermodelinux-joins: %S" rest)))

(defun erc-usermodelinux-joins (&rest rest)
  (with-current-buffer "irc.usermodelinux.org:6667"
    (erc-cmd-JOIN "#uml")))

(add-hook 'erc-after-connect 'erc-usermodelinux-joins)

(erc-select :server "irc.usermodelinux.org" :port 6667)

(defun freenode-join (channelname)
  (with-current-buffer "irc.freenode.net:6667"
    (erc-cmd-JOIN channelname)))


irc.usermodelinux.org
#uml





#####
#
# completing debian package names
# 2004oct12
#
#####

# «apt-cache-pkgsearch»  (to ".apt-cache-pkgsearch")
#*
apt-cache pkgsearch netc
#*
apt-cache pkgsearch netc
from man apt-cache: "pkgnames [ prefix ] (...) The output is suitable
for use in a shell tab complete function and the output is generated
extremely quickly."
anyone knows how to use apt-cache pkgsearch for completion in emacs?
I'd like to use it in an interactive function that jumps to the
description of a package in /var/lib/dpkg/info/available ...
btw: grep apt-cache $(find /usr/share/emacs/site-lisp/
 /etc/emacs/site-start.d/ -type f) gives nothing here

# (find-elnode "Minibuffer Completion")
# (find-elnode "Completion Commands")
# (find-elnode "Programmed Completion")

# (find-efunctiondescr 'minibuffer-complete)





#####
#
# color-theme.el
# 2004oct21
#
#####

# «color-theme.el»  (to ".color-theme.el")
# http://www.emacswiki.org/cgi-bin/wiki/ColorTheme
# http://www.emacswiki.org/cgi-bin/wiki/ColorThemeMaker
# http://www.emacswiki.org/elisp/color-theme.el.gz
#*
zcat $S/http/www.emacswiki.org/elisp/color-theme.el.gz > ~/elisp/color-theme.el
#*
# (load-library "color-theme.el")

(color-theme-select)
(color-theme-describe)

(color-theme-lawrence)
(color-theme-jsc-dark)
(color-theme-billw)
(color-theme-andreas)
(color-theme-arjen)
(color-theme-hober)
(color-theme-emacs-21)

(color-theme-print)

# «dto»
# dto uses this (and is having problems with 
(color-theme-dark-blue2)
(color-theme-terryp)





#####
#
# fontifying a whole buffer
# 2004oct25
#
#####

# «fontify-whole-buffer»  (to ".fontify-whole-buffer")

(defvar modeless nil)
(make-variable-buffer-local 'modeless)

(defun find-modeless (&rest pos-spec-list)
  (if modeless
      (apply 'ee-goto-position pos-spec-list)
    (let ((modeless-buffer-name (concat (buffer-name) " (modeless)")))
      (if (get-buffer modeless-buffer-name)
	  (apply 'find-ebuffer modeless-buffer-name pos-spec-list)
	(let ((contents (buffer-substring (point-min) (point-max))))
	  (find-ebuffer modeless-buffer-name)
	  (setq modeless t)
	  (insert contents)
	  (goto-char (point-min))
	  (apply 'ee-goto-position pos-spec-list))))))

(defun ee-kill-buffer (buffer-or-name &rest rest)
  (if (get-buffer buffer-or-name) (kill-buffer buffer-or-name))
  (if rest (apply 'ee-kill-buffer rest)))

;; (find-efunctiondescr 'font-lock-mode)
;; (find-efunctiondescr 'font-lock-fontify-buffer)
;; (find-evardescr 'font-lock-support-mode)
;; (find-evardescr 'font-lock-support-mode)
;; (find-efunctiondescr 'lazy-lock-mode)
;; (find-efunctiondescr 'fast-lock-mode)
;; (find-efunctiondescr 'jit-lock-mode)
 (setq font-lock-maximum-decoration t)

;; Choose files:
;; (find-efile "")

;; follow.el is big (80KB).
;; Font-locking doesn't happen immediately
;;
(progn (ee-kill-buffer "follow.el" "follow.el (modeless)")
       (find-efile "follow.el")
       ;; (font-lock-fontify-buffer)
       (font-lock-mode 1)
       (jit-lock-fontify-now)
       (find-modeless 200))

;; abbrevlist.el is small (1.5KB).
;; Font-locking doesn't happen immediately
;;
(progn (find-efile "abbrevlist.el")
       (font-lock-mode 1)
       (find-modeless 200))

;; (find-efile "font-lock.el")
;; (find-efile "jit-lock.el")
;; (find-efile "lazy-lock.el")
;; (find-efile "fast-lock.el")





#####
#
# key sequence echo messages
# 2004nov15
#
#####

# «key-sequence-echo-message»  (to ".key-sequence-echo-message")

...here's where I'm now: I still haven't found out how C-h has a
different prompt - "(Type ? for further options)" - and how I can set
such prompts in my keymaps... I think this deserves 17 lines of flood...
.
(key-binding "\C-h")
help-command
(symbol-function 'help-command)
(symbol-plist 'help-command)
(setq a (symbol-function 'help-command))
(describe-variable 'a)
.
cd /usr/share/emacs/21.3/lisp/
grep -i 'for further options' $(find * -name '*.el')
.
this only finds the string in emacs-lisp/helper.el - which means
the string comes from the source code. Grepping the source I find it
at: (find-ecvsfile "src/keyboard.c" "(Type ? for further options)")

# (find-efile "help.el")
# (find-efile "help-macro.el")
# (find-efile "emacs-lisp/helper.el")





#####
#
# ee-thing-at-point: notes and drafts
# 2004aug20
#
#####

# «ee-stuff-around-point»  (to ".ee-stuff-around-point")
# (find-eevfile "eev-dev.el" "ee-stuff-around-point")
# (find-efile "thingatpt.el")

# In eev I'm using something similar to thing-at-point but technically
# much simpler; that's because I don't understand thing-at-point well
# enough.

(defun ee-thing-at-point (kind-of-thing &optional show-it)
  (interactive "SKind of thing: \np")
  (let ((thing (thing-at-point kind-of-thing)))
    (if show-it (message "%S" thing)
      thing)))

(defun ee-word-at-point (&optional show-it)
  (interactive "p")
  (ee-thing-at-point show-it))

(call-interactively 'ee-thing-at-point)

(call-interactively
 (lambda (&rest args)
   (interactive "SKind of thing: \np")
   args))

(thing-at-point 'word)

;; Reducing empty strings to nil (for debpackages, for example:

(defun ee-empty-becomes-nil (str)
  (if (equal str "") nil str))

;; (info "(emacs)Dynamic Abbrevs")





#####
#
# basic datatypes: cons, string, symbol, window, buffer, etc
# 2004dec16
#
#####

# «datatypes»  (to ".datatypes")

# (find-ecvsfile "src/")
# (find-ecvsfile "src/lisp.h")
# (find-ecvsfile "src/lisp.h"  "\nunion Lisp_Object\n")
# (find-ecvsfile "src/lisp.h"   "\nenum Lisp_Type\n")
# (find-ecvsfile "src/lisp.h"   "\nenum Lisp_Misc_Type\n")
# (find-ecvsfile "src/lisp.h" "#define XCONS(a)")
# (find-ecvsfile "src/lisp.h" "#define XSTRING(a)")
# (find-ecvsfile "src/lisp.h" "#define XSYMBOL(a)")

# (find-ecvsfile "src/lisp.h" "\nstruct Lisp_Cons\n")
# (find-ecvsfile "src/lisp.h" "\nstruct Lisp_String\n")
# (find-ecvsfile "src/lisp.h" "\nstruct Lisp_Symbol\n")

# (find-ecvsfile "src/frame.h"  "\nstruct frame\n")
# (find-ecvsfile "src/window.h" "\nstruct window\n")
# (find-ecvsfile "src/buffer.h" "\nstruct buffer_text\n")
# (find-ecvsfile "src/buffer.h" "\nstruct buffer\n")

# Select the right tags table by hand:
# code-c-d:    (setq ee-ecvstagsfile "~/bigsrc/emacs/TAGS")
# C source:    (setq ee-ecvstagsfile "~/bigsrc/emacs/src/TAGS")
# Lisp source: (setq ee-ecvstagsfile "~/bigsrc/emacs/src/TAGS-LISP")
# (find-ecvsfile "omT")
# (find-ecvsfile "src/" "TAGS")



#####
#
# disassemble
# 2004dec16
#
#####

# «disassemble»  (to ".disassemble")
# (find-efunction 'disassemble)
# (find-efile "emacs-lisp/")
# (find-elnode "Disassembly")

# (find-efile "emacs-lisp/bytecomp.el")
# (find-efile "emacs-lisp/byte-opt.el")
# (find-efile "emacs-lisp/byte-run.el")
# (find-efile "emacs-lisp/disass.el")

(defun factorial (integer)
  "Compute factorial of an integer."
  (if (= 1 integer) 1
    (* integer (factorial (1- integer)))))

(factorial 4)

(disassemble 'factorial)




#####
#
# Erc bugs
# 2004dec16
#
#####

# «erc-bugs»  (to ".erc-bugs")

I use a dial-up connection, and if I start an Emacs session when I'm
offline, then connect, then run erc-select, I get this error:

  open-network-stream-nowait:
  irc.freenode.net/6667 Temporary failure in name resolution

Emacs sessions started while I'm online don't have this problem and
connect normally.

This bug shows up both in sarge's Emacs and in CVS Emacs.

People on #emacs have suggested me to try this:
  (open-network-stream "test" "*test*" "irc.freenode.net" 6667)
but I still don't see the connection...




#####
#
# htmlfontify
# 2013sep27
#
#####

# «htmlfontify»  (to ".htmlfontify")
# (find-epackages 0 "htmlfontify")
# (find-epackage 'htmlfontify)

# (find-sh "locate htmlfontify")
# (find-efile "htmlfontify.el")
# (find-node "(htmlfontify)Top")
# (find-node "(htmlfontify)Usage & Examples")
# (find-node "(htmlfontify)Interactive")

# (find-fline "~/eev-current/eev-brxxx.el")

# (find-eevfile                 "eev-brxxx.el")
# (find-sh0 "cp -v ~/eev-current/eev-brxxx.el /tmp/")
# (find-fline "/tmp/eev-brxxx.el")
# (find-fline "/tmp/eev-brxxx.el.html")
#       file:///tmp/eev-brxxx.el.html
#

# (find-fline "/tmp/eev-brxxx.el.html")
#
# Fixes needed for eev:
#   font-family: fixed -> monospace
#   force the presence of glyph fonts
#   (find-efile "htmlfontify.el" "hfy-sprintf-stylesheet")
#   (find-efile "htmlfontify.el" "hfy-compile-stylesheet")
# (find-node "(htmlfontify)Non-interactive" "`hfy-compile-stylesheet'")





#####
#
# htmlfontify and mkhtml
# 2004dec28
#
#####

# «mkhtml»  (to ".mkhtml")
# «htmlfontify-old» (to ".htmlfontify-old")
# http://www.emacswiki.org/cgi-bin/wiki/SaveAsHtml
# http://rtfm.etla.org/emacs/htmlfontify/
# http://rtfm.etla.org/emacs/htmlfontify/htmlfontify_0.20+texinfo.tar.gz

# http://www.emacswiki.org/elisp/mkhtml.el
cp -v $S/http/www.emacswiki.org/elisp/mkhtml.el ~/elisp/

# http://list-archive.xemacs.org/xemacs-beta/199811/msg00318.html
# (find-fline "$S/http/list-archive.xemacs.org/xemacs-beta/199811/msg00318.html"
              "htmlize-make-face-hash")
# (find-fline "~/elisp/htmlize.el")

# (require 'htmlize)
# (require 'mkhtml)

;; (find-fline "/tmp/foo.el")
;; (find-efunction 'mkhtml-any-buffer)
;; (find-elnode "Special Properties" "`mouse-face'")
;; (emacs-lisp-mode)

(defun set-sexp-mouse-face (target)
  (let ((e (point))
	(b (save-excursion (eek-backward-sexp))))
    (put-text-property b e 'mouse-face target)))

(set-sexp-mouse-face "http://127.0.0.1/vcarchives/")

;; (mkhtml-any-buffer)
;; (find-fline ".")

;; Oh no:
;; save-excursion: Symbol's function definition is void: htmlize-make-face-hash
;; A version of htmlize with `htmlize-make-face-hash':
;; http://list-archive.xemacs.org/xemacs-beta/199811/msg00318.html




#####
#
# emacs-bidi
# 2005jan03
#
#####

# «emacs-bidi»  (to ".emacs-bidi")
# Just to take a look at emacs-bidi's input methods. I'm just
# trying to find a reasonable way for typing a few sentences in
# Arabic in Emacs - it doesn't matter if I'll have to type each
# word starting by the last character.

# http://www.m17n.org/emacs-bidi/arabic.html
# http://www.m17n.org/emacs-bidi/
# ftp://ftp.m17n.org/pub/mule/.notready/m17nfonts.tar.gz

#*
rm -Rv ~/bigsrc/emacs-bidi/
tar -C ~/bigsrc/ \
  -xvzf $S/ftp/ftp.m17n.org/pub/mule/.notready/emacs-bidi-0.9.1.tar.gz
cd     ~/bigsrc/emacs-bidi/
find * | sort > .files

#*
# (code-c-d "ebidi" "~/bigsrc/emacs-bidi/")
# (find-ebidifile "")
# (find-ebidifile ".files")
# (find-ebidifile "lisp/international/bidi.el")
# (find-ebidifile "lisp/language/")
# (find-ebidifile "lisp/language/arab-util.el")
# (find-ebidifile "lisp/language/arabic.el")




#####
#
# Notes on protecting some erc buffers against accidental killing
# 2005jan03
#
#####

# «kill-buffer-protect»  (to ".kill-buffer-protect")
# Note: there's a package that does that, but I can't remember
# its name

(get-buffer-create "foo")
(with-current-buffer "foo"
  (insert "this is buffer foo\n"))
(kill-buffer "foo")

(find-ebuffer "foo")

(defun foo-kill-buffer-function ())
(defun foo-kill-buffer-function ()
  (if (equal (buffer-name) "foo")
      (error "Buffer foo doesn't want to be killed!")))

(let ((kill-buffer-hook (cons 'foo-kill-buffer-function kill-buffer-hook)))
  (kill-buffer "foo"))




#####
#
# x-symbol
# 2005jan08
#
#####

# «x-symbol»  (to ".x-symbol")
# (find-status   "x-symbol")
# (find-vldifile "x-symbol.list")
# (find-udfile   "x-symbol/")
# (find-vldifile "x-symbol.postinst")
# (find-fline "/etc/emacs/site-start.d/50x-symbol.el")
# (find-fline "/usr/share/emacs/site-lisp/x-symbol/etc/")
# (find-fline "/usr/share/emacs/site-lisp/x-symbol/etc/pcf/")

# (find-node "(x-symbol)Top")
# (find-node "(x-symbol)X-Symbol Internals")

# x-symbol is buggy on CVS Emacs, run with debug-on-error (M-5 M-e) if
# needed

(load "/etc/emacs/site-start.d/50x-symbol.el")
(x-symbol-initialize)
(x-symbol-grid)

(ascstr 0 255)

(progn (find-estring "")
       (insert (propertize (make-string 4 7351) 'face 'x-symbol-face))
       )

# (find-eapropos "x-symbol")
# (find-efunction 'x-symbol-mode)

(progn (find-fline "/tmp/foo.tex")
       (x-symbol-mode 1))

# http://x-symbol.sourceforge.net/details.html

# (find-fline "/usr/share/emacs/site-lisp/x-symbol/")
# (find-evariable 'x-symbol-latin1-fonts)
# (find-sitelispfile "x-symbol/x-symbol-vars.el" "defvar x-symbol-latin1-fonts")
# (find-sitelispfile "x-symbol/x-symbol.el" "-init-cset x-symbol-latin1-cset")
# (find-sitelispfile "x-symbol/x-symbol.el" "defvar x-symbol-latin1-table")


         Family: adobe-helvetica
Font or fontset: fontset-x-symbol-face





#####
#
# buttons
# 2005jan11
#
#####

# «buttons»  (to ".buttons")
# (find-elnode "Buttons")
# (find-efunction 'describe-function-1)
# (find-efunction 'describe-function-1 "help-xref-button")
# (find-efunctiondescr 'describe-function)
# (find-efunctiondescr 'describe-function "`help-")
# (find-elnode "Special Properties" "`category'")




#####
#
# bhl
# 2005jan12
#
#####

# «bhl»  (to ".bhl")
# (find-status   "bhl")
# (find-vldifile "bhl.list")
# (find-udfile   "bhl/")
# (load "/etc/emacs/site-start.d/50bhl.el")




#####
#
# hyperlinks that call functions that use with-output-to-temp-buffer
# 2005jan12
#
#####

# «with-output-to-temp-buffer»  (to ".with-output-to-temp-buffer")

;; This one doesn't jump to the right place.
(progn (list-colors-display)
       (goto-char 0) (search-forward " bisque"))

;; This one jumps to the right place, but if you're using
;; the default value for `pop-up-windows' - (setq pop-up-windows t)
;; instead of what I use, (setq pop-up-windows nil)
;; - then you'll end up with two windows displaying the "*Colors"
;; buffer.
(progn (list-colors-display)
       (switch-to-buffer "*Colors*")
       (goto-char 0) (search-forward " bisque"))

;; (find-efunction 'list-colors-display)
;; (find-efunction 'list-faces-display)
;; (find-efunctiondescr 'with-output-to-temp-buffer)
;; (find-eev "eev-dev.el")

(defmacro ee-no-pop-up-windows (sexp)
  `(let ((pop-up-windows-orig pop-up-windows))
     (setq pop-up-windows nil)		; "let pop-up-windows" doesn't work
     (unwind-protect ,sexp
       (setq pop-up-windows pop-up-windows-orig))))

# (find-eCfunction 'with-output-to-temp-buffer)
# (find-efunctiondescr 'with-output-to-temp-buffer)
# (require 'bytecomp)
# (find-efunction 'byte-compile-with-output-to-temp-buffer)
# (find-efile "emacs-lisp/bytecomp.el" "byte-temp-output-buffer-setup")

# (find-esh "grep temp.output.buffer.show $(find * -name '*.el')")







#####
#
# a fix for the buggy hyperlink functions (those that called wottb)
# 2005jan12
#
#####

# «find-wottb-call»  (to ".find-wottb-call")

(defun find-wottb-call (sexp bufname &rest pos-spec-list)
  "Hyperlink to functions that call `with-output-to-temp-buffer'.
Evaluate SEXP with a trick to not let it split the current window,
then switch to the buffer that it created (it must be called BUFNAME),
then go to the position specified by POS-SPEC-LIST.\n
 (Do I need to say that this is a horrible hack?)"
  (let ((pop-up-windows-orig pop-up-windows))
    (setq pop-up-windows nil)		; "let pop-up-windows" doesn't work
    (unwind-protect (eval sexp)
      (setq pop-up-windows pop-up-windows-orig)))
  (set-buffer bufname)
  (apply 'ee-goto-position pos-spec-list))

(defun find-eapropos (regexp &rest pos-spec-list)
  (interactive "sApropos symbol (regexp): ")
  (apply 'find-wottb-call '(apropos regexp) "*Apropos*" pos-spec-list))

(defun find-efunctiondescr (symbol &rest pos-spec-list)
  (interactive (find-function-read))
  (apply 'find-wottb-call '(describe-function symbol) "*Help*" pos-spec-list))

(defun find-evariabledescr (symbol &rest pos-spec-list)
  (interactive (find-function-read 'variable))
  (apply 'find-wottb-call '(describe-variable symbol) "*Help*" pos-spec-list))

(defun find-ekeydescr (key &rest pos-spec-list)
  (interactive "kFind function on key: ")
  (apply 'find-wottb-call '(describe-key key) "*Help*" pos-spec-list))

(defun find-efacedescr (face &rest pos-spec-list)
  (interactive (list (read-face-name "Describe face")))
  (apply 'find-wottb-call '(describe-face face) "*Help*" pos-spec-list))

(defun find-efaces (&rest pos-spec-list)
  (interactive)
  (apply 'find-wottb-call '(list-faces-display) "*Faces*" pos-spec-list))

(defun find-ecolors (&rest pos-spec-list)
  (interactive)
  (apply 'find-wottb-call '(list-colors-display) "*Colors*" pos-spec-list))

(defun find-efunctiond (function &rest pos-spec-list)
  (interactive (find-function-read))
  (apply 'find-wottb-call '(disassemble function) "*Disassemble*"
	 pos-spec-list))


;; (find-eapropos "unwind" "\nunwind-protect")
;; (find-efunctiondescr 'find-function "load-path")
;; (find-evariabledescr 'pop-up-windows "new windows")
;; (find-ekeydescr "\C-x40" "delete")
;; (find-efacedescr 'italic "Slant")
;; (find-efaces " italic")
;; (find-ecolors " bisque")
;; (find-efunctiond 'find-file "switch-to-buffer")

;; (disassemble 'find-file)
;; (setq pop-up-windows nil)
;; (setq pop-up-windows t)

;; To do: give examples of the call.
;; (find-wottb-call '(list-colors-display) "*Colors*" " bisque")

;; Note: unfortunately that doesn't work 100% - when we have several
;; windows `with-output-to-temp-buffer' will use another window for
;; the help buffer.




#####
#
# flet
# 2005jan13
#
#####

# «flet»  (to ".flet")
# (find-node "(cl)Modify Macros" "Special Form: letf")
# (find-node "(cl)Function Bindings" "flet (bindings...) forms...")
# (find-efunction 'flet)

(require 'cl)

(defun square (x) (* x x))
(defun cube (x) (* x (square x)))
(cube 3)
(flet ((square (x) 10))
      (cube 4))



#####
#
# rcirc
# 2004dec23
#
#####

# «rcirc»  (to ".rcirc")
# (find-angg ".emacs" "rcirc")
# http://savannah.nongnu.org/download/rcirc/rcirc-0.8.tar.gz
#*
rm -Rv ~/usrc/rcirc-0.8/
tar -C ~/usrc/ \
  -xvzf $S/http/savannah.nongnu.org/download/rcirc/rcirc-0.8.tar.gz
cd     ~/usrc/rcirc-0.8/

#*
# http://www.nongnu.org/rcirc/
# (code-c-d "rcirc" "~/usrc/rcirc/")
# (add-to-list 'load-path "~/usrc/rcirc/")
# (find-rcircfile "")
#*
rm -Rv ~/usrc/rcirc/
mkdir  ~/usrc/rcirc/
cd     ~/usrc/
export CVS_RSH=ssh
cvs -d:ext:anoncvs@savannah.nongnu.org:/cvsroot/rcirc co rcirc
cd     ~/usrc/rcirc/

# (find-rcircfile "rcirc.el" "read-only")
# (load-file "~/usrc/rcirc/rcirc.el")

#*
# (find-fline "~/elisp/rcirc.el")
# (load-file  "~/elisp/rcirc.el")

#*
# (code-c-d "rcirc" "~/usrc/rcirc-0.8/")
# (find-rcircfile "")
# (find-rcircfile "rcirc.el")
# (find-rcircfile "rcirc.texi")
# (add-to-list 'load-path "~/usrc/rcirc-0.8/")
# (require 'rcirc)

# (find-efunction 'rcirc)
(rcirc "irc.freenode.net" 6667 "edrx_r")

(code-c-d "rcirc" "~/usrc/rcirc-0.8/")
(defun rcirc-steps ()
  (interactive)
  (require 'rcirc)
  (setq rcirc-time-format "")
  (rcirc "irc.freenode.net" 6667 "edrx_r" '("#emacs" "#eev")))

# (require 'erc)
# (find-efunction 'rcirc-next-active-buffer)
# (find-efunction 'erc-track-switch-buffer)

Connecting to irc.freenode.net...done
#<process irc.freenode.net>
error in process filter: rcirc-print: Wrong type argument: sequencep, 35
error in process filter: Wrong type argument: sequencep, 35




#*
# Old stuff (2004dec):
# http://www.emmett.ca/~rcyeske/rcirc/
#*
rm -Rv ~/usrc/rcirc/
mkdir  ~/usrc/rcirc/
cd $S/http/www.emmett.ca/~rcyeske/rcirc/ && cp -iv * ~/usrc/rcirc/
cd     ~/usrc/rcirc/

#*
# (load-file "~/usrc/rcirc/rcirc.el")
# (code-c-d "rcirc" "~/usrc/rcirc/")
# (find-rcircfile "")
# (find-rcircfile "rcirc.el")

# (find-efunction 'rcirc)
# (setq rcirc-nick "edrx2")
# (rcirc rcirc-server rcirc-port "edrx2")

(add-to-list 'load-path "~/usrc/rcirc/")
(require 'rcirc)
(setq rcirc-nick "edrx2")
(rcirc rcirc-server "6667" "edrx2")

;; To examine rcirc's variables:
;; (find-rcircsh "grep make-local-variable rcirc.el")
;;
(defun values-of (varlist)
  (mapconcat (lambda (v) (format ";; %S\n%s\n" v (pp-to-string (eval v))))
	     varlist ""))
(setq interesting-rcirc-vars
      '(rcirc-nick rcirc-nick-table rcirc-server rcirc-victim
	rcirc-parent-buffer rcirc-last-buffer
	rcirc-process rcirc-process-output
	rcirc-insert-marker rcirc-input-ring))

(find-estring
 (with-current-buffer "#emacs@irc.freenode.net"
   (values-of interesting-rcirc-vars)))
(find-estring
 (with-current-buffer "irc.freenode.net"
   (values-of interesting-rcirc-vars)))

;; (find-elnode "Hash Access")
;; (find-efunction 'rcirc-nick-channels)
;;
(find-epp
 (with-current-buffer "irc.freenode.net"
   (rcirc-nick-channels rcirc-process "edrx2")))


(find-estring (values-of interesting-rcirc-vars))

(find-estring
 (with-current-buffer "#emacs@irc.freenode.net"
   (values-of '(rcirc-nick rcirc-server rcirc-victim
		rcirc-process rcirc-insert-marker rcirc-input-ring))))

(find-estring
 (with-current-buffer "irc.freenode.net"
   (values-of '(rcirc-nick-table rcirc-parent-buffer rcirc-last-buffer
		rcirc-process-output rcirc-insert-marker rcirc-input-ring))))

(find-estring
 (with-current-buffer "#emacs@irc.freenode.net"
   (values-of interesting-rcirc-vars)))

(find-estring
 (with-current-buffer "irc.freenode.net"
   (values-of interesting-rcirc-vars)))




(find-epp (sort (mapcar 'buffer-name (buffer-list)) 'string<))

(find-elinks
 (mapcar (lambda (bname) (ee-pph `(find-ebuffer ,bname)))
	 (sort (mapcar 'buffer-name (buffer-list))
	       'string<)))

"irc.freenode.net"

# (find-rcircfile "")
# (find-rcircfile "rcirc.el" "C-c `")



#####
#
# iswitchb
# 2005jan14
#
#####

# «iswitchb»  (to ".iswitchb")
# (find-enode "Iswitchb")
# (find-efile "iswitchb.el")

# (find-efile "isearchb.el")



#####
#
# hunting for help-C-file-name
# 2005jan14
#
#####

# «help-C-file-name»  (to ".help-C-file-name")

;; This works - it jumps to the source code in C for `+'.
;; <ret> -> button-action -> help-button-action.
(progn (delete-other-windows)
       (find-efunctiondescr '+ "`")
       ;; (debug)
       (help-button-action (button-at (point))))

;; This works too - it jumps to the source code in C for `+'.
(progn (delete-other-windows)
       (find-efunctiondescr '+ "`")
       (let* ((b (button-at (point)))
	      (bs (button-start b))
	      (bhf (button-get b 'help-function))
	      (bha (button-get b 'help-args)))
	 ;; (debug)
	 (help-do-xref bs bhf bha)))

;; (find-efunction 'help-do-xref)

;; The function in bhf/help-function is defined in "help-mode.el", at:
;; (find-efile "help-mode.el" "define-button-type 'help-function-def")
;; Try: (load "help-mode.el")
;;      (load "help-mode.elc")
;; How I discovered that: with (disassemble bhf) and:
;; (find-esh "grep help-C-file-name $(find * -name '*.el')")
;;
(progn (delete-other-windows)
       (find-efunctiondescr '+ "`")
       (let* ((b (button-at (point)))
	      (bs (button-start b))
	      (bhf (button-get b 'help-function))
	      (bha (button-get b 'help-args)))
	 ;; (disassemble bhf)
	 (find-epp (list 'b= b 'bs= bs 'bhf= bhf 'bha= bha))
	 ))

;; Something similar for variables:
;; (find-efile "help-mode.el" "define-button-type 'help-variable-def")



;; (find-eCfunction '+)
;; (find-eCfunction 'with-output-to-temp-buffer "unev")




#####
#
# arabic fonts
# 2005jan27
#
#####

# «arabic-fonts»  (to ".arabic-fonts")
# (find-zsh "installeddebs | sort | grep arabic")
# (find-zsh "availabledebs | sort | grep arabic")
# (find-equailfile "arabic.el")
# (find-enode "Bidirectional Editing")

# (find-status   "xfonts-intl-arabic")
# (find-vldifile "xfonts-intl-arabic.list")
# (find-udfile   "xfonts-intl-arabic/")

(view-hello-file)
(find-einsert '((1569 2000)))

(progn (find-estring "")
       (insert "-*- coding: iso-2022-7bit -*-\n\n")
       (ascstr  6818   6827) (insert "\n\n")
       (ascstr  6829   6853) (insert "\n")
       (ascstr  6854   6867) (insert "\n")
       (ascstr  6868   6889) (insert "\n\n")
       (ascstr 14369  14388) (insert "\n")
       (ascstr 14389  14412) (insert "\n")
       (ascstr 14413  14432) (insert "\n")
       (ascstr 14433  14446) (insert "\n")
       )

(find-fline "/usr/share/i18n/charmaps/UTF-8.gz")
(find-fline "/usr/share/i18n/charmaps/UTF-8.gz" "ARABIC LETTER ALEF")
(find-efunction 'describe-char "U+%04X")

(find-node "(recode)Charset and Surface Index")

# How do I get the unicode codes for these chars? (Esp. to get their
# names?)




#####
#
# "don't font-lock this"
# 2005feb08
#
#####

# «dont-font-lock-this»  (to ".dont-font-lock-this")
# (find-efile "")
# (find-efile "font-core.el")
# (find-evariable 'font-lock-global-modes)
# (find-efunction 'font-lock-unfontify-region)
# (find-efunction 'font-lock-default-unfontify-region)

(defun foo () (interactive)
  (font-lock-unfontify-region (point) (mark)))

# http://www.emacswiki.org/elisp/ewb.el
# http://www.emacswiki.org/cgi-bin/wiki/MultipleModes
# ftp://dlpx1.dl.ac.uk/fx/emacs/multi-mode.el

# (find-efile "hi-lock.el")




#####
#
# transparency in keymaps
# 2005feb12
#
#####

# «transparence-in-keymaps»  (to ".transparence-in-keymaps")
# minor-mode-map-alist
# (find-elnode "Active Keymaps")
# (find-elnode "Index" "* function-key-map:")
# (find-elnode "Functions for Key Lookup" "Function: current-active-maps")
# (find-eCfunction 'current-active-maps)
# (find-epp (current-active-maps))




#####
#
# greek
# 2005mar07
#
#####

# «greek»  (to ".greek")
;; Kristi [Stassinopoulou]

(progn (find-estring "")
       (insert 332666 332737 332719 332739 332740 332727))

(progn (find-estring "")
       (ascstr 332600 332800) (insert "\n\n")
       (ascstr 332657 332713) (insert "\n")
       (ascstr 332721 332745) (insert "\n")
       (insert 332762 "\n"))

(eev-glyph-set  ?\^B 332722 'eev-glyph-face-bang)
(eev-glyph-set  ?\^B 332722)
(eev-glyph-set  ?\^B)




#####
#
# input methods for (modern) greek
# 2006sep22
#
#####

# «greek-input-methods»  (to ".greek-input-methods")
# (find-eleimfile "quail/greek.el")
# (find-eleimfile "quail/greek.el" "\"greek\" \"Greek\"")
# (find-eleimfile "quail/greek.el" "\"greek-postfix\" \"GreekPost\"")
# (find-fline "~/LOGS/2006sep22.emacs")

<pgas> edrx: M-x describe-fontset RET
<zpg> brb
*** zpg QUIT "ERC Version 5.1.3 (IRC client for Emacs)"
<pgas> for greek I have
       greek-iso8859-7-efont-fixed-medium-r-normal--16-160-75-75-c-80-iso10646-1
<edrx> and I have this: greek-iso8859-7   -*-iso8859-7
       [-Misc-Fixed-Medium-R-Normal--6-60-75-75-C-40-ISO8859-7]
<edrx> aha (or kind of).


# (find-efunctiondescr 'describe-fontset)
# (find-efunction 'describe-fontset)
# (describe-fontset "")
#
# (find-efunction 'list-fontsets)
# (list-fontsets nil)
# (list-fontsets 1)
#
# (find-evardescr 'fontset-alias-alist)
# (find-efunction 'print-fontset)
# (find-efunction 'describe-fontset)







#####
#
# mathematical chars in X
# 2005may09
#
#####

# «math-chars-in-X»  (to ".math-chars-in-X")
#*
xfd -fn -Misc-Fixed-Medium-R-SemiCondensed--13-120-75-75-C-60-ISO10646-1 &
#*
cd ~/bigsrc/emacs/lisp/international/
grep mule-unicode-2500-33ff *.el
#*

;; Math chars from the range mule-unicode-0100-24ff:
(progn (find-estring "")
       (insert 342769 342770 342827 "\n")
       (ascstr 342896 342979) (insert "\n")
       (ascstr 342980 343032) (insert "\n")
       (ascstr 343033 343123) (insert "\n")
       (ascstr 343124 343233) (insert "\n")
       (ascstr 343234 343331) (insert "\n")
       (ascstr 343332 343399) (insert "\n")
       (ascstr 343400 343478) (insert "\n")
       (ascstr 343479 343534) (insert "\n")
       (ascstr 343535 343610) (insert "\n")
       (ascstr 343611 343662) (insert "\n"))

;; Math chars from the range mule-unicode-2500-33ff:
(progn (find-estring "")
       (ascstr 299040 299115) (insert "\n")
       (ascstr 299116 299199) (insert "\n")
       (ascstr 299200 299247) (insert "\n")
       (ascstr 299248 299323) (insert "\n")
       (ascstr 299324 299391) (insert "\n")
       (ascstr 299424 299475) (insert "\n")
       (ascstr 299476 299561) (insert "\n")
       (ascstr 299713 299720) (insert "\n")
       (ascstr 299731 299819) (insert "\n")
       (ascstr 299821 299847) (insert "\n")
       (ascstr 299862 299892) (insert "\n")
       (ascstr 299896 299943) (insert "\n")
       (ascstr 299954 299966) (insert "\n"))

;; Math chars using the xsymb font (a proportional font):
(progn (find-estring "")
       (ascstr 7201 7258) (insert "\n")
       (ascstr 7259 7294) (insert "\n")
       (ascstr 7329 7377) (insert "\n")
       (ascstr 7378 7422) (insert "\n")
       (ascstr 7457 7508) (insert "\n")
       (ascstr 7509 7550) (insert "\n")
       (ascstr 7584 7631) (insert "\n")
       (ascstr 7632 7660) (insert "\n"))

;; (find-efile "international/mule-diag.el" "defvar non-iso-charset-alist")
;; (find-efile "loaddefs.el" "mule-unicode-0100-24ff")
;; (find-efile "ps-mule.el" "mule-unicode-0100-24ff")

;; (list-character-sets nil)
;; (describe-fontset nil)

(defun foo () (interactive)
  (insert (format "(ascstr %d %d)\n"
		  (char-after (point-at-bol))
		  (char-before (point-at-eol))))
  (eek "<down>"))





#####
#
# fontsets
# 2005mar07
#
#####

# «fontsets-cvs»  (to ".fontsets-cvs")
;; http://www.emacswiki.org/cgi-bin/wiki/FontSets
;; (find-efunction  'create-fontset-from-fontset-spec)
;; (find-eCfunction 'set-fontset-font)

;; (x-decompose-font-name "fixed")

# (list-fontsets 1)
# (describe-fontset)
# (describe-fontset "fontset-standard")
# (find-enode "Defining Fontsets")




#####
#
# Hello World (an eval-buffer trick)
# 2005jul05
#
#####

# «hello-world-eval-buffer»  (to ".hello-world-eval-buffer")
# Adapted from:
# http://www.emacswiki.org/cgi-bin/wiki/HelloWorld

(find-estring ";;;;;;;; (sit-for 0.2)
10 (princ \"Hello world \" t)
20 (goto-char 10)

;;;;;;;; (eval-buffer)
")

# (find-eCfunction 'eval-buffer)

# (code-c-d "esrc" "~/bigsrc/emacs/src/")
# (find-esrctag "Feval_buffer")
# (find-esrctag "readevalloop")




#####
#
# describing keymaps
# 2005jul18
#
#####

# «find-ekeymapdescr»  (to ".find-ekeymapdescr")
# (find-efunction 'find-ekeymapdescr)

;; (find-estring (documentation 'emacs-lisp-mode))
;; (find-estring (documentation 'emacs-lisp-mode t))
;; (find-elnode "Keys in Documentation" "{MAPVAR}")
;; (find-efunction 'dired-mode)
;; (find-estring (documentation 'dired-mode))

;; (find-esh "grep 'function &optional raw' *.el emacs-lisp/*.el")
;; (find-efile "emacs-lisp/advice.el" "'documentation")
;; (find-ecvssh "cd src; grep documentation *.c")
;; (find-ecvsfile "src/doc.c" "Fdocumentation")
;; (find-ecvsfile "src/doc.c" "Fdocumentation" "Fsubstitute_command_keys")

;; (find-estring (substitute-command-keys "\\<eev-mode-map>\\{eev-mode-map}"))
(substitute-command-keys "\\<dired-mode-map>\\{dired-mode-map}")

(find-estring
 (let ((map dired-mode-map)) (substitute-command-keys "\\<map>\\{map}")))

(find-estring (let ((m shell-mode-map)) (substitute-command-keys "\\<m>\\{m}")))




#####
#
# links for index info nodes
# 2005jul31
#
#####

# «find-node_index»  (to ".find-node_index")
# (find-node "(texinfo)Printing Indices & Menus" "(line")
# (find-enode "Command Index" "auto-fill-mode")
# (find-enode "Command Index" "auto-fill-mode" '(eek "RET"))

(eesteps '(
  (find-enode "Command Index" "auto-fill-mode")
  "C-a C-SPC C-SPC" "4*<down>" "M-w"
  (find-estring "")
  "C-y"))

* auto-fill-mode:                        Auto Fill.           (line  17)
* auto-lower-mode:                       Frame Parameters.    (line   9)
* auto-raise-mode:                       Frame Parameters.    (line   9)
* auto-revert-mode:                      Reverting.           (line  38)

# (find-efunction 'Info-index)
# (find-efunction 'Info-index-node)
# (find-efunction 'Info-extract-menu-node-name)
# (find-efunction 'Info-extract-menu-node-name "(line +")





#####
#
# edb
# 2005sep01
#
#####

# «edb»  (to ".edb")
# http://www.glug.org/people/ttn/software/edb/
# http://www.glug.org/people/ttn/software/edb/edb-1.25.tar.gz
#*
rm -Rfv ~/usrc/edb-1.25/
tar -C ~/usrc/ -xvzf \
  $S/http/www.glug.org/people/ttn/software/edb/edb-1.25.tar.gz

cd ~/usrc/edb-1.25/
./configure --prefix ~/usrc/edb-1.25/

#*
# (code-c-d "edb" "~/usrc/edb-1.25/" "edb")
# (add-to-list 'Info-default-directory-list ee-edbdir)
# (find-edbnode "Top")
# (find-edbfile "")

# Related:
# xemacs manual:
# PostgreSQL Support
# http://www.xemacs.org/Documentation/21.5/html/lispref_62.html#SEC803




#####
#
# prefix-macro
# 2005nov02
#
#####

# «prefix-macro»  (to ".prefix-macro")

(setq prefix-macro-string ";; ")

;; Version 1
(defun prefix-macro (prefix)
  "No docs. To pretty-print the source: (find-efunctionpp 'prefix-macro)"
  (interactive "sPrefix string: ")
  (setq prefix-macro-string prefix)
  (setq last-kbd-macro "\C-a\M-:(insert prefix-macro-string)\r\C-a\C-n")
  (message "prefix-macro-string set to %S" prefix))

;; Version 2 (equivalent, but uses read-kbd-macro)
(defun prefix-macro (prefix)
  "No docs. To pretty-print the source: (find-efunctionpp 'prefix-macro)"
  (interactive "sPrefix string: ")
  (setq prefix-macro-string prefix)
  (setq last-kbd-macro
	(read-kbd-macro
	 "C-a M-: (insert SPC prefix-macro-string) RET C-a <down>"))
  (message "prefix-macro-string set to %S" prefix))




#####
#
# prefix-region
# 2005nov02
#
#####

# «prefix-region»  (to ".prefix-region")
;; From XEmacs (thx to bpalmer)

(defun prefix-region (prefix)
  "Add a prefix string to each line between mark and point."
  (interactive "sPrefix string: ")
  (if prefix
      (let ((count (count-lines (mark) (point))))
	(goto-char (min (mark)(point)))
	(while (> count 0)
	  (setq count (1- count))
          (beginning-of-line 1)
	  (insert prefix)
	  (end-of-line 1)
          (forward-char 1)))))

# (find-es "emacs" "saving_emacs_macros")




#####
#
# setting the mode-line face for borderless windows
# 2006mar26
#
######

# «mode-line-face-borderless»  (to ".mode-line-face-borderless")

(customize-face 'mode-line)
(find-efaces)
(find-ecolors)
(find-elnode "Index" "* set-face-attribute:")
(find-elnode "Attribute Functions")

;; Reset to default
;; (find-efacedescr 'mode-line)
;; (find-efacedescr 'mode-line-inactive)
;; (find-efacedescr 'scroll-bar)
;;
(set-face-background 'mode-line "grey75")
(set-face-attribute  'mode-line nil :box '(:line-width -1 :style released-button))
(set-face-foreground 'mode-line-inactive "grey80")
(set-face-background 'mode-line-inactive "grey30")
(set-face-attribute  'mode-line-inactive nil :weight 'light)
(set-face-background 'scroll-bar "grey75")

;; Good settings for when Emacs is in a borderless window
;; (find-anggfile ".fvwm/keys.fvwm" "!Borders")
;;
(set-face-background 'mode-line "bisque4")
(set-face-attribute  'mode-line nil :box nil)
(set-face-foreground 'mode-line-inactive nil)
(set-face-background 'mode-line-inactive "saddlebrown")
(set-face-attribute  'mode-line-inactive nil :box nil)
(set-face-background 'scroll-bar "grey32")

;; Problem: that only looks really good when the scroll bar is off...
;; Idea: 4-S could cycle `vertical-scroll-bar' (a buffer-local
;; variable) for the current buffer between three states: unset, left,
;; and nil. Hmm, how do I write that?
;;
;; (find-elnode "Scroll Bars" "vertical-scroll-bar")
;; (find-elnode "Intro to Buffer-Local")
;; (local-variable-p 'vertical-scroll-bar)
;; (local-variable-if-set-p 'vertical-scroll-bar)

(set-face-background 'mode-line "grey50")
(set-face-background 'mode-line "grey40")
(set-face-background 'mode-line "bisque")
(set-face-background 'mode-line "darkgoldenrod")
(set-face-background 'mode-line "saddlebrown")

(find-efacedescr 'mode-line)





#####
#
# window configurations
# 2006jul13
#
#####

# «window-configurations»  (to ".window-configurations")
# (find-angg ".emacs" "find-C-x")
;; More about window configurations:
;; (find-efunction 'window-configuration-to-register)
;; (find-evardescr 'register-alist)
;; (find-node "(elisp)Window Configurations")
;; (find-efile "winner.el")




#####
#
# emacs-wget
# 2007jan12
#
#####

# «emacs-wget»  (to ".emacs-wget")
# http://pop-club.hp.infoseek.co.jp/emacs/emacs-wget/emacs-wget-0.5.0.tar.gz
# (code-c-d "emacswget" "~/usrc/emacs-wget-0.5.0/")
# (find-emacswgetfile "")
# (find-emacswgetfile "README")
# (find-emacswgetfile "USAGE")
# (find-emacswgetfile "wget.el")
#*
rm -Rv ~/usrc/emacs-wget-0.5.0/
tar -C ~/usrc/ -xvzf \
  $S/http/pop-club.hp.infoseek.co.jp/emacs/emacs-wget/emacs-wget-0.5.0.tar.gz
cd     ~/usrc/emacs-wget-0.5.0/

#*




#####
#
# load-history
# 2007feb23
#
#####

# «load-history»  (to ".load-history")

(info "(elisp)Where Defined")
(find-node "(elisp)Eval" "Command: eval-region")
(find-node "(elisp)Eval" "Command: eval-buffer")
(find-fline "~/LOGS/2007feb23.emacs" "(elisp)Where Defined")

(find-epp (car load-history))
(mapcar 'car load-history)
(find-estring (mapconcat 'car load-history "\n"))
(find-elinks (mapcar (lambda (fname+) `(find-fline ,(car fname+))) load-history))
(find-elinks (mapcar (lambda (fname+) `(find-epp (assoc ,(car fname+) load-history))) load-history))

;; The two "find-elinks" lines above generate lines like these...
(find-fline "/home/edrx/.emacs")
(find-epp (assoc "/home/edrx/.emacs" load-history))

(symbol-file 'eejump 'defun)
(assoc (symbol-file 'eejump 'defun) load-history)
(find-epp (assoc (symbol-file 'eejump 'defun) load-history))


#*
mkdir /tmp/where/
cat > /tmp/where.el <<'%%%'
(defvar where-file nil)
(setq where-file (symbol-file 'where-file 'defvar))
%%%
cat > /tmp/where/where.el <<'%%%'
(defvar where-file nil)
(setq where-file (symbol-file 'where-file 'defvar))
%%%

#*
(load "/tmp/where.el")
where-file
(symbol-file 'where-file 'defvar)

# (find-eCfunction 'load)
# (find-eCfunction 'load "Get the name for load-history")



mkdir /tmp/where/






#####
#
# dired and tar-mode
# 2007mar07
#
#####

# «dired-and-tar-mode»  (to ".dired-and-tar-mode")
# (find-efunction-links 'tar-extract)
# (find-efunction 'dired-move-to-filename)

# (find-fline "~/flipbooks/")
# (find-fline "~/flipbooks/" "ee-glyph_001.png" '(eek "RET"))
# (find-fline "~/flipbooks/" "ee-glyph_001.png" '(eek "C-h k RET"))
# (find-fline "~/flipbooks/" "ee-glyph_001.png" '(dired-advertised-find-file))
# (find-fline "~/flipbooks/" "ee-glyph_001.png" '(dired-get-filename))
# (find-fline "~/flipbooks/" "ee-glyph_001.png" '(progn (debug) (dired-get-filename)))
# (find-fline "~/flipbooks/eesteps.tgz")
# (find-fline "~/flipbooks/eesteps.tgz" "eesteps_004.png" '(eek "RET"))
# (find-fline "~/flipbooks/eesteps.tgz" "eesteps_004.png" '(eek "C-h k RET"))
# (find-fline "~/flipbooks/eesteps.tgz" "" '(find-evardescr 'tar-parse-info))

# How do I implement something like this?...
# (find-fline "/tmp/flipbooks/eesteps.tgz!eesteps_002.png")





#####
#
# box characters
# 2007jul22
#
#####

# «box-chars»  (to ".box-chars")
;; (find-echarsetchars 'mule-unicode-2500-33ff "212x")
;; (find-eleimfile "quail/sgml-input.el")
;; (find-eleimfile "quail/sgml-input.el" "&box")
;; (find-angg ".emacs" "find-eunicodeucs")

(find-eoutput-rerun "*chars*"
  '(progn
    (insert 299124 299174 299127
            299168 299180 299171
            299130 299177 299133
            299121 299120)
    (insert 10)
    (insert 299052 299084 299056
            299068 299100 299076
            299060 299092 299064
            299042 299040)
    (insert 10)
    (insert 299181 299182 299184 299183)
    (insert 10)
    (insert 342899 342896 342898 342897)
 ))

;; &boxDR; &boxHD; &boxDL;
;; &boxVR; &boxVH; &boxVL;
;; &boxUR; &boxHU; &boxUL;
;; &boxV;  &boxH;
;;
;; &boxdr; &boxhd; &boxdl;
;; &boxvr; &boxvh; &boxvl;
;; &boxur; &boxhu; &boxul;
;; &boxv;  &boxh;
;; 
;; (What are the sgml codes for the round corners?)
;;
;; &darr; &larr; &rarr; &uarr;






#####
#
# emacsclient and multi-tty
# 2007oct27
#
#####

# «emacsclient-and-multi-tty»  (to ".emacsclient-and-multi-tty")
# Is gnudoit obsolete?

# (find-enode "Invoking emacsclient")
# (find-ecvsfile "lib-src/emacsclient.c")
# (find-ecvssh "lib-src/emacsclient --version")
# (find-ecvssh "lib-src/emacsclient --help")
# (find-ecvssh "lib-src/emacsclient --help" "-c, --current-frame")
# (find-ecvssh "lib-src/emacsclient --help" "-e, --eval")
# (find-ecvssh "lib-src/emacsclient --help" "-n, --no-wait")
# (find-ecvssh "lib-src/emacsclient --no-wait --eval '(+ 1 2)'")
# (find-ecvssh "lib-src/emacsclient -c -n -e '(+ 1 2)'")

# If I omit the "-c" (= "--current-frame") it tries to create a new frame...
# and I have the impression that "-n" ("--no-wait") is irrelevant with "-e".
# (eev "~/bigsrc/emacs/lib-src/emacsclient -c    -e '(+ 1 2)'")
# (eev "~/bigsrc/emacs/lib-src/emacsclient -c -n -e '(+ 1 2)'")

# (eev "~/bigsrc/emacs/lib-src/emacsclient /tmp/foo")
# (eev "~/bigsrc/emacs/lib-src/emacsclient -c /tmp/foo")

# Multi-tty:
# (find-ecvssh   "lib-src/emacsclient --help")
# (find-ecvssh   "lib-src/emacsclient --help" "-t, --tty")
# (eev "~/bigsrc/emacs/lib-src/emacsclient -t /tmp/foo")

# It unsets my guillemet glyphs... strange.
# (find-efunction 'eev-set-default-glyphs)
# (eev-set-default-glyphs)





#####
#
# palette
# 2007nov11
#
#####

# «palette»  (to ".palette")
# (find-angg ".emacs" "find-epalette")

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

LightSeaGreen MediumAquamarine aquamarine DarkSeaGreen SeaGreen
MediumSeaGreen ForestGreen PaleGreen SpringGreen green
MediumSpringGreen GreenYellow YellowGreen LimeGreen LightGreen
OliveDrab DarkOliveGreen DarkKhaki khaki LightGoldenrod PaleGoldenrod
yellow gold goldenrod peru orange DarkOrange RosyBrown tan HotPink
PaleVioletRed MediumVioletRed VioletRed DeepPink magenta1 magenta
magenta2 magenta3
 #aabbcc





#####
#
# letf
# 2007dec13
#
#####

# «letf»  (to ".letf")
# (find-node "(cl)Modify Macros" "letf")
# (find-node "(cl)Basic Setf")

(defun foo (a) (format "foo: %s" a))
(defun bar (a) (format "bar: %s" a))

   (lambda (a) (format "bar: %s" a))

(letf (((symbol-function 'foo)
	(lambda (a) (format "bar: %s" a))
	))
  (foo "plic"))

(foo "plic")


# Why:

<edrx> (progn (require 'dired) (dired-copy-file
       "/scp:edrx@caramelo:/home/edrx/o" "/usr/" 'ok-flag))
<edrx> this gives a permission denied error, but even if I wrap the
       dired-copy-file in a save-excursion tramp shows a buffer
       with the error (something that I can't interpret, just a
       sexp with pairs of numbers)
<edrx> this buffer goes away when I type a key - any key.
<edrx> anyone knows if there's a variable that makes tramp not show
       that?

(require 'dired)
(dired-copy-file "/scp:edrx@caramelo:/home/edrx/o" "/usr/" 'ok-flag)
(save-excursion
  (dired-copy-file "/scp:edrx@caramelo:/home/edrx/o" "/usr/" 'ok-flag))

;; (find-eapropos "tramp")
;; (find-efunction 'tramp-message)
;; (find-efunction 'tramp-error-with-buffer)
;; (find-es "emacs" "letf")

(letf (((symbol-function 'tramp-error-with-buffer)
	(lambda (a b c d) (message d))
	))
  (dired-copy-file "/scp:edrx@caramelo:/home/edrx/o" "/usr/" 'ok-flag)
  )

;; But this ^ doesn't work - the buffer with the numbers still
;; appears...





#####
#
# fontset math chars bug
# 2008mar14
#
#####

# «fontset-math-chars-bug»  (to ".fontset-math-chars-bug")
# http://article.gmane.org/gmane.emacs.bugs/17717
# http://lists.gnu.org/archive/html/bug-gnu-emacs/2008-03/msg00090.html
# (find-angg ".emacs" "gnu.emacs.bugs")
# (find-efile "")
# (find-efile "ChangeLog")
# (find-ecvsfile "")
# (find-ecvsgrep "grep -niH -e mincho $(cat .files.ch)")
# (find-ecvsgrep "grep -niH -e GB18030 $(cat .files.ch)")
# (find-egrep "grep -niH -e GB18030 $(find *)")
# (find-efile "international/fontset.el")
# (find-elnode "Fontsets")
# (find-elnode "Fontsets" "set-fontset-font")
# (find-eapropos "charset")
# (find-eapropos "fontset")
# (find-efunction 'describe-char "\"display\"")
# (list-fontsets nil)
# (list-fontsets t)

# From: Eduardo Ochs <eduardoochs@gmail.com>
# Subject: font used for some mathematical characters
# Newsgroups: gnu.emacs.bug
# Date: Fri, 14 Mar 2008 15:41:24 -0300

Some very recent changes in CVS Emacs have changed the the fonts that
are selected for displaying some mathematical characters, in a bad
way... The three sexps below will create a buffer with two problematic
characters (displayed with the face "highlight", for visibility), and
with several sexps that can be executed with C-x C-e to change to
frame font and to inspect the fonts used for individual characters.

--snip--snip--

(defun fontbug-propertize (c)
  (propertize (string c) 'face 'highlight))

(defun fontbug-string (c1 c2)
  (format "\
P%sQ <--| P
 |       |
 |  <->  |
 v       v
 R |--> Q%sS\n\n"
	  (fontbug-propertize c1)
	  (fontbug-propertize c2)))

(progn
  (switch-to-buffer "o")
  (delete-region 1 (point-max))
  (insert
   (string ?& 8743 10 10)
   (fontbug-string ?& ?>)
   (fontbug-string 8743 8835)  ;; problematic chars
   "(set-frame-font \"fixed\")\n"
   "(set-frame-font \"10x20\")\n"
   "(require 'descr-text)\n"
   "(describe-char-display 1 (char-after 1))\n"
   "(describe-char-display 2 (char-after 2))\n"
   "(internal-char-font 1)\n"
   "(internal-char-font 2)\n"
   ))

--snip--snip--

When I use the font "fixed", the two
"describe-char" lines return this:

  ("fixed:pixelsize=13:foundry=misc:weight=regular:slant=roman:width=semi-condensed" . "27")
  ("-Daewoo-Mincho-Medium-R-Normal--16-120-100-100-C-160-KSC5601.1987-0" . "217C")

and the "logical and" and "supset"/"implies"
chars (8743 and 8835) are taken from the "-Daewoo-..."
font and are ~ 2.5 times wider than normal chars.

When I use the font "10x20" the two
"describe-char" lines return this:

  ("fixed:pixelsize=20:foundry=misc:weight=regular:slant=roman:width=normal" . "08")
  ("fixed:pixelsize=20:foundry=misc:weight=regular:slant=roman:width=normal" . "C63")

and all the characters are the same size.

By the way, here "fixed" is the same font as "6x13"; I checked with:

  xlsfonts | grep -v \\-
  xlsfonts -l -fn fixed
  xlsfonts -l -fn 6x13

Versions: I am using a Debian 4.0 ("Etch", stable) GNU/Linux system;
and running "(emacs-version)" returns:
  => "GNU Emacs 23.0.60.2 (i686-pc-linux-gnu, GTK+ Version 2.8.20)
      of 2008-03-14 on persephone"

  Cheers,
    Eduardo Ochs
    http://angg.twu.net/
    eduardoochs@gmail.com


2227;LOGICAL AND;Sm;0;ON;;;;;N;;;;;
2283;SUPERSET OF;Sm;0;ON;;;;;Y;;;;;








#####
#
# mkto bug (multibyte vs unibyte)
# 2008mar14
#
#####

# «emacs-cvs-mkto-bug»  (to ".emacs-cvs-mkto-bug")
# (find-efunction 'mkto)
# (find-efunctionpp 'mkto)
# (find-elnode "Non-ASCII Characters")
# (find-elnode "Text Representations" "multibyte-string-p")
# (find-elnode "Converting Representations")
# (find-elnode "Converting Representations" "Function: string-make-unibyte")
# (find-elnode "Converting Representations" "Function: string-make-multibyte")
# (find-elnode "Converting Representations" "Function: string-to-multibyte")

(let* ((a (symbol-function 'mkto))
       (b (cadddr a))
       (c (cadr b))
       (d (caddr c))
       (s1 (cadr d))
       (s2 (caddr d))
       )
  (list s1 s2
  (multibyte-string-p s1)
  (multibyte-string-p s2)
  ))

(setq s1 "^\\(.+ \\)\253\\([!-~]+\\)\273$")
(setq s2 "\\1\253.\\2\273\t(to \"\\2\")\n\\&  (to \".\\2\")")
(setq m1 (string-to-multibyte s1))
(setq m2 (string-to-multibyte s2))
(setq u1 (string-make-unibyte m1))
(setq u2 (string-make-unibyte m2))

(multibyte-string-p s1)
(multibyte-string-p s2)
(multibyte-string-p m1)
(multibyte-string-p m2)
(multibyte-string-p u1)
(multibyte-string-p u2)





#####
#
# creating files in utf-8 and latin-1
# 2008apr08
#
#####

# «creating-utf8-files»  (to ".creating-utf8-files")
# (find-es "console" "non-utf-8")
# (find-efunctiondescr 'hexl-mode)

vtutil4
vtutil

(progn
  (find-file "/tmp/foo-l")
  (delete-region (point-min) (point-max))
  (set-buffer-file-coding-system 'latin-1)
  (insert 97 231 227 111 10)
  (save-buffer)
  )

(progn
  (find-file "/tmp/foo-u")
  (delete-region (point-min) (point-max))
  (set-buffer-file-coding-system 'latin-1)
  (insert 97 231 227 111 10)
  (set-buffer-file-coding-system 'utf-8)
  (save-buffer)
  )

lua51 -e 'print(string.char(0x61, 0xc3,0xa7, 0xc3,0xa3, 0x6f))' > /tmp/foo-u2
lua51 -e 'print(string.char(0x61,      0xe7,      0xe3, 0x6f))' > /tmp/foo-l2





#####
#
# skeletons
# 2008apr24
#
#####

# «skeletons»  (to ".skeletons")
# (find-efile "skeleton.el")
# (find-egrep "grep -nH -e skeleton $(find * -name '*.el')")
# (find-efile "textmodes/tex-mode.el" "define-skeleton tex-insert-braces")
# (find-efile "textmodes/tex-mode.el" "define-skeleton latex-insert-block")
# (find-node "(autotype)Top")
# (find-node "(autotype)Using Skeletons")




#####
#
# Help:IPA
# 2008apr26
#
#####

# «Help:IPA»  (to ".Help:IPA")
# (find-angg "elisp/help-ipa.el")
# http://en.wikipedia.org/wiki/Help:IPA
# (find-sh "tr '\"' '\n' < $S/http/en.wikipedia.org/wiki/Help:IPA | grep ogg | sort")
# (find-sh "tr '\"' '\n' < $S/http/en.wikipedia.org/wiki/Help:IPA | grep ogg | sort | grep http | uniq")
# (find-sh "tr '\"' '\n' < $S/http/en.wikipedia.org/wiki/Help:IPA | grep ogg | sort | grep http | uniq | tee /tmp/oggs")
#*
rm -Rv ~/usrc/help-ipa/
mkdir  ~/usrc/help-ipa/
cd     ~/usrc/help-ipa/
tar -xvzf ~/tmp/help-ita.tgz
for i in $(cat /tmp/oggs); do
  echo $i
  if [ ! -e $(basename $i) ]; then wget $i; fi
  # Don't download the oggs that we already have
done
tar -cvzf ~/tmp/help-ita.tgz *.ogg

#*

# (find-sh "grep audio /tmp/ipa2")
# (fooi-re "|{{audio-pipe|\\([^|]+\\)|[^|]+|<big>\\[&nbsp;\\([^&]+\\)&nbsp;\\]</big>}}" "\"\\2\" \"\\1\"")




#####
#
# The different display tables used by unibyte and latin-1 buffers
# 2008may20
#
#####

# «display-table-latin-1»  (to ".display-table-latin-1")
# (find-angg ".emacs" "find-euboutput")
# (find-elnode "Display Tables")
# (find-elnode "Active Display Table")
# (find-elnode "Glyphs")
# (find-elnode "Index" "* string-make-multibyte:")
# (find-elnode "Lisp and Coding Systems")
# (find-elnode "Coding System Basics" "Function: coding-system-get")
# (find-elnode "Explicit Encoding")

# (find-eevfile "eev-glyphs.el")
# (find-eevfile "eev-math-glyphs.el")

(progn
  (find-estring "áéíóú")
  (describe-coding-system nil)
  )




#####
#
# The "fixed" font became "sony-fixed"
# 2008may24
#
#####

# «sony-fixed»  (to ".sony-fixed")

<edrx> hello - I updated CVS emacs here and now the "-fn fixed"
       command-line parameter acts differently than before... it
       chooses a big, ugly font. (describe-face 'default) now
       reports:
<edrx>    Family: sony-fixed
<edrx>     Width: normal
<edrx>    Height: 120
<edrx>   ...
<edrx>      Font: #<font-object
       -sony-fixed-medium-r-normal--16-120-100-100-c-80-iso8859-1>
<edrx>   Fontset:
       -sony-fixed-medium-r-normal--16-*-75-75-c-80-fontset-auto2
<edrx> (btw: this is the first time that I see a #<font-object _> -
       is this a new datatype?)
<edrx> ah, and `(set-frame-font "10x20")' doesn't work anymore -
       "set-frame-font: Font `10x20' is not defined" - but
       `(set-frame-font "terminus-16")' works; `(set-frame-font
       "fixed")' runs without errors, but it chooses the "sony"
       font mentioned above.

<edrx> hmm
<edrx> (x-list-fonts "*" nil (selected-frame))
<edrx> lists lot of #<font-entity _> objects
<edrx> it's a whole new scary world

# (find-eface-links 'default)
# (find-efacedescr 'default)
# (find-elnode "Editing Types")
# (info "(elisp)Editing Types")
# (set-frame-font "fixed")
# (set-frame-font "10x20")
# (set-frame-font "terminus-16")
# (find-ecvsfile "")
# (find-ecvsfile "src/")
# (find-ecvssrcgrep "grep -nH -e font-object *")
# (find-elnode "Top")

# (find-efunction 'set-frame-font)
# (find-epp (x-list-fonts "*" nil (selected-frame)))
# (find-elnode "Fontsets")
# (find-elnode "Fontsets" "Function: set-fontset-font")
# (find-efile "")
# (find-egrep "grep -nH -e set-fontset-font $(find * -name '*.el')")
# (find-egrep "grep -nH -e sony-fixed $(find * -name '*.el')")
# (find-egrep "grep -nH -e sony $(find * -name '*.el')")
# (find-ecvssrcgrep "grep -nH -e sony *")

# (find-es "x")
# (find-sh "xlsfonts | grep fixed | sort")
# (find-sh "xlsfonts | grep sony | sort")

-misc-fixed-medium-o-normal--0-0-75-75-c-0-iso8859-1




#####
#
# fontsets
# 2008may26
#
#####

# «find-fontset-links»  (to ".find-fontset-links")
# (find-angg ".emacs" "find-fontset-links")

(find-fontset-links	 ,@rest)
(find-efunction 'find-fontset-links)

(find-es "emacs" "sony-fixed")
(find-efunctiondescr 'set-fontset-font)
(find-efunction 'set-fontset-font)
(find-elnode "Index" "* set-fontset-font:")
(find-egrep "grep -nH -e set-fontset-font $(find * -name '*.el')")
(find-egrep "grep -nH -e fontset $(find * -name '*.el')")
(find-efile "international/fontset.el" "set-fontset-font" "(#xE000 . #xF8FF)")

(list-fontsets nil)
(list-fontsets 1)
(describe-fontset ___)

(fontset-list)
(mapcar 'fontset-plain-name (fontset-list))
(mapcar 'x-decompose-font-name (fontset-list))
(find-efunction 'fontset-plain-name)
(query-fontset "fontset-startup")
(query-fontset "fontset-default")
(query-fontset "fixed")

(find-eface-links 'default)
(find-efacedescr 'default)

(set-frame-font "fixed")
(set-frame-font "-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso8859-1")
(set-frame-font "10x20")
(set-frame-font "terminus-16")

(find-elnode "Type Predicates")
(find-efunction 'x-resolve-font-name)
(x-resolve-font-name "fixed")
(type-of (x-resolve-font-name "fixed"))
(aref (x-resolve-font-name "fixed") 0)
(aref [6 7 8] 2)
(x-compose-font-name (x-resolve-font-name "fixed"))

(find-efunction 'create-fontset-from-ascii-font)
(create-fontset-from-ascii-font "fixed")
(create-fontset-from-ascii-font "-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso8859-1")
(x-decompose-font-name (x-resolve-font-name "fixed"))

(x-list-fonts "fixed" nil nil 1)
(ee-pp0 (car (x-list-fonts "fixed" nil nil 1)))
(find-estring (mapconcat 'ee-pp0 (x-list-fonts "fixed" nil nil nil) "\n"))

(find-efile "international/mule-diag.el")
(find-efile "international/fontset.el")

(find-efunction 'setup-default-fontset)

(find-efunction 'new-fontset)
(find-elnode "Index" "* new-fontset:")
(find-elnode "Fontsets")

(find-efunction-links 'create-fontset-from-fontset-spec)
(find-efunctiondescr 'create-fontset-from-fontset-spec)
(find-efunction 'create-fontset-from-fontset-spec)
(find-elnode "Index" "* create-fontset-from-fontset-spec:")

(find-es "x" "fonts.alias")
(find-sh "xlsfonts | grep fixed | sort")
(find-fline "/usr/share/fonts/X11/misc/fonts.alias" "fixed")

(find-bgprocess "xterm -fn 10x20")
(find-bgprocess "xterm -fn -misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso8859-1")
(find-ebuffer "*Messages*")

(find-man "1 xfd")
(find-bgprocess "xfd -fn fixed")
(find-bgprocess "xfd -fn 10x20")
(find-bgprocess "xfd -fn -misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso8859-1")
(find-bgprocess "xfd -fn -misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1")

(find-eapropos "fontset")
(find-eapropos "xl")
(list-fontsets nil)
(list-fontsets t)

(find-eapropos "xlfd")
(find-efunctiondescr 'font-xlfd-name)
(font-xlfd-name "fixed")
(font-xlfd-name (x-list-fonts "fixed" nil nil 1))
(find-egrep "grep -nH -e font-xlfd-name $(find * -name '*.el')")




#####
#
# ee-font-alias and ee-set-frame-font
# 2008jun01
#
#####

# «ee-font-unalias»    (to ".ee-font-unalias")
# «ee-set-frame-font»  (to ".ee-set-frame-font")
# (find-angg ".emacs" "ee-font-unalias")
# (find-angg ".emacs" "ee-set-frame-font")

# http://article.gmane.org/gmane.emacs.devel/98168
# (find-angg ".emacs" "gnu.emacs.devel")
# (find-sh "xlsfonts -ll -fn 7x13")
# (find-sh "xlsfonts -ll -fn 7x13 | grep ' FONT '")
# (find-sh "xlsfonts -ll -fn 7x13 | grep ' FONT ' | cut -b29-")
# (find-sh "xlsfonts -ll -fn 7x13 | grep ' FONT ' | cut -b29- | tr A-Z a-z")
# (find-sh "xlsfonts -ll -fn 7x13 | grep ' FONT ' | cut -b29- | tr A-Z a-z | head -n1")





#####
#
# font-log
# 2008may30
#
#####

# «font-log»  (to ".font-log")
# (find-egrep "grep -nH -e font-log $(find * -name '*.el')")
# (find-efunction 'font-show-log)
# http://article.gmane.org/gmane.emacs.devel/98030
# http://article.gmane.org/gmane.emacs.devel/97989
# http://article.gmane.org/gmane.emacs.devel/97563



#####
#
# glyphs as conses
# 2008jul03
#
#####

# «glyphs-as-conses»  (to ".glyphs-as-conses")
# http://article.gmane.org/gmane.emacs.bugs/17576
# http://article.gmane.org/gmane.emacs.bugs/17607
# http://lists.gnu.org/archive/html/bug-gnu-emacs/2008-02/msg00132.html
# http://lists.gnu.org/archive/html/bug-gnu-emacs/2008-02/msg00163.html
# (find-efunction 'ee-glyph)
# (find-efunction 'make-glyph-code)
# (find-efile "disp-table.el" "defun make-glyph-code" "(cons char fid)")






#####
#
# case in replace-regexp
# 2008jul02
#
#####

# «case-in-replace-regexp»  (to ".case-in-replace-regexp")
# (find-efunction 'replace-regexp-in-string)
# (find-elnode "Index" "* replace-regexp-in-string:")
# (find-elnode "Replacing Match")
# (find-elnode "Search and Replace")
# (find-elnode "Searching and Case")

(replace-regexp-in-string "[ab]" "xx" "foobar")
(replace-regexp-in-string "[ab]" "xx" "fooBar")
(replace-regexp-in-string "[ab]" (lambda (s) "ww") "fooBar")
(replace-regexp-in-string "[ab]" (lambda (s) "ww") "fooBar" 'fixedcase)



#####
#
# time stamps
# 2008jul21
#
#####

# «time-stamp»  (to ".time-stamp")
# (find-enode "Time Stamps")
# (find-efunction 'time-stamp)




#####
#
# anchors in latin-1 buffers: a problem
# 2008oct21
#
#####

# «anchors-in-latin-1»  (to ".anchors-in-latin-1")
# (find-TH "emacs" "unibyte-multibyte")
# (find-angg ".emacs" "save-this-block-as")
# http://article.gmane.org/gmane.emacs.bugs/21772
# http://lists.gnu.org/archive/html/bug-gnu-emacs/2008-10/msg00830.html
# http://lists.gnu.org/archive/html/bug-gnu-emacs/2009-01/msg00040.html

(setq ee-delimiter-semisnip "\n;;--------snip,snip--------\n")
(eeb-define 'eeb-string 'ee-se-to-string ee-delimiter-semisnip nil t t)
(defun save-this-block-as (fname) (eev (ee-once (eeb-string)) nil fname))

(find-fline "/tmp/1.txt")
(find-fline "/tmp/2.txt")
 (load-file "/tmp/1.txt")

(find-fline "/tmp/3.txt")
(eev "emacs-default -Q /tmp/3.txt")

# (find-eapropos "multibyte")
# (multibyte-string-p "«foo»")
# (multibyte-string-p "foo")
# (multibyte-string-p ee-anchor-format)
# (multibyte-string-p ee-anchor-format)
# (defun msp (str) (multibyte-string-p str))
# (find-elnode "Converting Representations")
# (find-elnode "Coding System Basics" "`raw-text'")
# (find-elnode "Coding System Basics" "`emacs-internal'")
# (find-elnode "Coding System Basics" "latin-1")
# (find-elnode "Lisp and Coding Systems" "coding-system-charset-list")
# (find-elnode "Lisp and Coding Systems" "detect-coding-region")
# (find-elnode "Explicit Encoding")

# Sent to: (find-angg ".emacs" "gnu.emacs.bugs")
#          (find-efunction 'report-emacs-bug)
# Subject: unibyte->multibyte conversion problem (in search-forward and friends)
# Date:    2008oct21


Hello,

this may not be exactly a bug, I'm just struggling with an obscure
part of Emacs... anyway, I did my best to make this look like a nice
bug report, and to make the tests clear enough to help other people
who also find unibyte<->multibyte conversions obscure...

The short story
===============
Let me refer to strings like "<<tag>>" - where the "<<" and ">>" stand
for guillemets, i.e., the characters that we type with `C-x 8 <' and
`C-x 8 >' - as "anchors". So: if I produce an anchor string in a
unibyte buffer and then I search for an occurrence of that string in
multibyte buffer, the search fails.

The two small blocks below illustrate this. Instructions: save the
first one to "/tmp/1.txt", the second one to "/tmp/2.txt", and then
run:

  (load-file "/tmp/1.txt")

It will show "uni" in the "*Messages*" buffer, and the search will
fail. The detailed message about the failure of the search will be
like this:

  progn: Search failed: "\302\253foo\302\273"

meaning the anchor string has been incorrectly converted.



;;--------snip,snip--------
;; -*- coding: raw-text-unix -*-
;; (save-this-block-as "/tmp/1.txt")
(progn
  (find-file "/tmp/2.txt")
  (goto-char (point-min))
  (setq anchorstr "«foo»")
  (message (if (multibyte-string-p anchorstr) "multi" "uni"))
  (search-forward anchorstr))
;;--------snip,snip--------

;;--------snip,snip--------
;; -*- coding: latin-1 -*-
;; (save-this-block-as "/tmp/2.txt")
(search-forward "«foo»")
;; «foo»
;;--------snip,snip--------



The long story
==============
Save the block below as "/tmp/3.txt" and follow the instructions in
it. Note that it doesn't have any non-ascii characters - the anchors
are produced by running the "(insert ...)" sexps.



;;--------snip,snip--------
;; -*- coding: latin-1 -*-
;; (save-this-block-as "/tmp/3.txt")

;; Run the "progn" below with C-x C-e.
;; It will create a line like this:
;; <<anchor>>\253anchor\273\253anchor\273\253anchor\273
;; (but the "<<", ">>", "\253", "\273" are single characters).
;; Don't delete that line, it will be used later.
;;
(progn
  (defun mmb (str) (string-make-multibyte str))
  (defun mub (str) (string-make-unibyte   str))
  (insert 171 "anchor" 187)
  (insert           "\253anchor\273")
  (insert      (mub "\253anchor\273"))
  (insert (mmb (mub "\253anchor\273")))
  )


;; Now try to save this file.
;; Emacs will complain about the "\253"s and "\273"s - it will
;; say that iso-latin-1-unix and utf-8-unix cannot encode them.
;; The "<<" and ">>" are ok, though...
;;
;; So: leave the "<<anchor>>" above, delete the "\253anchor\273"s,
;; save this file, and reload it. DON'T SKIP THIS STEP - the
;; charset properties mentioned below behave differently before
;; and after reloads, and I don't know exactly the mechanics of
;; this... 8-\
;;
;; If we inspect the "<<", ">>" "\253", "\273" with `C-x ='
;; we see this:
;; Char: << (171, #o253, #xab, file #xAB)
;; Char: >> (187, #o273, #xbb, file #xBB)
;; Char: \253 (4194219, #o17777653, #x3fffab, raw-byte)
;; Char: \253 (4194235, #o17777673, #x3fffbb, raw-byte)
;;
;; Now mark the "<<anchor>>" above and copy it to the top of
;; the kill ring with `M-w'. Let's examine the results of
;; several obvious ways to (re)create the "<<anchor>>"
;; above as a string...
;; Here are some of the results:
;;
;;               "\253anchor\273"   ==> "<<anchor>>"
;;          (mub "\253anchor\273")  ==> "<<anchor>>"
;;     (mmb (mub "\253anchor\273")) ==> "\253anchor\273"
;;               (car kill-ring)    ==>
;;               #("<<anchor>>" 0 8 (charset iso-8859-1))
;;          (mub (car kill-ring))   ==> "<<anchor>>"
;;     (mmb (mub (car kill-ring)))  ==> "\253anchor\273"

                            "\253anchor\273"
                       (mub "\253anchor\273")
                  (mmb (mub "\253anchor\273"))
             (mub (mmb (mub "\253anchor\273")))
(mapcar 'identity           "\253anchor\273")
(mapcar 'identity      (mub "\253anchor\273"))
(mapcar 'identity (mmb (mub "\253anchor\273")))
                            (car kill-ring)
                       (mub (car kill-ring))
                  (mmb (mub (car kill-ring)))
(mapcar 'identity           (car kill-ring))
(mapcar 'identity      (mub (car kill-ring)))
(mapcar 'identity (mmb (mub (car kill-ring))))


;; This is the weird part.
;; Let's insert another "<<anchor>>"/"\253anchor\273" pair, and
;; let's try to jump to its "anchors" with `search-backward'.

(insert 171 "anchor" 187 "\n\253anchor\273")



(search-backward            "\253anchor\273")
(search-backward       (mub "\253anchor\273"))
(search-backward  (mmb (mub "\253anchor\273")))
(search-backward            (car kill-ring))
(search-backward       (mub (car kill-ring)))
(search-backward  (mmb (mub (car kill-ring))))

;; Only "(search-backward (car kill-ring))" jumps to
;; "<<anchor>>" - all the others jump to "\253anchor\273".
;; The trick - aha! - is that "(car kill-ring)" holds this
;; string,
;;
;;          (car kill-ring)    ==>
;;          #("<<anchor>>" 0 8 (charset iso-8859-1))
;;
;; and the "(charset iso-8859-1)" property is essential...
;;--------snip,snip--------


What is the standard way to convert unibyte strings (for example
anchor strings, generated from code in raw-text-unix ".el" files) to
strings with the right charset property (if needed) and the right
encoding? I couldn't find the functions for that...

  Cheers, thanks in advance,
    Eduardo Ochs
    eduardoochs at gmail.com
    http://angg.twu.net/



P.S.: (emacs-version) ==>
"GNU Emacs 23.0.60.1 (i686-pc-linux-gnu, GTK+ Version 2.8.20)
 of 2008-10-11 on dekooning"
--end of mail--




#####
#
# anchors in latin-1, bis
# 2008oct24
#
#####

# «anchors-in-latin-1-2»  (to ".anchors-in-latin-1-2")
# (find-TH "emacs" "unibyte-multibyte")

;;--------snip,snip--------
;; -*- coding: latin-1 -*-
;; (save-this-block-as "/tmp/4.txt")

(setq <<foo>> "\253foo\273")
(setq <<foo>>uni    (string-to-unibyte   <<foo>>))
(setq <<foo>>multi  (string-to-multibyte <<foo>>))
(setq <<foo>>uni+   (decode-coding-string <<foo>>uni   'iso-8859-1))
(setq <<foo>>multi+ (decode-coding-string <<foo>>multi 'iso-8859-1))

;; Note: <<foo>>uni  is unibyte,
;;   but <<foo>>uni+ is multibyte
;; (and <<foo>>uni+ = <<foo>>multi+)
(multibyte-string-p <<foo>>)
(multibyte-string-p <<foo>>uni)
(multibyte-string-p <<foo>>multi)
(multibyte-string-p <<foo>>uni+)
(multibyte-string-p <<foo>>multi+)

(insert 171 "foo" 187)

(search-backward <<foo>>uni)
(search-backward <<foo>>multi)
(search-backward <<foo>>uni+)
(search-backward <<foo>>multi+)
;;--------snip,snip--------

(setq ee-anchor-format (encode-coding-string "«%s»" 'iso-8859-1))
(multibyte-string-p    (encode-coding-string "«%s»" 'iso-8859-1))
(multibyte-string-p   (format ee-anchor-format "foo"))
(decode-coding-string (format ee-anchor-format "foo") 'iso-8859-1)
(decode-coding-string                          "foo"  'iso-8859-1)
;;  => #("<<foo>>" 0 5 (charset iso-8859-1))
;;  => "foo"
(setq <<%s>>  (encode-coding-string "«%s»"  'iso-8859-1))
(setq <<foo>> (encode-coding-string "«foo»" 'iso-8859-1))
(multibyte-string-p "«%s»")
(multibyte-string-p <<%s>>)
(multibyte-string-p <<foo>>)
(decode-coding-string <<foo>> 'iso-8859-1)
(decode-coding-string  "foo"  'iso-8859-1)
(find-fline "/tmp/2.txt" <<foo>>)
(find-fline "/tmp/2.txt" foo>>)
(multibyte-string-p (format "%c%s%c" 171 "foo" 187))
(multibyte-string-p (concat (list 171 ?f ?o ?o 187)))






#####
#
# gdb'ing emacs
# 2008oct23
#
#####

# «gdb-ing-emacs»  (to ".gdb-ing-emacs")
# http://lists.gnu.org/archive/html/bug-gnu-emacs/2009-03/msg00101.html
# http://lists.gnu.org/archive/html/bug-gnu-emacs/2009-03/msg00454.html
# http://lists.gnu.org/archive/html/bug-gnu-emacs/2009-03/msg00457.html
# http://lists.gnu.org/archive/html/bug-gnu-emacs/2009-03/msg00467.html
# (find-ecvssh "grep -i gdb   .files0")
# (find-ecvssh "grep -i debug .files0")
# (find-ecvsfile "etc/DEBUG")
# (find-ecvsfile "etc/DEBUG" "** Examining Lisp object values")
# (find-ecvsfile "src/.gdbinit")

;; (sin 0)
;; (find-efunction 'sin)

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
emacs-default --eval '(sin 0)'
emacs-default --eval '(message ee-anchor-format "foo")'

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
~/bigsrc/emacs/src/
gdb emacs
br Fsin
set args --eval '(sin 0)'
run




#####
#
# Debian Lenny's problems with my .emacs
# 2009may03
#
#####

# «lenny-emacs-init»  (to ".lenny-emacs-init")
# (find-fline "/etc/" "emacs")
# (find-fline "/etc/emacs/site-start.d/")
# By default there's no "/etc/emacs21/"...
# Running the "mkdir" below solves the initialization problem,
# running the "rm" below makes it start happening again.
# (find-sh0 "sudo mkdir -p /etc/emacs21/site-start.d/")
# (find-sh0 "sudo rm -Rv   /etc/emacs21/")

Warning (initialization): An error occurred while loading `/home/edrx/.emacs':

File error: Opening directory, No such file or directory, /etc/emacs21/site-start.d

To ensure normal operation, you should investigate and remove the
cause of the error in your initialization file.  Start Emacs with
the `--debug-init' option to view a complete error backtrace.




#####
#
# bitmap-mule
# 2009jul26
#
#####

# «bitmap-mule»  (to ".bitmap-mule")
# (find-available "bitmap-mule")
# (find-status   "bitmap-mule")
# (find-vldifile "bitmap-mule.list")
# (find-udfile   "bitmap-mule/")
# (find-fline "/usr/share/pixmaps/bitmap-mule/")



#####
#
# Rudel (a collaborative editing environment)
# 2009sep22
#
#####

# «rudel»  (to ".rudel")
# http://rudel.sourceforge.net/




#####
#
# comint-mode gets stuck where shell-mode doesn't
# 2010oct09
#
#####

# «comint-gets-stuck»  (to ".comint-gets-stuck")
# This problem is a show-stopper for eepitch-comint.

# Run this before:
(defun eepitch-zsh () (interactive) (eepitch-comint "zsh" "zsh"))

* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)
-- This one gets stuck
li = io.read()
foo

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
lua51
-- This one does not get stuck
li = io.read()
foo

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# This one does not get stuck
read A
foo
echo $A

* (eepitch-zsh)
* (eepitch-kill)
* (eepitch-zsh)
# This one does not get stuck
read A
foo
echo $A




#####
#
# comint-process-echoes
# 2011nov03
#
#####

# «comint-process-echoes»  (to ".comint-process-echoes")
# 2011nov03: Found the culprit! It was this line:
#   (find-evariable 'comint-process-echoes)
#   (find-evardescr 'comint-process-echoes)
# (find-elnode "Index" "* make-local-variable:")

#*
# (eev-bounded)
cat > /tmp/test <<'%%%'
* (progn (load "/etc/emacs/site-start.d/90eev.el") (eev-activate-initial))
* (defun eepitch-gs () (interactive) (eepitch-comint "gs" "gs -r45 -geometry +512+0"))
* (defun eepitch-gs () (interactive) (eepitch-comint "gs" "gs -r45"))
* (eepitch-gs)
% This is problematic. Comint gets stuck here...
(This is a \
string \
that has no \
newlines)
==
* (eepitch-kill)
* (load "/home/edrx/eev-current/eepitch.el")
* (defun eepitch-gs () (interactive) (eepitch-comint "gs" "gs -r45"))
* (eepitch-gs)
% This is problematic. Comint gets stuck here...
(This is a \
string \
that has no \
newlines)
==
%%%

#*

# For the binary search I commented out a part of my .emacs (from some
# point to the end) with
# (progn 			; ^^^
# )	 			; ^^^
# and took notes of when the block happened...

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
emacs -geometry +0+0 -fn 6x13    /tmp/test
emacs -geometry +0+0 -fn 6x13 -Q /tmp/test

# (find-fline "~/.emacs" "^^^")
# emacs -Q with ^^^ at  739: nothing blocks
# emacs    with ^^^ at  423: all ok
# emacs    with ^^^ at 3000: all ok
# emacs    with ^^^ at 3496: all ok
# emacs    with ^^^ at 3710: all ok
# emacs    with ^^^ at 3913: all ok
# emacs    with ^^^ at 3990: all ok
# emacs    with ^^^ at 3998: ?
# emacs    with ^^^ at 4000: all block
# emacs    with ^^^ at 5000: all block






#####
#
# ee-gformat
# 2011feb24
#
#####

# «ee-gformat»  (to ".ee-gformat")
# (find-eevfile "eev-insert.el" "defun ee-gformat")
# (find-angg "LUA/lua50init.lua" "gformat")
;; (find-elnode "Index" "* replace-regexp-in-string:")
;; (find-elnode "Replacing Match")
;; (replace-regexp-in-string "^.*$" "<\\&_\\&>" "foo")
;; (replace-regexp-in-string "^.*$" "<\\&_\\&>" "foo \n bar")
;; (replace-regexp-in-string "\\`\\(.\\|\n\\)*\\'" "<e: \\&_\\&>" "FOO \n BAR")
;; (replace-regexp-in-string "\\`\\(.\\|\n\\)*\\'" "<e: \\&_\\&>" "FOO \n BAR" 'fixedcase)
;; (replace-regexp-in-string "\\`\\(.\\|\n\\)*\\'" "<e: \\&_\\&>" "foo \n bar" 'fixedcase)
;;          (ee-gformat "<\\&_\\&>")
;; (funcall (ee-gformat "<\\&_\\&>") "foo bar")
;; (funcall (ee-gformat "<\\&_\\&>") "foo \n bar")
;;          (ee-gmapconcat "<\\&_\\&>" ", ")
;; (funcall (ee-gmapconcat "<\\&_\\&>" ", ") (ee-split "foo bar"))
;; (funcall (ee-gmapconcat "  (setq \\& (or \\& \"{\\&}\"))\n") (ee-split "foo bar"))

(defun ee-gformat (fmt)
  `(lambda (str) (replace-regexp-in-string
		  "\\`\\(.\\|\n\\)*\\'" ,fmt str 'fixedcase)))

(defun ee-gmapconcat-split (fmt sep str)
  (mapconcat (ee-gformat fmt) (ee-split str) (or sep "")))

(defun ee-gmapconcat (fmt &optional sep)
  `(lambda (seq) (mapconcat (ee-gformat ,fmt) seq ,(or sep ""))))

(defun ee-gformat-now (fmt str)
  (funcall (ee-gformat fmt) str))
(defun ee-gmapconcat-now (fmt sep seq)
  (funcall (ee-gmapconcat fmt sep) seq))
(defun ee-gmapconcat-split (fmt sep str)
  (funcall (ee-gmapconcat fmt sep) (ee-split str)))


(ee-gmapconcat-split "  (setq \\& (or \\& \"{\\&}\"))\n" nil "foo bar")
(ee-gmapconcat-split "  (setq \\& (or \\& \"{\\&}\"))\n" nil "")




#####
#
# gdb-mi
# 2011nov20
#
#####

# «gdb-mi»  (to ".gdb-mi")
# (find-angg ".emacs" "gdb")
# (find-es "gdb" "gdb-squeeze")
# http://emacswiki.org/emacs/GDB-MI/
# (find-enode "GDB Graphical Interface")
# (find-efile "")
# (find-efile "progmodes/")
# (find-efile "progmodes/gdb-mi.el")
# (find-efile "progmodes/gdb-mi.el" "*input/output of ")
# (find-efile "progmodes/gud.el")
# (find-efile "progmodes/gud.el" "gdb-mi is loaded")
# (find-egrep "grep -nH -e gdb-mi progmodes/*.el")
# (find-eevgrep "grep -nH -e '=mi' *.el")
# (find-angggrep "grep -nH -e '=mi' .emacs")

# (find-gdbnode "Emacs")
# (find-gdbnode "Emacs" "GUD buffer")
# (find-gdbnode "GDB/MI")
# (find-gdbnode "Mode Options" "--interpreter=mi")
# (find-gdbnode "Interpreters")
# (find-gdbnode "Interpreters" "`mi'")




#####
#
# CC mode
# 2011nov20
#
#####

# «C-mode»  (to ".C-mode")
# (find-angg ".emacs" "cc-mode")
# (find-node "(ccmode)Top")
# (find-angg "vtutil/pio_fontx.c")

(code-c-d "ccmode" (ee-efile "progmodes/") "ccmode")
;; (find-ccmodefile "")
;; (find-ccmodefile "" "cc-align")
;; (find-ccmodenode "")
;; (find-ccmodenode "Electric Keys")
;; (find-ccmodenode "Getting Started" "Electric Indentation" "C-c C-l")





#####
#
# Tramp
# 2004dec23 / 2012apr09
#
#####

# «tramp»  (to ".tramp")
# (find-node "(tramp)Top")
# http://www.gnu.org/software/tramp/
# http://www.gnu.org/software/tramp/#Obtaining-Tramp
# http://lists.gnu.org/archive/html/tramp-devel/
# ftp://ftp.gnu.org/gnu/tramp/tramp-2.2.4.tar.gz
#*
rm -Rv ~/usrc/tramp-2.2.4/
tar -C ~/usrc/ -xvzf \
  $S/ftp/ftp.gnu.org/gnu/tramp/tramp-2.2.4.tar.gz
cd     ~/usrc/tramp-2.2.4/

# (find-angg "bin/emacs-default")

./configure --help      |& tee och
./configure --with-emacs=$HOME/bigsrc/emacs/src/emacs  |& tee oc
make lisp               |& tee oml
make MAKEINFO=makeinfo  |& tee ommi

#*
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd ~/usrc/tramp-2.2.4/

# «load-new-tramp»  (to ".load-new-tramp")
# (add-to-list 'load-path "~/usrc/tramp-2.2.4/lisp/")

# (find-angg ".emacs" "info-path")
# (add-to-list 'Info-additional-directory-list "~/usrc/tramp-2.2.4/info/")

# (code-c-d "tramp" "~/usrc/tramp-2.2.4/" "~/usrc/tramp-2.2.4/info/tramp")
# (find-trampfile "")
# (find-trampfile "texi/Makefile" "makeinfo --no-split")
# (find-trampfile "texi/Makefile" "localinfodir")
# (find-trampfile "texi/tramp-emacs.html/")
# (find-trampfile "info/")
# (find-trampnode "")
# (find-trampnode "Ad-hoc multi-hops")
# (find-trampnode "Multi-hops" "/sudo:randomhost")

# Sudo trick not working:
# (find-newhost-links "gwen" "192.168.1.101")
#   (find-fline "/sudo::/")
#   (find-fline "/sudo:localhost:/")
#   (find-fline "/ssh:edrx@gwen:/")
#   (find-fline "/sudo::|ssh:edrx@gwen:/")
#   (find-fline "/sudo:gwen:/")
#   (find-fline "/sudo:192.168.1.101:/")

# Old:
# (find-node "(tramp)Top")
# (find-node "(tramp)Inline methods" "`sudo'")
# (find-node "(tramp)Filename Syntax")
# (find-node "(tramp)Default Method" "/ssh:root@otherhost:/etc/motd")
# (find-fline "/sudo:root@localhost:/etc/fstab")

# Errors, 2013jul05:
Copy `/sda6/nikon/parabens_edwin/parabens_edwin_5.jpg' to `/scp:edrx@angg.twu.net:/home/edrx/slow_html/PURO/parabens_edwin_5.jpg' failed:
(file-error Couldn't find exit status of `(/usr/bin/zsh -c scp -p -q -r -o ControlPath=/tmp/tramp.6122eH3.%r@%h:%p -o ControlMaster=auto -o ControlPersist=no /sda6/nikon/parabens_edwin/parabens_edwin_5.jpg edrx\@angg.twu.net\:/home/edrx/slow_html/PURO/parabens_edwin_5.jpg && echo tramp_exit_status 0 || echo tramp_exit_status 1)')





#####
#
# Tramp from the git repo
# 2013mar02
#
#####

# «tramp-from-git» (to ".tramp-from-git")
# http://www.gnu.org/software/tramp/#Obtaining-Tramp
# http://lists.gnu.org/archive/html/tramp-devel/
# (add-to-list 'load-path "~/usrc/tramp/lisp/")
# (add-to-list 'Info-additional-directory-list "~/usrc/tramp/info/")

* (eepitch-shell2)
* (eepitch-kill)
* (eepitch-shell2)
# http://www.gnu.org/software/tramp/#Obtaining-Tramp
rm -Rfv ~/usrc/tramp/
mkdir   ~/usrc/tramp/
cd      ~/usrc/tramp/
git clone git://git.savannah.gnu.org/tramp.git .

# To update:
cd ~/usrc/tramp/
git pull

#*
# (find-fline "~/usrc/tramp/")
cd      ~/usrc/tramp/
autoconf





#####
#
# tramp-plink
# 2008jan18
#
#####

# «tramp-plink»  (to ".tramp-plink")
# (find-es "w32" "putty")




#####
#
# tramp-2.1.9
# 2007may21
#
#####

# «tramp-2.1.9»  (to ".tramp-2.1.9")
# (find-angg ".emacs" "tramp-2.1.9")
# ftp://ftp.gnu.org/gnu/tramp/tramp-2.1.9.tar.gz
#*
rm -Rv ~/usrc/tramp-2.1.9/
tar -C ~/usrc/ -xvzf \
  $S/ftp/ftp.gnu.org/gnu/tramp/tramp-2.1.9.tar.gz
cd     ~/usrc/tramp-2.1.9/

#*
# (code-c-d "tramp" "~/usrc/tramp-2.1.9/")
# (code-c-d "tramp" "~/usrc/tramp-2.1.9/" "~/usrc/tramp-2.1.9/info/tramp")
# (find-trampfile "")
# (find-trampnode "")





#####
#
# Password caching
# 2011nov27
#
#####

# «password-cache»  (to ".password-cache")
# (find-angg ".emacs" "tramp-2.1.9")
# (find-eapropos "password" "password-cache")
# (find-efile "password-cache.el")
# (find-efile "password-cache.el" "(make-vector 7 0)")




#####
#
# Multi-hop methods for tramp
# 2011nov27
#
#####

# «multi-hop»  (to ".multi-hop")
# (find-angg ".emacs" "varda")

a quick question about tramp and multi-hops, related to:
  (info "(tramp)Multi-hops")
  (describe-variable 'tramp-default-proxies-alist)
I can access files on the machine "varda" with both these sexps,
  (find-file "/scp:edrx@varda:")
  (find-file "/ssh:edrx@varda:")
and there I can do sudo without password and ssh locally to root with, say, password 1234.
so: how can I access files as root on varda via tramp? it should be something like this,
  (setq         tramp-default-proxies-alist nil)
  (add-to-list 'tramp-default-proxies-alist '("varda\\'" "\\`root\\'" "/ssh:%h:"))
but what [...]

I turns out that this works:

  (find-file "/ssh:root@varda:")
  (find-file "/ssh:root@varda:/")
  (find-file "/ssh:root@varda:/etc/")




#####
#
# CUA mode
# 2011dec01
#
#####

# «cua-mode»  (to ".cua-mode")
# (find-enode "CUA Bindings")
# (find-efile "emulation/")
# (find-efile "emulation/cua-base.el")
# (find-efile "emulation/cua-gmrk.el")
# (find-efile "emulation/cua-rect.el")
# (find-efunctiondescr 'cua-mode)




#####
#
# undo-boundary (thx to ljf)
# 2011dec28
#
#####

# «undo-boundary»  (to ".undo-boundary")

in the code below,
  (defun f (str) (format "<%s>" str))
  (defun g () (interactive)
    (insert (f (delete-and-extract-region (point-at-bol) (point-at-eol)))))
why does undo consider that g is an atomic operation?
if I insert "foo" in a line, then run M-x g, then the line becomes "<foo>",
  but with an intermediate step: "foo" -> "" -> "<foo>"...
if I then run "undo" what happens is "foo" <- "<foo>".
Emacs does the right thing, but I don't understand how that's implemented.
pointers would be highly appreciated =)

# (find-elnode "Index" "* undo-boundary:")




#####
#
# backup-inhibited
# 2012apr24
#
#####

# «backup-inhibited»  (to ".backup-inhibited")
# (find-fline "/etc/apt/sources.list")
# (find-fline "/etc/hosts")
#   (setq backup-inhibited t)




#####
#
# aliases for variables
# 2012oct01
#
#####

# «defvaralias»  (to ".defvaralias")
# (find-elnode "Variable Aliases")

(defvaralias 'ee-H 'ee-hyperlink-prefix)
;; (ee-template0 "{ee-H}Hello")




#####
#
# Where GUD stores the current source line
# 2012nov07
#
#####

# «gud-fringe» (to ".gud-fringe")

# (find-egrep "grep -niH -e xpm progmodes/*.el")
# (find-egrep "grep -niH -e pbm progmodes/*.el")
# (find-egrep "grep -niH -e breakpoint-xpm-data progmodes/*.el")
# (find-egrep "grep -niH -e find-image             progmodes/*.el")
# (find-egrep "grep -niH -e fringe                 progmodes/*.el")
# (find-egrep "grep -niH -e triangle               progmodes/*.el")
# (find-egrep "grep -niH -e fringe-indicator-alist progmodes/*.el")
# (find-egrep "grep -niH -e overlay-arrow-position progmodes/*.el")
# (find-egrep "grep -niH -e last-frame             progmodes/*.el")
# (find-egrep "grep -niH -e frame-handler          progmodes/*.el")
# (find-efile "progmodes/")
# (find-efile "progmodes/gdb-mi.el" "breakpoint-xpm-data")
# (find-efile "progmodes/gdb-mi.el" "breakpoint-enabled-icon")
# (find-efile "progmodes/gdb-mi.el" "define-fringe-bitmap")
# (find-efile "progmodes/gud.el" "gud-last-frame")
# (find-eetcfile "images/gud/")
# (find-eetcfile "images/gud/break.xpm")
# (find-elnode "Fringes")
# (find-elnode "Fringe Indicators" "left-triangle")
# (find-elnode "Fringe Indicators" "fringe-indicator-alist")
# (find-elnode "Overlay Arrow" "overlay-arrow-position")
# (find-esgrep "grep -nH -e ptype *.e")

gdb-selected-frame
gdb-selected-file
gdb-selected-line

(find-fline gdb-selected-file gdb-selected-line)


          (setq gud-last-frame (cons gdb-selected-file gdb-selected-line))




#####
#
# frame geometry (for screencasts)
# 2012nov13
#
#####

# «frame-geometry» (to ".frame-geometry")
# (find-es "x" "xwininfo")

;; (find-elnode "Size of Window")
;; (find-elnode "Size of Window" "window-pixel-edges")
;; (find-elnode "Management Parameters" "`outer-window-id'")
;; (find-es "x" "xwininfo")
;; (find-elnode "Parameter Access")
;; (find-epp (frame-parameters))
;; (find-xwininfo "")
;; (find-xwininfo0 "| grep Width: | awk '{print $2}'")
;; (find-xwininfo0 "| grep Height: | awk '{print $2}'")
;; (window-edges)
;; (window-pixel-edges)

(defun find-xwininfo0 (str)
  (let ((id (frame-parameter (selected-frame) 'outer-window-id)))
    (find-sh0 (format "xwininfo -id %s %s" id str))))

(defun find-xwininfo (str &rest pos-spec-list)
  (find-estring (find-xwininfo0 str) pos-spec-list))

(defun ee-aligned (pow2 n) (= 0 (logand (- pow2 1) n)))
(defun ee-align   (pow2 n) (while (not (ee-aligned pow2 n)) (setq n (1+ n))) n)
;; (ee-align 8 20)

(defun ee-scast-geometry0 (h v)
  (format "%dx%d+0+0" (+ 18 (* 6 h)) (* 13 v)))
(defun ee-scast-geometry (ah av)
  (ee-scast-geometry0
   (ee-align ah (frame-parameter (selected-frame) 'width))
   (ee-align av (frame-parameter (selected-frame) 'height))))
(setenv "GEOMETRY" (ee-scast-geometry 1 1))

(setq ee-scast-cmdline
 "avconv -loglevel quiet -r 5 -s $GEOMETRY -f x11grab -i $DISPLAY /tmp/out.mp4")

(defun ee-scast-start () (interactive)
  (find-sh0 "rm -f /tmp/out.mp4")
  (setenv "GEOMETRY" (ee-scast-geometry))
  (find-bgprocess ee-scast-cmdline))
(defun ee-scast-stop  () (interactive)
  (find-sh0 "killall avconv"))

;; (ee-scast-start)
;; (ee-scast-stop)
;; (find-fline "/tmp/" "out.mp4")
;; (find-video "/tmp/out.mp4")

(find-bgprocess ee-scast-cmdline))

(ee-scast-geometry0 167 46)
(ee-scast-geometry)




#####
#
# Adjust the geometry (NOT WORKING)
# 2012nov16
#
#####

# «adjust-geometry» (to ".adjust-geometry")

(defun eegeom-adjust (dx dy)
  (set-frame-parameter nil 'width  (+ dx (frame-parameter nil 'width)))
  (set-frame-parameter nil 'height (+ dy (frame-parameter nil 'height))))

(defun eeframe-get (symbol)       (frame-parameter (selected-frame) symbol))
(defun eeframe-set (symbol v) (set-frame-parameter (selected-frame) symbol v))

# (find-elnode "Size and Position" "set-frame-height")

(set-frame-width (selected-frame) 160)
(set-frame-width (selected-frame) 167)

(eeframe-get 'width)
(eeframe-set 'width 160)

(defun eeframe-width () (frame-parameter nil 'width)

(eegeom-adjust -1 0)
(eegeom-adjust 1 0)





#####
#
# Fontifying an arbitary buffer as info
# 2012nov18
#
#####

# «fontify-as-info» (to ".fontify-as-info")
;; (find-efunction 'info)
;; (find-efile "info.el" "info-title-2")
;; (find-efile "info.el" "defun Info-fontify-node")
;; (find-efile "info.el" "defun Info-fontify-node" ";; Fontify titles")

(progn
  (find-enode "Executing Lisp")
  (write-region (point-min) (point-max) "/tmp/i")
  (find-fline "/tmp/i")
  (Info-fontify-node)
  )

(progn
  (find-sh "cat /tmp/i")
  (Info-fontify-node)
  )

(progn
  (find-eepitch-intro)
  (Info-fontify-node)
  )




#####
#
# Adjust PATH
# 2012nov20
#
#####

# «adjust-PATH» (to ".adjust-PATH")
# https://gist.github.com/34b59137063404db0f56

(defun read-lines (file)
  "Return a list of lines in FILE."
  (with-temp-buffer
    (insert-file-contents file)
    (split-string
     (buffer-string) "\n" t)
    ) )

(defun jdv-split-path-from-file (lines)
  (let ((linelist (if (listp lines) lines (list lines)) ))
    (split-string (car linelist) ":" t)))

(let ((path-file (expand-file-name "~/.emacs_path")))
  (when (file-exists-p path-file)
    (setenv "PATH"
            (mapconcat 'identity
                       (delete-dups
                        (append
                         (jdv-split-path-from-file (read-lines path-file))
                         (split-string (getenv "PATH") ":" t))) ":"))))



#####
#
# Emacsconf
# 2013jan06
#
#####

# «emacsconf» (to ".emacsconf")
# http://lists.hugadev.com/listinfo.cgi/emacs-conf-hugadev.com
# http://lists.hugadev.com/pipermail/emacs-conf-hugadev.com/
# http://lists.hugadev.com/pipermail/emacs-conf-hugadev.com/2013-January.txt
# http://lists.hugadev.com/pipermail/emacs-conf-hugadev.com/2012-December.txt.gz

# My submission:
# http://lists.hugadev.com/pipermail/emacs-conf-hugadev.com/2013-January/000120.html
# http://angg.twu.net/emacsconf.html



#####
#
# SMIE (Simple Minded Indentation Engine)
# 2013feb02
#
#####

# «smie» (to ".smie")
# http://emacsconf.herokuapp.com/proposals/27
# (find-efile "emacs-lisp/smie.el")
# (find-elnode "SMIE")
# (find-egrep "grep -nrH -e smie *")




#####
#
# define-minor-mode (and how to redefine a minor mode)
# 2013mar01
#
#####

# «define-minor-mode» (to ".define-minor-mode")
# (find-es "eev" "backtick-eev-mode")
# (find-efunctiondescr 'define-minor-mode)
# (find-elnode "Defining Minor Modes")
# (find-eev "eev-mode.el" "eev-mode-define")

(define-minor-mode foo-mode "Help 1"
  :init-value nil :global nil :lighter " foo")
;;
(define-minor-mode foo-mode "Help 2"
  :init-value nil :global nil :lighter " foo")
;;
;; (foo-mode 0)
;; (foo-mode 1)
;; (find-efunctiondescr 'foo-mode)

;; (find-efunctiondescr 'eev-mode)
;;
(let ((eev-mode-help "Bleh"))
  (eev-mode-define))
;; (find-efunctiondescr 'eev-mode)
;;
(eev-mode-define)
;; (find-efunctiondescr 'eev-mode)




#####
#
# eww
# 2013jul13
#
#####

# «eww» (to ".eww")
# (find-angg ".emacs" "eww")
# http://lars.ingebrigtsen.no/2013/06/eww.html
# http://lars.ingebrigtsen.no/2013/06/eww-improvements.html
# http://thread.gmane.org/gmane.emacs.devel/160466/focus=160669

# (find-eetcfile "NEWS" "`eww'")
# (find-gitemacsfile "")
# (find-gitemacsfile "oc" "checking for libxml-2.0")
# (find-gitemacsfile "src/xml.c")
# (find-elnode "Parsing HTML/XML")

# (eww "file:///home/edrx/TH/L/")
# (eww "file:///home/edrx/TH/L/index.html")
# (eww "file:///home/edrx/TH/L/parabens-edwin.html")
# (find-efile "net/eww.el")
# (find-efile "net/")
# (find-efunction 'eww)
# (find-efunction 'eww-render)
# (find-efunction 'eww-display-html)




#####
#
# term
# 2013sep24
#
#####

# «term» (to ".term")
# (find-efunctiondescr 'term)
# (find-efunctiondescr 'term-mode)
# (find-efile "term.el")
# (find-enode "Terminal emulator")
# (find-enode "Term Mode")





#####
#
# EmacsConf 2013
# 2013sep26
#
#####

# «emacsconf-2013» (to ".emacsconf-2013")
http://www.youtube.com/playlist?list=PL4th0AZixyRE9bb8OevAb7I8RuaWJQWnO&feature=plcp Emacs Conference 2013
http://www.youtube.com/watch?v=hEqqbq0lL4k&list=PL4th0AZixyRE9bb8OevAb7I8RuaWJQWnO&index=1 XWidgets - Joakim Verona (Emacs Conf 2013)
http://www.youtube.com/watch?v=H9E5qmiuYOQ&list=PL4th0AZixyRE9bb8OevAb7I8RuaWJQWnO&index=2 Emacs Wiki - Nic Ferrier - Emacs Conference 2013
http://www.youtube.com/watch?v=gswAVtzQ7to&list=PL4th0AZixyRE9bb8OevAb7I8RuaWJQWnO&index=3 Arxana - Joe Corneli - Emacs Conference 2013
http://www.youtube.com/watch?v=-jSePveaIPA&list=PL4th0AZixyRE9bb8OevAb7I8RuaWJQWnO&index=4 Emacs Live - Sam Aaron - Emacs Conference 2013
http://www.youtube.com/watch?v=Z7-tWOl07hY&list=PL4th0AZixyRE9bb8OevAb7I8RuaWJQWnO&index=5 El-get - Dimitri Fontaine - Emacs Conference 2013
http://www.youtube.com/watch?v=VhnEQj7Sn8E&list=PL4th0AZixyRE9bb8OevAb7I8RuaWJQWnO&index=6 From Marmalade to Emacs - Michael Olson - Emacs Conference 2013
http://www.youtube.com/watch?v=RvPFZL6NJNQ&list=PL4th0AZixyRE9bb8OevAb7I8RuaWJQWnO&index=7 Emacs Lisp Development - John Wiegley - Emacs Conference 2013
http://www.youtube.com/watch?v=ApoNHiLZVCA&list=PL4th0AZixyRE9bb8OevAb7I8RuaWJQWnO&index=8 Package Management - Nic Ferrier, Steve Purcell, Dimitri Fontaine - Emacs Conference 2013
http://www.youtube.com/watch?v=eZDWJfB9XY4&list=PL4th0AZixyRE9bb8OevAb7I8RuaWJQWnO&index=9 SLIME - Luke Gorrie - Emacs Conference 2013
http://www.youtube.com/watch?v=uRO3dNJx5Dw&list=PL4th0AZixyRE9bb8OevAb7I8RuaWJQWnO&index=10 Project Grok - Steve Yegge - Emacs Conference 2013

http://www.youtube.com/watch?v=BQUd3VjqENU&list=PL4th0AZixyRE9bb8OevAb7I8RuaWJQWnO&index=11 Fixing My ELisp - Christophe Rhodes - Emacs Conference 2013 Lightning Talks
http://www.youtube.com/watch?v=ufE-aBQXg-A&list=PL4th0AZixyRE9bb8OevAb7I8RuaWJQWnO&index=12 Javascript REPL - Kris Jenkins - Emacs Conference 2013 Lightning Talks
http://www.youtube.com/watch?v=ARa5GlzxGvw&list=PL4th0AZixyRE9bb8OevAb7I8RuaWJQWnO&index=13 Intro to One-Key - Ben Veal (Joe Bloggs) - Emacs Conference 2013 Lightning Talks
http://www.youtube.com/watch?v=REvuT16GRVA&list=PL4th0AZixyRE9bb8OevAb7I8RuaWJQWnO&index=14 Minor Mode for Writing - Daniel Szmulewicz - Emacs Conference 2013 Lightning Talks
http://sachachua.com/blog/2013/04/emacs-conference-2013-sketchnotes-also-pdf/




#####
#
# elscreen
# 2013nov18
#
#####

# «elscreen» (to ".elscreen")
# http://www.emacswiki.org/emacs/EmacsLispScreen
# https://github.com/knu/elscreen
# (find-zsh "dmissing elscreen")
# (find-epackages)
# (find-epackage 'elscreen)

;; (find-fline "~/.emacs.d/elpa/")
;; (find-fline "~/.emacs.d/elpa/elscreen-20120413.1107/")
(code-c-d "elscreen" "~/.emacs.d/elpa/elscreen-20120413.1107/")
;; (find-elscreenfile "")
# (find-elscreenfile "elscreen.el")

# (eek "M-h M-k C-z ?")
# (eek "C-z ?")





#####
#
# Emacs web server
# 2014jan12
#
#####

# «emacs-web-server» (to ".emacs-web-server")
# (find-es "org" "mailing-list")
# http://lists.gnu.org/archive/html/emacs-orgmode/2014-01/msg00524.html

# https://github.com/eschulte/emacs-web-server
# http://eschulte.github.io/emacs-web-server/tutorials/#sec-1
# http://eschulte.github.io/emacs-web-server/Org_002dmode-Export.html#Org_002dmode-Export
# https://github.com/eschulte/emacs-web-server/blob/master/examples/013-org-export-service.el
# https://github.com/eschulte/emacs-web-server/blob/master/examples/011-org-agenda.el
# https://github.com/eschulte/org-ehtml
# http://eschulte.github.io/emacs-web-server/benchmark/






# 2005apr20

<edrx> is there a way to distinguish between a prefix like M-0 M-1 M-2 and one
       like M-1 M-2 ?
<delYsid> edrx: You can get it via `this-command-keys'
<delYsid> or `this-command-keys-vector'
<delYsid> (defun test1 () (interactive)
            (message "%S" (this-command-keys-vector)))
<delYsid> M-0 M-1 M-x test1 RET
<edrx> delYsid: excellent! thanks! :)
<delYsid> np




#####
#
# easy-menu-define
# 2004dec17
#
#####

# (find-efile "emacs-lisp/")
# (find-efile "emacs-lisp/easymenu.el")
# (find-efile "progmodes/")
# (find-efile "progmodes/meta-mode.el" "easy-menu-define")
# (find-eevfile "eev-dev.el" "menu-bar-eev-menu")

(easy-menu-define
 'fundcomp-menu global-map
 "FundComp menu."
 '("FundComp"
   ["dired: (find-file \".\")"      (find-file ".") t]
   ["tutorial de Scheme"            fundcomp-tutorial-scheme t]
   ["Tutorial de Lisp"              fundcomp-tutorial-lisp t]
   "--"
   ["Sei lá"                        fundcomp-xxx t]
   ))

(easy-menu-define
 eev-menu global-map
 "Eev menu."
 '("(eev)"
   :visible eev-mode
   ["eek-eval-sexp-eol"          eek-eval-sexp-eol t]
   ["eek-eval-last-sexp"         eek-eval-last-sexp t]
   ["eval-last-sexp"             eval-last-sexp t]
   "--"
   ["kill-buffer"                kill-buffer t]
   "--"
   ["eev manual and tutorial"    (find-eevfile "manual.e")]
   ["main emacs keys"            (find-eevfile "keys.e")]
   ["(info \"(emacs)Top\")"      (info "(emacs)Top") t]
   ["(info \"(elisp)Top\")"      (info "(elisp)Top") t]
   ["(info \"(eintr)Top\")"      (info "(eintr)Top") t]
   ))



;;(defun ee-invade-global-menu-bar ()
;;  (interactive)
;;  (define-key global-map [menu-bar eev] (cons "(eev)" menu-bar-eev-menu)))

;;;
;;: eev-menu
;;;

;; This is horribly obsolete, it's from ages ago. I commented it out
;; with a tick. I'll choose other entries when I have the time and
;; inspiration for that.






(defun without-trailing-nl (str)
  (if (string-match "[\n]\\'" str)
      (substring str 0 -1)
    str))


#*
eev-cd e
grep easy-menu $(find * -name '*.el')

#*

cd /home/edrx/bigsrc/emacs/lisp/emacs-lisp/


http://www.emacswiki.org/emacs/rcircDbusNotification





show-trailing-whitespace



(dolist (s (mapcar 'car (buffer-local-variables (current-buffer))))
  (when (string-match "^b" (symbol-name s))
    (insert (format "%S\n" s))))

(find-epp (sort (mapcar 'buffer-name (buffer-list)) 'string<))


# (find-efile "emacs-lisp/bytecomp.el" "temp-output")
# (find-esh "cat ChangeLog{,.{10,9,8,7,6,5,4,3,2,1}}")


(open-dribble-file "~/dribble")
(open-dribble-file "/tmp/dribble")
(open-dribble-file (format-time-string "~/dribble-%Y%m%d%H%M"))

(insert #XA7)
(insert (string-to-number "A7" 16))


# (find-fline "/hda6/TATI/")



Tramp on emacs23:

Loading tramp...done
Loading `hex-util': old-style backquotes detected!
Loading `sha1-el': old-style backquotes detected!
Tramp: Opening connection for edrx@angg.twu.net using scp...
Tramp: Waiting 60s for local shell to come up...
Tramp: Sending command `exec ssh angg.twu.net -l edrx  -q -e none'
Tramp: Waiting for prompts from remote shell
Tramp: Sending password
Tramp: Found remote shell prompt on `angg.twu.net'








#  Local Variables:
#  coding:               raw-text-unix
#  modes:                (fundamental-mode emacs-lisp-mode)
#  ee-delimiter-hash:    "\n#*\n"
#  ee-delimiter-percent: "\n%*\n"
#  ee-anchor-format:     "«%s»"
#  End: