GNU bug report logs - #38309
Recent $EMACSLOADPATH changes crash gnome-session

Previous Next

Package: guix;

Reported by: "Alex Griffin" <a <at> ajgrf.com>

Date: Thu, 21 Nov 2019 02:27:01 UTC

Severity: serious

Done: clement <at> lassieur.org (Clément Lassieur)

Bug is archived. No further changes may be made.

Full log


Message #52 received at 38309 <at> debbugs.gnu.org (full text, mbox):

From: Leo Prikler <leo.prikler <at> student.tugraz.at>
To: ludo <at> gnu.org
Cc: 38309 <at> debbugs.gnu.org
Subject: bug#38309: Recent $EMACSLOADPATH changes crash gnome-session
Date: Wed, 27 Nov 2019 01:01:31 +0100
Hi everyone,

Am Dienstag, den 26.11.2019, 09:56 +0100 schrieb Ludovic Courtès: 
> are we not going overboard with that big a environment variable? :-)
I think I vaguely remember a related discussion about the Emacs build
system adding the guix.d directory, which further worsens this problem
[1].  Putting that aside however, $EMACSLOADPATH should not contain
more than
- $GUIX_PROFILE/share/emacs/$EMACS_VERSION/lisp
- $GUIX_PROFILE/share/emacs/$EMACS_VERSION/site-lisp
- $GUIX_PROFILE/share/emacs/site-lisp
If I read (elisp)Library Search correctly, these directories each
contain a file to add their subdirectories to the load-path variable.  
This can be confirmed by searching in the store or through message-
debugging.  It appears, however, that these files are not quite
sufficient.  While the load-path is indeed modified, no autoloading
occurs for files inside guix.d -- indeed, I doubt it would occur for
any package, regardless of how we name it.

After further digging around, this appears to be a bug in guix-emacs. 
Rather than using the load-path variable, it uses $EMACSLOADPATH
directly via getenv.  I suggest either recursing into subdirectories as
Emacs itself would or using load-path instead of reverse engineering
it, preferring the latter if applicable.

Now that this has been cleared up, a fix should be in reach.  First we
would fix guix-emacs, then we can restrict $EMACSLOADPATH to the above
three -- perhaps two, as the versioned site-lisp appears unused.

WDYT?

Regards,
Leo

[1] As I only vaguely remember it, I can not find a source for this. 
However, the process that I've laid out should work fine with or
without guix.d





This bug report was last modified 5 years and 167 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.