On Sunday, June 9, 2013 4:37:01 PM UTC+2, Yakov wrote:
>
> What confuses me here is..
>  
>
>> !!! null
>> >default mode has an unlucky name
>> {{{
>> tags: 
>> *mode: text/plain <-   should this be null? is this a mime or a mode?*(and 
>> what about the section's name?)
>>
>> Here we have *mode* in the header and *mime* in the mode.. slice, I 
> believe.
>

As I wrote, the cm-editor needs a configuration object that can have those 
params: 
http://codemirror.net/2/doc/manual.html  see: Configuration section, mode 
parameter.

I did use the exact same names, even if they interfere with existing TW 
names. IMO Using different names would make the code unmaintainalbe. 


That's why I wrote the "default mode has an unlucky name" comment. The mode 
>> imo should be "default" or something like this. If you create a new 
>> tiddler, it doesn't have a "custom filed" named: content-type. So it uses 
>> the default settings, with the unlucky name "null" 
>>
>> !!! tiddlywiki
>> {{{
>> tags: 
>> *mode: tiddlywiki <-  this makes me think that in the "null" section, 
>> there's a mistake..*
>>
>> and here we have *mode* in *both* header and slice. "text/plain" is the 
> name of the mime, not mode, isn't it? So why mime name in the mode "slice" 
> (in the "null" section)?
>

- The section (heading) allways is the mode name
- each section can have a mode:slice
- The cm-library can handle MIMEs or modes.

As I wrote. If you use the mode, it uses the default settings, defined by 
the mode programmer. The MIME type is more precise. Since TW2 has no 
official (registered) MIME type I did use "mode: tiddlywiki" and the 
tiddlywiki.js uses the right MIME type. 

registered MIMEs see: http://www.iana.org/assignments/media-types/text
at the moment we use "text/x-tiddlywiki" which isn't a "real" mime type. 
the "x-" prefix was meant to be a temporary solution. 

It should be: text/vnd-tiddlywiki2 or something like this.

TW5 will register its own mime type: text/vnd-tiddlywiki for TW5 syntax. 
(There is a discussion about MIME types for TW5. but I don't find the link) 

Ah, ok, with the addon this does work. By the way, pushing F11 also causes 
> the editor to think smth was edited. Yeah, well, like you said, if any key 
> is pressed..
>
 
F11 does modify the tiddler content. It sets a custom field: cm-height: max 
/ min
 

>
> No-no-no, this has nothing to do with chkForceMinorUpdate (it's 
> unchecked). Like I said, the behaviour depends on when a tiddler was 
> created/modified -- when CM plugins were enabled or disabled. As I can see, 
> tiddlers created with disabled plugins are different from tiddlers with no 
> content-type in terms of storage format: first ones have no "content-type" 
> attribute in the storage divs, and second ones have 'content-type=""'. And 
> so the tiddlers from the first group have such a behaviour -- the 
> unnecessary dialogue appears even in the ordinary edit mode even if no key 
> was pushed.
>
> By the way, as content-type chooser appears in both edit and cmEdit mode 
> anyway, may be you can add an option which causes to open ordinary edit 
> mode (by cmEdit command) in tiddlers with no content-type? The idea is to 
> allow "graduate" workflow -- tiddlers with no content-type open the edit 
> mode on double-click and the ordinary "save" on ctrl+enter; tiddlers with 
> content-type open the cmEdit mode and use cmSave on ctrl+enter. This seems 
> to minimize different drawbacks.
>
 
IMO changing the behaviour in that way is "fighting the symptoms" and not a 
bug fix. I _can't_ reproduce the behavior, you discribe. I did use the 
2.8.0 TW I did post as an attachment. Can you reproduce the behaviour there 
too?

-m

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to