missing $GUIX_PROFILE/share/emacs/site-lisp in EMACSLOADPATH

  • Done
  • quality assurance status badge
Details
3 participants
  • bbb ee
  • Maxim Cournoyer
  • Rostislav Svoboda
Owner
unassigned
Submitted by
bbb ee
Severity
normal

Debbugs page

bbb ee wrote 3 years ago
(address . bug-guix@gnu.org)
CALNLCmURimzbuyE6ETy9ujLBLvu1DKk3OWo55JtWXHjc+NDwKg@mail.gmail.com
## Description of bug
emacs can't load packages installed by guix because missing
$GUIX_PROFILE/share/emacs/site-lisp
in EMACSLOADPATH

$GUIX_PROFILE/share/emacs/site-lisp isn't set in my
$GUIX_PROFILE/etc/profile and not in my $EMACSLOADPATH

```
$ echo $EMACSLOADPATH
/run/current-system/profile/share/emacs/site-lisp:/run/current-system/profile/share/emacs/27.1/lisp

$ less $GUIX_PROFILE/etc/profile
export EMACSLOADPATH="${GUIX_PROFILE:-/gnu/store/vq5dzmbx202z9p5hjyxfzcdpyzapxgxg-profile}/share/emacs/site-lisp:${GUIX_PROFILE:-/gnu/store/vq5dzmbx202z9p5hjyxfzcdpyzapxgxg-profile}/share/emacs/27.1/lisp${EMACSLOADPATH:+:}$EMACSLOADPATH"

```

## Workaround used
add in init.el
```
(add-to-list 'load-path "/home/dev_1/.guix-profile/share/emacs/site-lisp")
(guix-emacs-autoload-packages)
```
## version
emacs 27.1
Attachment: file
Maxim Cournoyer wrote 3 years ago
(name . bbb ee)(address . blasforr@gmail.com)(address . 52002@debbugs.gnu.org)
877dd2dtjt.fsf@gmail.com
Hello,

bbb ee <blasforr@gmail.com> writes:

Toggle quote (18 lines)
> ## Description of bug
> emacs can't load packages installed by guix because missing
> $GUIX_PROFILE/share/emacs/site-lisp
> in EMACSLOADPATH
>
> $GUIX_PROFILE/share/emacs/site-lisp isn't set in my
> $GUIX_PROFILE/etc/profile and not in my $EMACSLOADPATH
>
> ```
> $ echo $EMACSLOADPATH
> /run/current-system/profile/share/emacs/site-lisp:/run/current-system/profile/share/emacs/27.1/lisp
>
> $ less $GUIX_PROFILE/etc/profile
> export
> EMACSLOADPATH="${GUIX_PROFILE:-/gnu/store/vq5dzmbx202z9p5hjyxfzcdpyzapxgxg-profile}/share/emacs/site-lisp:${GUIX_PROFILE:-/gnu/store/vq5dzmbx202z9p5hjyxfzcdpyzapxgxg-profile}/share/emacs/27.1/lisp${EMACSLOADPATH:+:}$EMACSLOADPATH"
>
> ```

The EMACSLOADPATH environment variable is set when installing Emacs
itself; have you installed the 'emacs' package in your profile (guix
install emacs), then sourced your profile again
(. ~/.guix-profile/etc/profile), or alternatively started a new shell?

This works for me, for example:

Toggle snippet (9 lines)
$ guix shell --container emacs emacs-magit -- emacs --batch --eval \
'(begin (print (getenv "EMACSLOADPATH") (print (magit-version))'
Loading /gnu/store/hsj3kl0vc3hxiapklg5nj42z5jb4s80p-emacs-magit-3.3.0/share/emacs/site-lisp/magit-3.3.0/magit-autoloads...
[...]
"/gnu/store/zv9iqvv6jnnvf0cr0c8kan3dcgj8mybj-profile/share/emacs/site-lisp:/gnu/store/ybpddmq7f8ajzydhiqqx6dldgmadqanp-emacs-27.2/share/emacs/27.2/lisp"

"3.3.0"

HTH,

