Subject: bug#38273: emacs doesn't open files

From: zimoun <[email-masked]>
Date: Fri, 22 Nov 2019 14:42:25 +0100

Hi Maxim,

Thank you for all the details.

On Fri, 22 Nov 2019 at 04:46, Maxim Cournoyer <[email-masked]> wrote:

> There's no need to be sorry; that's a pitfall many are likely to
> encounter sooner or later.  I'm thinking one common place it'd bite
> users would be when they use their desktop manager's application
> launcher to start Emacs:  in this case, the EMACSLOADPATH would be taken
> from what it was at the time they logged in their session, and would
> never be refreshed until the next login.

I do not know if it is related, but the initial report of this bug
seems similar to this bug report [1].

[1] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=38309

> --8<---------------cut here---------------start------------->8---
> tree /gnu/store/vhk1ljc45jn465xk3lqx0030qlkp53ws-emacs-grep-a-lot-1.0.7
> /gnu/store/vhk1ljc45jn465xk3lqx0030qlkp53ws-emacs-grep-a-lot-1.0.7
> └── share
>     ├── doc
>     │   └── emacs-grep-a-lot-1.0.7
>     │       └── COPYING
>     └── emacs
>         └── site-lisp
>             └── guix.d
>                 └── grep-a-lot-1.0.7
>                     ├── grep-a-lot-autoloads.el
>                     ├── grep-a-lot.el
>                     └── grep-a-lot.elc
> --8<---------------cut here---------------end--------------->8---
>
> The motivation for the above layout was to make sure the package files
> wouldn't clash together.  I'm not sure if this motivation is truly
> important, given that all the Emacs symbols are global and must already
> be uniquely named to avoid clashes (the common thing to do is to use a
> prefix named after the package for every procedure/variables defined);
> I'd expect the same rigor to be employed when naming the package files.
>
> So, there's a couple things we could do to make the life of users
> better:
>
> 1) Deprecate the use of guix.d and adapt the emacs-build-system so that
> it stops producing it.

It seems the easiest, isn't it? I have a poor understanding of the
details by it seems to simplify how it works.

Maybe, asking on guix-devel to have the inputs of Pierre and/or Alex
should be helpful.

> 2) Contribute a patch to Emacs so that the directories present in the
> EMACSLOADPATH would be searched recursively for packages.

Following time to time the list emacs-devel, I do not how hard it
would be to convince for this kind of change. :-)

> 3) Do nothing and expect the users to use the
> 'guix-set-emacs-environment' (from emacs-guix) to source their user
> profile so that EMACSLOADPATH is refreshed, then issue
> 'guix-emacs-autoload-packages' (from the site-start.el shipped with our
> Emacs package).
>
> The third option seems like too complicated and bothersome to be worth
> explaining to newcomers, so I'd personally go for either 1 or 2.

Even if I am a fan of emacs-guix, I am not sure that this presumption
would be true. I mean that I agree with your comment.

Thank you for all your insights in the Emacs land.

All the best,
simon