Macros are text-substitution processors. As such, they only do two things:
1) replace parameters -- $paramname$ -- with the values passed to the macro
2) replace variables -- $(variablename)$ -- with the values currently assigned by the calling context
After completing those replacements, the result is then inserted into the calling context which determines how the macro result is handled.
In your code, you have three instances of the <<journalTiddlerName>> macro:
1) <$transclude tiddler=<<journalTiddlerName>> mode="block" />
2) <<journalTiddlerName>>
3) <$tiddler tiddler=<<journalTiddlerName>>>
In both the 1st and 3rd instances, the macro output is used as the value for the "tiddler" parameter in a widget call and the macro output is simply passed along to the widget for further handling.
In the 2nd instance, the macro output is actually being *displayed* and it is directly parsed and rendered.
For your purposes, you want to actually evaluate the <<now ...>> macro and then substitute it's output into the macro.
Here's a modified version of your code that should do what you want:
\define journalTiddlerName( ) $(when)$ $(project)$
\define state() $:/state/$(currentTiddler)$
<$vars project={{!!project}} when=<<now DD-MMM-YYYY>>>
* I used the <$vars> widget instead of separate <$set> widgets. It does the same thing as $set (assigns values to variables), but is a more compact syntax.
* I omitted the setting of the state variable, since it was just setting the value to itself.
* I added a variable, "when" which captures the output of the <<now ...>> macro.
* The "journalTiddlerName" macro then uses the $(when)$ reference to substitute the captured "now" value into the desired result.
Give it a try and let me know how it goes...
enjoy,
-e
Eric Shulman
TiddlyTools.com: "Small Tools for Big Ideas!" (tm)