Maxim
bbb ee wrote 3 years ago
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)(address . 52002@debbugs.gnu.org)
CALNLCmX_Oi7VFa+n5oMwezjBaLU-rLrePwZY=4TyWvu2cnT_GA@mail.gmail.com
Thanks, the problem is solved.

## Possible cause
Initially, I have emacs installed and ~/.guix-profile/etc/profile sourced.

but when I type "guix package -I | grep emacs". I don't see emacs package
(strange).

So I reinstall emacs : guix install emacs. Then I can see 2 emacs-27.1
installation
```
$ which -a emacs
/home/dev_1/.guix-profile/bin/emacs
/home/dev_1/.guix-profile/bin/emacs
/run/current-system/profile/bin/emacs

$ ls -l /home/dev_1/.guix-profile/bin/emacs
lrwxrwxrwx 8 root root 64 Jan 1 1970 /home/dev_1/.guix-profile/bin/emacs
-> /gnu/store/6mw831p6pccqwr3k3qanr6pmhcq0qym6-emacs-27.1/bin/emacs

$ ls -l /run/current-system/profile/bin/emacs
lrwxrwxrwx 2 root root 64 Jan 1 1970
/run/current-system/profile/bin/emacs ->
/gnu/store/yy66pbp3h5mw5sv7hrl1778skapszq7k-emacs-27.1/bin/emacs
```

Now $EMACSLOADPATH contains 6 paths with
"$GUIX_PROFILE/share/emacs/site-lisp" in it:
```
$ echo $EMACSLOADPATH
/home/dev_1/.guix-profile/share/emacs/site-lisp:/home/dev_1/.guix-profile/share/emacs/27.1/lisp:/home/dev_1/.guix-profile/share/emacs/site-lisp:/home/dev_1/.guix-profile/share/emacs/27.1/lisp:/run/current-system/profile/share/emacs/site-lisp:/run/current-system/profile/share/emacs/27.1/lisp
```
Before $EMACSLOADPATH contains only 2 paths without
"$GUIX_PROFILE/share/emacs/site-lisp" in it.

I think my first emacs installation should has something break,so
$EMACSLOADPATH isn't correctly set.

Thanks again

Le dim. 21 nov. 2021 à 04:25, Maxim Cournoyer <maxim.cournoyer@gmail.com> a
écrit :

Toggle quote (47 lines)
> Hello,
>
> bbb ee <blasforr@gmail.com> writes:
>
> > ## Description of bug
> > emacs can't load packages installed by guix because missing
> > $GUIX_PROFILE/share/emacs/site-lisp
> > in EMACSLOADPATH
> >
> > $GUIX_PROFILE/share/emacs/site-lisp isn't set in my
> > $GUIX_PROFILE/etc/profile and not in my $EMACSLOADPATH
> >
> > ```
> > $ echo $EMACSLOADPATH
> >
> /run/current-system/profile/share/emacs/site-lisp:/run/current-system/profile/share/emacs/27.1/lisp
> >
> > $ less $GUIX_PROFILE/etc/profile
> > export
> >
> EMACSLOADPATH="${GUIX_PROFILE:-/gnu/store/vq5dzmbx202z9p5hjyxfzcdpyzapxgxg-profile}/share/emacs/site-lisp:${GUIX_PROFILE:-/gnu/store/vq5dzmbx202z9p5hjyxfzcdpyzapxgxg-profile}/share/emacs/27.1/lisp${EMACSLOADPATH:+:}$EMACSLOADPATH"
> >
> > ```
>
> The EMACSLOADPATH environment variable is set when installing Emacs
> itself; have you installed the 'emacs' package in your profile (guix
> install emacs), then sourced your profile again
> (. ~/.guix-profile/etc/profile), or alternatively started a new shell?
>
> This works for me, for example:
>
> --8<---------------cut here---------------start------------->8---
> $ guix shell --container emacs emacs-magit -- emacs --batch --eval \
> '(begin (print (getenv "EMACSLOADPATH") (print (magit-version))'
> Loading
> /gnu/store/hsj3kl0vc3hxiapklg5nj42z5jb4s80p-emacs-magit-3.3.0/share/emacs/site-lisp/magit-3.3.0/magit-autoloads...
> [...]
>
> "/gnu/store/zv9iqvv6jnnvf0cr0c8kan3dcgj8mybj-profile/share/emacs/site-lisp:/gnu/store/ybpddmq7f8ajzydhiqqx6dldgmadqanp-emacs-27.2/share/emacs/27.2/lisp"
>
> "3.3.0"
> --8<---------------cut here---------------end--------------->8---
>
> HTH,
>
> Maxim
>
Attachment: file
Maxim Cournoyer wrote 3 years ago
(name . bbb ee)(address . blasforr@gmail.com)(address . 52002-done@debbugs.gnu.org)
87y2596mhc.fsf@gmail.com
Hello,

