Re: [tw] Re: [TW5] How to combine/transclude codeblock tiddlers?

2014-08-28 Thread Branimir Braykov


On Thursday, August 28, 2014 2:26:27 PM UTC+3, Jeremy Ruston wrote:
>
>
> The highlight plugin currently applies to all instances of the codeblock 
> widget, including those generated automatically by the core when 
> transcluding non-wikitext tiddlers.
>
>
Strange. I wonder what language it is trying to recognize.
I usually use it like this to specify:

> ```bash
> myVar=value
> ``` 


But as I said, that is not important for me now :-) 

-- 
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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.


Re: [tw] Re: [TW5] How to combine/transclude codeblock tiddlers?

2014-08-28 Thread Jeremy Ruston
Hi Branimir


> There is one unexpected glitch, however. After converting my tiddlers, for
> some unknown reason they look like parsed with the "highlight" plugin that
> I have.
> I don't know if this is a bug or it's intentional, but I will ignore this
> for now.
>

The highlight plugin currently applies to all instances of the codeblock
widget, including those generated automatically by the core when
transcluding non-wikitext tiddlers.

Best wishes

Jeremy


>  --
> 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 post to this group, send email to tiddlywiki@googlegroups.com.
> Visit this group at http://groups.google.com/group/tiddlywiki.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Jeremy Ruston
mailto:jeremy.rus...@gmail.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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: [TW5] How to combine/transclude codeblock tiddlers?

2014-08-28 Thread Branimir Braykov
Thank you for this info.
I didn't know that setting a tiddler as text/plain displays it like a 
codeblock. This is the thing that suits me most.
So here's what I did: converted my tiddler types to text/plain and used 
this:

> <$view tiddler="text1"/>
> <$view tiddler="text2"/>
> 


It is perfect, because I can also adjust the space between these tiddlers, 
so if I decide I need a blank line I could just do this:

> <$view tiddler="text1"/>
>
 

<$view tiddler="text2"/>
> 


There is one unexpected glitch, however. After converting my tiddlers, for 
some unknown reason they look like parsed with the "highlight" plugin that 
I have.
I don't know if this is a bug or it's intentional, but I will ignore this 
for now.

-- 
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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.


Re: [tw] Re: [TW5] How to combine/transclude codeblock tiddlers?

2014-08-27 Thread Jeremy Ruston
Hi Branimir

Apologies, I missed out a couple of points: you'll need to remove the
triple backticks from your code tiddlers. If you still want those tiddlers
to display as fixed width text then you can give them the type text/plain.

In terms of transclusion, there's basically two ways of doing it:

* To replace any transclusions with the target text (if necessary
repeatedly), and then parse and render the result. The downside of this
approach is that if one of the transcluded tiddlers changes then we need to
refresh the entire tiddler
* To treat transclusions more like an HTML iframe, where the transcluded
text is parsed separately and then spliced into the output tree. The upside
of this approach is that we can then selectively refresh individual
transclusions, making the process much more efficient

TiddlyWiki supports both approaches. Textual transclusion is accomplished
via macro parameters and variable substitutions. Structured transclusion is
accomplished via the transclude widget.

There's much more flexibility baked into the transclude widget, simply
because it's almost always the most efficient. But there are many tasks
that require the textual transclusion capability of macros.

The particular use case here would require a form of filtered textual
transclusion that isn't possible right now. But we might imagine something
like this:

\define my-concatenated-tiddlers(filter)
```
$$( $filter$ || mytemplate )$$
```
\end

Best wishes

Jeremy


On Wed, Aug 27, 2014 at 9:00 PM, Branimir Braykov  wrote:

> Hi, Jeremy,
> 10x for your quick answer.
> I tried the proposed way, but the resulting block includes a lot of ``` as
> they become part of the text.
> My actual tiddlers only include something like:
>
>> ```
>> text
>> more text
>> ```
>
>
> I was originaly trying to follow the logic as explained in
> TranscludeWidget.
> Actually this should work if I have tiddlers that only contain, e.g.
> unordered list.
> But after combining such tiddlers I do get a small whitespace, separating
> the lists from the two tiddlers.
> The same behavior is observed when I try to combine codeblocks.
> From what is given in the example in TranscludeWidget, which is actually
> more complex, transcluding tiddlers in block mode means that the tiddlers
> are combined as a single "block"-ed content but wikified as within the
> separate tiddlers.
> I too would like to hear other opinions on the matter.
>
> Either way I think it should be possible to transclude tiddlers both like
> it works now, in separate blocks and as a single block, list, etc.
> If that sounds complicated I can provide examples.
>
> --
> 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 post to this group, send email to tiddlywiki@googlegroups.com.
> Visit this group at http://groups.google.com/group/tiddlywiki.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Jeremy Ruston
mailto:jeremy.rus...@gmail.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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: [TW5] How to combine/transclude codeblock tiddlers?

2014-08-27 Thread Branimir Braykov
Hi, Jeremy,
10x for your quick answer.
I tried the proposed way, but the resulting block includes a lot of ``` as 
they become part of the text.
My actual tiddlers only include something like:

> ```
> text
> more text
> ```


I was originaly trying to follow the logic as explained in TranscludeWidget.
Actually this should work if I have tiddlers that only contain, e.g. 
unordered list.
But after combining such tiddlers I do get a small whitespace, separating 
the lists from the two tiddlers.
The same behavior is observed when I try to combine codeblocks.
>From what is given in the example in TranscludeWidget, which is actually 
more complex, transcluding tiddlers in block mode means that the tiddlers 
are combined as a single "block"-ed content but wikified as within the 
separate tiddlers.
I too would like to hear other opinions on the matter.

Either way I think it should be possible to transclude tiddlers both like 
it works now, in separate blocks and as a single block, list, etc.
If that sounds complicated I can provide examples.

-- 
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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.