|
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")
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-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")
# «.tramp» (to "tramp")
# «.tramp-2.1.9» (to "tramp-2.1.9")
# «.tramp-plink» (to "tramp-plink")
# «.htmlfontify» (to "htmlfontify")
# «.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")
# 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µEIÖOàUéc‡C€<®>¯"
"^aƒeˆo“u–A¶EÒOâ"
"`a…eŠio•u—A·EÔOãUë"
"~aÆoäAÇOå"
"\"a„e‰i‹o”uAŽ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-fline "~/.Xdefaults")
# (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 (potato)
# 2000nov13
#
#####
# «calc» (to ".calc")
# (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".
# (<