<<not-a-real-macro>>
<$macrocall $name="not-a-real-macro"/>
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/1ecc0c93-5932-41bb-9634-3eca9daf26c1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/49d883c4-f2f7-434b-aaf7-5b1f0d21a29b%40googlegroups.com.
Hi David
{{{ [[myMacro]] +[!is[variable]addsuffix[ is not defined]] }}}
\define macro(VAR_NAME)test\end
<$list filter="[[macro]] +[is[variable]addsuffix[ is a variable]] ~[[Undefined variable or macro 'VAR_NAME']]"><<currentTiddler>></$list>
<$list filter="[<macro>] +[is[variable]addsuffix[ is a variable]] ~[[Undefined variable or macro 'VAR_NAME']]">
<<currentTiddler>>
</$list>
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/6c5462a8-99ad-4133-86f3-199b3ac66737%40googlegroups.com.
Is it possible to use this operator for checking if the parameter has been passed to a macro or not!
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/19918c87-0d56-4ecf-b057-4aff3147a724%40googlegroups.com.
\define macro2(param)I'm a macro. Param is <$list filter="[<__param__>minlength[1]]">not</$list> provided\end
<<macro2 param:provided>>
<<macro2>>
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/4rEuAWc4EpM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/4580fe7a-9855-428b-8246-2ea56bcc2fae%40googlegroups.com.
VAR_NAME is a variable
Undefined variable or macro 'VAR_NAME2'
So, it works. Note that, VAR_NAME2 is not existed!
--Mohammad
Tony
\define variable-test(var)
<$list filter="[[$var$]] +[is[variable]]" emptyMessage="''$var$'' - Undefined variable or macro">
</$list>
\end
1. <<variable-test list-links>>
2. <<variable-test list-linkss>>
</$list>
to give an empty looking result. I don't know if this is an undocumented feature, or if it's a bug that will be fixed at some point causing this macro to break down. If that bothers you, just use an unused macro such as <<emptyMessage>>
in the result area.Hmm, I may have declared success prematurely. Is there a way to reformulate the test so that if the macro is defined, the <$list> displays nothing. I really only want output if the error condition -- a missing macro -- occurs. Otherwise I want it to do nothing while the rest of the tiddlyscript in the tiddler executes.
{{{ [[myMacro]] +[!is[variable]addsuffix[ is not defined]] }}}
.... but the "!" does not seem to be working. If you try a similar arrangement to test for non-existence of a tiddler, using "!is[tiddler]", it does work as expected.
I think I will raise this as a GitHub issue.
\define check-var-or-macro(var)
<$list filter="[[$var$]] +[is[variable]]" emptyMessage="Undefined variable or macro '$var$'"><<emptyNonExistentMessage>></$list>\end
<<check-var-or-macro VAR-OR-MACRO-NAME>>
{{{ [[VAR-OR-MACRO-NAME]] +[!is[variable]addprefix[Undefined variable or macro ']addsuffix[']] }}}
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/0b2f7c7d-8513-4bb9-92d6-d21cd69dbb57%40googlegroups.com.
I think the problem you’re describing is the possibility that ones delicate arrangements of customisations might break, perhaps through an upgrade or human error. That’s certainly something I can relate to, and I’m interested in how we can address the brittleness of complex wikis.The primary defence is to keep continuous backups.
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/CAFWVPz_P8ZR92Y8hqrdXsyjoYGiCPAVAOFNtqT09%3DxJNckrDug%40mail.gmail.com.