Hi,
I just learned, if there's even a single file in $XDG_CONFIG_HOME/numen/phrases/, everything in /etc/numen/phrases is ignored. I see why this is necessary to avoid picking up definitions from both locations and possibly getting conflicts, but it wasn't obvious at a first reading of the manpage. Knowing this now, it does describe this correctly but perhaps not as clearly as it could ?
Here's an attempt at rewriting the "With no arguments ...." paragraph of the DESCRIPTION section :
#
By default, numen uses the phrase files in /etc/numen/phrases/ . If there are files in $XDG_CONFIG_HOME/numen/phrases/ , these will be loaded instead of the default set. ($XDG_CONFIG_HOME is usually ~/.config)
#
Feel free to use or not, it's not a major problem.
Looking forward to using numen more. Thanks !
Hi fenugrec, maybe not clarifying the overriding as much as you'd like,
but I think I might change it to:
*numen* uses the default phrases unless given files as arguments, or there
are files ending with *.phrases* in your *$XDG_CONFIG_HOME/numen/phrases/*
directory. The default phrases can be found in the */etc/numen/phrases/*
directory, but should not be edited! (*$XDG_CONFIG_HOME* is *~/.config*
unless set otherwise.)
I'm trying to also cover that you can specify files with the command-line
arguments, and you shouldn't be editing the system-wide phrases that get
replaced on reinstall/update.
Thanks!
Hi John,
sure, that would work.
Regarding the recommendation to not edit the copies in /etc however, I think an alternate solution would be to follow a common pattern of FHS :
" Any program or package which contains or requires data that doesn't need to be modified should store that data in /usr/share "
" /etc : Host-specific system configuration"
(https://refspecs.linuxfoundation.org/FHS_3.0/fhs)
and thus, the order of precendence would be :
- /usr/share/numen readonly, modified only when package is updated
- /etc/numen for cases where a system-wide configuration is desirable; package doesn't install anything there
- $XDG_CONFIG_HOME/.config/numen.... for per-user configs
- arguments
But, that is a bit of scope creep maybe.
I like the /usr/share suggestion! Recently someone on the chat said they
lost changes due to /etc/numen being overwritten, which I hadn't thought
enough about before.
The transition would be slightly bumpy, with old installed
/etc/numen taking precedence over it, and I know at least
https://github.com/anpandey/numen-nix/blob/master/flake.nix would need
paths updated, but it would probably be worth it.
Hi fenugrec, after thinking about /usr/share/numen again recently, I'm
thinking future versions should use /usr/share/numen and just ignore
/etc/numen. I feel system-wide configuration of numen would rarely be
used, and /etc/numen would just add confusion, especially since a current
user's existing /etc/numen would override the new /usr/share/numen.
Don't feel you need to reply, just thought I'd say in case of any
thoughts!
Hi John,
> used, and /etc/numen would just add confusion, especially since a current> user's existing /etc/numen would override the new /usr/share/numen.
In that last bit, "a current user's existing /etc/numen" , was that a typo or are you planning to drop $XDG_CONFIG_HOME/numen/phrases ?
Just wanted to clarify, since /etc/numen is not really the right place for user-editable configs !
Cheers
"current user's" was confusing. I just meant how lingering /etc/numen from
older installs would override /usr/share/numen, blocking any updates to
the default phrases made by future releases.
~/.config/numen is safe :)