I saw Alex's blog post before I saw this discussion, so I commented there:

http://tw.posterous.com/wouldnt-it-be-good-if-entering-foobar-in-tidd

"Cool, I've been thinking about this too. As well as supporting
#hashtags, in TiddlyWeb it would be useful to support @user for
referring to the space of another user. These things could combine,
too, so you could have helloth...@nimble_monkey would be the tiddler
called "HelloThere" belonging to the user nimble_monkey, or
#id...@nimble_monkey would indicate all tiddlers tagged "ideas" by the
user nimble_monkey."

Best wishes

Jeremy.

On Tue, Sep 8, 2009 at 1:25 PM, FND<[email protected]> wrote:
>
>> *Wouldn't it be good if *... entering #FooBar in tiddler.text resulted
>> in that Tiddler being tagged FooBar
>
> I remember there was a similar discussion a few months ago, and I
> thought I'd written some code back then - but apparently not...
> (Probably because determining a foolproof pattern is hard.)
>
> Anyway, you could hijack saveTiddler, parse tiddler.text and insert the
> tags - something like this perhaps:
> ---------------
> (function() {
>
> var txt = "foo\n\nlorem #aaa ipsum\ndolor #bbb sit amet\n\nbar";
>
> var _saveTiddler = TiddlyWiki.prototype.saveTiddler
> TiddlyWiki.prototype.saveTiddler = function(title, newTitle, newBody,
>        modifier, modified, tags, fields, clearChangeCount, created) {
>        var pattern = /\s#(.+?)\s/g; // XXX: capturing ignored by match
>        var inlineTags = newBody.match(pattern);
>        arguments[5] = tags.concat(inlineTags);
>        _saveTiddler.apply(this, arguments);
> };
>
> })();
> ---------------
>
>
> -- F.
>
> >
>



-- 
Jeremy Ruston
mailto:[email protected]
http://www.tiddlywiki.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/tiddlywiki?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to