[INCLUDE TH/speedbar.blogme] [lua: L = R; LR = R ] [# (defun c () (interactive) (find-blogme3-sh0-if "emacs")) ;; http://angg.twu.net/emacs.html ;; file:///home/edrx/TH/L/emacs.html ;; (find-blogmefile "README") ;; (find-blogmefile "INTERNALS") ;; (find-blogmefile "") #] [lua: def [[ STANDOUT 1 text "$text" ]] def [[ STANDOUT 1 body BGFG("red", "yellow", body) ]] def [[ NMG 1 text "(?NMG $text?)"]] def [[ MTAL 1 text "(?MTAL $text?)"]] def [[ DPM 1 text "(?DPM $text?)"]] -- (find-anggfile "TH/eev-article.blogme" "QQQ") def [[ QQQBOX 1 body _G["BORDERLESSBOX+"](STYLE("background: #ffda99;"), body) ]] def [[ QQQ 1Q body QQQBOX(PRE(Q(two_d_trim(body)))) ]] def [[ ARTICLESEC 2 sec,body HREF("eev-article.html#"..sec, body) ]] def [[ ONESPACE 1 body string.gsub(body, "%s+", " ") ]] def [[ RMPARENS 1 sexp string.sub(sexp, 2, -2) ]] def [[ T' 1Q sexp Tgt(RMPARENS(ONESPACE(sexp))) ]] def [[ T' 1Q sexp TGT(sexp) ]] ] [# lua: def [[ _ 1 body "$body" ]] def [[ __ 2 str,text _target[str] and HREF(_target[str], nilify(text) or str) or BG("red", str) ]] def [[ _ 1 body __(gsub(body, " ", "."), body) ]] load_TARGETS() -- (find-blogme3file "angglisp.lua" "luamanual") -- (find-blogme3file "elisp.lua" "code_c_d_remote =") ] [_TARGETS myxpm.el -> (find-angg "elisp/myxpm.el") find-epalette -> (find-angg ".emacs" "find-epalette") js-flipbooks -> (find-es "javascript" "flipbooks") ] [htmlize [J Edrx's Emacs page] [P Home is where my [AL .emacs .emacs] is.] [P [HREF index.html Emacs+eev] is my main interface with the system. See [HREF eev-article.html this article]. Most of [HREF index.html http://angg.twu.net/] is concerned with eev, by the way.] [P I use GNU Emacs. I don't know how to make my [AL eev-current/eev-glyphs.el glyphs] work in XEmacs.] [P These days I tend to use Emacs on X, on [HREF [-> fvwm] Fvwm].] [# # Quick index: # «.general-links» (to "general-links") # «.short-eev-tutorial» (to "short-eev-tutorial") # «.short-emacs-tutorial» (to "short-emacs-tutorial") # «.short-eev-tutorial» (to "short-eev-tutorial") # «.call-diagrams» (to "call-diagrams") # «.debugging-buttons» (to "debugging-buttons") # «.unibyte-multibyte» (to "unibyte-multibyte") # «.eejump» (to "eejump") # «.palette» (to "palette") # «.flipbooks» (to "flipbooks") # «.xpm-and-favicons» (to "xpm-and-favicons") #] [WITHINDEX [RULE -------------------------------------------------------] [sec «general-links» (to ".general-links") H2 [++N]. General links] [P I used to use [HREF [-> irc] IRC] a lot. My favourite IRC client is [R http://www.nongnu.org/rcirc/ rcirc] (its [R http://www.emacswiki.org/cgi-bin/wiki/rcirc EmacsWiki page], [AL .emacs#rcirc rcirc stuff in my .emacs]).] [P Some links on dynamic scoping vs. lexical scoping: an [R http://www.emacswiki.org/cgi-bin/wiki/NoThreading IRC log], a [R http://www.emacswiki.org/cgi-bin/wiki/DynamicBindingVsLexicalBinding bigger discussion], a [R http://www.gnu.org/software/emacs/emacs-paper.html#SEC17 section about that in an old Emacs paper], the [LR http://www-pu.informatik.uni-tuebingen.de/users/sperber/papers/dynamic-scope-analysis.pdf "Dynamic Scope Analysis" paper].] [P Emacs Lisp is a [R http://www.dreamsongs.org/Separation.html Lisp-2].] [# http://www.nhplace.com/kent/Papers/Technical-Issues.html http://www.nhplace.com/kent/Papers/index.html #] [HLIST1 [J CVS Emacs:] [J I prefer 22.0.50 (CVS) over 22.1.4.] [J [ES emacs#cvs How to compile CVS Emacs.]] [J [J w3m-el on Debian needs this to be happy in Emacs 22: [MYL elisp/w3m-e22.el w3m-e22.el].]] ] [HLIST1 [J Etc:] [R http://www.gnu.org/software/emacs/] [R http://www.gnu.org/software/emacs/tour/] [LR http://www.emacswiki.org/cgi-bin/wiki http://www.emacswiki.org/] [J There are some links on Emacs for Windows at my [HREF w32.html w32 page].] [LR http://www.1010.co.uk/emacsch.html] [# LR http://www.cabochon.com/~stevey/blog-rants/tour-de-babel.html] [LR http://steve.yegge.googlepages.com/tour-de-babel] ] [HLIST1 [J Org, Howm and Planner] [HLIST2 [J Org:] [J [R http://staff.science.uva.nl/~dominik/Tools/org/ Home page], [R http://www.emacswiki.org/cgi-bin/wiki/OrgMode emacswiki page] ] [J Mailing list: [R http://news.gmane.org/gmane.emacs.orgmode gmane], [R http://lists.gnu.org/archive/html/emacs-orgmode/ html archive] ] [R http://dto.freeshell.org/notebook/OrgMode.html] ] [HLIST2 [J Howm:] [R http://www.emacswiki.org/cgi-bin/wiki/HowmMode emacswiki page] [R http://www.emacswiki.org/cgi-bin/wiki/PlannerAndHowmComparison planner and howm comparison] [R http://howm.sourceforge.jp/ home page] [J [R http://dto.freeshell.org/HowmTutorial.howm.html tutorial] by dto] [ES howm my e-scripts about it] [AL .emacs#howm howm stuff in my .emacs] ] [HLIST2 [J Planner:] [R http://sacha.free.net.ph/notebook/wiki/PlannerMode.php sachac's page] [R http://www.emacswiki.org/cgi-bin/wiki/PlannerMode main emacswiki page] [R http://www.plannerlove.com/pmwiki/pmwiki.php www.plannerlove.com] ] ] [P Tramp (and $ASROOT); rcirc, circe, bitlbee] [P Things to try: [R http://homepage1.nifty.com/bmonkey/emacs/elisp/screen-lines.el screen-lines.el], [R http://www.dedasys.com/freesoftware/files/two-mode-mode.el two-mode-mode.el] (see also [R http://www.emacswiki.org/cgi-bin/wiki/MultipleModes this])] [P Do you think that this page is unreadable? Sorry [GOOGLE [J site:xahlee.org "human animal"] human animal]! Xah Lee thinks that too! But I am a [R http://xahlee.org/UnixResource_dir/writ/plain_text.html unix moron], what can I do?] [RULE ----------------------------------------] [sec «short-eev-tutorial» (to ".short-eev-tutorial") H2 [++N]. What is eev] [_TARGETS C-x.C-e -> (find-enode "Lisp Eval") C-e -> (find-enode "Moving Point") M-e -> (find-eevarticlesection "hyperlinks") red.star.glyph -> (find-eevarticlesection "glyphs") eev-mode => http://article.gmane.org/gmane.emacs.eev.devel/52 ] [P (2007oct15: Note: this is a very short introduction to eev, written mainly for people who already know Emacs well enough. The material that I use to explain Emacs and eev at the same time for people unfamiliar with Emacs is below. This is [STANDOUT very incomplete].)] [P I use eev to make Emacs be my main interface with the system.] [P Eev lets me "record" what I do into plain text files, in ways that can be "played back" later easily; I call these text files "e-scripts".] [P There is no way to run an e-script file all at once - e-scripts are not like scripts, they are more like "executable notes", or "executable logs"; we can select blocks in them and then say to Emacs to execute those blocks in a certain way. The two most basic ways are: (1) "go to the end of this line and execute the sexp before point" (this is bound to [_ M-e] in [_ eev-mode], and is roughly equivalent to [_ C-e] [_ C-x C-e], and (2) "send the current line to a program (typically a shell) running in another buffer"; this is bound to F8 (`eepitch-this-line').] [P Way (1) is mainly for recording links to interesting information, using sexps as hyperlinks. For example:] [# (find-THfile "emacs.blogme" "C-x.C-e") # (find-TH "emacs") ] [BE' (find-enode "Lisp Eval") (find-enode "Lisp Eval" "`C-x C-e'") (find-eevfile "") (find-eevarticlesection "hyperlinks") (find-eevarticlesection "shorter-hyperlinks") ] [P Way (2) is for recording commands to be sent to external programs - mainly to the shell. There's a trick: when the current line starts with a [_ red star glyph] the rest of the line is executed as Lisp, not sent; this is used to set up the "eepitch target". For example:] [BE'  (eepitch-shell) cd /tmp/ echo $[1+2] ] [P There are other ways to send commands to external programs, but they require some setup (like patching rcfiles):] [BE' (find-eevarticlesection "making-progs-receive-cmds") (find-eev "INSTALL") (find-eev "eev-rctool") ] [RULE ----------------------------------------] [sec «short-emacs-tutorial» (to ".short-emacs-tutorial") H2 [++N]. A short Emacs tutorial] [P (Started in 2007jul23. Work in progress.)] [P Most Emacs tutorials, for example this "[R http://www.gnu.org/software/emacs/tour/ guided tour]" from [R http://www.gnu.org/ gnu.org], treat Emacs as an editor that can "edit" anything that looks like text - [R [T' (find-enode "Files")] files], [R [T' (find-enode "Dired")] directories], [R [T' (find-enode "Man Page")] manpages], [R [T' (find-enode "Misc Help")] help], [R [T' (find-enode "Interactive Shell")] shell sessions], [R [T' (find-enode "Program Modes")] the source code of programs], [R [T' (find-enode "Debuggers")] debugging sessions], etc. I don't like this approach very much; it makes people feel overwhelmed. I prefer to see Emacs as a Lisp environment that people have used to build several kinds of editors and tools.] [P A bit of history (simplified, but not far from the [R http://www.multicians.org/mepap.html truth]): in the middle of 1970s people were starting to experiment with programmable (i.e., extensible) text editors, but most of the time what they were getting were systems where one person's extensions wouldn't be easily reusable by other people. For example, if Alice had programmed some functions to make it easier to edit e-mails then Bob would find Alice's extensions very hard to understand, and they would probably not work if Bob tried to use them together with his own extensions... But then at some point some people said: "hey, instead of taking an existing text editor and trying to make it programmable, let's take this programming language here, Lisp, that is very easy to extend and to modify, and let's add a few functions to it so that it will also behave as a very primitive text editor; then we will add the rest" - and this worked VERY well, and this was the core of Emacs; so Emacs is a Lisp on top of which hundreds, or thousands, of modules have been added, and these modules can be understood each one separately from the others.] [P In Emacs the Lisp is "very close to the surface", always accessible, and if we present some basic things about it as soon as possible - I always do that in the first 5 minutes when I'm explaining Emacs to people - then everything becomes simpler. In the boxes below the "[TT (functionname argument ...)]" things with hyperlinks are small Lisp programs - "one-liners" - whose actions are somehow correspondent to following the hyperlink at the `[TT ")]'; the link at the `[TT functionname]' points to more detailed explanations of what those one-line programs do.] [# (find-enode "Name Help") ] [PREBOXBLOGME [E' Commands, keys, prefixes, aborting, completion ============================================== Commands in Emacs can be several keys long, and all commands have names and can be invoked by their names - for example, `M-x find-file'. The prefixes "C-" and "M-" mean "Control" and "Meta"; on most keyboards "Meta" is "Alt". To abort a partially-typed command use `C-g'. (find-enode "Keys" "key sequence") (find-enode "User Input" "`Control-a'" "usually written `C-a'") (find-enode "User Input" " key") (find-enode "M-x" "Running Commands by Name") (find-enode "Quitting" "`C-g'") The TAB key can be used for completion in M-x, and in many other situations. (find-enode "Completion") ]] [PREBOXBLOGME [E' Files, Buffers, Windows, Frames, Display, etc ============================================= Emacs can edit several files at the same time, each one in a "buffer". (find-enode "Files") (find-enode "Buffers") (find-enode "Windows") (find-enode "Frames") The display of Emacs looks like this: (TODO: create a real screenshot.) __ _ _ ______________emacs_______\/|-|X| / | | \ | | bla | | Emacs Window | | | | calls this managers | | | | a "window". call | | | / this a | |--:** foo.txt (Fundamental) ----| <-- Its "modeline". "window". / | | \ Emacs \ | bla bla | | Another calls | | bleh | | window. this a | | | | "frame". | | | / | |--:** bar.txt (Fundamental) ----| <-- Its modeline. \ |Find file: ~/bletch.txt__________| <-- The minibuffer. The bottom line of a frame is sometimes the "echo area", sometimes the "minibuffer". The minibuffer acts like a window when it is active, and `C-x o' can be used to move from it to the "normal windows" and back. You can also use the mouse to move between windows. (find-enode "Other Window") ]] [PREBOXBLOGME [E' Basic keys ========== The keys that should be learned first are: `C-g' See: (find-enode "Quitting" "`C-g'") `C-_' or `C-/' See: (find-enode "Basic Undo") `C-x C-e' See: (find-enode "Lisp Eval") and: http://angg.twu.net/eev-article.html#hyperlinks Then: M-x -- execute-extended-command (find-enode "M-x") more about the minibuffer: (find-enode "Minibuffer") TAB -- for completion: (find-enode "Completion") for indentation: (find-enode "Indentation") in programming modes: (find-enode "Basic Indent") C-x o -- other-window (find-enode "Other Window") C-x 0 -- delete-window (find-enode "Change Window") C-x 1 -- delete-other-windows ("1 window") (find-enode "Change Window") C-x 2 -- split-window-vertically (Abv/Blw) (find-enode "Split Window") C-x 3 -- split-window-horizontally (L|R) (find-enode "Split Window") (find-enode "Dired") C-x C-f -- find-file (find-enode "Visiting") C-x C-s -- save-buffer (find-enode "Saving") C-x C-c -- save-buffers-kill-emacs (find-enode "Saving") C-x b -- switch-to-buffer (find-enode "Select Buffer") C-x k -- kill-buffer (find-enode "Kill Buffer") (find-enode "Mark") C-SPC -- set-mark-command (find-enode "Setting Mark") C-w -- kill-region (cut) (find-enode "Other Kill Commands") M-w -- kill-ring-save (copy) (find-enode "Kill Ring") C-y -- yank (paste) (find-enode "Kill Ring") C-a -- beginning-of-line (find-enode "Moving Point") C-e -- end-of-line (find-enode "Moving Point") M-< -- beginning-of-buffer (find-enode "Moving Point") M-> -- end-of-buffer (find-enode "Moving Point") M-q -- fill-paragraph (find-enode "Fill Commands") C-s -- isearch-forward (find-enode "Incremental Search") C-r -- isearch-backward (find-enode "Incremental Search") M-C-s -- isearch-forward-regexp (find-enode "Regexp Search") M-C-r -- isearch-backward-regexp (find-enode "Regexp Search") M-% -- query-replace (find-enode "Replace") C-x ( -- start-kbd-macro (find-enode "Keyboard Macros") C-x ) -- end-kbd-macro (find-enode "Keyboard Macros") C-x e -- call-last-kbd-macro (find-enode "Keyboard Macros") ]] [# M-e -- end-of-line-then-eval-last-sexp (*) M-k -- kill-buffer (*) (backspace) -- delete-backward-char (find-enode "Erasing") (del) -- delete-char (find-enode "Erasing") C-k -- kill-line (find-enode "Killing by Lines") C-h i -- info (find-enode "Misc Help") C-h k -- describe-key (find-enode "Key Help") C-h b -- describe-bindings (find-enode "Misc Help") C-h m -- describe-mode (find-enode "Misc Help") C-h l -- view-lossage (find-enode "Misc Help") C-h f -- describe-function (find-enode "Name Help") C-h w -- where-is (find-enode "Name Help") C-h F -- view-emacs-FAQ (find-enode "Misc Help") (find-efaqnode "Top") left -- backward-char (find-enode "Moving Point") right -- forward-char (find-enode "Moving Point") up -- previous-line (find-enode "Moving Point") down -- next-line (find-enode "Moving Point") C-q -- quoted-insert (find-enode "Inserting Text") M-1 -- digit-argument (find-enode "Arguments") C-u -- universal-argument (find-enode "Arguments") C-x = -- what-cursor-position (find-enode "Position Info") M-| -- shell-command-on-region (find-enode "Single Shell") M-. -- find-tag (find-enode "Tags") C-x r k -- kill-rectangle (find-enode "Rectangles") C-x r y -- yank-rectangle (find-enode "Rectangles") C-t -- transpose-chars (find-enode "Transpose") M-c -- capitalize-word (find-enode "Case") M-l -- downcase-word (find-enode "Case") M-u -- upcase-word (find-enode "Case") M-x pwd (find-enode "File Names") M-x fundamental-mode (find-elnode "Major Modes") M-x text-mode M-x tcl-mode M-x c-mode M-x emacs-lisp-mode (find-enode "Lisp Eval") M-x sort-lines (find-enode "Sorting") M-x sort-columns (find-enode "Sorting") Some info mode bindings ======================= q -- Info-exit (find-enode "Misc Help") RET -- Info-follow-nearest-node n -- Info-next p -- Info-prev u -- Info-up l -- Info-last ? -- Info-summary TAB -- Info-next-reference t -- Info-top-node Some picture mode bindings ========================== M-x picture-mode (find-enode "Picture") C-c C-c -- picture-mode-exit (find-enode "Picture") C-c . -- picture-movement-down (find-enode "Insert in Picture") C-c > -- picture-movement-right (find-enode "Insert in Picture") Other non-standard bindings that I set ====================================== M-o -- other-window (find-enode "Other Window") ins -- overwrite-mode (find-enode "Minor Modes") f1 -- buffer-menu (find-enode "Several Buffers") f4 -- redraw-display (find-elnode "Refresh Screen") f5 -- call-last-kbd-macro (find-enode "Keyboard Macros") f6 -- picture-mode (find-enode "Picture") ] [RULE ----------------------------------------] [sec «short-eev-tutorial» (to ".short-eev-tutorial") H2 [++N]. A minimal roadmap/tutorial for eev] [P (Started in 2007aug24. Work in progress.)] [P Not all links work at this moment - the red words are "future links"...] [_TARGETS F3 -> (find-eevarticlesection "delimited-regions") F8 -> (find-eevarticlesection "eepitch") F9 -> (find-eevarticlesection "channels") M-x -> (find-enode "M-x") eev -> (find-eevarticlesection "sending-commands") M-x.eev -> (find-eevarticlesection "sending-commands") eev-bounded -> (find-eevarticlesection "delimited-regions") region -> (find-enode "Mark") screenshot -> (find-eevfile "doc/shot-f8.png") M-x.shell -> (find-enode "Interactive Shell") prepared.shell -> (find-eevarticlesection "making-progs-receive-cmds") C-q -> (find-enode "Inserting Text") eepitch-shell -> (find-eevarticlesection "eepitch") eepitch-kill -> (find-eevarticlesection "eepitch") eexterm -> (find-eevarticlesection "channels") eexterm-kill -> (find-eevarticlesection "channels") temporary.script -> (find-eevarticlesection "making-progs-receive-cmds") C-x.C-e -> (find-enode "Lisp Eval") M-h.M-f -> (find-eevarticlesection "generating-hyperlinks") M-h.M-k -> (find-eevarticlesection "generating-hyperlinks") key.sequence -> (find-enode "Keys") ee-hyperlink-prefix -> (find-eev "eev-insert.el" "ee-hyperlink-prefix") glyph -> (find-eevarticlesection "glyphs") Info.node -> (find-enode "Misc Help") kill-this-buffer -> (find-enode "Kill Buffer") bury-buffer -> (find-elnode "The Buffer List") C-e -> (find-enode "Moving Point") M-e -> (find-eevarticlesection "hyperlinks") M-E -> (find-eevarticlesection "hyperlinks") M-k -> (find-eevarticlesection "returning") M-K -> (find-eevarticlesection "returning") M-x.eev-mode -> (find-eev "eev.el" "eev-mode-map") C-SPC -> (find-enode "Setting Mark") C-x.C-x -> (find-enode "Setting Mark") M-w -> (find-enode "Kill Ring") C-w -> (find-enode "Other Kill Commands") C-y -> (find-enode "Kill Ring") C-k -> (find-enode "Killing by Lines") point -> (find-enode "Point") mark -> (find-enode "Mark") M-h.M-2 => http://angg.twu.net/flipbooks/refining.html#009 M-h.M-y => http://angg.twu.net/flipbooks/refining.html#010 M-h.M-i => http://angg.twu.net/flipbooks/refining.html#008 eev-mode-map -> (find-eev "eev.el" "eev-mode-map") pop-up-windows -> (find-eev "eev.el" "eev-mode-global-settings-saver") ] [NAME eev-keys-basic] [PREBOXBLOGME Sending commands to shells ([_ screenshot]): M-x [_ eev] save the [_ region] into $EE M-x [_ eev-bounded] save the bounded region into $EE [_ F3] run the default bounded action "ee" in a execute the commands in $EE [_ prepared shell] (verbosely; $EE is a [_ temporary script]) Sending one line to a shell: [_ F8] send to an [_ M-x shell] buffer [_ F9] send to an xterm listening on a channel F8 and F9 treat red-star lines specially (as Lisp):  ([_ eepitch-shell]) set the target for F8  ([_ eepitch-kill]) kill the current eepitch target  ([_ eexterm] "A") set the target for F9; create an xterm if needed  ([_ eexterm-kill]) kill the current eexterm ] [NAME eev-keys-for-editing] [PREBOXBLOGME Editing: [_ C-q] C-o insert a red star [_ glyph]: "" (a typical delimiter for F3 is "\n#\n") [_ M-h M-2] duplicate the current line [_ M-h M-y] refine a hyperlink Basic cut & paste keys (not eev-specific) [_ C-SPC] set the [_ mark] [_ C-x C-x] exchange [_ point] and mark [_ M-w] copy [_ C-w] cut [_ C-y] paste [_ C-k] kill-this-line ] [NAME eev-keys-for-hyperlinks] [PREBOXBLOGME Hyperlinks (keys to follow them): [_ M-e] like [_ C-e] [_ C-x C-e]: go to end of line, then M-E [_ M-E] like [_ C-x C-e]: eval the sexp ending before point Hyperlinks (keys to returning from them): [_ M-k] [_ kill-this-buffer] [_ M-K] [_ bury-buffer] Temporary buffers with hyperlinks: [_ M-h M-f] hyperlinks to an Emacs function [_ M-h M-k] hyperlinks to a [_ key sequence] and to the function associated to it [_ M-h f] hyperlinks to the current file [_ M-h M-i] hyperlinks to the current [_ Info node] M-x [_ ee-hyperlink-prefix] ] [NAME eev-mode] [PREBOXBLOGME Turning eev-mode on (with [_ M-x eev-mode]) has only two effects: the keymap [_ eev-mode-map] becomes active, and `[_ pop-up-windows]' becomes nil (this makes `M-e', `M-E', `M-k', and `M-K' behave better). Turning eev-mode off deactivates the keymap and restores the value of `pop-up-windows'. The easy way to try eev is to download and unpack the tarball somewhere, mkdir ~/eev-current/ cd ~/eev-current/ wget http://angg.twu.net/eev-current.tar.gz tar -xvzf eev-current.tar.gz and then load it and activate it with: (add-to-list 'load-path "~/eev-current/") (require 'eev-all) (eev-mode 1) The effects of "(require 'eev-all)" are: lots of functions are defined (mainly for hyperlinks); some environment variables are set ($EE, $EEVTMPDIR, etc), but only in Emacs and in programs started from Emacs; and a few glyphs are defined. The "full instalation" for eev involves changing some rcfiles - .emacs, .bashrc, etc. This can be done semi-automatically (see eev-rctool and the INSTALL file) and is trivial to undo. If you try eev without changing rcfiles then [_ M-x eev] and [_ F3] will not work properly, in the sense that the shortcut "ee" to execute the temporary script file - a shell function - will not be defined. ] [RULE ----------------------------------------] [sec «call-diagrams» (to ".call-diagrams") H2 [++N]. Call Diagrams (for some parts of eev)] [lua: -- (find-es "blogme" "diagrams-with-words") lpeg.togsub = lpeg_togsub lpeg.gsub = lpeg_gsub f = function (s) return BG("blue", Q(s)) end f = function (s) return _target[s] and BG("blue", Q(s)) or Q(s) end f = function (s) return _target[s] and __(s, Q(s)) or Q(s) end Word = lpeg.R("az")^1 Dash = lpeg.P("-") Words = (Word * (Dash * Word)^0) / f def [[ TRANSWORDS 1q body Words:gsub(body, Q) ]] ] [_TARGETS code-c-d -> (find-eev "eev-mini.el" "code-c-d") ee-code-c-d -> (find-eev "eev-mini.el" "ee-code-c-d") ee-expand -> (find-eev "eev-mini.el" "ee-expand") ee-goto-position -> (find-eev "eev-mini.el" "ee-goto-position") ee-goto-rest -> (find-eev "eev-mini.el" "ee-goto-rest") find-code-c-d -> (find-eev "eev-mini.el" "find-code-c-d") find-eoutput-rerun -> (find-eev "eev-mini.el" "find-eoutput-rerun") find-estring-elisp -> (find-eev "eev-mini.el" "find-estring-elisp") find-fline -> (find-eev "eev-mini.el" "find-fline") find-node -> (find-eev "eev-mini.el" "find-node") ] [P A diagram for the `find-fline'/`find-node' family:] [PREBOXBLOGME [TRANSWORDS . code-c-d find-code-c-d | / | v v v find-fline <----- ee-code-c-d find-estring-elisp / | / | v | v v ee-expand | find-node find-eoutput-rerun | | v v ee-goto-position | v ee-goto-rest Top-level words: find-fline - hyperlink to a file find-node - hyperlink to an info node code-c-d - to define `find-xxxfile' and `find-xxxnode' words find-code-c-d - inspect the code that `code-c-d' would run ]] [_TARGETS ee-eeb-define -> (find-eev "eev-mini.el" "ee-eeb-define") ee-se-to-string -> (find-eev "eev-mini.el" "ee-se-to-string") ee-write-string -> (find-eev "eev-mini.el" "ee-write-string") eeb-default -> (find-eev "eev-mini.el" "eeb-default") eeb-defaults -> (find-eev "eev-mini.el" "eeb-defaults") eeb-define -> (find-eev "eev-mini.el" "eeb-define") eeflash -> (find-eev "eev-mini.el" "eeflash") eev -> (find-eev "eev-mini.el" "eev") eev-bounded -> oops: (find-eev "eev-mini.el" "eev-bounded") eev-set-glyph -> (find-eev "eev-mini.el" "eev-set-glyph") find-eeb-define -> (find-eev "eev-mini.el" "find-eeb-define") find-estring-elisp -> (find-eev "eev-mini.el" "find-estring-elisp") ] [P The `eev' family:] [PREBOXBLOGME [TRANSWORDS . eeb-define find-eeb-define | / | v v v ee-eeb-define find-estring-elisp | v eev-bounded | | | v | eeb-default | / \ v v v eev <-------------- eeb-defaults eeflash | \ : | v v | ee-se-to-string eev-set-glyph | v ee-write-string Top-level words: eev - save the region to a temporary script file eev-bounded - save a bounded region into the temporary script file eeb-define - used to define `eev-bounded' from `eev' find-eeb-define - display the code that eeb-define runs The relations in the graph above: `eev' calls `ee-write-string', that calls `ee-se-to-string'. `eev' uses `ee-se-to-string' to get what to save. `eev-bounded' sets `eeb-defauls' and calls `eeb-default'. `eeb-default' read the delimiters and the function from `eeb-defaults'. The delimiters in `eeb-defaults' usually contain `', whose appearance is defined by a call to `eev-set-glyph'. `eeb-default' calls `eeflash' to highlight the region. `eeb-define' calls `ee-eeb-define' to generate the code of a defun - for example, for the definition of `eev-bounded'. This code is then evaluated. `find-eeb-define' also calls `ee-eeb-define', but instead of evaluating the code it uses `find-estring-elisp' to display the code in a buffer. ]] [H3 Diagrams for the steppers:] [P [ARTICLESEC eesteps eesteps]:] [PREBOXBLOGME [E' . ----> eesteps-do-step | \ | v M-e ----> eesteps | eesteps-perform | | | v v v eesteps-list eek eek0 eesteps-pos ]] [P eepaste:] [PREBOXBLOGME [E' M-P ----> eepaste-one-line | \ v v M-w ----> kill-ring (insert line) (call-interactively (key-binding "\r")) ]] [_TARGETS eepitch -> (find-eev "eev-mini-steps.el" "eepitch") eepitch-code -> (find-eev "eev-mini-steps.el" "eepitch-code") eepitch-display-target-buffer -> (find-eev "eev-mini-steps.el" "eepitch-display-target-buffer") eepitch-line -> (find-eev "eev-mini-steps.el" "eepitch-line") eepitch-not-this-buffer -> (find-eev "eev-mini-steps.el" "eepitch-not-this-buffer") eepitch-prepare-target-buffer -> (find-eev "eev-mini-steps.el" "eepitch-prepare-target-buffer") eepitch-target-buffer -> (find-eev "eev-mini-steps.el" "eepitch-target-buffer") eepitch-this-line -> (find-eev "eev-mini-steps.el" "eepitch-this-line") ] [P [ARTICLESEC eepitch eepitch]:] [PREBOXBLOGME [TRANSWORDS ----> eepitch-this-line | | \  | | v | | eepitch -------------- | | / \ | v v v | eepitch-prepare-target-buffer ---> eepitch-code | eepitch-display-target-buffer | eepitch-not-this-buffer v eepitch-line | eepitch-target-buffer v (insert line) (call-interactively (key-binding "\r")) ]] [_TARGETS eechannel -> (find-eev "eev-mini-steps.el" "eechannel") eechannel-default -> (find-eev "eev-mini-steps.el" "eechannel-default") eechannel-kill -> (find-eev "eev-mini-steps.el" "eechannel-kill") eechannel-pid -> (find-eev "eev-mini-steps.el" "eechannel-pid") eechannel-pidfile -> (find-eev "eev-mini-steps.el" "eechannel-pidfile") eechannel-send -> (find-eev "eev-mini-steps.el" "eechannel-send") eechannel-strfile -> (find-eev "eev-mini-steps.el" "eechannel-strfile") eechannel-this-line -> (find-eev "eev-mini-steps.el" "eechannel-this-line") ] [P [ARTICLESEC channels eechannel]:] [PREBOXBLOGME [TRANSWORDS -----> eechannel-this-line | \  | v | eechannel | \ v v eechannel-send ----------> eechannel-default | \ | v | eechannel-kill | | | v | eechannel-pid | | v v eechannel-strfile eechannel-pidfile ]] [RULE --------------------] [sec «debugging-buttons» (to ".debugging-buttons") H2 [++N]. Debugging Emacs with elisp hyperlinks] [P I should have sent this idea to emacs-devel, but I didn't...] [PREBOXBLOGME [E' http://lists.gnu.org/archive/html/emacs-devel/2007-06/msg00517.html (find-efunctiondescr 'find-file) (find-efunctiondescr 'find-file "files.e") (find-efunctiondescr 'find-file "files.e" '(eek "RET")) (find-efunctiondescr 'find-file "files.e" '(eek "M-h M-k RET")) (find-efunctiondescr 'find-file "files.e" '(eek "M-x push-button")) (find-efunctiondescr 'find-file "files.e" '(push-button (point))) (find-efunctiondescr 'find-file "files.e" '(progn (debug) (push-button (point)))) (find-efunctiondescr 'find-file "files.e" '(find-epp (button-at (point)))) (find-efunctiondescr 'find-file "files.e" '(button-activate (button-at (point)))) (find-efunctiondescr 'find-file "files.e" '(find-epp (button-get (button-at (point)) 'action))) (find-efunctiondescr 'find-file "files.e" '(find-epp (button-get (button-at (point)) 'action))) (find-efunctiondescr 'find-file "files.e" '(help-button-action (button-at (point)))) (find-efunctiondescr 'find-file "files.e" '(find-epp help-button-action (button-at (point)))) (find-efunction 'push-button) (find-efunction 'button-activate) (find-efunction 'help-button-action) (find-efunctiondescr 'find-file "files.e" '(find-epp (button-start (button-at (point))))) (find-efunctiondescr 'find-file "files.e" '(find-epp (button-get (button-at (point)) 'help-function))) (find-efunctiondescr 'find-file "files.e" '(find-epp (button-get (button-at (point)) 'help-args))) (find-efunctiondescr 'find-file "files.e" '(find-epp (button-get (button-at (point)) 'help-function))) (find-efunctiondescr 'find-file "files.e" '(find-efunctiond (button-get (button-at (point)) 'help-function))) (find-egrep "grep -nH -e 'Unable to find location in file' $(find * -name '*.el')") (find-efile "help-mode.el" "define-button-type 'help-function-def") (find-efile "help-mode.el" "define-button-type 'help-variable-def") (find-efile "help-mode.el" "define-button-type 'help-face-def") (load "help-mode.el") (find-efunctiondescr 'find-file "files.e" '(find-epp (button-get (button-at (point)) 'help-function))) (load "help-mode.elc") (find-efunctiondescr 'find-file "files.e" '(find-epp (button-get (button-at (point)) 'help-function))) ]] [RULE --------------------] [sec «unibyte-multibyte» (to ".unibyte-multibyte") H2 [++N]. The unibyte<->multibyte bridge] [P 2008oct21: My green guillemet glyphs do not work well in multibyte buffers - functions based on find-anchor, mkto and eev-compose-two-keys fail in weird ways. I'm trying to understand how Emacs converts between unibyte and multibyte, in strings, buffers and files, to fix this...] [BE' (find-es "emacs" "anchors-in-latin-1") (find-es "emacs" "anchors-in-latin-1-2") (find-angg ".emacs" "save-this-block-as") (find-elnode "Explicit Encoding") http://article.gmane.org/gmane.emacs.bugs/21772 http://lists.gnu.org/archive/html/bug-gnu-emacs/2008-10/msg00830.html unibyte string/ <-\ convert/ multibyte string --/ concat ^ | kill | | insert/search | v unibyte buffer/ glyphs multibyte buffer ------> display ^ | v raw unibyte files/ raw multibyte files/ files with other encodings ] [BE' ;;--------snip,snip-------- ;; -*- coding: latin-1 -*- ;; (save-this-block-as "/tmp/4.txt") (setq <> "\253foo\273") (setq <>uni (string-to-unibyte <>)) (setq <>multi (string-to-multibyte <>)) (setq <>uni+ (decode-coding-string <>uni 'iso-8859-1)) (setq <>multi+ (decode-coding-string <>multi 'iso-8859-1)) ;; Note: <>uni is unibyte, ;; but <>uni+ is multibyte ;; (and <>uni+ = <>multi+) (multibyte-string-p <>) (multibyte-string-p <>uni) (multibyte-string-p <>multi) (multibyte-string-p <>uni+) (multibyte-string-p <>multi+) (insert 171 "foo" 187) (search-backward <>uni) (search-backward <>multi) (search-backward <>uni+) (search-backward <>multi+) ;;--------snip,snip-------- ] [RULE ----------------------------------------] [sec «eejump» (to ".eejump") H2 [++N]. eejump] [P Here's something that I've been using a lot lately... The full version is [AL .emacs#eejump here]; the code below is a miniature that just shows the main idea. Further reading: [R http://www.gnu.org/software/emacs/emacs-paper.html#SEC29 this] and [AL eev-article#hyperlinks this].] [P [QQQ ;; eejump (M-j): ;; M-1 M-j opens a certain file, ;; M-2 M-j opens another file, ;; when the argument is 11, 22, 33 or 44 do something special, ;; like changing the font; ;; with no argument or with an unrecognized argument jump to ;; the definition of eejump in ~/.emacs; then we can see which ;; numbers correspond to which actions (the source is the ;; documentation!), and we can change the definition if needed - ;; just run C-x C-e (eval-last-sexp) at the right place to make ;; the changes apply. ;; (global-set-key (kbd "M-j") 'eejump) (defun eejump (arg) (interactive "P") (cond ((eq arg 1) (find-file "~/NOTES")) ((eq arg 2) (find-file "~/otherfile.txt")) ;; ((eq arg 11) (set-frame-font "fixed")) ((eq arg 22) (set-frame-font "terminus-16")) ((eq arg 33) (set-frame-font "terminus-bold-16")) ((eq arg 44) (set-frame-font "10x20")) (t (find-function 'eejump)))) ]] [RULE ----------------------------------------] [sec «palette» (to ".palette") H2 [++N]. palette] [P [SCALEDIMAGE 25% IMAGES/palette.png]] [P This is just a proof of concept for another idea... given a region and a list of names - say, [TT ("foo" "bar")] - go through each word of the region, and when the word is in the list convert it to a button whose action is to jump to an anchor with that name in an index buffer (that index buffer can be something like [HREF [--> (find-enode "Command Index")] this], but using [HREF [--> (find-eevarticlesection "anchors")] anchors] and sexps).] [P The code is [__ find-epalette here].] [RULE ----------------------------------------] [sec «flipbooks» (to ".flipbooks") H2 [++N]. Flipbooks] [P [AL eev-current/eev-sshot.el eev-sshot.el], for screenshots and flipbook animations (2006oct02).] [HLIST2 [J Three flipbooks (suggestion: open them in new browser tabs):] [R http://angg.twu.net/flipbooks/eesteps.html#002 one demonstrating eesteps], [R http://angg.twu.net/flipbooks/ee-glyph.html#001 one about glyphs], [R http://angg.twu.net/flipbooks/refining.html#001 one about refining hyperlinks]. ] [P Some notes about a javascript-based interface are [__ js-flipbooks here].] [RULE ----------------------------------------] [sec «xpm-and-favicons» (to ".xpm-and-favicons") H2 [++N]. Editing XPM favicons in Emacs] [P Here: [_ myxpm.el]. The favicons can be seen in [R index.html my main page]. No docs yet.] ] ] [# # (find-blogme3file "") # (find-blogme3file "anggdefs.lua") ] [# # Local Variables: # coding: raw-text-unix # modes: (fundamental-mode blogme-mode) # End: #]