noisy errors

36 views
Skip to first unread message

joearms

unread,
Feb 1, 2019, 12:33:53 PM2/1/19
to TiddlyWikiDev
Hello,

I'm a great fan of what I call "noisy" errors - a noisy error is
when the systems tells you in no uncertain terms that something is wrong


My view is that anything that smells bad should be brought to the attention of
the programmer in a way they cannot miss.

Recently I've been hit in the face by tiny syntax errors - typically
<$widget> has no matching </$widget> or my quoted symbols are wrong
(example "" is matched by a single " and not two quotes) - as a beginner
I find silent errors *very* frustrating - my eye/brain interface is not yet trained 
to the point where the errors hit me in the face.

Would it be possible to make a strict mode where I get told about these errors?

If I tag a tiddler with `strict` I'd like to be told when a <$widget> is not correctly terminated
or when any detectable errors are detected.

This could be done with HUGE RED TEXT in the preview window. 

I could live with the strict mode being turned off inside quoted blocks - and I'd also like
The <$widget> and matching </$widget> to be in the same tiddler - It would be strange
to start a widget in one tiddler and terminate it in a transclusion. Also terminating backtick on the same line.

Maybe this is a "lint" for the TW

Would this be doable?

Cheers

/Joe



Jeremy Ruston

unread,
Feb 1, 2019, 12:42:37 PM2/1/19
to TiddlyWikiDev
Hi Joe

I think a lot of problems that trip us up are not actually errors. For example, over email we discussed the fiendish case where you had this:

<$data title="$:/state/showeditpreview" text="yes”/> 
        <$data title="$:/state/sidebar" text="no"/>

The problem is that the terminating double quote for the value “yes” has been changed to a “smart” curly quote. However, the result was still valid wikitext; to the parser, it just looks like the attribute “text” has been given the value:

yes”/> 
        <$data title=

So, I think that the best bet to tackle these sorts of issues is to have a syntax colouring module for the CodeMirror editor. It works for me when I’m editing JavaScript: the syntax colouring lets me see that a construction is being interpreted differently than I expect.

Best wishes

Jeremy.

--
You received this message because you are subscribed to the Google Groups "TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywikide...@googlegroups.com.
To post to this group, send email to tiddly...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywikidev.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywikidev/ab7ecfec-18a0-4d66-a199-02c34fe43e0c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ton Gerner

unread,
Feb 1, 2019, 12:52:14 PM2/1/19
to TiddlyWikiDev
Hi Joe,

Stephen Kimmel made a set of editor toolbar plugiuns. Among them "BalanceCheck - detects and locates mis-matched parenthesis, braces, brackets and TiddlyWiki formatting marks".


Cheers,

Ton

Reply all
Reply to author
Forward
0 new messages