Warning: this is an htmlized version!
The original is here, and the conversion rules are here. |
####### # # E-scripts on Scite and Scintilla. # # 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. # An introduction to eev can be found here: # # (find-eev-quick-intro) # http://angg.twu.net/eev-intros/find-eev-quick-intro.html # # 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 <http://angg.twu.net/e/scintilla.e> # or at <http://angg.twu.net/e/scintilla.e.html>. # See also <http://angg.twu.net/emacs.html>, # <http://angg.twu.net/.zshrc[.html]>, # <http://angg.twu.net/escripts.html>, # and <http://angg.twu.net/>. # ####### (find-es "davinci") (find-es "iup") (find-es "scintilla") Note: I'm trying to split my notes about the DaVinci project into several e-script files (iup.e, davinci.e, scintilla.e, ...) - but at the moment there are lots of duplications and lots of garbage... # «.scite-from-debsrc» (to "scite-from-debsrc") # «.scite-upstream» (to "scite-upstream") # «.scite-in-gdb» (to "scite-in-gdb") # «.command-subsystem» (to "command-subsystem") # «.calling-lua-from-scite» (to "calling-lua-from-scite") # «.scite-properties-file» (to "scite-properties-file") # «.panes» (to "panes") # «.mailing-lists» (to "mailing-lists") # «.scite-gdb» (to "scite-gdb") # «.tcmd.tcl» (to "tcmd.tcl") # «.tcmd-screenshot» (to "tcmd-screenshot") # «.testing-intro.lua» (to "testing-intro.lua") # «.bait» (to "bait") # «.compiling-bait-by-hand» (to "compiling-bait-by-hand") ##### # # scite-1.71 from the Debian sources # 2007jun25 # ##### # «scite-from-debsrc» (to ".scite-from-debsrc") # http://ftp.debian.org/debian/pool/main/s/scite/ # http://ftp.debian.org/debian/pool/main/s/scite/scite_1.71-1.dsc # http://ftp.debian.org/debian/pool/main/s/scite/scite_1.71-1.diff.gz # http://ftp.debian.org/debian/pool/main/s/scite/scite_1.71.orig.tar.gz #* rm -Rv ~/usrc/scite/ mkdir ~/usrc/scite/ cd $S/http/ftp.debian.org/debian/pool/main/s/scite/ cp -v scite_1.71* ~/usrc/scite/ cd ~/usrc/scite/ dpkg-source -sn -x scite_1.71-1.dsc cd ~/usrc/scite/scite-1.71/ find * | sort > .files cd ~/usrc/scite/scite-1.71/ dpkg-buildpackage -us -uc -b -rfakeroot |& tee odb #* apti libgtk2.0-dev libglib2.0-dev dpatch apti fakeroot #* # (code-c-d "scite" "~/usrc/scite/scite-1.71/" :grep) # (code-c-d "scitedoc" "~/usrc/scite/scite-1.71/scite/doc/" :grep) # (find-scitefile "") # (find-scitedocfile "") # (find-scitegrep "grep -niH -e lua $(find * | grep -iv lua)") # (find-scitegrep "grep -niH -e PrintHi $(find *)") # (find-fline "/usr/share/scite/") # (find-w3m "/usr/share/scite/SciTE.html") # (find-w3m "/usr/share/scite/SciTEExtension.html") # (find-w3m "/usr/share/scite/SciTEDirector.html") # (find-w3m "/usr/share/scite/SciTELua.html") # (find-w3m "/usr/share/scite/SciTEDoc.html") # (find-scitefile ".files") # (find-scitefile "scite/doc/") # (find-scitew3m "scite/doc/SciTELua.html") # (find-scitefile "scite/scripts/Fixer.py") ##### # # scite-1.74 (upstream) # 2007jul16 # ##### # «scite-upstream» (to ".scite-upstream") # Scite 1.74 is the first version to come with Lua 5.1 (not 5.0.2). # http://ufpr.dl.sourceforge.net/sourceforge/scintilla/scite174.tgz #* rm -Rv ~/usrc/scite174/ mkdir ~/usrc/scite174/ tar -C ~/usrc/scite174/ -xvzf \ $S/http/ufpr.dl.sourceforge.net/sourceforge/scintilla/scite174.tgz cd ~/usrc/scite174/ find * -type f | sort > .files find * -type f -name '*.[ch]' | sort > .files.ch find * -type f -name '*.[ch]' -or -name '*.cxx' | sort > .files.ch etags $(cat .files.ch) cd ~/usrc/scite174/scintilla/gtk/ # make |& tee om make DEBUG=1 |& tee om cd ~/usrc/scite174/scite/gtk/ # make |& tee om make DEBUG=1 |& tee om #* # (code-c-d "scite174" "~/usrc/scite174/" :grep :gdb) # (find-scite174file "scintilla/gtk/") # (find-scite174file "scintilla/gtk/om") # (find-scite174file "scintilla/gtk/makefile") # (find-scite174file "scite/gtk/") # (find-scite174file "scite/gtk/om") # (find-scite174file "scite/gtk/makefile") # (find-scite174file "") # (find-scite174file "scite/README") # (find-scite174file "scite/") # (find-scite174file "scite/doc/") # (find-scite174tag "main") # (find-scite174w3m "scintilla/doc/ScintillaHistory.html") # (find-scite174w3m "scintilla/doc/ScintillaHistory.html" "Lua 5.1") # (find-angg "DAVINCI/") # (find-angg "DAVINCI/intro.lua") #* cd ~/DAVINCI/ ~/usrc/scite174/scite/bin/SciTE intro.lua #* ##### # # gdb'ing scite # 2007aug20 # ##### # «scite-in-gdb» (to ".scite-in-gdb") # (find-angg ".emacs" "eepitch-gdb-scite") # (find-scite174file "") # (find-scite174sh "cd scite/bin; ls -lAF") # (find-scite174sh "cd scite/bin; ldd SciTE | sort") # (find-scite174file "scintilla/README" "static linking") # (find-scite174file "scintilla/") (defun eepitch-gdb-scite () (eepitch-gdb "*gud-SciTE*" "gdb --annotate=3 ~/usrc/scite174/scite/bin/SciTE")) (defun eepitch-gdb-scite-kill () (eepitch-gdb-kill "*gud-SciTE*")) * (eepitch-gdb-scite-kill) * (eepitch-gdb-scite) tbr main run ptype MultiplexExtension ptype Extension tbr SciTEGTK::Run tbr SciTEGTK::CreateUI # (find-scite174file "scite/gtk/SciTEGTK.cxx" ": SciTEBase(ext)") # (find-scite174tag "main") # (find-scite174tag "SciTEGTK::scite") # (find-scite174tag "SciTEGTK::Run") # (find-scite174tag "SciTEGTK::CreateUI") # (find-scite174file "scite/gtk/SciTEGTK.cxx" "// The Menubar") # (find-scite174file "scite/gtk/SciTEGTK.cxx" "wEditor = scintilla_new();") # (find-scite174file "scite/gtk/SciTEGTK.cxx" "UIAvailable();") # (find-scite174tag "MultiplexExtension") # (find-scite174tag "Extension") # (find-esgrep "grep -niH -e signal *.e") # (find-es "lua5" "signal") # (find-man "7 signal" "SIGCHLD") ##### # # "Command Subsystem" in SciTe # 2007aug11 # ##### # «command-subsystem» (to ".command-subsystem") # (find-scite174grep "grep -niH -e subsystem $(find *)") # (find-scite174grep "grep -niH -e subsystemtype $(find *)") ##### # # Using Lua from SciTe # 2007jul06 # ##### # http://lua-users.org/wiki/UsingLuaWithScite # http://lua-users.org/wiki/SciteScripts # http://www.geocities.com/keinhong/ # http://www.geocities.com/keinhong/scintilla.html # http://www.geocities.com/keinhong/scite/index.html # http://www.geocities.com/keinhong/scitemacros.html # http://www.geocities.com/keinhong/SciTELuaExporters.html # For quick access (w3m doesn't like local html files without ".html"): #* cd $S/http/lua-users.org/wiki/ ls | grep '^[A-Za-z0-9]*$' for i in $(ls | grep '^[A-Za-z0-9]*$'); do echo $i; done for i in $(ls | grep '^[A-Za-z0-9]*$'); do cp -av $i $i.html; done #* cp -v UsingLuaWithScite UsingLuaWithScite.html # Now brwl should work: # http://lua-users.org/wiki/UsingLuaWithScite.html ##### # # calling lua from scite # 2007jul06 # ##### # «calling-lua-from-scite» (to ".calling-lua-from-scite") # http://lua-users.org/wiki/UsingLuaWithScite # http://lua-users.org/wiki/UsingLuaWithScite.html # http://lua-users.org/wiki/SciteScripts # (find-scitew3m "scite/doc/") # (find-scitew3m "scite/doc/SciTELua.html" "Lua is currently loaded just-in-time") # (find-scitefile "odb" "dpatch apply-all") # (find-scitefile "") # (find-scitefile "debian/patches/") # (find-scitegrep "grep -nH -e subsystem $(find *)") ##### # # the sciteuser-properties file # 2007jul06 # ##### # «scite-properties-file» (to ".scite-properties-file") # (find-angg ".SciTEUser.properties") # (find-angg ".zshrc" "strace") # http://lua-users.org/wiki/UsingLuaWithScite # (find-luawikiw3m "UsingLuaWithScite.html") # (find-scitew3m "scite/doc/SciTEDoc.html" "\nProperties file\n") # (find-scitew3m "scite/doc/SciTEDoc.html" "command.go.$(file.patterns.html)") # (find-scitew3m "scite/doc/SciTEDoc.html" "On Windows, the global properties file") # Screenshot: # http://angg.twu.net/IMAGES/scite-running-lua.png #* cat > ~/.SciTEUser.properties <<'%%%' command.name.1.*=Load Lua command.1.*=dofile $(FilePath) command.subsystem.1.*=3 %%% strace-to ~/s \ scite /tmp/foo.lua & grep -i user ~/s #* # (find-fline "~/s") # (find-fline "/usr/share/scite/Embedded.properties") # (find-scitefile "") # (find-scitefile "scite/gtk/SciTEGTK.cxx" "/Options/Use _Monospaced Font") # (find-scitefile "scite/gtk/SciTEGTK.cxx" "/Options/Open Lua Startup Scr_ipt") # (find-scitedocw3m "SciTELua.html" "command.name.1.*=") It works - Tools -> Load Lua Ctrl+1 It opens a separate pane. print(_VERSION) -> 5.0.2 # (find-scitefile "scintilla/include/Scintilla.iface") # (find-scitegrep "grep -nH -e Scintilla.iface $(cat .files)") # (find-scitedocw3m "SciTELua.html" "Scintilla.iface") # (find-scitegrep "grep -nH -e GetSelText $(cat .files)") # (find-scitegrep "grep -nH -e 2161 $(cat .files)") # (find-scitegrep "grep -nH -e SCI_GETSELTEXT $(cat .files)") # (find-scitefile "scite/src/IFaceTable.cxx" "GetSelText") # (find-scitefile "scintilla/include/Scintilla.h" "#define SCI_GETSELTEXT 2161") # (find-scitefile "scintilla/src/Editor.cxx" "case SCI_GETSELTEXT:") # (find-scitegrep "grep -niH -e monospaced $(cat .files)") # (find-scitefile "scite/gtk/SciTEGTK.cxx" "Options/Use _Monospaced Font") # (find-scitegrep "grep -nH -e IDM_MONOFONT $(cat .files)") # (find-scitefile "scite/src/SciTE.h" "#define IDM_MONOFONT") # (find-scitegrep "grep -nH -e 450 $(cat .files)") # (find-scitefile "scite/src/SciTEBase.cxx" "case IDM_MONOFONT:") # (find-scitedocw3m "SciTEDoc.html" "font.monospace") # (find-scitedocw3m "SciTEDoc.html" "wrap.style") # (find-scitedocw3m "SciTEDoc.html" "fore:#FF0000,font:Courier,size:14") ##### # # panes in SciTe # 2007jul16 # ##### # «panes» (to ".panes") # (find-scitedocw3m "SciTEDoc.html" "output pane") # "print" in SciTe's Lua extension is something that prints to the output pane. # "Panes" in SciTe correspond to "windows" in Emacs (not "frames"). # How do I do, in Scite... # C-x o # C-x 2 # etc? # And what about find-file, and going back? ##### # # Mailing lists # ##### # «mailing-lists» (to ".mailing-lists") http://www.scintilla.org/ http://mailman.lyra.org/pipermail/scintilla-interest/ http://mailman.lyra.org/pipermail/scite-interest/ http://news.gmane.org/gmane.comp.lib.scintilla.devel http://news.gmane.org/gmane.editors.scite.general http://lists.luaforge.net/pipermail/iup-users/ getlinks < $S/http/mailman.lyra.org/pipermail/scite-interest/index.html grep .txt.gz < ~/snarf/http/mailman.lyra.org/pipermail/scite-interest/index.html" A=( 2007-July 2007-June 2007-May 2007-April 2007-March 2007-February 2007-January 2006-December 2006-November 2006-October 2006-September 2006-August 2006-July 2006-June 2006-May 2006-April 2006-March 2006-February 2006-January 2005-December 2005-November 2005-October 2005-September 2005-August 2005-July 2005-June 2005-May 2005-April 2005-March 2005-February 2005-January 2004-December 2004-November 2004-October 2004-September 2004-August 2004-July 2004-June 2004-May 2004-April 2004-March 2004-February 2004-January 2003-December 2003-November 2003-October 2003-September 2003-August 2003-July 2003-June 2003-May 2003-April 2003-March 2003-February 2003-January 2002-December 2002-November 2002-October 2002-September 2002-August 2002-July 2002-June 2002-May 2002-April 2002-March 2002-February 2002-January 2001-December 2001-November 2001-October ) for i in $A; do psne http://mailman.lyra.org/pipermail/scite-interest/$i.txt.gz; done ##### # # scite-gdb # 2007aug03 # ##### # «scite-gdb» (to ".scite-gdb") # http://mailman.lyra.org/pipermail/scite-interest/2007-June/ # http://mailman.lyra.org/pipermail/scite-interest/2007-June/009150.html # http://mailman.lyra.org/pipermail/scite-interest/2007-June/009152.html # http://mailman.lyra.org/pipermail/scite-interest/2007-June/009335.html # http://mysite.mweb.co.za/residents/sdonovan/scite-gdb/scite-gdb.zip # http://mysite.mweb.co.za/residents/sdonovan/scite-gdb/screenshot.png #* rm -Rv ~/usrc/scite-gdb/ unzip -d ~/usrc/ \ $S/http/mysite.mweb.co.za/residents/sdonovan/scite-gdb/scite-gdb.zip cd ~/usrc/scite-gdb/ #* # (code-c-d "scitegdb" "~/usrc/scite-gdb/") # (find-scitegdbfile "") # (find-scitegdbfile "scite_lua/") # (find-scitegdbw3m "documentation.html") # (find-scitegdbw3m "extman.html") ##### # # tcmd # 2007jul04 # ##### # «tcmd.tcl» (to ".tcmd.tcl") # (find-angg "DAVINCI/tcmd.tcl") # (find-angg "TH/davinci.blogme") # http://angg.twu.net/DAVINCI/tcmd.tcl # http://angg.twu.net/DAVINCI/tcmd.tcl.html # http://angg.twu.net/DAVINCI/tcmd-1.png # http://www.tecgraf.puc-rio.br/luacmd/debug.gif # http://www.tecgraf.puc-rio.br/luacmd/ ##### # # TCmd: code to take a screenshot # 2007jul04 # ##### # «tcmd-screenshot» (to ".tcmd-screenshot") # (set-face-bold-p 'comint-highlight-input nil) # (set-face-bold-p 'comint-highlight-input t) * (eepitch-shell) * (eepitch-kill) * (eepitch-shell) cd ~/DAVINCI/tcmd.tcl & echo setfile ~/usrc/lua-5.1.2/test/fib.lua > /tmp/ee.tcmd.tcl kill -USR2 $(cat /tmp/ee.tcmd.pid) echo -e 'setvars "n = 4\nN = 1"' > /tmp/ee.tcmd.tcl kill -USR2 $(cat /tmp/ee.tcmd.pid) echo setline 5 > /tmp/ee.tcmd.tcl kill -USR2 $(cat /tmp/ee.tcmd.pid) echo setline 6 > /tmp/ee.tcmd.tcl kill -USR2 $(cat /tmp/ee.tcmd.pid) kill $(cat /tmp/ee.tcmd.pid) # Upload: Scp ~/DAVINCI/tcmd-1.png edrx@angg.twu.net:slow_html/DAVINCI/ ##### # # Testing intro.lua # 2007jul19 # ##### # «testing-intro.lua» (to ".testing-intro.lua") # (find-angg "DAVINCI/intro.lua") # (find-angg "DAVINCI/tcmd.tcl") # Install Tcl/Tk and Expect. # (Packages are available for most distributions). # Download and compile SciTe 1.74 (upstream). # Install the dependencies; get the list from: # http://ftp.debian.org/debian/pool/main/s/scite/scite_1.71-1.dsc # (find-es "davinci" "scite-upstream") mkdir ~/DAVINCI/ cd ~/DAVINCI/ wget http://angg.twu.net/DAVINCI/intro.lua wget http://angg.twu.net/DAVINCI/tcmd.tcl wget http://angg.twu.net/LUA/lua50init.lua * (eepitch-shell) # (find-angg "DAVINCI/intro.lua") cd ~/DAVINCI/ ~/usrc/scite174/scite/bin/SciTE intro.lua & * (eepitch-shell) kill $(cat /tmp/ee.tcmd.pid) * (eepitch-kill) * (eepitch-shell) cd ~/DAVINCI/ ./tcmd.tcl & ~/usrc/scite174/scite/bin/SciTE intro.lua & # (find-angg "DAVINCI/tcmd.tcl") kill $(cat /tmp/ee.tcmd.pid) cd ~/DAVINCI/ ./tcmd.tcl & * (eepitch-shell) cd ~/DAVINCI/ cp -v ~/usrc/lua-5.1.2/test/fib.lua . kill $(cat /tmp/ee.tcmd.pid) ~/DAVINCI/tcmd.tcl & * (eepitch-lua51) tcmd = function (tclcode) writefile("/tmp/ee.tcmd.tcl", tclcode) local output = getoutput("kill -USR2 $(cat /tmp/ee.tcmd.pid)") if output ~= "" then error(output) end end tcmd("setfile fib.lua") tcmd('setvars "n = 4\nN = 1"') tcmd("setline 5") tcmd("setline 6") # (find-scitegrep "grep -niH -e '\"editor\"' $(find *)") # (find-scitefile "scite/src/LuaExtension.cxx" "\"editor\"") ##### # # Scite ST and friends # 2007jul24 # ##### http://caladbolg.net/scite.php http://caladbolg.net/scite/images/pm.png http://caladbolg.net/scite_snippets.php http://caladbolg.net/scite_st.php http://scite-tools.googlecode.com/svn/trunk/scripts/doc/snippets_doc.txt http://scitetools.wordpress.com/ ##### # # bait # 2007sep04 # ##### # «bait» (to ".bait") # (find-scite174w3m "scintilla/doc/ScintillaRelated.html") # (find-scite174w3m "scintilla/doc/ScintillaDoc.html") # (find-scite174w3m "scintilla/doc/ScintillaDoc.html" "Bait") # http://www.scintilla.org/bait.zip #* # (eepitch-shell) rm -v ~/usrc/scintilla cd ~/usrc/ ln -sfv scite174/scintilla . ls -l scintilla #* rm -Rv ~/usrc/bait/ mkdir ~/usrc/bait/ unzip -d ~/usrc/bait/ $S/http/www.scintilla.org/bait.zip cd ~/usrc/bait/ # make |& tee om make CXXFLAGS="-DGTK -DSCI_LEXER -W -Wall -O0 -g" |& tee om #* # (code-c-d "bait" "~/usrc/bait/") # (find-baitfile "") # (find-baitfile "Makefile") # (find-baitfile "bait.c") * (eepitch-gdb-bait-kill) * (eepitch-gdb-bait) tbr main run ##### # # bait - notes on compiling by hand # 2007sep05 # ##### # «compiling-bait-by-hand» (to ".compiling-bait-by-hand") # I wrote this because I didn't want to create a symlink # ~/usrc/scintilla/ -> ~/usrc/scite174/scintilla/ ... # but I did something wrong here (probably related to omitting # the "Lex*.o" files), and I ended up having to debug the # call to the linker... # INCLUDEDIRS=-I../scintilla/include # CXXFLAGS= -DGTK -DSCI_LEXER -W -Wall # LEXEROBJS=$(wildcard ../scintilla/gtk/Lex*.o) # .c.o: # gcc `pkg-config --cflags gtk+-2.0` $(INCLUDEDIRS) $(CXXFLAGS) -c $< -o $@ # bait: bait.o $(LEXEROBJS) ../scintilla/bin/scintilla.a # gcc `pkg-config --libs gtk+-2.0 gthread-2.0` -lstdc++ -DGTK $^ -o $@ * (eepitch-shell) * (eepitch-kill) * (eepitch-shell) cd ~/usrc/bait/ gcc `pkg-config --cflags gtk+-2.0` \ -I$HOME/usrc/scite174/scintilla/include/ \ -DGTK -DSCI_LEXER -W -Wall -O0 \ -c bait.c -o bait.o * (eepitch-shell) * (eepitch-kill) * (eepitch-shell) #* cd ~/usrc/bait/ gcc \ bait.o \ ~/usrc/scite174/scintilla/bin/scintilla.a \ `pkg-config --libs gtk+-2.0 gthread-2.0` \ -o bait |& tee og #* # ~/usrc/scite174/scintilla/gtk/Lex*.o \ # (find-node "(gcc-4.1)Link Options") # (find-scite174sh "cd scintilla/bin/; nm scintilla.a") # (find-scite174sh "cd scintilla/bin/; nm scintilla.a --defined-only") # (find-scite174sh "cd scintilla/bin/; nm scintilla.a --defined-only -C") # (find-scite174sh "nm --defined-only -C scintilla/bin/scintilla.a") # (find-scite174sh "nm --defined-only -C scintilla/bin/scintilla.a" "scintilla_new") # (find-scite174file "") # (find-scite174file "scintilla/gtk/") # (find-scite174file "scintilla/gtk/makefile") # (find-scite174file "scintilla/gtk/om") # (find-scite174file "scintilla/gtk/makefile" "COMPLIB=../bin/scintilla.a") # (find-scite174file "scintilla/gtk/makefile" "$(COMPLIB):") # (find-scite174file "scite/gtk/makefile") # (find-scite174file "scite/gtk/om") # (find-scite174file "scite/gtk/om" "scintilla.a") # (find-scite174file "scite/gtk/makefile" "$(PROG):") # (find-scite174file "scite/gtk/makefile" "CONFIGLIB=") # (find-node "(make)Selective Search") # (find-baitfile "og") # (find-sh "pkg-config --libs gtk+-2.0 gthread-2.0") # (find-fline "~/usrc/scite174/scintilla/include/") # (find-fline "~/usrc/scite174/scintilla/gtk/") # (find-scite174file "scintilla/gtk/") # (find-scite174file "scintilla/gtk/om") # Examples for W32: # http://scintilla.sourceforge.net/Steps.html # http://www.scintilla.org/dmapp.zip # Local Variables: # coding: utf-8-unix # End: