Quick
index
main
eev
eepitch
maths
angg
blogme
dednat6
littlelangs
PURO
(C2,C3,C4,
 λ,ES,
 GA,MD,
 Caepro,
 textos,
 Chapa 1)

emacs
lua
(la)tex
maxima
 qdraw
git
lean4
agda
forth
squeak
icon
tcl
tikz
fvwm
debian
irc
contact

BlogMe3: the Angg Extensions

Quick index:

0.1. Relative links


0.2. E-scripts and sexp hyperlinks

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.

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:

(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

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.


0.3. Links as underlined words with a target

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:

[_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').]

This becomes:

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').

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 "=>" lines) and elisp hyperlinks (the "->" lines). Lines that are not in the "->" or "=>" formats are silently ignored, but using elisp expressions that blogme3 doesn't know how to convert into a target url would raise an error.

0.4. Htmlizing e-scripts


0.5. Generating Makefiles

# (find-blogme3 "makefile.lua")
# (find-blogme3 "anggmake.lua")
# (find-angg "TH/Makefile")
# (find-anggfile "TH/Makefile.auto")

0.6. The "-tgt" option

# (find-blogme3 "anggdefs.lua" "-tgt")

0.7. Running "blogme3.lua -tgt" from Emacs

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

0.8. The "-tgt" option

# (find-angg ".emacs" "favourite-modes")