Error processing request

Parameters

CONTENT_LENGTH0
REQUEST_METHODGET
REQUEST_URI/revision/Balancing+Open+and+Close+Quotes+in+a+TK+text+widget%2E?V=10
QUERY_STRINGV=10
CONTENT_TYPE
DOCUMENT_URI/revision/Balancing+Open+and+Close+Quotes+in+a+TK+text+widget.
DOCUMENT_ROOT/var/www/nikit/nikit/nginx/../docroot
SCGI1
SERVER_PROTOCOLHTTP/1.1
HTTPSon
REMOTE_ADDR172.71.254.42
REMOTE_PORT22728
SERVER_PORT4443
SERVER_NAMEwiki.tcl-lang.org
HTTP_HOSTwiki.tcl-lang.org
HTTP_CONNECTIONKeep-Alive
HTTP_ACCEPT_ENCODINGgzip, br
HTTP_X_FORWARDED_FOR3.138.34.158
HTTP_CF_RAY876c1942389e2323-ORD
HTTP_X_FORWARDED_PROTOhttps
HTTP_CF_VISITOR{"scheme":"https"}
HTTP_ACCEPT*/*
HTTP_USER_AGENTMozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; [email protected])
HTTP_CF_CONNECTING_IP3.138.34.158
HTTP_CDN_LOOPcloudflare
HTTP_CF_IPCOUNTRYUS

Body


Error

Unknow state transition: LINE -> END

-code

1

-level

0

-errorstack

INNER {returnImm {Unknow state transition: LINE -> END} {}} CALL {my render_wikit {Balancing Open and Close Quotes in a TK text widget.} \[WJG\]\ (04/11/07)\ This\ week\ I've\ spent\ too\ many\ hours\ using\ \[OpenOffice\]\ correcting\ simple\ single\ and\ double\ quotes\ in\ page\ after\ page\ of\ text\ files\ created\ in\ my\ Tk\ based\ text\ editor.\ Pity\ I\ didn't\ sit\ down\ and\ complete\ the\ following\ proc\ and\ use\ it\ some\ time\ ago.\nIf\ anyone\ has\ any\ suggestion\ please\ include\ them\ but\ please\ don't\ change\ the\ original\ code\ -just\ add\ comments\ to\ the\ end\ of\ the\ file.\n\n======\n\ #---------------\n\ #\ balanceQuotes.tcl\n\ #---------------\n\ #\ William\ J\ Giddings\n\ #\ 04/11/07\n\ #---------------\n\ #\ Enable\ context\ sensitive\ quotations.\n\ #\ If\ the\ input\ quote\ mark\ is\ preceded\ by\ a\ printable\ character,\n\ #\ then\ closequote\ otherwise\ openquote!\n\ #\ \n\ #---------------\n\ #\ Notes:\n\ #\ This\ is\ not\ \"smart\"\ and\ so\ doesn't\ attempt\ to\ balance\ quote\ marks.\n\ #---------------\n\n\ #!/bin/sh\ \\\n\ exec\ tclsh\ \ \"\$0\"\ \"\$@\"\n\n\ package\ require\ Tk\n\n\ #---------------\n\ #\ w\ \ \ \ text\ widget\ into\ which\ the\ substition\ is\ to\ be\ made\n\ #\ c\ \ \ \ character\ currently\ inserted\n\ #---------------\n\ proc\ balanceQuotes\ \{w\ c\}\ \{\n\n\ \ \ \ #get\ the\ preceding\ character\n\ \ \ \ set\ idx\ \[\$w\ index\ insert\]\n\ \ \ \ set\ str\ \[\$w\ get\ \"\$idx\ -1char\"\ \$idx\]\n\n\ \ \ \ #\ if\ null\ is\ returned,\ it\ must\ be\ the\ start\ of\ a\ line\n\ \ \ \ #\ so\ make\ it\ whitespace\n\ \ \ \ if\ \{\$str\ ==\ \"\"\ \}\ \{set\ str\ \"\ \"\}\n\ \ \ \ \n\ \ \ \ #\ check\ for\ character\ types\n\ \ \ \ #\ the\ character\ class\ print\ is\ not\ used\ as\ <space>\ is\ printable!\n\ \ \ \ if\ \{\ \[string\ is\ wordchar\ \$str\]\ ||\ \[string\ is\ punct\ \$str\]\ \}\ \{\ \ \ \ \ \ \ \n\n\ \ \ \ \ \ \ \ #\ check\ if\ the\ previous\ character\ is\ an\ open\ quote.\n\ \ \ \ \ \ \ \ #\ nested\ open\ quotations\ need\ to\ be\ allowed\ for\n\ \ \ \ \ \ \ \ if\ \{\ \$str\ ==\ \"\\u2018\"\ ||\ \$str\ ==\ \"\\u201C\"\ \}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ set\ i\ 0\n\ \ \ \ \ \ \ \ \}\ else\ \ \{\n\ \ \ \ \ \ \ \ \ \ \ \ set\ i\ 1\n\ \ \ \ \ \ \ \ \}\n\n\ \ \ \ \ \ \ \ if\ \{\$c\ ==\ \"apostrophe\"\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ if\ \{\$i\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \$w\ insert\ insert\ \\u2019\ \ \ \ \;#\ single\ close\n\ \ \ \ \ \ \ \ \ \ \ \ \}\ else\ \ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \$w\ insert\ insert\ \\u2018\ \ \ \ \;#\ single\ open\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \}\ else\ \ \{\n\ \ \ \ \ \ \ \ \ \ \ \ #\ must\ be\ quotedl\n\ \ \ \ \ \ \ \ \ \ \ \ if\ \{\$i\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \$w\ insert\ insert\ \\u201D\ \ \ \ \;#\ double\ close\n\ \ \ \ \ \ \ \ \ \ \ \ \}\ else\ \ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \$w\ insert\ insert\ \\u201C\ \ \ \ \;#\ double\ open\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \}\n\n\ \ \ \ \}\ else\ \ \{\n\ \ \ \ \ \ \ \ if\ \{\$c\ ==\ \"apostrophe\"\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \$w\ insert\ insert\ \\u2018\ \ \ \ \;#\ single\ open\n\ \ \ \ \ \ \ \ \}\ else\ \ \{\n\ \ \ \ \ \ \ \ \ \ \ \ #\ must\ be\ quotedl\n\ \ \ \ \ \ \ \ \ \ \ \ \$w\ insert\ insert\ \\u201C\ \ \ \ \;#\ double\ open\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \}\n\ \}\n\n\ #---------------\n\ #\ Demo\n\ #---------------\n\ set\ txt\ \[text\ .txt\ -font\ \{Sans\ 15\}\]\n\ pack\ \$txt\n\n\ bind\ \$txt\ <Key-apostrophe>\ \{\ balanceQuotes\ %W\ %K\ \;\ break\ \}\n\ bind\ \$txt\ <Key-quotedbl>\ \{\ balanceQuotes\ %W\ %K\ \;\ break\ \}\n\n----\n\n\[MG\]\ gets\ an\ error\ about\ \"apostrophe\"\ not\ being\ a\ valid\ keysym\;\ I\ think\ maybe\ it\ should\ be\ \"quoteright\"?\n\n\[WJG\]\ (05/11/07)\ It\ all\ works\ fine\ on\ my\ machine.\n\n\[MG\]\ That's\ weird\;\ I\ thought\ the\ keysyms\ were\ the\ same\ across\ all\ platforms.\ What\ system\ are\ you\ using?\ (Mine\ is\ Tcl\ 8.4.9\ /\ 8.5a1\ on\ Win\ XP\ SP2)\n\n\[WJG\]\ (06/11/07)\ Suse\ 10.1,\ Tcl\ 8.4.12.\ My\ code\ is\ fine.\ Does\ your\ system\ generate\ a\n\"quoteright\"\ keysym\ when\ the\ error\ occurs?\ I\ can't\ find\ that\ listed\ in\ my\ docs.\ Try\ the\ following\ binding\ on\ a\ text\ widget\ to\ check\ what\ keysym\ your\ system\ generates.\n\n\ console\ show\n\ set\ txt\ \[text\ .txt\]\n\ pack\ \$txt\n\ bind\ \$txt\ <Key>\ \{\ puts\ %K\ \}\n\n\[MG\]\ Sorry\;\ I\ answered\ this\ before,\ but\ it\ seems\ to\ have\ disappeared.\ Yeah,\ for\ me\ the\ apostrophe\ key\ generates\ a\ \"quoteright\"\ keysym,\ and\ that's\ what's\ listed\ in\ the\ keysym\ helpfile\ I\ have\ (the\ Win\ .chm\ from\ ActiveTcl\ 8.4.9).\n\n\[LV\]\ Yea,\ there\ was\ data\ loss\ last\ week\ and\ my\ comments\ were\ lost\ as\ well.\ I\ ran\ the\ above\ code\ against\ the\ hummingbird\ Windows\ x\ server,\ and\ I\ got\ \n\n======\n'\ =>\ apostrophe\n`\ =>\ grave\n======\n\n\[WJG\]\ (16/11/07)\ Naturally,\ just\ modify\ the\ codes\ to\ suit.\ I\ guess\ some\ platform\ checking\ could\ be\ put\ in\ there\ but\ perhaps\ this\ issue\ one\ that\ Tcl\ Core\ guys\ can\ resolve\ in\ order\ to\ maintain\ cross-platform\ compatibility.\ \n\n\n\n<<categories>>\ Widget regexp2} CALL {my render {Balancing Open and Close Quotes in a TK text widget.} \[WJG\]\ (04/11/07)\ This\ week\ I've\ spent\ too\ many\ hours\ using\ \[OpenOffice\]\ correcting\ simple\ single\ and\ double\ quotes\ in\ page\ after\ page\ of\ text\ files\ created\ in\ my\ Tk\ based\ text\ editor.\ Pity\ I\ didn't\ sit\ down\ and\ complete\ the\ following\ proc\ and\ use\ it\ some\ time\ ago.\nIf\ anyone\ has\ any\ suggestion\ please\ include\ them\ but\ please\ don't\ change\ the\ original\ code\ -just\ add\ comments\ to\ the\ end\ of\ the\ file.\n\n======\n\ #---------------\n\ #\ balanceQuotes.tcl\n\ #---------------\n\ #\ William\ J\ Giddings\n\ #\ 04/11/07\n\ #---------------\n\ #\ Enable\ context\ sensitive\ quotations.\n\ #\ If\ the\ input\ quote\ mark\ is\ preceded\ by\ a\ printable\ character,\n\ #\ then\ closequote\ otherwise\ openquote!\n\ #\ \n\ #---------------\n\ #\ Notes:\n\ #\ This\ is\ not\ \"smart\"\ and\ so\ doesn't\ attempt\ to\ balance\ quote\ marks.\n\ #---------------\n\n\ #!/bin/sh\ \\\n\ exec\ tclsh\ \ \"\$0\"\ \"\$@\"\n\n\ package\ require\ Tk\n\n\ #---------------\n\ #\ w\ \ \ \ text\ widget\ into\ which\ the\ substition\ is\ to\ be\ made\n\ #\ c\ \ \ \ character\ currently\ inserted\n\ #---------------\n\ proc\ balanceQuotes\ \{w\ c\}\ \{\n\n\ \ \ \ #get\ the\ preceding\ character\n\ \ \ \ set\ idx\ \[\$w\ index\ insert\]\n\ \ \ \ set\ str\ \[\$w\ get\ \"\$idx\ -1char\"\ \$idx\]\n\n\ \ \ \ #\ if\ null\ is\ returned,\ it\ must\ be\ the\ start\ of\ a\ line\n\ \ \ \ #\ so\ make\ it\ whitespace\n\ \ \ \ if\ \{\$str\ ==\ \"\"\ \}\ \{set\ str\ \"\ \"\}\n\ \ \ \ \n\ \ \ \ #\ check\ for\ character\ types\n\ \ \ \ #\ the\ character\ class\ print\ is\ not\ used\ as\ <space>\ is\ printable!\n\ \ \ \ if\ \{\ \[string\ is\ wordchar\ \$str\]\ ||\ \[string\ is\ punct\ \$str\]\ \}\ \{\ \ \ \ \ \ \ \n\n\ \ \ \ \ \ \ \ #\ check\ if\ the\ previous\ character\ is\ an\ open\ quote.\n\ \ \ \ \ \ \ \ #\ nested\ open\ quotations\ need\ to\ be\ allowed\ for\n\ \ \ \ \ \ \ \ if\ \{\ \$str\ ==\ \"\\u2018\"\ ||\ \$str\ ==\ \"\\u201C\"\ \}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ set\ i\ 0\n\ \ \ \ \ \ \ \ \}\ else\ \ \{\n\ \ \ \ \ \ \ \ \ \ \ \ set\ i\ 1\n\ \ \ \ \ \ \ \ \}\n\n\ \ \ \ \ \ \ \ if\ \{\$c\ ==\ \"apostrophe\"\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ if\ \{\$i\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \$w\ insert\ insert\ \\u2019\ \ \ \ \;#\ single\ close\n\ \ \ \ \ \ \ \ \ \ \ \ \}\ else\ \ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \$w\ insert\ insert\ \\u2018\ \ \ \ \;#\ single\ open\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \}\ else\ \ \{\n\ \ \ \ \ \ \ \ \ \ \ \ #\ must\ be\ quotedl\n\ \ \ \ \ \ \ \ \ \ \ \ if\ \{\$i\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \$w\ insert\ insert\ \\u201D\ \ \ \ \;#\ double\ close\n\ \ \ \ \ \ \ \ \ \ \ \ \}\ else\ \ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \$w\ insert\ insert\ \\u201C\ \ \ \ \;#\ double\ open\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \}\n\n\ \ \ \ \}\ else\ \ \{\n\ \ \ \ \ \ \ \ if\ \{\$c\ ==\ \"apostrophe\"\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \$w\ insert\ insert\ \\u2018\ \ \ \ \;#\ single\ open\n\ \ \ \ \ \ \ \ \}\ else\ \ \{\n\ \ \ \ \ \ \ \ \ \ \ \ #\ must\ be\ quotedl\n\ \ \ \ \ \ \ \ \ \ \ \ \$w\ insert\ insert\ \\u201C\ \ \ \ \;#\ double\ open\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \}\n\ \}\n\n\ #---------------\n\ #\ Demo\n\ #---------------\n\ set\ txt\ \[text\ .txt\ -font\ \{Sans\ 15\}\]\n\ pack\ \$txt\n\n\ bind\ \$txt\ <Key-apostrophe>\ \{\ balanceQuotes\ %W\ %K\ \;\ break\ \}\n\ bind\ \$txt\ <Key-quotedbl>\ \{\ balanceQuotes\ %W\ %K\ \;\ break\ \}\n\n----\n\n\[MG\]\ gets\ an\ error\ about\ \"apostrophe\"\ not\ being\ a\ valid\ keysym\;\ I\ think\ maybe\ it\ should\ be\ \"quoteright\"?\n\n\[WJG\]\ (05/11/07)\ It\ all\ works\ fine\ on\ my\ machine.\n\n\[MG\]\ That's\ weird\;\ I\ thought\ the\ keysyms\ were\ the\ same\ across\ all\ platforms.\ What\ system\ are\ you\ using?\ (Mine\ is\ Tcl\ 8.4.9\ /\ 8.5a1\ on\ Win\ XP\ SP2)\n\n\[WJG\]\ (06/11/07)\ Suse\ 10.1,\ Tcl\ 8.4.12.\ My\ code\ is\ fine.\ Does\ your\ system\ generate\ a\n\"quoteright\"\ keysym\ when\ the\ error\ occurs?\ I\ can't\ find\ that\ listed\ in\ my\ docs.\ Try\ the\ following\ binding\ on\ a\ text\ widget\ to\ check\ what\ keysym\ your\ system\ generates.\n\n\ console\ show\n\ set\ txt\ \[text\ .txt\]\n\ pack\ \$txt\n\ bind\ \$txt\ <Key>\ \{\ puts\ %K\ \}\n\n\[MG\]\ Sorry\;\ I\ answered\ this\ before,\ but\ it\ seems\ to\ have\ disappeared.\ Yeah,\ for\ me\ the\ apostrophe\ key\ generates\ a\ \"quoteright\"\ keysym,\ and\ that's\ what's\ listed\ in\ the\ keysym\ helpfile\ I\ have\ (the\ Win\ .chm\ from\ ActiveTcl\ 8.4.9).\n\n\[LV\]\ Yea,\ there\ was\ data\ loss\ last\ week\ and\ my\ comments\ were\ lost\ as\ well.\ I\ ran\ the\ above\ code\ against\ the\ hummingbird\ Windows\ x\ server,\ and\ I\ got\ \n\n======\n'\ =>\ apostrophe\n`\ =>\ grave\n======\n\n\[WJG\]\ (16/11/07)\ Naturally,\ just\ modify\ the\ codes\ to\ suit.\ I\ guess\ some\ platform\ checking\ could\ be\ put\ in\ there\ but\ perhaps\ this\ issue\ one\ that\ Tcl\ Core\ guys\ can\ resolve\ in\ order\ to\ maintain\ cross-platform\ compatibility.\ \n\n\n\n<<categories>>\ Widget} CALL {my revision {Balancing Open and Close Quotes in a TK text widget.}} CALL {::oo::Obj3852236 process revision/Balancing+Open+and+Close+Quotes+in+a+TK+text+widget%2E} CALL {::oo::Obj3852234 process}

-errorcode

NONE

-errorinfo

Unknow state transition: LINE -> END
    while executing
"error $msg"
    (class "::Wiki" method "render_wikit" line 6)
    invoked from within
"my render_$default_markup $N $C $mkup_rendering_engine"
    (class "::Wiki" method "render" line 8)
    invoked from within
"my render $name $C"
    (class "::Wiki" method "revision" line 31)
    invoked from within
"my revision $page"
    (class "::Wiki" method "process" line 56)
    invoked from within
"$server process [string trim $uri /]"

-errorline

4