Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 709344 - net-mail/mu-1.3.6 USE=emacs breaks user org-mode installation
Summary: net-mail/mu-1.3.6 USE=emacs breaks user org-mode installation
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Matthew Smith
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2020-02-12 08:04 UTC by Jan Seeger
Modified: 2020-02-20 13:27 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info output (emergeinfo,5.82 KB, text/plain)
2020-02-12 08:04 UTC, Jan Seeger
Details
load-autoloads.awk (load-autoloads.awk,165 bytes, text/plain)
2020-02-12 08:05 UTC, Jan Seeger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Seeger 2020-02-12 08:04:36 UTC
Created attachment 613422 [details]
emerge --info output

If `mu` is installed with the `emacs` useflag, it will add a "(require 'mu)" to the site-local initialisation at `/usr/share/emacs/site-lisp/site-gentoo.el`. 

This will then transiently pull in other packages, like the `org-mode` bundled in Emacs. Installing a newer `org-mode` package via `package.el` will then lead to a mix of both versions loaded, resulting in a non-working org-mode.

This should be fixed by not requiring the library, but relying on the Emacs autoload functionality to load the elisp files when a function is first called. I've attached an AWK script that can generate these autoload lines. This script would then be called to generate the autoloads.
Comment 1 Jan Seeger 2020-02-12 08:05:28 UTC
Created attachment 613424 [details]
load-autoloads.awk

AWK script to generate autoloads. Call recursively with `find` on every `.el` file to generate list of autoloads.
Comment 2 Matthew Smith gentoo-dev 2020-02-12 14:18:48 UTC
Hi,

Thank you for the bug report. I was not able to reproduce the org-mode breakage myself but I have created a pull request (https://github.com/gentoo/gentoo/pull/14639) to merge a patch that uses the autoload system instead of requiring mu4e directly.

Thanks.
Comment 3 Larry the Git Cow gentoo-dev 2020-02-20 13:27:18 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=770e1fccb119fbce8ba6d16021a3598123f212ff

commit 770e1fccb119fbce8ba6d16021a3598123f212ff
Author:     Matt Smith <matt@offtopica.uk>
AuthorDate: 2020-02-12 14:13:32 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2020-02-20 13:22:28 +0000

    net-mail/mu: Use autoload instead of require
    
    Closes: https://bugs.gentoo.org/709344
    Signed-off-by: Matt Smith <matt@offtopica.uk>
    Package-Manager: Portage-2.3.88, Repoman-2.3.20
    Closes: https://github.com/gentoo/gentoo/pull/14639
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 net-mail/mu/files/70mu-gentoo-autoload.el |  2 +
 net-mail/mu/mu-1.3.6-r1.ebuild            | 99 +++++++++++++++++++++++++++++++
 2 files changed, 101 insertions(+)