-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Labels
Description
Looking into #200 I looked over the configuration file loading if luaotfload which reminded me that it is kind of a mess: Currently the first of the following files is loaded:
./luaotfload.conf./luaotfloadrc$XDG_CONFIG_HOME/luaotfload.conf$XDG_CONFIG_HOME/luaotfloadrc$HOME/.luaotfloadrc- Kpathsea lookup for
luaotfloadrc - Kpathsea lookup for
luaotfload.conf
There are quite some issues I have with this:
- Why is sometimes
luaotfload.confpreferred and sometimesluaotfloadrc? - Why do we need two names in the first place? Especially for the potentially costly kpathsea lookup this seems like a waste.
- Why should the user configuration file (e.g. in
$XDG_CONFIG_HOME/luaotfload.confbe skipped if./luaotfload.confis present?
One suggestion to improve this would be:
- Only use
luaotfload.conf, but additionally look forluaotfloadrcfor now and throw an error if it exists to avoid silently breaking something. - Load all found files in reverse order of preference. (So that local files can overwrite settings from more global files, but settings which are not overwritten still get applied.)
- Remove the
config.actionsinterfaces in the process or at least move them into less generic names.
Of course, this is potentially breaking existing configurations, but I would assume that these aren't used that much in the first place and even if people use these files, they can just rename them.