I've updated the demo with "version 0.1.2" of my showmacrodef plugin, which is still not finished, just improved (I hope). Fixing the duplicate entries was trivial (missed out a unique[] operator in a filter).
To speed things up and make them look tidier, I removed the preview of possible source tiddlers within the dropdown. Best, Chris On Thursday, March 4, 2021 at 11:23:28 AM UTC-5 Mohammad wrote: > Thanks Chris! > > Wow, this is much faster! but multiple outputs of the same result! > > > Best wishes > Mohammad > > > On Thu, Mar 4, 2021 at 6:23 PM clutterstack <bee...@gmail.com> wrote: > >> Hi Mohammad, I updated it sometime after 11pm EST yesterday, at the same >> link >> <https://clutterstack.github.io/can-tw/clutterstack-TW5-com/#%24%3A%2FCommander:%24%3A%2FCommander>. >> >> It is faster, but also lists variables multiple times, so I made a mistake >> with my filters. I will look at it again today and post here when I update >> again. >> >> Best, >> Chris >> >> On Thursday, March 4, 2021 at 9:03:08 AM UTC-5 Mohammad wrote: >> >>> Chris, >>> Is there a new version? Is it in the same link? >>> >>> >>> >>> Best wishes >>> Mohammad >>> >>> >>> On Thu, Mar 4, 2021 at 5:27 PM clutterstack <bee...@gmail.com> wrote: >>> >>>> Hi Mohammad, >>>> >>>> Hmm. That is disappointing! >>>> >>>> Did you try it after my last post here? The newer iteration is much >>>> faster than the first. (A peripheral lesson here is: update version >>>> numbers >>>> no matter what! I was in a rush to upload the faster version.) >>>> >>>> I see my latest version is returning duplicate results in the dropdown >>>> though, so there's at least one major bug. Maybe it'll be fast after I fix >>>> that! Haha. I will look some more at this later. >>>> >>>> Thanks for testing! >>>> >>>> Best, >>>> Chris >>>> On Thursday, March 4, 2021 at 5:06:33 AM UTC-5 Mohammad wrote: >>>> >>>>> Hi Chris, >>>>> Great to see you are improving macro-variable ! >>>>> I tried to experiment with Sample >>>>> <https://clutterstack.github.io/can-tw/clutterstack-TW5-com/#%24%3A%2FCommander:%24%3A%2FCommander%20%24%3A%2Fplugins%2Fcan%2Fshowmacrodef%20%24%3A%2Fplugins%2Fcan%2Fselector> >>>>> you >>>>> provided >>>>> >>>>> To reproduce >>>>> 1. In commander Combo Search I entered \define >>>>> 2. Commander returned 60 matches >>>>> 3. Under the Defs tab I entered testCreate >>>>> 4. After a while I see the dropdown returns some outputs and let me >>>>> choose a variable to show >>>>> >>>>> Yes, as you wrote in your post it is pretty slow! >>>>> >>>>> >>>>> >>>>> Best wishes >>>>> Mohammad >>>>> >>>>> >>>>> On Thu, Mar 4, 2021 at 2:06 AM clutterstack <bee...@gmail.com> wrote: >>>>> >>>>>> For Mohammad: I am still wading through the mess I made, but I made a >>>>>> tab for Tiddler Commander you can try here >>>>>> <https://clutterstack.github.io/can-tw/clutterstack-TW5-com/#%24%3A%2FCommander:%24%3A%2FCommander%20%24%3A%2Fplugins%2Fcan%2Fshowmacrodef%20%24%3A%2Fplugins%2Fcan%2Fselector>. >>>>>> >>>>>> This is *totally not ready for prime time and will probably not stay >>>>>> in this wiki *but I'd be interested in your feedback as to how you'd >>>>>> like something like this to work. >>>>>> >>>>>> There are two plugins at the moment, to make this work: "selector" >>>>>> and "showmacrodef". One gives me a macro for a dropdown selector. The >>>>>> other >>>>>> gives me a JavaScript widget and a JS macro, for displaying a variable's >>>>>> definition/value and a sample macrocall (if applicable), respectively, >>>>>> as >>>>>> well as a tool that makes a tab for Tiddler Commander to inspect for >>>>>> variable definitions within a filtered list of tiddlers. There is a >>>>>> tiddler >>>>>> that will do something similar without having Commander installed, but >>>>>> it's >>>>>> not finished. >>>>>> >>>>>> The Commander tab does something like this, starting with the >>>>>> searchfilter from the top part of the Commander UI: >>>>>> >>>>>> You type into the selector and it looks through those tiddlers for >>>>>> lines with "\define ", followed by something that contains the user >>>>>> input, >>>>>> followed by "(". From that, it rebuilds the macro name on that line. >>>>>> Each >>>>>> macro name it deduces from this, it lists in the dropdown as a selection >>>>>> option. >>>>>> >>>>>> Once you select a macro name, it returns a list of the tiddlers that >>>>>> contain a "\define" line for that macro name. Note that it's possible >>>>>> for a >>>>>> tiddler to have a line like that, but NOT be defining anything (e.g. >>>>>> within >>>>>> a code block). To check, you choose the tiddler with a radio button, and >>>>>> the macro gives you a display. >>>>>> >>>>>> Here's where it checks that there's a macro definition in the >>>>>> selected tiddler: it redefines that macro using a set widget, then >>>>>> imports >>>>>> the variables from the candidate source tiddler. If the macro now has a >>>>>> definition, then that tiddler had a real definition in it, and this is >>>>>> displayed using the aforementioned JS widget. >>>>>> >>>>>> I note that the filter in the dropdown interface is pretty slow. >>>>>> Right now it's showing all candidate source tiddlers in the >>>>>> dropdown...maybe not a good tradeoff performance- and space-wise. >>>>>> >>>>>> Any feedback welcome. >>>>>> >>>>>> Best, >>>>>> Chris >>>>>> >>>>>> On Tuesday, March 2, 2021 at 11:27:10 AM UTC-5 clutterstack wrote: >>>>>> >>>>>>> Thanks, David. >>>>>>> >>>>>>> On Sunday, February 28, 2021 at 6:09:13 PM UTC-5 David Gifford wrote: >>>>>>> >>>>>>>> Added this to the toolmap, both in the "Understanding TiddlyWiki" >>>>>>>> section and the "Advanced / developer" section >>>>>>>> >>>>>>>> On Friday, February 26, 2021 at 2:17:25 PM UTC-6 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/439a2708-886a-4d28-9988-1e14678c11f9n%40googlegroups.com >>>>>> >>>>>> <https://groups.google.com/d/msgid/tiddlywiki/439a2708-886a-4d28-9988-1e14678c11f9n%40googlegroups.com?utm_medium=email&utm_source=footer> >>>>>> . >>>>>> >>>>> -- >>>> 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/25425569-0731-40f6-92cc-5e07f55ac7d5n%40googlegroups.com >>>> >>>> <https://groups.google.com/d/msgid/tiddlywiki/25425569-0731-40f6-92cc-5e07f55ac7d5n%40googlegroups.com?utm_medium=email&utm_source=footer> >>>> . >>>> >>> -- >> 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/b70fabfd-c558-49e7-8d9c-8680103e8eden%40googlegroups.com >> >> <https://groups.google.com/d/msgid/tiddlywiki/b70fabfd-c558-49e7-8d9c-8680103e8eden%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- 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/4b952160-bf8d-42e6-90aa-1f438d1011e0n%40googlegroups.com.