Re: [tw5] [Demo] Inspect macro definitions

2021-02-27 Thread Mohammad Rahmani
On Sun, Feb 28, 2021 at 1:36 AM clutterstack  wrote:

> Mohammad,
>
> Haha, sorry for not making sure to reference solutions you've already
> released!
>

No problem, ;-) I myself forgot what I have done before :-) :-)



> I have tried out the *find* macro, which is a very neat tool. I was tired
> when I replied, and Mat's post was the thing I remembered first, because it
> was the first one I saw when I started to want to look at the source of
> macros a lot.
>

One minore issue with find macro is it needs both starting and ending
delimiters! but I noticed Mats solution also uses the send delimiter (end
of the line char)




>
> I am still running into formatting issues trying to make codeblocks with a
> combination of JS and WikiText, so I am replacing one of my JS macros with
> a widget.
>
> ...I am trying to make a wiki to use, not a plugin, but I keep opening
> parentheses...
>

Great! good luck! I have an eye open for your further improvement to the
code!

>
> On Saturday, February 27, 2021 at 10:54:18 AM UTC-5 Mohammad wrote:
>
>> Worth also to refere to
>>> https://groups.google.com/g/tiddlywiki/c/Rx7RHqB-LbY/m/qY8rfuveAgAJ
>>
>> The find macro!
>>
>>>
>>>
Cheers
Mohammad




> --
> 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/11cdc2d4-6ad5-4ce7-86e6-eeea055f44e0n%40googlegroups.com
> 
> .
>

-- 
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/CAAV1gMBaA%2B7sKhO8NvVJya5Px9LNB9JUVO2q%2BJxFV9f9vz9zxA%40mail.gmail.com.


Re: [tw5] [Demo] Inspect macro definitions

2021-02-27 Thread clutterstack
Mohammad,

Haha, sorry for not making sure to reference solutions you've already 
released! I have tried out the *find* macro, which is a very neat tool. I 
was tired when I replied, and Mat's post was the thing I remembered first, 
because it was the first one I saw when I started to want to look at the 
source of macros a lot.

I am still running into formatting issues trying to make codeblocks with a 
combination of JS and WikiText, so I am replacing one of my JS macros with 
a widget.

...I am trying to make a wiki to use, not a plugin, but I keep opening 
parentheses...

On Saturday, February 27, 2021 at 10:54:18 AM UTC-5 Mohammad wrote:

> Worth also to refere to 
>> https://groups.google.com/g/tiddlywiki/c/Rx7RHqB-LbY/m/qY8rfuveAgAJ
>
> The find 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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/11cdc2d4-6ad5-4ce7-86e6-eeea055f44e0n%40googlegroups.com.


Re: [tw5] [Demo] Inspect macro definitions

2021-02-27 Thread Mohammad Rahmani
>
> Worth also to refere to
> https://groups.google.com/g/tiddlywiki/c/Rx7RHqB-LbY/m/qY8rfuveAgAJ

The find 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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/CAAV1gMAR1syiEdTU0RYvkdh7xbBLS-74MS0y42Spj%2BZQwSV57g%40mail.gmail.com.


Re: [tw5] [Demo] Inspect macro definitions

2021-02-27 Thread Mohammad Rahmani
On Sat, Feb 27, 2021 at 6:45 PM clutterstack  wrote:

> Hi Mohammad,


Hi Chris,

>
> Thanks for checking it out. To your points:
>
> 1. I thought this looked tricky, but I guess by importing variables from
> each candidate tiddler in turn, we can examine non-global macros in the
> same way. Local macros will often have non-unique names, so that would have
> to be taken into account.
>
> In practical terms, Mat's solution shared here (
> https://groups.google.com/g/tiddlywiki/c/NgFPRM1fFCw) works pretty well
> for finding local macros and linking to their source tiddlers, and is a lot
> simpler.
>

Thank you! I used the solution by Mat's with my show-macro (
https://kookma.github.io/TW-Utility/#demo%2Fshow-macro) in Utility plugin
and I got nice results.

