Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The mu4e package fails to load mu4e with the mu4e layer. (mu4e-maildirs-extension) #6028

Closed
jpfairbanks opened this issue May 10, 2016 · 18 comments
Labels
- Mailling list - Email Fixed in develop stale marked as a stale issue/pr (usually by a bot)

Comments

@jpfairbanks
Copy link
Contributor

Description

The mu4e package fails to load mu4e with the mu4e layer.

Solution?

This patch "fixes it" by disabling the mu4e-maildirs-extension.
I wasn't using before mu4e-maildirs-extension so I can live with that, but other people probably need the extensions.

diff --git a/layers/ email/mu4e/packages.el b/layers/ email/mu4e/packages.el
index 86b5f34..18a9f22 100644
--- a/layers/ email/mu4e/packages.el
    b/layers/ email/mu4e/packages.el
@@ -13,7  13,7 @@
       '(
         (mu4e :location site)
         mu4e-alert
-        mu4e-maildirs-extension
         org
         ))

I still get this message which looks like a warning that should be fixed.

Configuring package mu4e...
(Spacemacs) Warning: Auto-evilication could not remap these functions in map `mu4e-headers-mode-map':
   - `mu4e-headers-query-prev' originally mapped on `\'
Configuring package mu4e...done
Configuring package mu4e...
(Spacemacs) Warning: Auto-evilication could not remap these functions in map `mu4e-headers-mode-map':
   - `mu4e-headers-query-prev' originally mapped on `\'
Configuring package mu4e...done

Reproduction guide

  • Start Emacs
  • M-x mu4e

Observed behaviour: Error messages appear instead of the mu4e-main buffers.

Expected behaviour: mu4e-main buffer should appear.

System Info

  • OS: gnu/linux
  • Emacs: 24.5.1
  • Spacemacs: 0.105.20
  • Spacemacs branch: develop (rev. c2fc02e)
  • Graphic display: t
  • Distribution: spacemacs
  • Editing style: vim
  • Completion: helm
  • Layers:
(spacemacs-helm auto-completion emacs-lisp git github markdown org pandoc mu4e spell-checking syntax-checking csv extra-langs xkcd)

Backtrace

From the message buffer.

(Spacemacs) Configuring mu4e...
(Spacemacs)   -> pre-init (org)...
(Spacemacs)   -> init (mu4e)...
Configuring package mu4e...
(Spacemacs) Warning: Auto-evilication could not remap these functions in map `mu4e-headers-mode-map':
   - `mu4e-headers-query-prev' originally mapped on `\'
Configuring package mu4e...done (0.153s)
(Spacemacs) Configuring mu4e-alert...
(Spacemacs)   -> init (mu4e)...
(Spacemacs) Configuring mu4e-maildirs-extension...
(Spacemacs)   -> init (mu4e)...

... a bunch of normal stuff

Open the quickhelp.
Configuring package helm...done (0.245s)
gnutls.c: [0] (Emacs) fatal error: The TLS connection was non-properly terminated.
command-execute: Buffer is read-only: #<buffer *Messages*>
Mark saved where search started [2 times]
error in process filter: mu4e-maildirs-extension-new-maildir: Wrong type argument: wholenump, -2
error in process filter: Wrong type argument: wholenump, -2
[mu4e] Contacts received: 670
mu4e-maildirs-extension-new-maildir: Wrong type argument: wholenump, -2 [2 times]

I don't know if the gnutls.c warnings are relevant.
The wholenump -2 seems to be where the problem is.
If I keep calling (mu4e) then the error
mu4e-maildirs-extension-new-maildir: Wrong type argument: wholenump, -2 [2 times]
repeats.

@StreakyCobra
Copy link
Contributor

CC @nixmaniack @AlejandroCatalina

@AlejandroCatalina
Copy link
Contributor

Looks like something changed in the mu4e package. I guess mu4e-maildirs-extension didn't update the assumptions about the arguments. I don't use the maildirs extension so I didn't notice it.

I'll look into recent updates of mu4e.

@jpfairbanks
Copy link
Contributor Author

jpfairbanks commented May 11, 2016 via email

@nixmaniack
Copy link
Contributor

I don't use maildirs extension often but I tried now and it worked fine even after updating emacs packages(may be because I have custom config for both). I'll give it a try without my configs and see if I can reproduce this.

@nixmaniack
Copy link
Contributor

I just tried with Spacemacs's config with following extra bit in user-init.

(setq mu4e-maildir "~/Maildir_Private"
      mu4e-drafts-folder "/Personal/[Gmail].Drafts"
      mu4e-sent-folder "/Personal/[Gmail].Sent Mail"
      mu4e-trash-folder "/Personal/[Gmail].Trash"
      mu4e-refile-folder "/Personal/[Gmail].All Mail")

And everything worked without any errors.
I'm using mu v0.9.15 and mu4e-maildirs-extension-20160126.39.

Since I can't reproduce, unable to debug further.

Can you try purging *.elc files in your mu4e-installation-path?

@jpfairbanks
Copy link
Contributor Author

where should the mu4e-installation-path be? I currently am not setting it. "/usr/share/emacs/site-lisp" has an mu4e directory.

@darkfeline
Copy link
Contributor

darkfeline commented May 12, 2016

I actually ran into this, it's a "bug" in mu4e-maildirs-extension.

agpchil/mu4e-maildirs-extension#26

