By the way, the results of testing with CodeMirror. in CodeMirror editor, 
the suggestions are shown without any changes of AutoSuggestPlugin (!), and 
if I click a suggesion with the cursor, it is inserted as expected. 
However, the behaviour of up/down arrows and enter key is not what is 
expected: when I press enter (after, say, I've typed [[To and the first 
suggestion is ToolbarCommands), I get *both *linebreak and the suggestion 
inserted, resulting in
[[To
olbarCommands
A similar thing happens with arrows: when I press "down" to select another 
suggestion, the cursor goes down as well, making the suggestion dropdown 
disappear.

I'll report when I test this with the View Mode/Inline Editing plugins [1] 
(presumably it's enough to add the autoSuggest command to the ViewToolbar 
slice..)

Best regards,
Yakov.

[1] https://groups.google.com/forum/#!topic/tiddlywiki/0FT6iBneYOk

среда, 9 апреля 2014 г., 0:21:43 UTC+4 пользователь Yakov написал:
>
> Hello Albert,
>
> This may be of interest:
>
> in the current snapshot (0.2.2) there's 
>
> config.options.chkAutoSuggestGlobal
>
> option that is defined in your code, but which is not used anyhow;
> at the same time there's
>
> chkAutoSuggestScope
>
> option which is used but is not defined. Looks like it was the same option 
> and you renamed it in some parts of the code, but forgot to do so in others 
> (or some other mistake took place).
>
> By the way, the tag suggestion feature works nicely! First, I've suspected 
> that it can interact poorly with transclusions when one wants to transclude 
> a section:
> <<tiddler [[some tiddler##
> or with second level of numbered lists
> ## list item
> but tests showed that the workflow is quite reasonable: in the first case 
> there's no suggestion at all, and also if one uses AutoSuggestion to get 
> the tiddler, (s)he will get
> <<tiddler [[some tiddler]]
> first and then go add the section part. And in the second case when a 
> space is added after ##, the suggestions are hidden.
>
> These made me think, though..
> * one more idea: autosuggestions of sections/slices can be added! below 
> are some use-cases, "l" represents the cursor:
> <<tiddler [[some tiddler##l
> <<tiddler [[some tiddler::l
> <<tiddler [[some tiddler##l]]
> <<tiddler [[some tiddler::l]]
> * there's one more case where tag suggestions are useful: filters there 
> are two cases:
> ** tag filter. Examples of use-cases (obviously, there's no need for the 
> ## addition in this cases):
> <<list filter '[tag[l
> <<list filter '... [tag[l
> <<list filter '[tag[l]]'>>
> <<list filter '[tag[l]] ...'>>
> <<list filter '... [tag[l]]'>>
>     as you can see, these can be described as /\[tag\[([^\]]*)($|\])/m if 
> I'm not mistaking
> ** other filters that can "eat" tags:
> <<list filter '[filterName[##|
>     (and versions with or without smth before/after as well)
> In these two cases, of'course, instead of [[tagName]], either tagName]]or 
> tagName should be inserted.
>
> Great work!
>
> Best regards,
> Yakov.
>
> четверг, 3 апреля 2014 г., 17:01:50 UTC+4 пользователь Yakov написал:
>>
>> Hello Albert,
>>
>> четверг, 3 апреля 2014 г., 12:03:22 UTC+4 пользователь Albert Riedinger 
>> написал:
>>>
>>> Hi Yakov,
>>>
>>> Thank you, I'm glad you like it.
>>> Initially this plugin was an experiment, but I also think that it has 
>>> more potential. I'm a novice in JavaScript and especially in RegExp so it's 
>>> hard for me to achieve progress. But it's fun and I'll try my best :)
>>>
>>> Unfortunately At.js doesn't support unicode (and won't in near future), 
>>> so now I try to work around this issue without using more dependencies like 
>>> XRegExp library. I'm german so support for diacritics (like äöü) is 
>>> critical for me. I already tested some solutions and it worked more or 
>>> less, but I had no time to implement it yet. Does it work for you using 
>>> kyrillic characters (if you use any at all)?
>>>
>>> Not sure what do you mean here by "doesn't support". I've tried to type 
>> tiddler names starting from cyrillics ([[До) and got the proper 
>> suggestions; I've even created a tiddler which name starts from ASCII 
>> letters and contain cyrillics (New Tiddler Ъ) and if I type [[Ъ or even 
>> [[ъ (not capital letter), I get the right suggestion listed. What 
>> exactly didn't work for you?
>>
>> By the way, I've noticed that I have to click the "autosuggest off" 
>> button twice to make it switch to "on", this is a small bug, I'd say. Not 
>> sure what's the cause.
>> Also, I'd either omit the hideReadOnly param (to keep the code clean) or 
>> set it to true (no reason for a guest to get the suggestions for editing as 
>> he or she won't be any editing anyway). By the way, in TiddlySpace, the 
>> "view instead of edit" mode for guests doesn't allow to type any letters, 
>> so this doesn't work as demo. If you'd like to show some demo directly in 
>> the space, you have to manually create a tiddler with some <html>...</html> 
>> containing a textarea where a guest can type and (s)he gets the suggestions.
>>  
>>
>>> Implementing support for pretty links should be my next challenge. As I 
>>> said, I'm new to all of this and it's kind of complicated to write a RegExp 
>>> for such a case. Maybe you have some ideas[1]? Matching "[[..." is easy, 
>>> but I don't really know how to match simultaneously this: "[[some text|...".
>>>
>>
>> Well, the easiest RegExp the matches [[some text| would probably be 
>> /\[\[[^\|\]]+?\|/, but I'm not sure how this should be passed to .. is 
>> it .atwho method that sets the autoSuggestions?
>>
>>>
>>> Making space symbol after suffix ("]]") an option should be easy. I will 
>>> implement this right now and release it on tiddlyspace soon.
>>>
>>> I'll add a couple of ideas just see some perspectives. One this is 
>> replacing html-entities (special symbols) with actual symbols like this:
>> * let's imagine I'd like to add a left-to-right arrow (&rarr;)
>> * I start to type &r
>> * I get a "→" suggestion -- *not* "&rarr;"
>> * I chose it and get much clearer wiki-code, without that unreadable 
>> "&rarr;" stuff
>> Though, I don't know if there's an interface to get a list of all these 
>> "abbriviations" (rarr, larr, uarr, darr, harr, times, bull, 
>> .......................) and an interface to get there unicode equivalent.
>> Also, "--" -> &nash;/&mdash; could be processed in this manner.
>>
>> A similar thing can be used with MathJax plugin to turn \rho to ρ etc. 
>> (though, just autoreplacing can be done instead of autosuggesting 
>> replacement, but autosuggesting seems to be more flexible)
>>
>> Another possible application is to combine this with CodeMirror for 
>> TiddlyWiki (see [1] for the latest release and discussion). This can be 
>> another huge step in turning TW into a dev environment. Fortunately, Mario 
>> is here and probably can comment this somehow.
>>
>> Finally, autoSuggestions can be used in the tags line which seems to be 
>> more beatiful and faster than Udo's interface [2] (although, Udo's solution 
>> implements some smart algorithm for ranging suggestions).
>>  
>>
>>> Spasiba Yakov for your interest and your suggestions!
>>>
>>> You are welcome (it's acually "spasibo" ;)
>>
>> Best regards,
>> Yakov.
>>
>> [1] https://groups.google.com/forum/#!topic/tiddlywiki/KRnQvzazULE
>> [2] http://tiddlywiki.abego-software.de/#IntelliTaggerPlugin
>>  
>>
>>> Albert
>>>
>>> [1] see matcher function of At.js > 
>>> https://github.com/ichord/At.js/blob/master/dist/js/jquery.atwho.js#L616
>>>
>>>
>>> 2014-04-02 17:39 GMT+02:00 Yakov <[email protected]>:
>>>
>>>> Wow, Albert,
>>>>
>>>> great stuff! Do you plan to implement suggestions for the [[some 
>>>> text|syntax (to complete it to [[some 
>>>> text|target tiddler]])? Also, it would be nice if adding the space 
>>>> symbol after ]] is optional.
>>>>
>>>> This approach surely have potential for different applications, thanks 
>>>> for that.
>>>>
>>>> Best regards,
>>>> Yakov.
>>>>
>>>> среда, 26 марта 2014 г., 20:52:02 UTC+4 пользователь Albert Riedinger 
>>>> написал:
>>>>
>>>>> Hi all,
>>>>>
>>>>> a few days ago Ramnath requested[1] a tiddler link suggestion feature 
>>>>> in edit mode, so I wrote a quick-and-dirty commands plugin[2] for the 
>>>>> good 
>>>>> old TWC. It is just an implementation of At.js[3], which allows word 
>>>>> suggestions in textareas. After activating this feature with the toolbar 
>>>>> command, typing double square brackets "[[" in edit text field will 
>>>>> suggest 
>>>>> tiddler names, while left-angle brackets(?) "<<" will suggest you 
>>>>> installed 
>>>>> macros.
>>>>> I'm not a programmer and it is my first public plugin, but I think 
>>>>> that your TW won't explode using this little hack :P
>>>>>
>>>>> Have fun and let me know if you find it useful!
>>>>>
>>>>> Cheers,
>>>>> Albert
>>>>>
>>>>>
>>>>> [1] https://groups.google.com/d/topic/tiddlywiki/b5xYteF6U9c/
>>>>> discussion
>>>>> [2] http://autosuggest.tiddlyspace.com/#AutoSuggestPlugin
>>>>> [3] https://github.com/ichord/At.js/ (see also: 
>>>>> https://github.com/ichord/Caret.js/)
>>>>>
>>>>  -- 
>>>> 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 [email protected].
>>>> To post to this group, send email to [email protected].
>>>> Visit this group at http://groups.google.com/group/tiddlywiki.
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>>

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

Reply via email to