Hi Jorge,

On Sat, Dec 19 2020, Jorge P. de Morais Neto wrote:
It is a pity though that this workaround needs writing manual wrappers for every affected program.

In this particular case, we can actually fix Emacs. When Emacs spawns a child process it passes the environment as specified in the process-environment variable, so you can clear out the unwanted environment variables by running something like this during startup:

(setq process-environment
     (seq-remove (lambda (s)
                   (or (string-prefix-p "GTK_PATH=" s)
                       (string-prefix-p "XDG_DATA_DIRS=" s)))
                 process-environment))

That doesn't solve the broader problem in Guix, but it should make Emacs in particular work properly.

Carlo

Reply via email to