bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#60565: [PATCH] src/pgtkfns.c (parse_resource_key): Use recursive sch


From: Po Lu
Subject: bug#60565: [PATCH] src/pgtkfns.c (parse_resource_key): Use recursive schema lookup
Date: Sat, 07 Jan 2023 19:04:18 +0800
User-agent: Gnus/5.13 (Gnus v5.13)

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Tad Fisher <tadfisher@gmail.com>
>> Date: Thu, 5 Jan 2023 01:58:47 +0000
>> 
>> 
>> From 8e2cf80593dd78030929f96f0f1a3e1a325428a4 Mon Sep 17 00:00:00 2001
>> From: Tad Fisher <tadfisher@gmail.com>
>> Date: Wed, 4 Jan 2023 13:40:17 -0800
>> Subject: [PATCH] ; * src/pgtkfns.c (parse_resource_key): Use recursive 
>> schema lookup
>> 
>> XDG_DATA_DIRS may consist of multiple directories, and
>> g_settings_schema_source_get_default composes these into a recursive
>> schema source. One must pass TRUE to g_settings_schema_source_lookup,
>> otherwise only the first directory in XDG_DATA_DIRS is searched.
>> 
>> It follows that in the case that the directory containing the compiled
>> GSettings schema for Emacs is not the first in XDG_DATA_DIRS,
>> parse_resource_key will not accept any resource key, which causes
>> pgtk_get_defaults_value and pgtk_set_defaults_value to fail.
>> 
>> This impacts systems that compose multiple GSettings schema sources
>> via XDG_DATA_DIRS, such Flatpak and NixOS.
>> 
>> Supporting GIO documentation for g_settings_schema_source_get_default:
>> 
>> > The returned source may actually consist of multiple schema sources
>> > from different directories, depending on which directories were given
>> > in `XDG_DATA_DIRS` and `GSETTINGS_SCHEMA_DIR`. For this reason, all
>> > lookups performed against the default source should probably be done
>> > recursively.
>
> Thanks.  Po Lu, any comments?

Fine by me.  Please install if the copyright exemption checks out.

Thanks, Tad.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]