bbb ee <blasforr@gmail.com> writes:

Toggle quote (40 lines)
> Thanks, the problem is solved.
>
> ## Possible cause
> Initially, I have emacs installed and ~/.guix-profile/etc/profile sourced.
>
> but when I type "guix package -I | grep emacs". I don't see emacs package
> (strange).
>
> So I reinstall emacs : guix install emacs. Then I can see 2 emacs-27.1
> installation
> ```
> $ which -a emacs
> /home/dev_1/.guix-profile/bin/emacs
> /home/dev_1/.guix-profile/bin/emacs
> /run/current-system/profile/bin/emacs
>
> $ ls -l /home/dev_1/.guix-profile/bin/emacs
> lrwxrwxrwx 8 root root 64 Jan 1 1970 /home/dev_1/.guix-profile/bin/emacs
> -> /gnu/store/6mw831p6pccqwr3k3qanr6pmhcq0qym6-emacs-27.1/bin/emacs
>
> $ ls -l /run/current-system/profile/bin/emacs
> lrwxrwxrwx 2 root root 64 Jan 1 1970
> /run/current-system/profile/bin/emacs ->
> /gnu/store/yy66pbp3h5mw5sv7hrl1778skapszq7k-emacs-27.1/bin/emacs
> ```
>
> Now $EMACSLOADPATH contains 6 paths with
> "$GUIX_PROFILE/share/emacs/site-lisp" in it:
> ```
> $ echo $EMACSLOADPATH
> /home/dev_1/.guix-profile/share/emacs/site-lisp:/home/dev_1/.guix-profile/share/emacs/27.1/lisp:/home/dev_1/.guix-profile/share/emacs/site-lisp:/home/dev_1/.guix-profile/share/emacs/27.1/lisp:/run/current-system/profile/share/emacs/site-lisp:/run/current-system/profile/share/emacs/27.1/lisp
> ```
> Before $EMACSLOADPATH contains only 2 paths without
> "$GUIX_PROFILE/share/emacs/site-lisp" in it.
>
> I think my first emacs installation should has something break,so
> $EMACSLOADPATH isn't correctly set.
>
> Thanks again

Alright, glad you got it sorted!

Closing.

Maxim
Closed
Rostislav Svoboda wrote 1 years ago
Re: Archived problem report bug#52002 (missing $GUIX_PROFILE/share/emacs/site-lisp in EMACSLOADPATH)
(name . GNU bug tracker automated control server)(address . control@debbugs.gnu.org)
CAEtmmewygtWHyekQB0sAZLBCcYnEgVQUDzzGF6AdgJXnNuDM1g@mail.gmail.com
unarchive 52002
Rostislav Svoboda wrote 1 years ago
Fwd: missing $GUIX_PROFILE/share/emacs/site-lisp in EMACSLOADPATH
(address . 52002@debbugs.gnu.org)
CAEtmmewNXAR3VD4MW3k_z64po_J4uneuAdXbAMpGK3OJVo3h9w@mail.gmail.com
This happens when I remove emacs from the default profile `guix remove
emacs` and install it via `guix home ...`.
IOW the bug is not that $GUIX_PROFILE/share/emacs/site-lisp is missing
in EMACSLOADPATH, but that "$HOME/.guix-profile/share/emacs/site-lisp"
is in the load-path even if emacs is not installed in the default
profile.

Cheers Bost
?
Your comment

This issue is archived.

To comment on this conversation send an email to 52002@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 52002
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help