something line below in on https://tiddlywiki.com/ (assuming you have
utility installed)


<$list
filter="""[all[tiddlers]!has[plugin-type]!tag[$:/tags/Macro]search[\define]]""">

<$link/>

<>







>
> 2. This should be possible...it's all just filters, except the two
> JavaScript macros that find out what TiddlyWiki considers the definition
> text of a macro to be, and what its parameter names and defaults are.
>
>
Yes, sometime you want to inspect a plugin for macros and variables.

Anyway I enjoy using your great solution!

Thank you!



> Best,
> Chris
> On Friday, February 26, 2021 at 11:51:10 PM UTC-5 Mohammad wrote:
>
>> Hi Chris,
>> Inspect is a very useful addition both for developers and users.
>>
>> Few suggestions (ignore them if not relevant)
>>
>> 1. find macros in tiddlers not tagged with $:/tags/Macro (e.g. non-global
>> variable). For example I can search in all tiddlers tagged with
>> $:/tags/Macro/Commander
>> 2. limit the search to a plugin or filtered list only
>>
>>
>> Best wishes
>> Mohammad
>>
>>
>> On Fri, Feb 26, 2021 at 11:47 PM clutterstack  wrote:
>>
>>> Hi all,
>>>
>>> I was playing with dropdowns and...things...and I built something that I
>>> wished I had last summer, and which will help me keep track of current
>>> variable and macro definitions/values.
>>>
>>> A first version to play with is at
>>> https://clutterstack.github.io/can-tw/clutterstack-TW5-com/#Inspect%20variable%20and%20macro%20definitions
>>>
>>> It's not perfect, but I'm kind of pleased. Also not documented or
>>> packaged.
>>>
>>> I ended up writing two javascript macros to access variables and their
>>> properties -- if I could have done this using filters, I'd love to know
>>> what I missed! I didn't just want to search tiddlers for "\define" etc,
>>> because sometimes I put that stuff in code blocks as content.
>>>
>>> Also, if there was a pre-existing public solution for this, I'd also
>>> like to see it. There must be a few out there, at least in private wikis.
>>>
>>> Best,
>>> Chris
>>>
>>> --
>>> 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 view this discussion on the web visit
>>> https://groups.google.com/d/msgid/tiddlywiki/b24fbec3-5b12-4610-9778-3633be89af4bn%40googlegroups.com
>>> 
>>> .
>>>
>> --
> 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/a526472b-cf9b-405b-9cc4-32b959c0b92en%40googlegroups.com
> 
> .
>

-- 
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/CAAV1gMB0N0dPSvHBysb42h0p5EAZU_KEQQBck%3DjQ1ppvQ0BVZA%40mail.gmail.com.


Re: [tw5] [Demo] Inspect macro definitions

2021-02-27 Thread clutterstack
Hi Mohammad,

Thanks for checking it out. To your points:

1. I thought this looked tricky, but I guess by importing variables from 
each candidate tiddler in turn, we can examine non-global macros in the 
same way. Local macros will often have non-unique names, so that would have 
to be taken into account.

In practical terms, Mat's solution shared here (
https://groups.google.com/g/tiddlywiki/c/NgFPRM1fFCw) works pretty well for 
finding local macros and linking to their source tiddlers, and is a lot 
simpler.

2. This should be possible...it's all just filters, except the two 
JavaScript macros that find out what TiddlyWiki considers the definition 
text of a macro to be, and what its parameter names and defaults are.

Best,
Chris
On Friday, February 26, 2021 at 11:51:10 PM UTC-5 Mohammad wrote:

