[INCLUDE TH/speedbar.blogme] [SETFAVICON dednat4/dednat4-icon.png] [# (defun c () (interactive) (find-blogme3-sh0-if "blogme3-angg")) ;; http://angg.twu.net/blogme3-angg.html ;; file:///home/edrx/TH/L/blogme3-angg.html #] [lua: LR = R ] [htmlize [J BlogMe3: the Angg Extensions] [lua: -- (eev-math-glyphs-edrx) eev_math_glyphs_edrx() ] [WITHINDEX [# # «.relative-links» (to "relative-links") # «._TARGETS» (to "_TARGETS") # «.elisp-hyperlinks» (to "elisp-hyperlinks") # «.htmlizing-escripts» (to "htmlizing-escripts") # «.makefiles» (to "makefiles") # «.-tgt» (to "-tgt") # «.tgt-from-emacs» (to "tgt-from-emacs") # «.blogme-mode» (to "blogme-mode") #] [RULE ----------------------------------------] [sec «relative-links» (to ".relative-links") H2 [++NN]. Relative links] [RULE ----------------------------------------] [sec «elisp-hyperlinks» (to ".elisp-hyperlinks") H2 [++NN]. E-scripts and sexp hyperlinks] [_TARGETS local.copy -> (find-eevarticlesection "local-copies") anchors -> (find-eevarticlesection "anchors") elisp.hyperlinks -> (find-eevarticlesection "hyperlinks") glyphs -> (find-eevarticlesection "glyphs") elisp.lua -> (find-blogme3 "elisp.lua") lpeg => http://www.inf.puc-rio.br/~roberto/lpeg.html ] [P When I wrote TH back in 1999 I had two main needs; for some of my external links I had to generate both the usual link pointing out and a link to a [_ local copy] (I don't use that much anymore), and I had to be able to htmlize my e-script files - which meant handling [_ glyphs], [_ anchors], and [_ elisp hyperlinks]; the worst part was to handle elisp hyperlinks - glyphs and anchors were trivial in comparison.] [P For some sexps that point to pages in Info manuals we can associate a "target url" when that manual has an HTML version online; and sexps that point to files in my home directory that are exported to angg.twu.net also have target urls. For example:] [# (at this moment only the "one HTML page per info node" format is supported)] [BE' (find-node "(emacs)Lisp Eval") (find-enode "Lisp Eval") -> http://www.gnu.org/software/emacs/manual/html_node/emacs/Lisp-Eval.html (find-angg "blogme3/") (find-angg "blogme3/brackets.lua") (find-angg "blogme3/brackets.lua" "parsers") (find-angg "IMAGES/") (find-anggfile "dednat4/dednat4-icon.png") -> http://angg.twu.net/blogme3/ -> http://angg.twu.net/blogme3/brackets.lua -> http://angg.twu.net/blogme3/brackets.lua#parsers -> http://angg.twu.net/dednat4/dednat4-icon.png ] [P Many sexps that I use in e-scripts, including some that are not hyperlinks, also have have another sexp associated to them: their "help url". The code that parses (some) sexps is at [_ elisp.lua]; it uses [_ lpeg]. It only tries to htmlize the sexps that are one-liners, that start with one of the recognized "heads" (in the table BLAH), and that end at the end of the line.] [RULE ----------------------------------------] [sec «_TARGETS» (to "._TARGETS") H2 [++NN]. Links as underlined words with a target] [P One day I was writing - by hand, on a piece of paper - the text that would go into one of my pages, and I realized that I was just underlining the words and expressions that would become links, and that there was a natural representation in ascii (i.e., in the blogme source) for that: [' [_ blah]] would become blah. For example:] [BE' [_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 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 This becomes:] [NARROW [_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 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 Note that the word _TARGETS implements a convenient way to define many hyperlink targets at once, andthat it is smart enough to know how to handle both normal links (the "[TT [Q =>]]" lines) and elisp hyperlinks (the "[TT [Q ->]]" lines). Lines that are not in the "[TT [Q ->]]" or "[TT [Q =>]]" formats are silently ignored, but using elisp expressions that blogme3 doesn't know how to convert into a target url would raise an error.] [sec «htmlizing-escripts» (to ".htmlizing-escripts") H2 [++NN]. Htmlizing e-scripts] [RULE ----------------------------------------] [sec «makefiles» (to ".makefiles") H2 [++NN]. Generating Makefiles] [BE' # (find-blogme3 "makefile.lua") # (find-blogme3 "anggmake.lua") # (find-angg "TH/Makefile") # (find-anggfile "TH/Makefile.auto") ] [sec «-tgt» (to ".-tgt") H2 [++NN]. The "-tgt" option] [BE' # (find-blogme3 "anggdefs.lua" "-tgt") ] [sec «tgt-from-emacs» (to ".tgt-from-emacs") H2 [++NN]. Running "blogme3.lua -tgt" from Emacs] [BE' # (find-angg ".emacs" "tgt") ] [sec «blogme-mode» (to ".blogme-mode") H2 [++NN]. The "-tgt" option] [BE' # (find-angg ".emacs" "favourite-modes") ] ] ] [# # Local Variables: # coding: raw-text-unix # modes: (fundamental-mode blogme-mode) # End: #]