From 36df714e569120f73c4edbc153964a8d152c53b4 Mon Sep 17 00:00:00 2001 From: Doug Coleman <erg@jjjj.(none)> Date: Tue, 9 Oct 2007 03:40:04 -0500 Subject: [PATCH 1/3] Print out errors when parsing .fhtml files instead of printing nothing --- extra/http/server/templating/templating.factor | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/extra/http/server/templating/templating.factor b/extra/http/server/templating/templating.factor index f22298f3b4..277f07a256 100644 --- a/extra/http/server/templating/templating.factor +++ b/extra/http/server/templating/templating.factor @@ -1,8 +1,8 @@ ! Copyright (C) 2005 Alex Chapman ! Copyright (C) 2006, 2007 Slava Pestov ! See http://factorcode.org/license.txt for BSD license. -USING: sequences kernel parser namespaces io io.files -io.streams.lines io.streams.string html html.elements +USING: continuations sequences kernel parser namespaces io +io.files io.streams.lines io.streams.string html html.elements source-files debugger combinators math quotations generic strings splitting ; @@ -70,6 +70,9 @@ DEFER: <% delimiter : eval-template ( string -- ) parse-template call ; +: html-error. ( error -- ) + <pre> error. </pre> ; + : run-template-file ( filename -- ) [ [ @@ -77,7 +80,7 @@ DEFER: <% delimiter parser-notes off templating-vocab use+ dup source-file file set ! so that reload works properly - [ <file-reader> contents eval-template ] keep + [ <file-reader> contents [ eval-template ] [ html-error. ] recover ] keep ] with-scope ] assert-depth drop ; From 536ee98b8c04ea0c26d682beecab3b820d66d0df Mon Sep 17 00:00:00 2001 From: Doug Coleman <erg@jjjj.(none)> Date: Tue, 9 Oct 2007 03:40:52 -0500 Subject: [PATCH 2/3] Make the gvim executable "gvim" instead of "vim" --- extra/editors/gvim/gvim.factor | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/extra/editors/gvim/gvim.factor b/extra/editors/gvim/gvim.factor index 009379e43b..d26bd70209 100644 --- a/extra/editors/gvim/gvim.factor +++ b/extra/editors/gvim/gvim.factor @@ -5,8 +5,10 @@ TUPLE: gvim ; M: gvim vim-command ( file line -- string ) [ - "\"" % vim-path get % "\" --remote-tab-silent " % + "\"" % vim-path get % "\"" % + vim-switches get [ % ] when* "+" % # " \"" % % "\"" % ] "" make ; T{ gvim } vim-editor set-global +"gvim" vim-path set-global From 769680503722308cc64e38253ba001b049659880 Mon Sep 17 00:00:00 2001 From: Slava Pestov <slava@factorcode.org> Date: Wed, 10 Oct 2007 17:47:38 -0400 Subject: [PATCH 3/3] Templating fix --- extra/http/server/templating/templating.factor | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/extra/http/server/templating/templating.factor b/extra/http/server/templating/templating.factor index f22298f3b4..f8022c0a58 100644 --- a/extra/http/server/templating/templating.factor +++ b/extra/http/server/templating/templating.factor @@ -77,7 +77,10 @@ DEFER: <% delimiter parser-notes off templating-vocab use+ dup source-file file set ! so that reload works properly - [ <file-reader> contents eval-template ] keep + [ + ?resource-path <file-reader> contents + eval-template + ] keep ] with-scope ] assert-depth drop ;