On Thu, Sep 08, 2016 at 04:42:30PM +0000, Guenter Milde wrote: > On 2016-09-08, Enrico Forestieri wrote: > > On Thu, Sep 08, 2016 at 06:58:10AM +0000, Guenter Milde wrote: > > >> On 2016-09-08, Enrico Forestieri wrote: > >> > On Wed, Sep 07, 2016 at 09:45:31PM +0000, Guenter Milde wrote: > > >> >> Dear Developers, > > >> >> pending a decision about handling of text-mode commands in mathed, is it > >> >> OK to submit the following minimal-invasive patch to prevent the math > >> >> toolbars inserting symbols in a way that makes document uncompilable or > >> >> leads to wrong output? > > >> > http://www.lyx.org/trac/ticket/9742 > > >> #9742 is the undecided ticket about handling of text-mode commands > >> in mathed. > > >> The proposed patch > > >> * solves the problem with inserting symbols from the math panel, as > >> described in http://www.lyx.org/trac/ticket/10349, > > >> * does this similar to the current handling of the Å and Ø text symbols > >> in the "misc" toolbar. > > >> * does not change the handling of text-mode commands in mathed discussed > >> in #9742. > > > >> +1 fix toolbars pending a fundamental decision about text-mode in mathed > > >> -0 no fix for existing documents ("bug for bug backwards compatibility") > > > I think that the last patch attached to #9742 is a step forward and I am > > considering to commit it. Then, you can start from there. > > I appreciate your work and interest. However, I think that even the last > patch is a step in the wrong direction.
Then we have opposite views, apparently. > Starting from there is a longer way to where I want to go: > > I don't want blurring the distinction of text-mode and math-mode commands. I don't understand this argument. If you enter a text-mode command directly in a latex equation, you get the same kind of error. You have to insert it in a proper environment for it to work and you could still do it in lyx. Now, you have to do it for avoiding the error, while, with the patch, lyx will do it for you. > It is far more difficult to restore this distinction after starting to > support commands in the wrong mode with "silent additions". LyX is full of silent additions aimed at avoiding the occurrence of errors. I don't buy the argument that a further inset has to be explicitly inserted. If you copy and paste an equation outside of lyx, the "silent additions" are also provided, so they are not so silent. This one seems to me a philosophical argument that I don't understand. Ideally, I would avoid any non necessary inset that simply clutter the display and cause problems when you do not exactly position the cursor when making an insertion. > This is why I strongly prefer a clear specification of the desired behaviour > and LyX format before any changes of text-in-math support. There is no such a change but simply a prosecution of a work initiated many years ago that proved to be effective. I am going to commit the patch because it is no change of direction, unless the majority votes against and stops me. -- Enrico