# HG changeset patch # User Robert McIntyre # Date 1319530111 25200 # Node ID 73beed20f7ded8af9fd38cf7e44940ae79333399 # Parent ce96610fe058ce756d60d648f40e23cc26ae93fe going to move refreshing the page to auto-weave diff -r ce96610fe058 -r 73beed20f7de auto-weave.pl --- a/auto-weave.pl Mon Oct 24 09:41:38 2011 -0700 +++ b/auto-weave.pl Tue Oct 25 01:08:31 2011 -0700 @@ -11,7 +11,7 @@ @org_files = glob("./org/*.org"); $" = "\n"; -print "@org_files"; +print "@org_files\n"; foreach(@org_files){ @@ -21,22 +21,26 @@ my $e = shift; my $name = $e->fullname; print "$name was modified\n" if $e->IN_MODIFY; - `weave $name`; + system ("weave $name"); + print ("$name\n"); + $path = `readlink -f $name`; + $path =~ s|/home/r/proj|http://aurellem.localhost|; + print ("$path\n"); + $path =~ s|org|html|g; + print ("$path\n"); + system ("firefox $path"); + }); - - - - } # integration into AnyEvent (works with EV, Glib, Tk, POE...) -my $inotify_w = AnyEvent->io - ( - fh => $inotify->fileno, poll => 'r', cb => sub { $inotify->poll } - ); +#my $inotify_w = AnyEvent->io +# ( +# fh => $inotify->fileno, poll => 'r', cb => sub { $inotify->poll } +# ); # manual event loop 1 while $inotify->poll; diff -r ce96610fe058 -r 73beed20f7de tangle.sh --- a/tangle.sh Mon Oct 24 09:41:38 2011 -0700 +++ b/tangle.sh Tue Oct 25 01:08:31 2011 -0700 @@ -17,4 +17,4 @@ (mapc (lambda (file) (find-file (expand-file-name file \"$DIR\")) (org-babel-tangle) - (kill-buffer)) '($FILES)))" 2>&1 | pcregrep '(Wrote)|(tangled)' + (kill-buffer)) '($FILES)))" diff -r ce96610fe058 -r 73beed20f7de weave.sh --- a/weave.sh Mon Oct 24 09:41:38 2011 -0700 +++ b/weave.sh Tue Oct 25 01:08:31 2011 -0700 @@ -9,7 +9,11 @@ dir=`dirname $org` -emacsclient \ +emacs \ +-l /home/r/config/emacs/clojure-init.el \ +-l /home/r/config/emacs/org-init.el \ +-l /home/r/config/emacs/web-color.el \ +--batch \ --eval " (progn (setq org-publish-project-alist