P.S.: Personally I'm okay with just removing mu4e-maildirs-extension. It goes against the driving principle of mu, which is search-driven email management as opposed to per-mailbox email management. Not sure how many people are actually using it.

@nixmaniack
Copy link
Contributor

It was proposed long back based on mu4e users' feedback to disable maildirs-extension.
Reference: #5112 #4892 bb07eec

@jpfairbanks
Copy link
Contributor Author

Thanks for the help in understanding this.
Here is a cross post from issue agpchil/mu4e-maildirs-extension#26:

  1. Does "is a mailbox" mean "is a directory containing subdirectories: new, cur, tmp"?
  2. If root is a maildir, does that indicate improper initialization of the Maildir directory?

I set things up with OfflineIMAP, but have also used gnus and mu4e with this maildir. I would not be surprised if things got messed up by conflicting settings or initializations.

@stevenarntson
Copy link

I'm a nonprogrammer user of Mu4e who just switched to Spacemacs, and this was a problem for me. Thank you so much for posting this solution--it worked on my system: emacs 24.5.1, spacemacs 0.2, and mu4e .9.1.2

@runswithd6s
Copy link

runswithd6s commented Oct 13, 2016

I hadn't seen this as an issue until recently, but I also have this bug to report:

Description

After upgrading to 0.200.1 and updating packages, mu4e layer no longer works.

Solution?

The proposed "solution" of commenting out the mu4e-maildir-extensions in packages
solves the issue for me.

Reproduction Guide

  • Ensure maildir-utils is installed
  • Ensure mu4e is installed
  • Enable mu4e layer
  • Start emacs with --debug-init (or restart) SPC q d
  • Enable debug-on-error SPC t D
  • SPC m a M

Observed Behavior
mu4e appears to load the list of contacts from the database, but does not
enter the primary screen for the applciation.

Expected Behavior
The main menu screen for mu4e should be displayed.

Notes on Testing
I've tried rolling back to Spacemacs 0.200.0 and rolling back package updates.
For some reason, I had the same failure. This worked for me on 2016-10-11, on
which I believe I was on Spacemacs: 0.200.0. The version of mu4e-maildirs-extension.el is from

`;; Filename: mu4e-maildirs-extension.el
;; Version: 0.1
;; Package-Version: 20160911.41

System Info 💻

  • OS: gnu/linux
  • Emacs: 24.5.1
  • Spacemacs: 0.200.1
  • Spacemacs branch: nil (rev. 3706a42)
  • Graphic display: t
  • Distribution: spacemacs
  • Editing style: emacs
  • Completion: helm
  • Layers:
(auto-completion better-defaults clojure dash elfeed emacs-lisp erc finance git markdown music mu4e org python ruby ruby-on-rails
                 (shell :variables shell-default-shell 'eshell shell-enable-smart-eshell t shell-protect-eshell-prompt nil shell-default-height 30 shell-default-position 'bottom)
                 search-engine spell-checking syntax-checking tmux vagrant version-control)

Backtrace

Debugger entered--Lisp error: (wrong-type-argument wholenump -2)
  make-string(-2 32)
  mu4e-maildirs-extension-new-maildir("/")
  mapcar(mu4e-maildirs-extension-new-maildir ("/" "/Archives" "/Archives/2014" "/Archives/2015" "/Archives/2016" "/connor" "/drafts" "/nora" "/ryan" "/sent" "/taxes/*" "/taxes/2015" "/trash"))
  mu4e-maildirs-extension-load-maildirs()
  mu4e-maildirs-extension-update()
  mu4e-maildirs-extension-main-view-handler()
  run-hooks(change-major-mode-after-body-hook special-mode-hook mu4e-main-mode-hook)
  apply(run-hooks (change-major-mode-after-body-hook special-mode-hook mu4e-main-mode-hook))
  run-mode-hooks(mu4e-main-mode-hook)
  mu4e-main-mode()
  mu4e~main-view-real(nil nil)
  mu4e~main-view()
  mu4e~start(mu4e~main-view)
  mu4e(nil)
  call-interactively(mu4e record nil)
  command-execute(mu4e record)
  helm-M-x(nil #("mu4e" 0 4 (match-part "mu4e")))
  call-interactively(helm-M-x nil nil)
  command-execute(helm-M-x)

@paynito
Copy link

paynito commented Oct 21, 2016

same problem as @runswithd6s

@runswithd6s
Copy link

I suggest that this extension is toggled as an option for the layer itself.

@bencef
Copy link

bencef commented Mar 7, 2017

I added mu4e-maildirs-extension to the dotspacemacs-excluded-packages now mu4e works, but I can't start org-mode anymore, because it requires org-mu4e which requires mu4e which tries to load the extension.

I'm a bit confused why this is not a problem when I simply start mu4e.

@jonasfagundes
Copy link

I got the same error today when I tried to test mu4e with spacemacs, commenting the mu4e-maildirs-extension line as @jpfairbanks said worked for me (thank you @jpfairbanks).

Why not just remove this package to avoid this error for new users? The functionality is not essential and the package is not receiving any love recently.

@wilhelmy
Copy link

wilhelmy commented May 5, 2018

I just ran into the same issue. 👍 for disabling it.

@dpflug
Copy link

dpflug commented May 25, 2018

#9586 may help here

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!

@github-actions github-actions bot added the stale marked as a stale issue/pr (usually by a bot) label Feb 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- Mailling list - Email Fixed in develop stale marked as a stale issue/pr (usually by a bot)
Projects
None yet
Development

No branches or pull requests