TagSearchPlugin -> WikiLinkSearchPlugin for Word Completion??

14 views
Skip to first unread message

Måns

unread,
Nov 16, 2011, 4:59:39 PM11/16/11
to TiddlyWiki
Hi TwWizards (@tobias)

What if when you start writing a link in a tiddler: "[[wi .." (or: "[[|
wi..") - [1] the tagseach dialog would open with instant suggestions
for Word completion [2]: existing tiddler titles, tags (via
GoToPlugin) or words from a TagSearchConfig tiddler (simple list of
lineseparated words) for linktext that would replace the text you just
wrote, if you clicked it???

Imho that would be *VERY* usefull....

[1] http://groups.google.com/group/tiddlyweb/browse_thread/thread/af0368f16ea2830e
[2] http://groups.google.com/group/tiddlywiki/browse_thread/thread/5a317c720087183a/1a4efba494ea4042

Cheers Måns Mårtensson


Message has been deleted

Tobias Beer

unread,
Nov 16, 2011, 5:33:16 PM11/16/11
to TiddlyWiki
Hey Måns,

Honestly, I belive this involves a considerable amount of tricky
fiddling, especially with all the event handling around what does
haven focus, when and where and for how long, etc...

GotoPlugin being at the heart of the searchbox in TagSearch, Eric
really does have a much better understanding of the underlying event
model behind this little box... or to put it differently, it took
quite some time to figure out how to have it behave in TagSearch / or
to have TagSearch around it behave quite the way I wanted.

In fact, this would work quite differently than TagSearch, since it
rather impacts on the mechanisms which trigger the search and also the
search algorithm itself... neither of which TagSearch is messing with.

I remember that Jon also had some autocompletion in use for
NiceTagger... so there are at least three people that might have some
idea on how to not start all the way from zero with this.

Eventually, the input box would be replaced by the textarea for the
tiddler body in addition to a listbox for selection... which would
probably be accessed by pressing the DOWN key or perhaps CTRL+DOWN and
which would cycle through entries, until you EXCAPE out of it or
confirm your action with ENTER... or perhaps with TAB when not being
in the listbox but writing text. Which keys actually trigger each
action should probably be configurable. Also, escaping out of the
listbox should not trigger escaping out of the tiddler.

Lots of stuff... which, for the moment, I would (unfortunately) not
want to endulge in.

tb

Tobias Beer

unread,
Nov 16, 2011, 5:42:48 PM11/16/11
to TiddlyWiki
Addendum...

An alternative to some "suggest-as-you-go" auto completion might, in
fact, be one that is rather invoked by pressing a special key
combination, maybe CTRL-DOWN, in a popup or overlay.

Then, you could have your defaut GotoPlugin input field and it's
listbox for search results... but again, the search algorithm would
need to be extended to allow for your autocompletion-config-list to be
matched against the input ...via some default hook for additional
search functions ...which Eric should define and implement for
GotoPlugin.

I remember that - rather than - hijacking Erics plugin in the code of
TagSearch, I suggested he would provide the hook that is required for
TagSearch to work... I don't think he ever did that ...so perhaps he
might not provide this either... but perhaps he will deliver both, at
the same time, who knows. :o)

tb
Message has been deleted

Tobias Beer

unread,
Nov 16, 2011, 5:54:19 PM11/16/11
to TiddlyWiki
Probably there should be two inputs, one for the search and the other
for an optional pretty title, so that when you finally hit enter, you
automatically get your pretty link syntax... so it's kind of the other
way around than the actual syntax, but it makes sense... because you
select your target tiddler first and then you define which pretty name
you want to apply. If your match is one of the config list, then of
course there would be no link generation and the secondary input would
be deactivated... unless we came up with some real usecase that made
use of it... perhaps something like...

<html><iframe src="%0"/></html>

...being one line in your config, so that when you paste soem url into
the secondary input, %0 would be replaced with that url and the
resulting text being inserted was...

<html><iframe src="http://ma.ma"/></html>

tb

Måns

unread,
Nov 16, 2011, 5:58:51 PM11/16/11
to TiddlyWiki
Hi Tobias

Thanks for explaining some of the obstacles for making sth like this
happen :-)
I hope Jon or/and Eric will/can see some potential in an undertaking
like this, and maybe even get inspired by your TagSearchPlugin.
(Imho: It's a pure stroke of genius: nice design and intuitive
userexperience yet easily configurable for different needs)

Cheers Måns Mårtensson
Reply all
Reply to author
Forward
0 new messages