[tw] Re: [TW5] Button to quickly set tiddler type

2016-05-23 Thread Ruslan Prokopchuk
Thank you very much! Now I can tangle/untangle my literate sources 
instantly!

понедельник, 23 мая 2016 г., 20:10:20 UTC+3 пользователь c pa написал:
>
> <$select field="type">
>  Regular TiddlyWiki Stuff 
>  Plain Text 
> 
>

-- 
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 https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/edab60ef-225b-4b72-acb1-a94585487d35%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] [TW5] Button to quickly set tiddler type

2016-05-14 Thread Ruslan Prokopchuk
How would I add a button to tiddler's toolbar to set tiddler type in the 
view mode? For example, to make it "text/plain" quickly.

-- 
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 https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/62ef11d8-2083-4ee9-9641-e28b4e105c14%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: [TW5] How to enable wikilinks in codeblocks?

2016-05-11 Thread Ruslan Prokopchuk
But yes, if I'm using a custom parser anyway, I can treat transclusion as 
links on the render, and as transclusion on the export! Thank you for the 
idea!

среда, 11 мая 2016 г., 11:01:46 UTC+3 пользователь Ruslan Prokopchuk 
написал:
>
> The point of using links is to not transclude referenced chunks on the 
> render, but only during the tangling process. Usually, you want to read 
> literate code folded, but with an ability to jump quickly to included 
> chunks.
>
> среда, 11 мая 2016 г., 10:41:53 UTC+3 пользователь PMario написал:
>>
>> On Wednesday, May 11, 2016 at 9:30:54 AM UTC+2, Ruslan Prokopchuk wrote:
>>>
>>> Mario is right, \rules solution doesn't work well in my situation. I've 
>>> spent entire morning playing with it, but decided to write custom parser: 
>>> https://gist.github.com/ul/bdd6c6d6715b8ed36348304c973a91af
>>> Custom parser is better than custom widget because you not only get 
>>> links, but proper reference handling, missing, orphans etc.
>>>
>>
>> Your literate programming approach is very interesting. 
>>
>> If you use {{Included chunk name}} instead of [[Included chunk name]] it 
>> should be possible to create tangled source output out of the box, with 
>> some custom rendering templates. 
>>
>> So your code snippet would look like this:
>>
>> ```
>> function parentChunk() {
>>   console.log("let's include another chunk below");
>>   {{Included chunk name}}
>> }
>> ```
>>
>>
>> just some thoughts. 
>>
>> -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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/2fe8a055-12d7-45d1-b13a-36ab55cca37a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: [TW5] How to enable wikilinks in codeblocks?

2016-05-11 Thread Ruslan Prokopchuk
The point of using links is to not transclude referenced chunks on the 
render, but only during the tangling process. Usually, you want to read 
literate code folded, but with an ability to jump quickly to included 
chunks.

среда, 11 мая 2016 г., 10:41:53 UTC+3 пользователь PMario написал:
>
> On Wednesday, May 11, 2016 at 9:30:54 AM UTC+2, Ruslan Prokopchuk wrote:
>>
>> Mario is right, \rules solution doesn't work well in my situation. I've 
>> spent entire morning playing with it, but decided to write custom parser: 
>> https://gist.github.com/ul/bdd6c6d6715b8ed36348304c973a91af
>> Custom parser is better than custom widget because you not only get 
>> links, but proper reference handling, missing, orphans etc.
>>
>
> Your literate programming approach is very interesting. 
>
> If you use {{Included chunk name}} instead of [[Included chunk name]] it 
> should be possible to create tangled source output out of the box, with 
> some custom rendering templates. 
>
> So your code snippet would look like this:
>
> ```
> function parentChunk() {
>   console.log("let's include another chunk below");
>   {{Included chunk name}}
> }
> ```
>
>
> just some thoughts. 
>
> -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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/4b62e0e6-a822-49d8-824e-182a49f831e7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: [TW5] How to enable wikilinks in codeblocks?

2016-05-11 Thread Ruslan Prokopchuk
Mario is right, \rules solution doesn't work well in my situation. I've 
spent entire morning playing with it, but decided to write custom 
parser: https://gist.github.com/ul/bdd6c6d6715b8ed36348304c973a91af
Custom parser is better than custom widget because you not only get links, 
but proper reference handling, missing, orphans etc.

