unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Chris Marusich <cmmarusich@gmail.com>
To: Pierre Neidhardt <mail@ambrevar.xyz>
Cc: 38015@debbugs.gnu.org, myglc2@gmail.com, help-guix@gnu.org,
	Alex Kost <alezost@gmail.com>,
	Maxim Cournoyer <maxim.cournoyer@gmail.com>
Subject: [bug#38015] Emacs in multiple profiles
Date: Tue, 12 Nov 2019 23:18:29 -0800	[thread overview]
Message-ID: <87eeyc452y.fsf@gmail.com> (raw)
In-Reply-To: <87ftittvht.fsf@ambrevar.xyz> (Pierre Neidhardt's message of "Tue, 12 Nov 2019 08:16:30 +0100")

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

Hi Pierre and Maxim,

Pierre Neidhardt <mail@ambrevar.xyz> writes:

> Good luck!

Thank you, Pierre - and Maxim!  I was able to apply the 3 patches (using
commit 18a69803e2eea4f7555d6eafb6497a645c2d094f, which is on master)
cleanly.  I built a profile using the following manifest:

--8<---------------cut here---------------start------------->8---
(use-modules (gnu packages))

(specifications->manifest
 '(
   "emacs"
   "emacs-bbdb"
   ;; ... a whole lot of omitted packages ...
   "emacs-sr-speedbar"
   "emacs-terraform-mode"
   ))
--8<---------------cut here---------------end--------------->8---

I installed it like this:

  ./pre-inst-env guix package -m  /home/marusich/Documents/guix-manifests/emacs.scm -p ~/.guix-extra-profiles/emacs/emacs

I then emptied my default profile and added this to ~/.bash_profile:

--8<---------------cut here---------------start------------->8---
GUIX_EXTRA_PROFILES="$HOME/.guix-extra-profiles"
for i in $GUIX_EXTRA_PROFILES/*; do
	profile=$i/$(basename "$i")
	if [ -f "$profile"/etc/profile ]; then
		GUIX_PROFILE="$profile"
		. "$profile"/etc/profile
        export INFOPATH="$profile/share/info${INFOPATH:+:}$INFOPATH"
        export MANPATH="$profile/share/man${MANPATH:+:}$MANPATH"
	fi
	unset profile
done
--8<---------------cut here---------------end--------------->8---

I logged out and logged back in.  It seems to work so far.  I started
Emacs from a GNOME terminal bash shell.  There were no errors in my
Messages buffer after I started Emacs.  There were no error messages
from the Emacs process, either.  I'm enjoying my new Emacs right now!

So far, I've noticed three things:

- The fonts were different than I remember.  Not sure why it happened,
  but I'm guessing it had to do with the fact that I emptied my default
  profile, and thus got rid of a lot of fonts accidentally.  At this
  time, I doubt it's because of your changes.

- In the GNOME application picker, when I type "emacs" into the search
  bar, there are no longer any results.  Previously, Emacs showed up in
  the search.  This is true for IceCat, too, which I also moved into its
  own separate profile, so I think it's probably an issue with our GNOME
  package instead of your changes.

- Aspell does not work: "ispell-init-process: Error: No word lists can
  be found for the language "en_US"."  I think this happens because
  the Guix package for aspell refers to the default profile:

  (add-after 'install 'wrap-aspell
   (lambda* (#:key outputs #:allow-other-keys)
     (let ((bin/aspell (string-append (assoc-ref outputs "out")
                                      "/bin/aspell")))
       (wrap-program bin/aspell
         '("ASPELL_CONF" "" =
           ("${ASPELL_CONF:-\"dict-dir ${GUIX_PROFILE:-$HOME/.guix-profile}/lib/aspell\"}")))
       #t)))

We should probably follow up on these issues in separate bug reports.
Other than the above, it all just works.  I don't see any reason not to
merge it into master, since even with these issues it is a strict
improvement over the current situation in which we cannot use Emacs
nearly at all in non-default profiles.

If I notice anything else, I'll let you know!

Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:

> Subject: [PATCH 1/3] gnu: emacs: Locate Elisp libraries via EMACSLOADPATH.

LGTM!

> 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.

> 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)?

-- 
Chris

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

  reply	other threads:[~2019-11-13  7:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <9c395fd0-9458-7894-af8b-9294d212c60b@fastmail.net>
     [not found] ` <878tajzu03.fsf@gmail.com>
     [not found]   ` <m1efkb6x7v.fsf@ordinateur-de-catherine--konrad.home>
     [not found]     ` <87a7uyd7qy.fsf@gmail.com>
     [not found]       ` <m17eq17jsb.fsf@ordinateur-de-catherine--konrad.home>
     [not found]         ` <874ll51mq3.fsf@gmail.com>
     [not found]           ` <m1zi2v5jo0.fsf@ordinateur-de-catherine--konrad.home>
     [not found]             ` <87zi2t4jgh.fsf@gmail.com>
     [not found]               ` <877ep4z44b.fsf@gmail.com>
     [not found]                 ` <87tv88ihzc.fsf@ambrevar.xyz>
     [not found]                   ` <878spgo7ex.fsf@gmail.com>
     [not found]                     ` <87o8yccwtq.fsf@ambrevar.xyz>
     [not found]                       ` <871rv1ed8v.fsf@gmail.com>
     [not found]                         ` <87mudpm5nt.fsf@ambrevar.xyz>
     [not found]                           ` <874kzscpgs.fsf@gmail.com>
     [not found]                             ` <87eeyvespq.fsf@ambrevar.xyz>
     [not found]                               ` <87zhhhbhzl.fsf@gmail.com>
     [not found]                                 ` <877e4l5c9h.fsf@ambrevar.xyz>
2019-11-01  4:25                                   ` [bug#38015] Emacs in multiple profiles Maxim Cournoyer
2019-11-01 19:06                                     ` Pierre Neidhardt
2019-11-02  1:12                                       ` Maxim Cournoyer
2019-11-02  9:41                                         ` Pierre Neidhardt
2019-11-12  5:14                                     ` Chris Marusich
2019-11-12  7:16                                       ` Pierre Neidhardt
2019-11-13  7:18                                         ` Chris Marusich [this message]
2019-11-13 11:08                                           ` Pierre Neidhardt
2019-11-18  5:50                                           ` Maxim Cournoyer

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=87eeyc452y.fsf@gmail.com \
    --to=cmmarusich@gmail.com \
    --cc=38015@debbugs.gnu.org \
    --cc=alezost@gmail.com \
    --cc=help-guix@gnu.org \
    --cc=mail@ambrevar.xyz \
    --cc=maxim.cournoyer@gmail.com \
    --cc=myglc2@gmail.com \
    /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).