Selon Dov Feldstern <[EMAIL PROTECTED]>: > Jean-Marc Lasgouttes wrote: > > Mael Hilléreau <[EMAIL PROTECTED]> writes: > > > >> No, in fact it wasn't the case with LyX-Code. I updated the patch so that > >> LyX-Code paragraphs are no more spellchecked (see attached). > > > > I have to say that I do not like that at all: we should never hardcode > > layout names. > > > > Agreed. But how *should* this kind of thing be done?
Agreed too. As it makes no sense to spellcheck LyX-Code paragraphs, the only way left would be to add a "NoSpellcheking [bool]" keyword to layout files. > Regarding the rest of the patch --- I think it's good, Mael. I haven't > tested it yet, but the code looks good and the approach seems to be a > sound one IMO. Thanks Dov :) > > I think we should first decide what we want to do with the LaTeX > > language. If we keep it in some form (or call it nolanguage), then > > there is not real need for complicated stuff. > > I don't think that using the language is an option: for example, if this > text that I don't want spell-checked is in Hebrew (within a Hebrew > document), I can't change it's language to something else just in order > to avoid spell-checking: that'll mess up the bidi algorithm, not to > mention the latex output (say, if it's a branch, which is sometimes > output and sometimes not). I totally agree. We have two aspects: 1) language; and 2) ignore spellchecking. These are different things and shouldn't be confused. If we want to disable the spellchecking of some text, we shouldn't loose its language setting in the same time. > We must have something besides the language > which specifies the spell-checking status --- or general rules, such as > Mael implemented here. > > After seeing this patch, I'm starting to think that Mael's idea of a > non-spell-checked inset is actually pretty good (in addition to this > patch). Just adding this new type on inset, which of course will not be > spell-checked, regardless of the onlyOutput flag, (and which should have > no visible effect at all on the output) would solve the problem of > being able to choose arbitrary text to be ignored during spell-checking. > I don't think this is necessary to have, but it would be nice, and > probably not that hard to implement. > > > > > On the other hand, I like the idea of not spellchecking stuff that is > > not output (although your test in note inset is very weird). > > Looks OK to me...? Me too :) Did you mean too simple? I don't know but here we use polymorphism so... Mael.