On 01/22/2018 04:23 AM, Jean-Marc Lasgouttes wrote:
> Le 22/01/2018 à 10:10, racoon a écrit :
>> So LyX should load the library's stdinset.inc first and then load the
>> code that extends it next.
>>
>> Richard, who ran into similar problems as I did, suggested that LyX
>> could be enhanced by automatically looking for and loading an .ext
>> file, e.g. stdinset.inc.ext.
>>
>> I think that is a good idea and this concept could be used for other
>> sorts of layout files, like .modules.
>
> One idea that I do not like about the .ext file idea is that it does
> not scale when you want to extend a file that has already been
> extended, which might happen if we had a site directory as proposed in
> http://www.lyx.org/trac/ticket/10326.
>
> One idea I had about that is to change the behavior of Input (which
> searches for files in user dir, then build dir, and finally system
> dir) so that it skips to the next level when doing recursive input.
> Example:
>
> * In user_dir/foo.layout, if I do "Input foo.layout", it will search
> in build dir, and then system dir
> * in build_dir/foo.layout, it will try only sys_dir/foo.layout
>
> The same will work if we add a site directory.
>
> Would that fix your issue, or are there cases where it would not do
> what you expect?

My sense, from our previous discussion, is that this would work in the
cases racoon had in mind. But I'm not sure why this wouldn't scale. We
could of course look also for *.ext.ext.

These ideas could also probably be combined.

Richard

Reply via email to