~geb/numen

6 2

$XDG_CONFIG_HOME/numen/phrases completely overrides /etc/numen

Details
Message ID
<trinity-2d0340b1-6272-4048-9863-e82602fa5b73-1709580676759@3c-app-mailcom-lxa14>
DKIM signature
pass
Download raw message
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 !
Details
Message ID
<CZLBXUQ972RE.OYTST015VJ2B@johngebbie.com>
In-Reply-To
<trinity-2d0340b1-6272-4048-9863-e82602fa5b73-1709580676759@3c-app-mailcom-lxa14> (view parent)
DKIM signature
pass
Download raw message
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!
Details
Message ID
<trinity-98477589-8b88-4c8f-af39-41a221b4f606-1709595818226@3c-app-mailcom-lxa14>
In-Reply-To
<CZLBXUQ972RE.OYTST015VJ2B@johngebbie.com> (view parent)
DKIM signature
pass
Download raw message
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.
Details
Message ID
<CZLSNTESUE2E.ZK0C6AZD0YK9@johngebbie.com>
In-Reply-To
<trinity-98477589-8b88-4c8f-af39-41a221b4f606-1709595818226@3c-app-mailcom-lxa14> (view parent)
DKIM signature
pass
Download raw message
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.
Details
Message ID
<D14730JPZKEE.1B3SVKQP4OTBK@johngebbie.com>
In-Reply-To
<trinity-98477589-8b88-4c8f-af39-41a221b4f606-1709595818226@3c-app-mailcom-lxa14> (view parent)
DKIM signature
pass
Download raw message
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!
Details
Message ID
<trinity-760b5eb1-19fa-4dec-bb87-7e12550c30e2-1715175901070@3c-app-mailcom-lxa11>
In-Reply-To
<D14730JPZKEE.1B3SVKQP4OTBK@johngebbie.com> (view parent)
DKIM signature
pass
Download raw message
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
Details
Message ID
<D14BVGA0GPQP.22NFYBR1ANT55@johngebbie.com>
In-Reply-To
<trinity-760b5eb1-19fa-4dec-bb87-7e12550c30e2-1715175901070@3c-app-mailcom-lxa11> (view parent)
DKIM signature
pass
Download raw message
"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 :)
Reply to thread Export thread (mbox)