On Saturday, 8 June 2019 17.32.47 WEST Enrico Forestieri wrote:
> I am not sure this is necessary. As it stands now, when python is
> invoked as "python -tt" we can be sure that it will be run what
> os:python() returns. This also allows to leave unchanged lyxrc.defaults,
> for example, or customized preferences.

I have no problem with this option. It makes some sense, specially regarding 
the PEPs that I have referred. Also it makes things simple and forward 
compatible.

My main concern when proposing this was trying to avoid those cases where in 
the converters people/users use "python -tt" and they do really mean python2.

The solution is probably to document this in the release notes. If the 
converters only support python2 users should replace those cases from
"python -tt" to "python2 -tt" and that is it.

At the same time there is an issue with the conversion I suggest that is the 
fact that we are using a variable name with more than one letter and so it 
should be, to be on the safe side, "$${python}". I admit that this gets 
cumbersome after some time.

We do not have overlaps in the current replacements but potentially we could 
get them with "$$o" and "$$opts":

[jamatos@myth src (master)]$ grep -r '$$o' *
Converter.cpp:string const token_to("$$o");
frontends/qt4/GuiView.cpp: ...
graphics/GraphicsConverter.cpp: string const token_to    = "$$o";
Mover.cpp:      command = subst(command, "$$o", 
quoteName(to.toFilesystemEncoding()));
Mover.h:         *      python $$s/scripts/fig_copy.py $$i $$o $$l
Mover.h:         *        $$o is a placeholder for the name of the file after 
moving,
Mover.h:         *  $$o and $$l can only differ if the file is copied from the 
temporary
output_latex.cpp:       result = subst(result, "$$opts", options);
output_latex.cpp:               "\\begin{$$lang}$$opts" : 
lyxrc.language_command_begin;
output_latex.cpp:                           "\\text$$lang$$opts{" : 
lyxrc.language_command_local;
output_latex.cpp:               "\\begin{$$lang}$$opts" : 
lyxrc.language_command_begin;

-- 
José Abílio


Reply via email to