####### # # 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 # or at . # See also , # , # , # , # and . # ####### 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") # .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") # This was a primitive version of "mkto": (setq last-kbd-macro (read-kbd-macro "C-a 3* NUL C-e ESC w C-e 2*SPC (to SPC \". C-y \") C-a RET # SPC C-q \\256 . C-y C-q \\257 2*SPC (to SPC \" C-y \") C-a ")) ##### # # 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 " ' 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" "'aeiouAEIOUcC<>" "^aeouAEO" "`aeiouAEOU" "~aoAO" "\"aeiouAOU"))) (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" "'aeiouAEIOUcC<>" "^aeouAEO" "`aeiouAEOU" "~aoAO" "\"aeiouAOU"))) '(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)))) 'aeiouAEIOUcC ^aeouAEO `aeiouAEOU ~aoAO \"aeiouAOU # (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 RET # SPC (find-fline SPC \"/usr/doc/ C-y /\") C-a ")) # (setq last-kbd-macro (read-kbd-macro "NUL C-w C-y 2* ESC z SPC ESC z SPC { \\ al SPC C-a ESC z 3*SPC C-a ")) # (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 RET # SPC (find-fline SPC \"/usr/doc/ C-y /\") C-a "))) ##### # # 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" "") ##### # # 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" "
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 ' ao # (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: ,emacspeak emacspeak is [0] a package which lets you use Emacs with an auditory user interface. [1] In Debian, apt-get install eflite; apt-get install emacspeak; Then just select eflite from the configuration menu., [2] at http://emacspeak.sf.net, [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") ##### # # Carto 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\SC$B5KT\=)Y4MPXJNI+7HZ>JEN&[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 # ##### # 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-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 )". (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 " 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 ") (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 ##### # # 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-m