(where <<previousTo value>> just gives value - 1 to increase readability).
There is a way to use macro arguments like modifier attached to the exporting file name of the button action? I would like to have something like filename=$modifier$+"recent.json", so if modifier user is Jhon Doe, the exported JSON file with the tiddlers would be named jhon-doe-recent.json
The $modifier$ is only valid inside the depricated macro \define and you do not document this.
Your “previouse” macro can’t be used in a filter.
Please give us more of the context.
Tip:
What you are trying to do is concatenate or substitute things in a string. There is a lot of discussions here on this subject. The new substitute operator, the back tick attribute value method.
Notice that <<modifiedBySinceDaysAgo Offray 5>> is time sensitive, so it gives different answers when I visit the wiki. If I visit the wiki 5 days after the modification, the result will be empty. If fact, that makes me think that what I like is something like <<lastModificationsByUpTo modifier amount>>, that takes all the modifications by a particular modifier and select the last amount defaulting to a particular quantity. But that is a matter of changing the filter.
To explain myself better: my question now is how the result of a particular macro can be saved with a button, including a particular parameter given to such macro. So, instead of saving into the generic tiddlers.json, we could get something like jhon-doe-recent.json, where jhon-doe is a parameter given to the filter.
To use a different target filename (instead of “tiddlers.json”), you could change the filename parameter of the tm-download-file message to something like this:
The slugify[] filter operator (see https://tiddlywiki.com/#slugify%20Operator) ensures that the resulting filename won’t have any spaces or other characters that are usually not permitted by your local filesystem. So if the $modifier$ has a value of “Jhon Doe” (i.e., containing capital letters and spaces), it will automatically be converted to “jhon-doe” for use by tm-download-file