GNU bug report logs - #38015
Emacs in multiple profiles

Previous Next

Package: guix-patches;

Reported by: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Date: Fri, 1 Nov 2019 04:26:02 UTC

Severity: normal

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Chris Marusich <cmmarusich <at> gmail.com>
Cc: myglc2 <at> gmail.com, 38015 <at> debbugs.gnu.org, Pierre Neidhardt <mail <at> ambrevar.xyz>, help-guix <at> gnu.org, Alex Kost <alezost <at> gmail.com>
Subject: [bug#38015] Emacs in multiple profiles
Date: Mon, 18 Nov 2019 14:50:32 +0900
Hello Chris,

Chris Marusich <cmmarusich <at> gmail.com> writes:

[...]

I've skipped your previous questions, as I believe they were well
answered by Pierre (thank you, Pierre!).

>> Subject: [PATCH 2/3] build-system: emacs: Simplify the SET-EMACS-LOAD-PATH
>>  phase.
>>
>> +(define* (add-source-to-load-path #:key dummy #:allow-other-keys)
>> +  "Augment the EMACSLOADPATH environment variable with the source directory."
>>    (let* ((source-directory (getcwd))
>> -         (input-elisp-directories (input-directories->el-directories
>> -                                   (inputs->directories inputs)))
>> -         (emacs-load-path-value
>> -          (string-join
>> -           (append input-elisp-directories (list source-directory))
>> -           ":" 'suffix)))
>> +         (emacs-load-path-value (string-append (getenv "EMACSLOADPATH") ":"
>> +                                               source-directory)))
>>      (setenv "EMACSLOADPATH" emacs-load-path-value)
>> -    (format #t "environment variable `EMACSLOADPATH' set to ~a\n"
>> -            emacs-load-path-value)))
>> +    (format #t "source directory ~s appended to the `EMACSLOADPATH' \
>> +environment variable\n" source-directory)))
>
> It looks like the change is as follows: previously, we added multiple
> directories, including the source-directory, to the load path; after
> this change, we append just the source-directory to the EMACSLOADPATH.
> Can you remind me why we don't need to add the other elisp directories
> to the EMACSLOADPATH, too?  It seems to work, so I'm probably just
> missing something obvious.

The magic is in the set-paths phase that is inherited from the
gnu-build-system.  It uses the search path specification now specified in
the Emacs package to set the EMACSLOADPATH environment variable itself.

When building Elisp packages, it is useful to add the current source
directory to that environment variable, so that 'require' directives are
able to find the package's own modules (say, when running its test
suite).

>> Subject: [PATCH 3/3] gnu: emacs: Adapt the autoloads auxiliary code to use
>>  EMACSLOADPATH.
>
> As far as I can tell, this looks good to me, too.
>
> Finally: do you anticipate that this will cause any user-visible or
> backwards-incompatible changes that we should mention in the Guix
> channel's news file (and in the Guix NEWS file)?

Thanks for the review!  I can't anticipate any user-visible changes
except the current (incorrect) behavior.

This change is now live on master, with commit
47b3b4c2aa49e21f4cc32c97ff7bbbd069bb849c.  Thanks for testing :-).

Maxim




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

Previous Next


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