-- -*- coding: raw-text -*- -- angglisp.lua - See: (find-blogme3 "elisp.lua") -- This is part of blogme3. -- Author: Eduardo Ochs -- Version: 2008aug09 -- -- -- License: GPL. -- See: (find-blogme3 "escripts.lua") -- (find-blogme3 "elisp.lua") -- This files uses relative links *a lot*, and it can only be loaded -- after the variabless -- We can only load this file when the variables "pathtoroot" and -- "eevarticle" are set; usually they are set by the "-o" option. -- (find-blogme3 "elisp.lua" "relative-links") -- (find-blogme3 "options.lua" "basic-options") -- Quick index: -- «.code_c_d_angg» (to "code_c_d_angg") -- «.find_node» (to "find_node") -- «.code_ps» (to "code_ps") -- «.find-LATEX» (to "find-LATEX") -- «.find-LTX» (to "find-LTX") -- «.ghcdoc» (to "ghcdoc") --------[ Elisp hyperlinks that are not angg-specific ]-------- _EHELP["to"] = eevarticle.."#anchors" _E ["to"] = function (all, funname, qtag) local tag = dequote(qtag) return makesexphtml(all, funname, eevarticle.."#anchors", tag and "#"..tag) end --------[ Lots of hyperlinks (angg-specific) ]-------- -- Some tests (should work in the htmlized version): -- «first_anchor» (to "second_anchor") -- «second_anchor» (to "first_block") -- (find-angg "TH/eev-article.blogme" "anchors") -- (find-dednat4 "") -- (find-dednat4file "dednat4-icon.png") -- «code_c_d_angg» (to ".code_c_d_angg") -- (find-blogme3 "anggdefs.lua" "-anggat") code_c_d_angg = function (c, d) if pathtoangg then code_c_d_remote(c, pathtoangg..d) else code_c_d_local (c, d) end end code_c_d_angg("angg", "") code_c_d_angg("es", "e/") code_c_d_angg("dednat4", "dednat4/") code_c_d_angg("dn4", "dednat4/") code_c_d_angg("dn4ex", "dednat4/examples/") code_c_d_angg("blogme", "blogme/") code_c_d_angg("blogme3", "blogme3/") code_c_d_angg("eev", "eev-current/") code_c_d_angg("flua", "flua/") code_c_d_angg("rubyforth", "rubyforth/") code_c_d_angg("vtutil", "vtutil/") code_c_d_angg("vtutil4", "vtutil4/") -- code_c_d_remote("eevarticlesection", eevarticle) set_E4("find-eevarticlesection", _E_remoteanchor, eevarticle.."#shorter-hyperlinks", eevarticle.."#", "") -- (find-blogme3file "rumilisp.lua") -- PP(_E) -- PP(_EBASE) -- Fix for a fossil "feature" of find-es. _ESUFFIX["find-es"] = ".e.html" -- http://www.gnu.org/software/bash/manual/bash.html -- http://www.gnu.org/software/gdb/gdb.html -- http://www.gnu.org/software/emacs/emacs-faq.html -- http://lilypond.org/doc/v2.10/Documentation/ -- http://lilypond.org/doc/v2.10/Documentation/user/lilypond/ for _,xxx in ipairs(split [[ efaq exp gcc lily lua ]]) do set_EHELP("find-"..xxx.."node", "NOT_YET") end for _,funname in ipairs(split [[ find-angghtml find-shttpfile ]]) do set_EHELP(funname, "NOT_YET") end -- (find-eevarticlesection "delimited-regions") set_EHELP("find-fline", eevarticle.."#hyperlinks") set_EHELP("find-node", eevarticle.."#hyperlinks") set_EHELP("eev-bounded", eevarticle.."#delimited-regions") set_EHELP("eelatex-bounded", eevarticle.."#delimited-regions") set_EHELP("find-sh", eevarticle.."#dangerous-hyperlinks") set_EHELP("find-sh0", eevarticle.."#dangerous-hyperlinks") set_EHELP("eeman", eevarticle.."#splitting-eev.el") set_EHELP("find-man", eevarticle.."#splitting-eev.el") set_EHELP("eevnow-at", eevarticle.."#big-modular-e-scripts") set_EHELP("eepitch", eevarticle.."#eepitch") set_EHELP("eepitch-shell", eevarticle.."#eepitch") set_EHELP("eepitch-lua51", eevarticle.."#eepitch") --------[ Experimental, 2007apr17 ]-------- code_c_d_remote("wdgref", "http://www.htmlhelp.com/reference/") code_c_d_remote("wdg40", "http://www.htmlhelp.com/reference/html40/") code_c_d_remote("wdgcss", "http://www.htmlhelp.com/reference/css/") code_c_d_remote("luamanual", "http://www.lua.org/manual/5.1/manual.html") code_c_d_remote("lua50manual", "http://www.lua.org/manual/5.0/manual.html") code_c_d_remote("pil", "http://www.lua.org/pil/") code_c_d_remote("lpeg", "http://www.inf.puc-rio.br/~roberto/") -- (find-zsh "touch ~/e/html.e; makeL") -- (find-es "html") -- file:///root/edrx/TH/L/e/html.e.html -- (find-luamanualw3m "#6") -- (find-lua50manualw3m "#6") -- (find-pilw3m "7.1.html") --------[ Experimental, 2007jun07 ]-------- -- «find_node» (to ".find_node") infonodehtmlname_re = "([- ])" infonodehtmlname_table = {[" "] = "-", ["&"] = "-", ["-"] = "_002d", ["/"] = "_002f"} infonodehtmlname = function (str) return translatechars(str, infonodehtmlname_re, infonodehtmlname_table) end find_elnode = function (nodename) return "http://www.gnu.org/software/emacs/elisp-manual/html_node/" .. infonodehtmlname(nodename) .. ".html" end find_enode = function (nodename) return "http://www.gnu.org/software/emacs/manual/html_node/" .. infonodehtmlname(nodename) .. ".html" end infomanual_basedir = {} -- infomanual_basedir["emacs"] = "http://www.gnu.org/software/emacs/manual/html_node/" -- infomanual_basedir["elisp"] = "http://www.gnu.org/software/emacs/elisp-manual/html_node/" find_node2 = function (manual, section) if not manual or not section then return end -- print(manual, section) basedir = infomanual_basedir[manual] -- print(basedir) if not basedir then return end return basedir .. infonodehtmlname(string.gsub(section, "%s+", " ")) .. ".html" end find_node = function (nodename) if not nodename then return end local manual, section = string.match(nodename, "^%(([^()]+)%)(.*)$") -- print(nodename, manual, section) return find_node2(manual, section) end -- file:///home/edrx/TH/L/blogme3/angglisp.lua.html -- (find-node "(elisp)Symbols") -- (find-node "(elisp)Symbols") -- (find-elnode "Symbols") -- (find-elnode "Backups and Auto-Saving" "auto-") -- (find-elinode "More Complex") -- (find-node "(libc)Sockets") -- (find-node "(libc)I/O Overview") -- (find-node "(make)") -- (find-node "(grub)Naming convention") -- (find-node "(gawk)") set_E4("find-node", function (all, funname, qnode) return makesexphtml(all, funname, _EHELP[funname], find_node(dequote(qnode))) end, eevarticle.."#hyperlinks", "") _E_remotenode = function (all, funname, qnode) local node = dequote(qnode) return makesexphtml(all, funname, _EHELP[funname], find_node2(_EBASE[funname], node)) end code_c_m_b = function (c, manual, basedir) infomanual_basedir[manual] = basedir set_E4("find-"..c.."node", _E_remotenode, eevarticle.."#shorter-hyperlinks", manual, "") end code_c_m_b("e", "emacs", "http://www.gnu.org/software/emacs/manual/html_node/emacs/") code_c_m_b("el", "elisp", "http://www.gnu.org/software/emacs/manual/html_node/elisp/") code_c_m_b("eli", "eintr", "http://www.gnu.org/software/emacs/emacs-lisp-intro/html_node/") code_c_m_b("cl", "cl", "http://www.gnu.org/software/emacs/manual/html_node/cl/") code_c_m_b("gnus", "gnus", "http://www.gnu.org/software/emacs/manual/html_node/gnus/") code_c_m_b("message", "message", "http://www.gnu.org/software/emacs/manual/html_node/message/") code_c_m_b("woman", "woman", "http://www.gnu.org/software/emacs/manual/html_node/woman/") code_c_m_b("pclcvs", "pcl-cvs", "http://www.gnu.org/software/emacs/manual/html_node/pcl-cvs/") code_c_m_b("autotype", "autotype", "http://www.gnu.org/software/emacs/manual/html_node/autotype/") code_c_m_b("libc", "libc", "http://www.gnu.org/software/libc/manual/html_node/") code_c_m_b("make", "make", "http://www.gnu.org/software/make/manual/html_node/") code_c_m_b("grub", "grub", "http://www.gnu.org/software/grub/manual/html_node/") code_c_m_b("gawk", "gawk", "http://www.gnu.org/software/gawk/manual/html_node/") code_c_m_b("texi", "texinfo", "http://www.gnu.org/software/texinfo/manual/texinfo/html_node/") code_c_m_b("gcc", "gcc-4.1", "http://gcc.gnu.org/onlinedocs/gcc-4.2.2/gcc/") code_c_m_b("coreutils", "coreutils", "http://www.gnu.org/software/coreutils/manual/html_node/") code_c_m_b("bash", "bash", "http://www.gnu.org/software/bash/manual/html_node/") code_c_m_b("bash", "bashref", "http://www.gnu.org/software/bash/manual/html_node/") code_c_m_b("wget", "wget", "http://www.gnu.org/software/wget/manual/html_node/") -- (find-womannode "Introduction") -- (find-pclcvsnode "") -- http://directory.fsf.org/ -- -- http://www.gnu.org/software/emacs/manual/index.html -- http://sourceware.org/gdb/current/onlinedocs/gdb.html -- http://www.gnu.org/software/gdb/documentation/ -- http://www.gnu.org/software/gdb/gdb.html -- http://www.gnu.org/software/hurd/doc/hurd_toc.html -- http://www.gnu.org/software/hurd/gnumach-doc/index.html --------[ Experimental, 2007jun10 ]-------- -- «code_ps» (to ".code_ps") eevcurrent = "http://angg.twu.net/eev-current/" _E_remoteps = function (all, funname) return makesexphtml(all, funname, _EHELP[funname], _EBASE[funname]) end code_ps = function (c, psurl) set_E4("find-"..c.."page", _E_remoteps, eevcurrent.."eev.el.html#code-ps", psurl) set_E4("find-"..c.."text", _E_remoteps, eevcurrent.."eev.el.html#code-ps", psurl) end code_ps("luaimp", "http://www.tecgraf.puc-rio.br/~lhf/ftp/doc/jucs05.pdf") code_ps("luanofrills", "http://luaforge.net/docman/view.php/83/98/ANoFrillsIntroToLua51VMInstructions.pdf") -- This needs an explanation... -- In emacs, (find-TH "index" "math") -- becomes: (find-angg "TH/index.blogme" "math") -- but in the htmlization, (find-TH "index" "math") -- becomes: http://angg.twu.net/index.html#math -- -- See: (find-angg ".emacs" "find-TH") -- code_c_d_angg("TH", "") -- «find-LATEX» (to ".find-LATEX") set_E4("find-LATEX", _E_localanchor, eevarticle.."#shorter-hyperlinks", "LATEX/", ".pdf") -- «find-LTX» (to ".find-LTX") -- (find-angg ".emacs" "find-LTX") set_E4("find-LTX", _E_localanchor, eevarticle.."#shorter-hyperlinks", "LATEX/", ".pdf") -- (find-luaimppage 1) -- (find-luanofrillstext) -- «ghcdoc» (to ".ghcdoc") -- (find-es "haskell" "ghc6") -- (find-ghcdocfile "") code_c_d_remote("ghcdoc", "http://www.haskell.org/ghc/docs/latest/html/") -- http://www.haskell.org/ghc/docs/latest/html/users_guide/index.html -- (find-ghcdocw3m "users_guide/index.html") code_c_d_remote("doxygendoc", "http://www.stack.nl/~dimitri/doxygen/") code_c_d_remote("qt3doc", "http://doc.trolltech.com/3.3/") code_c_d_remote("qt4doc", "http://doc.trolltech.com/4.3/") code_c_d_remote("sqlitedoc", "http://www.sqlite.org/") code_c_d_remote("apthowto", "http://www.debian.org/doc/manuals/apt-howto/") code_c_d_remote("zumbipage", "http://zumbi/~edrx/") code_c_d_remote("zumbiwiki", "http://zumbi/wiki/") code_c_d_remote("profsoftdevel", "http://zumbi/~edrx/professional_software_engineering/") code_c_d_remote("ramroot", "http://iki.fi/lindi/darcs/ramroot/") code_c_d_remote("hugsuserguide", "http://cvs.haskell.org/Hugs/pages/users_guide/") code_c_d_remote("xfigdoc", "http://xfig.org/userman/") code_c_d_remote("xfigref", "http://xfig.org/userman/") code_c_d_remote("coqv81", "http://coq.inria.fr/V8.1/") code_c_d_remote("webercap", "http://www.ne.jp/asahi/moriyuki/abukuma/weber/world/ethic/") code_c_d_remote("coqlibdoc", "http://coq.inria.fr/coq/distrib/current/stdlib/") code_c_d_remote("coqtut1", "http://coq.inria.fr/node/9") code_c_d_remote("coqtut2", "http://coq.inria.fr/node/10") code_c_d_remote("coqtut3", "http://coq.inria.fr/node/11") code_c_d_remote("coqref", "http://coq.inria.fr/coq/distrib/current/refman/") -- file:///home/edrx/TH/L/blogme3/angglisp.lua.html