On Wed, Oct 03, 2007 at 06:39:14PM +0200, Juergen Spitzmueller wrote: > Richard Heck wrote: > > > The difficulty is that, if you're already in the inset, you might be > > wanting to apply another one. How do you distinguish that from changing > > the inset type (which is the most natural thing). > > Some thoughts: Say I have a charstyle <foo>hello world</foo>. > > * If I select "hello" and select "bar" from the combo, the result would be a > nested construct "<foo><bar>hello</bar> world</foo>".
Yes. > * If I want to get rid of "foo", I select "hello world" and select "none" > from the combo (which "dissolves" the inset) No need to select... just be inside the inset to be dissolved. > * If I select "hello" and chose "none", the result would be "hello<foo> > world</foo>". > > * If I select "o wo" and select "none", the expected result would > be "<foo>hell</foo>o wo<foo>rld</foo>". This might be tricky to implement, > but it's needed. Don't think so. If you want this, use dissolve-select-foo-select-foo. (IOW you shouldn't have created the original charstyle in the first place. Second time around you'll be wiser :) > * I'm not sure yet what should happen if you select "hello world" and > chose "bar". It might be expected to get <foo><bar>hello world</bar></foo>, > and this should be possible. OTOH some people might expect (for some > specific insets) that foo is replaced by "bar", i.e. "<bar>hello > world</bar>". But in the end, they might to reset the inset first, or we > define some "mutually exclusive" types of insets (the math color problem). Depends on how big the selection is, does it include <foo> ... </foo>. The nice thing with an inset is that _this case_ is never ambiguous. > Does this make sense? I understand it (I think), but disagree. This is not semantic mark-up. "None" is not a semantic thing and we shouldn't pretend it is. - Martin