unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Andrew Tropin <andrew@trop.in>
To: Maxime Devos <maximedevos@telenet.be>, 56661@debbugs.gnu.org
Subject: bug#56661: EMACSLOADPATH not set when using Guix System + Guix Home + SLIM + Mate
Date: Wed, 20 Jul 2022 15:08:22 +0300	[thread overview]
Message-ID: <87v8rsoukp.fsf@trop.in> (raw)
In-Reply-To: <8f5cae4c-a84f-f5e2-d4fa-c60fdbf330cd@telenet.be>

[-- Attachment #1: Type: text/plain, Size: 6453 bytes --]

On 2022-07-20 12:45, Maxime Devos wrote:

> Hi,
>
> (the SLIM + Mate might be irrelevant, untested)
>
> I am using Guix System and Guix Home. In Guix Home, I've added the 
> "emacs" and "emacs-magit" packages (and some others):
>
>> (home-environment
>>   (packages
>>     (specifications->packages
>>       (list "git" "irssi" "evolution" "openssh" "gnupg" "htop"
>>             "bash" "coreutils" "bash-completion"
>>             "emacs" "emacs-magit" "emacs-paredit"
>>             "icedove" "gnunet" "seahorse" #;"icedove-wayland")))
>>   (services
>>     (list (service
>>             home-bash-service-type
>>             (home-bash-configuration
>>               (aliases
>>                 '(("grep" . "grep --color=auto")
>>                   ("ll" . "ls -l")
>>                   ("ls" . "ls -p --color=auto")))
>>               (bashrc
>>                 (list (local-file ".bashrc" "bashrc")))
>>               (bash-profile
>>                 (list (local-file
>>                         ".bash_profile"
>>                         "bash_profile"))))))))
>
> For completeness, here is the .bash_profile and .bashrc (unmodified from 
> base installation, except for removing a redundant alias):
>
>> # Honor per-interactive-shell startup file
>> if [ -f ~/.bashrc ]; then . ~/.bashrc; fi

Hi Maxime,

According to the documentation to get all the environment variables set
correctly you either need to manage your login shell with Guix Home or
do additional configuration of your shell:
https://guix.gnu.org/manual/devel/en/html_node/Configuring-the-Shell.html

From what I see you manage bash with Guix Home, so according to the
source code your bash_profile should look differently from what you've
posted and must contain `source ~/.profile` in it:
https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/home/services/shells.scm#n440

This line makes your login shell source .profile, which sources
setup-environment, which sources ~/.guix-home/profile/etc/profile, which
sets EMACSLOADPATH.

Additionally, I've built the home environment you provided and it
contains the code I mentioned above.

Make sure that ~/.bash_profile and ~/.guix-home/files/.bash_profile
point to the same file in the store.

>
> and
>
>> # Bash initialization for interactive non-login shells and
>> # for remote shells (info "(bash) Bash Startup Files").
>>
>> # Export 'SHELL' to child processes.  Programs such as 'screen'
>> # honor it and otherwise use /bin/sh.
>> export SHELL
>>
>> if [[ $- != *i* ]]
>> then
>>     # We are being invoked from a non-interactive shell.  If this
>>     # is an SSH session (as in "ssh host command"), source
>>     # /etc/profile so we get PATH and other essential variables.
>>     [[ -n "$SSH_CLIENT" ]] && source /etc/profile
>>
>>     # Don't do anything else.
>>     return
>> fi
>>
>> # Source the system-wide file.
>> source /etc/bashrc
>>
>> # Adjust the prompt depending on whether we're in 'guix environment'.
>> if [ -n "$GUIX_ENVIRONMENT" ]
>> then
>>     PS1='\u@\h \w [env]\$ '
>> else
>>     PS1='\u@\h \w\$ '
>> fi
>
> After a "guix home reconfigure" and after a few reboots, I tried out 
> emacs-magit, but there was no match for the "M-x magit-status".  It 
> turned out that $EMACSLOADPATH was unset. However, it is set in 
> ~/.guix-home/profile/etc/profile:
>
>> # Source this file to define all the relevant environment variables in 
>> Bash
>> # for this profile.  You may want to define the 'GUIX_PROFILE' environment
>> # variable to point to the "visible" name of the profile, like this:
>> #
>> #  GUIX_PROFILE=/path/to/profile ; \
>> #  source /path/to/profile/etc/profile
>> #
>> # When GUIX_PROFILE is undefined, the various environment variables refer
>> # to this specific profile generation.
>>
>> export 
>> PATH="${GUIX_PROFILE:-/gnu/store/ll0p9k6yp5070svjhwry8dxdm98ipk7d-profile}/bin:${GUIX_PROFILE:-/gnu/store/ll0p9k6yp5070svjhwry>
>> export 
>> GIT_EXEC_PATH="${GUIX_PROFILE:-/gnu/store/ll0p9k6yp5070svjhwry8dxdm98ipk7d-profile}/libexec/git-core"
>> export 
>> BASH_LOADABLES_PATH="${GUIX_PROFILE:-/gnu/store/ll0p9k6yp5070svjhwry8dxdm98ipk7d-profile}/lib/bash${BASH_LOADABLES_PATH:+:}$BA>
>> export 
>> INFOPATH="${GUIX_PROFILE:-/gnu/store/ll0p9k6yp5070svjhwry8dxdm98ipk7d-profile}/share/info${INFOPATH:+:}$INFOPATH"
>> export 
>> EMACSLOADPATH="${GUIX_PROFILE:-/gnu/store/ll0p9k6yp5070svjhwry8dxdm98ipk7d-profile}/share/emacs/site-lisp${EMACSLOADPATH:+:}$E>
>> export 
>> XDG_DATA_DIRS="${GUIX_PROFILE:-/gnu/store/ll0p9k6yp5070svjhwry8dxdm98ipk7d-profile}/share${XDG_DATA_DIRS:+:}$XDG_DATA_DIRS"
>
> (nevermind the >, that's just me not making the terminal wide enough 
> before copying)
>
> Weirdly, EMACSLOADPATH is not set (tested in a terminal), but PATH, 
> GIT_EXEC_PATH, BASH_LOADABLES_PATH, INFOPATH and XDG_DATA_DIRS are set.  
> Also, inside a login shell (bash --login) (started inside the graphical 
> environment), EMACSLOADPATH is not set.
>
> Also, if I do "source ~/.guix-home/setup-environment", then 
> $EMACSLOADPATH" is set.
>
> TBI ...
>
> Greetings,
> Maxime.
>
>
> -----BEGIN PGP PUBLIC KEY BLOCK-----
>
> xjMEX4ch6BYJKwYBBAHaRw8BAQdANPb/d6MrGnGi5HyvODCkBUJPRjiFQcRU5V+m
> xvMaAa/NL01heGltZSBEZXZvcyA8bWF4aW1lLmRldm9zQHN0dWRlbnQua3VsZXV2
> ZW4uYmU+wpAEExYIADgWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCX4ch6AIbAwUL
> CQgHAwUVCgkICwUWAgMBAAIeAQIXgAAKCRBJ4+4iGRcl7japAQC3opZ2KGWzWmRc
> /gIWSu0AAcfMwyinFEEPa/QhUt2CogD/e2RdF4CYAgaRHJJmZ9WU7piKbLZ7llB4
> LzgezVDHggzNJU1heGltZSBEZXZvcyA8bWF4aW1lZGV2b3NAdGVsZW5ldC5iZT7C
> kAQTFggAOBYhBMHzPuIMUo/bfdcBH0nj7iIZFyXuBQJf56ycAhsDBQsJCAcDBRUK
> CQgLBRYCAwEAAh4BAheAAAoJEEnj7iIZFyXujpQBAKV1SwDDl4f24rXciDlB9L8W
> ycZt30CgbewMSRQk4mvbAP9dFMbVVixYBd6C8cfhR+NsOBGiOJnQABlUmgNuqGFJ
> Dc44BF+HIegSCisGAQQBl1UBBQEBB0BOlzIWiJzgobMF6/cqwLaLk7jIcFSZ++c0
> k9cCNT6YXwMBCAfCeAQYFggAIBYhBMHzPuIMUo/bfdcBH0nj7iIZFyXuBQJfhyHo
> AhsMAAoJEEnj7iIZFyXuMr0BAJc8cl5PGvVmVuSQVKjleNl4DK1/XAaPAYPe34AE
> fZJPAP9IqLCQhH/FeJanHqBP8gNdGNI2qn8RnnLVfRJgUjZ1BA==
> =OVqp
> -----END PGP PUBLIC KEY BLOCK-----

-- 
Best regards,
Andrew Tropin

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

  parent reply	other threads:[~2022-07-20 12:09 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-20 10:45 bug#56661: EMACSLOADPATH not set when using Guix System + Guix Home + SLIM + Mate Maxime Devos
2022-07-20 10:59 ` bug#56661: EMACSLOADPATH not set when using Guix System + Guix Home + SDDM " Maxime Devos
2022-07-20 12:08 ` Andrew Tropin [this message]
2022-07-20 12:30   ` bug#56661: EMACSLOADPATH not set when using Guix System + Guix Home + SLIM " Maxime Devos
2022-07-20 17:47     ` Andrew Tropin
2022-07-22  9:28       ` bug#56661: EMACSLOADPATH not set when using Guix System + Guix Home + SDDM " Maxime Devos
2022-07-22 10:17         ` Maxime Devos
2022-07-22  9:32       ` bug#56661: EMACSLOADPATH not set when using Guix System + Guix Home + SLIM " Maxime Devos
2022-07-22 13:03         ` Andrew Tropin
2022-07-22 13:13           ` bug#56661: SDDM does not do the equivalent of 'login shell --login', unlike other login managers Maxime Devos
2022-07-22 10:24 ` bug#56661: EMACSLOADPATH not set when using Guix System + Guix Home + SDDM + Mate Maxime Devos
2022-07-22 10:44   ` Maxime Devos
2022-07-22 11:00     ` bug#56661: SDDM does not do the equivalent of 'login shell --login', unlike other login managers Maxime Devos
2022-07-22 13:15     ` bug#56661: EMACSLOADPATH not set when using Guix System + Guix Home + SDDM + Mate Andrew Tropin
2022-07-30 11:16 ` bug#56661: [PATCH] build-self: Try printing nicer error messages Maxime Devos
2022-07-30 11:17   ` Maxime Devos

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87v8rsoukp.fsf@trop.in \
    --to=andrew@trop.in \
    --cc=56661@debbugs.gnu.org \
    --cc=maximedevos@telenet.be \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).