[tw5] Re: Using Filter Notation in code for Table of Contents

2023-04-25 Thread springer
Many apologies for posting before trying more things! 

(I had quickly tried some variant ways, but somehow tried all kinds of 
variants other than filter notation *with* quote-marks. I won't bore you 
further with explaining why I got confused. Thanks for the prompt 
clarification!)

-Springer

On Tuesday, April 25, 2023 at 2:28:40 PM UTC-4 PMario wrote:

> Please have a look at the docs. [[title with spaces]]
>
> [image: toc-exclude-param.png]
>
> -m
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/6c6432d9-3e1d-48cf-a3dc-a77c91d31d91n%40googlegroups.com.


[tw5] Re: Using Filter Notation in code for Table of Contents

2023-04-25 Thread PMario
Please have a look at the docs. [[title with spaces]]

[image: toc-exclude-param.png]

-m

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/674a1a4e-4c49-425a-ba6f-3258c90e2dcen%40googlegroups.com.


[tw5] Re: Using Filter Notation in code for Table of Contents

2023-04-25 Thread Eric Shulman
On Tuesday, April 25, 2023 at 8:40:38 AM UTC-7 springer wrote:

```
<$macrocall
$name="toc-tabbed-external-nav"
tag="Common Operators"
exclude="all Operator"
/>
```
As best I can tell, it fails when BOTH the tag and the exclude string have 
spaces.


Before the TOC code change, the `excluded` variable contained a ***list of 
tiddlers titles*** that had already been "visited" and was applied 
internally using `-[enlist]` to prevent infinite "loops" in the 
tree.  In v5.3.0-prerelease, this variable can now also use filter syntax 
to generate a list of tiddler titles to be excluded (applied internally 
using `-[subfilter]`).  The TOC code changes also now permit this 
parameter to be passed in to `toc-tabbed-external-nav`.  Since the value 
has always operated on a LIST, the correct usage to pass a specified title 
containing a space would be `exclude="[[all Operator]]"`

Note also that the `tag` parameter (used to specify the starting "root tag" 
for the tree) is NOT a list, and CAN contain spaces, since it is used 
internally via `tag<__tag__>`.

This DOES work as before:
```
<$macrocall
$name="toc-tabbed-external-nav"
tag="Common Operators"
exclude="[[all Operator]]"
/>
```

-e

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/2fb0dadb-020f-4f2a-962f-44c99d8ea8cbn%40googlegroups.com.


[tw5] Re: Using Filter Notation in code for Table of Contents

2023-04-25 Thread springer
On the demo site, this kind of simple thing now works:

```
<$macrocall
$name="toc-tabbed-external-nav"
tag="TableOfContents"
exclude="HelloThere"
/>
```
But this does not work:
```
<$macrocall
$name="toc-tabbed-external-nav"
tag="Common Operators"
exclude="all Operator"
/>
```
As best I can tell, it fails when BOTH the tag and the exclude string have 
spaces.

This seems to be have been true (all along) for the 
toc-selective-expandable as well (which I never use, except now in testing).

Of course, I could make a workaround described earlier in this thread --  
setting a variable called excluded so that `exclude=<>` could do 
the work in the toc macro. 

But it seems the exclude parameter is of very limited use if it can't be 
used on the fly (without framing a variable beforehand) for something as 
simple as excluding a tiddler that has spaces in the title, when the tag 
title also has spaces in it.

Am I missing something?

-Springer
On Tuesday, April 25, 2023 at 7:47:50 AM UTC-4 PMario wrote:

> On Saturday, February 11, 2023 at 3:24:47 AM UTC+1 Eric Shulman wrote:
>
> I've submitted a `[BUG]` issue on GitHub: 
> https://github.com/Jermolene/TiddlyWiki5/issues/7261
>
>
> Hi folks, 
> There is a preview version 
> https://tiddlywiki5-4elmgaims-jermolene.vercel.app/
> created by the PR https://github.com/Jermolene/TiddlyWiki5/pull/7417 ... 
> which may be included into the next TW version. 
>  
> docs: 
> https://tiddlywiki5-4elmgaims-jermolene.vercel.app/#Table-of-Contents%20Macros
>
> Please test and give feedback. 
> have fun!
> Mario
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/929c50be-4192-4443-9cf4-db9a232e6980n%40googlegroups.com.


[tw5] Re: Using Filter Notation in code for Table of Contents

2023-04-25 Thread PMario
On Saturday, February 11, 2023 at 3:24:47 AM UTC+1 Eric Shulman wrote:

I've submitted a `[BUG]` issue on GitHub: 
https://github.com/Jermolene/TiddlyWiki5/issues/7261


Hi folks, 
There is a preview version 
https://tiddlywiki5-4elmgaims-jermolene.vercel.app/
created by the PR https://github.com/Jermolene/TiddlyWiki5/pull/7417 ... 
which may be included into the next TW version. 
 
docs: 
https://tiddlywiki5-4elmgaims-jermolene.vercel.app/#Table-of-Contents%20Macros

Please test and give feedback. 
have fun!
Mario

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/53037a10-7135-499b-b2c9-8001b59c4049n%40googlegroups.com.