Honoring ‘ASPELL_CONF’ in libaspell
[email protected] (Ludovic Courtès) Sun, 26 Mar 2017 15:52:35 +0200
| Newsgroups | gmane.comp.gnu.aspell.devel |
|---|---|
| Message-ID | <[email protected]> |
--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Hello!
GNU=C2=A0Guix does not follow the file system hierarchy standard (FHS) and
thus does not have a =E2=80=9Cstandard location=E2=80=9D where dictionaries=
can be
looked for.
When using the =E2=80=98aspell=E2=80=99 command-line tool, that=E2=80=99s n=
ot a problem: users
can simply do
export ASPELL_CONF=3D"dict-dir $HOME/.guix-profile/lib/aspell"
and then =E2=80=98aspell=E2=80=99 will look for dictionaries in this place.
However, libaspell does not honor =E2=80=98ASPELL_CONF=E2=80=99, and thus l=
ibraries such
as Enchant that link against libaspell think there are no dictionaries
around because they=E2=80=99re not looking in the right place:
https://bugs.gnu.org/25836
To work around this, I considered patching our =E2=80=98aspell=E2=80=99 pac=
kage in Guix
such that libaspell would always honor =E2=80=98ASPELL_CONF=E2=80=99. I tr=
ied this
naive patch:
--=-=-=
Content-Type: text/x-patch
Content-Disposition: inline
--- aspell-0.60.6.1/lib/new_config.cpp 2017-03-10 11:16:56.343795853 +0100
+++ aspell-0.60.6.1/lib/new_config.cpp 2017-03-10 11:16:57.607786182 +0100
@@ -17,6 +17,10 @@ namespace acommon {
Config * new_config()
{
Config * config = new_basic_config();
+
+ // Honor 'ASPELL_CONF' unconditionally.
+ config->read_in_settings();
+
setup_static_filters(config);
return config;
}
--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
=E2=80=A6 but it breaks the =E2=80=98aspell=E2=80=99 command:
aspell: common/config.cpp:1335: acommon::PosibErr<void> acommon::Config::=
set_committed_state(bool): Assertion `empty()' failed.
So two questions:
1. What am I doing wrong in this patch? :-)
2. What=E2=80=99s your take on the general issue of this need to configure
libaspell when its users (Enchant here) are oblivious to this
configuration?
Thanks in advance,
Ludo=E2=80=99.
--=-=-=
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Aspell-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/aspell-devel
--=-=-=--