вторник, 10 мая 2016 г., 19:51:48 UTC+3 пользователь Ruslan Prokopchuk 
написал:
>
> Hi!
>
> I think TiddlyWiki fits perfectly for literate programming. The only thing 
> I miss (except tangling sources for passing to the compiler, but it is easy 
> implemented as an external tool) is an ability to support wikilinks in 
> codeblocks. I mean that stuff like that:
>
> ```
> function parentChunk() {
>   console.log("let's include another chunk below");
>   // [[Included chunk name]]
> }
> ```
>
> to be rendered as
>
> function parentChunk() {
>   console.log("let's include another chunk below");
>   // Included chunk name <http:///>  < link to the tiddler!  tags 
> are allowed inside  and  ones AFAIK
> }
>
> Is it possible to shadow codeblock macro to add support for that? How to 
> do that?
>
>

-- 
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 https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/b7b96260-5e0e-4bec-b507-f9d921ca1ce6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] [TW5] Is it safe to edit tiddlers in an external editor?

2016-05-10 Thread Ruslan Prokopchuk
I run TiddlyWiki in --serve mode. Is it safe to edit tiddlers externally? 
Does TW perform any checks and reject / save with new name / or whatever 
for such edited tiddlers?

-- 
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 https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/dc1f08ec-261f-4c85-810c-039b7f59a275%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: [TW5] How to enable wikilinks in codeblocks?

2016-05-10 Thread Ruslan Prokopchuk
I've come up with a quick and dirty hack by replacing

codeNode.appendChild(this.document.createTextNode(this.getAttribute("code"
)));

with

var t = this.getAttribute("code").split(/(\[\[.+?\]\])/); 
for (var i = 0; i < t.length; i++) { 
  if (i % 2 === 0) { 
codeNode.appendChild(this.document.createTextNode(t[i])); 
  } else { 
var a = this.document.createElement("a"); 
var s = t[i].slice(2, -2); 
a.setAttribute("href", "#" + encodeURIComponent(s)); 
a.appendChild(this.document.createTextNode(s)); 
codeNode.appendChild(a); 
  } 
} 


in $:/core/modules/widgets/codeblock.js

but I definitely eager to have a chance for a proper, flexible and clean 
solution!

вторник, 10 мая 2016 г., 19:51:48 UTC+3 пользователь Ruslan Prokopchuk 
написал:
>
> Hi!
>
> I think TiddlyWiki fits perfectly for literate programming. The only thing 
> I miss (except tangling sources for passing to the compiler, but it is easy 
> implemented as an external tool) is an ability to support wikilinks in 
> codeblocks. I mean that stuff like that:
>
> ```
> function parentChunk() {
>   console.log("let's include another chunk below");
>   // [[Included chunk name]]
> }
> ```
>
> to be rendered as
>
> function parentChunk() {
>   console.log("let's include another chunk below");
>   // Included chunk name <http:///>  < link to the tiddler!  tags 
> are allowed inside  and  ones AFAIK
> }
>
> Is it possible to shadow codeblock macro to add support for that? How to 
> do that?
>
>

-- 
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 https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/b82219b8-19dc-48b3-a142-0f461f0ad4d1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] [TW5] How to enable wikilinks in codeblocks?

2016-05-10 Thread Ruslan Prokopchuk
Hi!

I think TiddlyWiki fits perfectly for literate programming. The only thing 
I miss (except tangling sources for passing to the compiler, but it is easy 
implemented as an external tool) is an ability to support wikilinks in 
codeblocks. I mean that stuff like that:

```
function parentChunk() {
  console.log("let's include another chunk below");
  // [[Included chunk name]]
}
```

to be rendered as

function parentChunk() {
  console.log("let's include another chunk below");
  // Included chunk name   < link to the tiddler!  tags are 
allowed inside  and  ones AFAIK
}

Is it possible to shadow codeblock macro to add support for that? How to do 
that?

-- 
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 https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/4b8aaa19-0640-4f46-9101-9a755496bbae%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.