> Hi Chris,
> Inspect is a very useful addition both for developers and users.
>
> Few suggestions (ignore them if not relevant)
>
> 1. find macros in tiddlers not tagged with $:/tags/Macro (e.g. non-global 
> variable). For example I can search in all tiddlers tagged with 
> $:/tags/Macro/Commander
> 2. limit the search to a plugin or filtered list only  
>
>
> Best wishes
> Mohammad
>
>
> On Fri, Feb 26, 2021 at 11:47 PM clutterstack  wrote:
>
>> Hi all,
>>
>> I was playing with dropdowns and...things...and I built something that I 
>> wished I had last summer, and which will help me keep track of current 
>> variable and macro definitions/values. 
>>
>> A first version to play with is at 
>> https://clutterstack.github.io/can-tw/clutterstack-TW5-com/#Inspect%20variable%20and%20macro%20definitions
>>
>> It's not perfect, but I'm kind of pleased. Also not documented or 
>> packaged.
>>
>> I ended up writing two javascript macros to access variables and their 
>> properties -- if I could have done this using filters, I'd love to know 
>> what I missed! I didn't just want to search tiddlers for "\define" etc, 
>> because sometimes I put that stuff in code blocks as content.
>>
>> Also, if there was a pre-existing public solution for this, I'd also like 
>> to see it. There must be a few out there, at least in private wikis.
>>
>> Best,
>> Chris
>>
>> -- 
>> 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 view this discussion on the web visit 
>> https://groups.google.com/d/msgid/tiddlywiki/b24fbec3-5b12-4610-9778-3633be89af4bn%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
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/a526472b-cf9b-405b-9cc4-32b959c0b92en%40googlegroups.com.


Re: [tw5] [Demo] Inspect macro definitions

2021-02-26 Thread Mohammad Rahmani
Hi Chris,
Inspect is a very useful addition both for developers and users.

Few suggestions (ignore them if not relevant)

1. find macros in tiddlers not tagged with $:/tags/Macro (e.g. non-global
variable). For example I can search in all tiddlers tagged with
$:/tags/Macro/Commander
2. limit the search to a plugin or filtered list only


Best wishes
Mohammad


On Fri, Feb 26, 2021 at 11:47 PM clutterstack  wrote:

> Hi all,
>
> I was playing with dropdowns and...things...and I built something that I
> wished I had last summer, and which will help me keep track of current
> variable and macro definitions/values.
>
> A first version to play with is at
> https://clutterstack.github.io/can-tw/clutterstack-TW5-com/#Inspect%20variable%20and%20macro%20definitions
>
> It's not perfect, but I'm kind of pleased. Also not documented or packaged.
>
> I ended up writing two javascript macros to access variables and their
> properties -- if I could have done this using filters, I'd love to know
> what I missed! I didn't just want to search tiddlers for "\define" etc,
> because sometimes I put that stuff in code blocks as content.
>
> Also, if there was a pre-existing public solution for this, I'd also like
> to see it. There must be a few out there, at least in private wikis.
>
> Best,
> Chris
>
> --
> 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/b24fbec3-5b12-4610-9778-3633be89af4bn%40googlegroups.com
> 
> .
>

-- 
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/CAAV1gMDgCx-3KGG2YpB2%3DqOO6-a7d1Gw%2Bz7m2Q2GLTcPopcGgA%40mail.gmail.com.


[tw5] [Demo] Inspect macro definitions

2021-02-26 Thread clutterstack
Hi all,

I was playing with dropdowns and...things...and I built something that I 
wished I had last summer, and which will help me keep track of current 
variable and macro definitions/values. 

A first version to play with is at 
https://clutterstack.github.io/can-tw/clutterstack-TW5-com/#Inspect%20variable%20and%20macro%20definitions

It's not perfect, but I'm kind of pleased. Also not documented or packaged.

I ended up writing two javascript macros to access variables and their 
properties -- if I could have done this using filters, I'd love to know 
what I missed! I didn't just want to search tiddlers for "\define" etc, 
because sometimes I put that stuff in code blocks as content.

Also, if there was a pre-existing public solution for this, I'd also like 
to see it. There must be a few out there, at least in private wikis.

Best,
Chris

-- 
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/b24fbec3-5b12-4610-9778-3633be89af4bn%40googlegroups.com.