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

mu4e-thread-folding not working with Doom Emacs (mu4e 1.4.15) #26

Open
mcamou opened this issue Sep 20, 2021 · 4 comments
Open

mu4e-thread-folding not working with Doom Emacs (mu4e 1.4.15) #26

mcamou opened this issue Sep 20, 2021 · 4 comments

Comments

@mcamou
Copy link

mcamou commented Sep 20, 2021

I've installed mu4e-thread-folding on Doom Emacs and it does not work. Doom is installing mu4e 1.4.15.

I've tried e.g. M-x mu4e-headers-fold-all and mu4e-headers-fold-at-point and nothing happens.

@FrostyX
Copy link

FrostyX commented Sep 21, 2021

I've tried e.g. M-x mu4e-headers-fold-all and mu4e-headers-fold-at-point and nothing happens.

Happens to me as well, and I am using vanilla Emacs.
Just saying in case some debugging is required, we can try to find what is the intersection of Doom configuration and mine.

@mcamou
Copy link
Author

mcamou commented Sep 23, 2021

I did M-x mu4e-thread-folding-mode. Initially nothing happened, but when I opened a message folding mode got activated. I assume that I need to add this call to one of the mu4e hooks.

@mcamou
Copy link
Author

mcamou commented Sep 23, 2021

I got it to work with this config:

(use-package! mu4e-thread-folding
  :after mu4e
  :config
  (add-to-list 'mu4e-header-info-custom
               '(:empty . (:name "Empty"
                           :shortname ""
                           :function (lambda (msg) "  "))))

  (setq! mu4e-headers-fields '((:empty         .    2)
                              (:human-date    .   12)
                              (:flags         .    6)
                              (:mailing-list  .   10)
                              (:from          .   22)
                              (:subject       .   nil))
         mu4e-thread-folding-default-view 'folded
         mu4e-headers-found-hook '(mu4e-headers-mark-threads mu4e-headers-fold-all))

  (evil-define-key 'normal mu4e-headers-mode-map
    (kbd "TAB")  'mu4e-headers-toggle-at-point
    (kbd "<left>") 'mu4e-headers-fold-at-point
    (kbd "<S-left>") 'mu4e-headers-fold-all
    (kbd "<right>") 'mu4e-headers-unfold-at-point
    (kbd "<S-right>") 'mu4e-headers-unfold-all)
)

The relevant line is (setq mu4e-headers-found-hook '(mu4e-headers-mark-threads mu4e-headers-fold-all)).

Now if only #27 gets fixed I will be happy.

@rougier
Copy link
Owner

rougier commented Sep 26, 2021

The first time you activate the mode, it does not parse the current view and you need to do a new search before it becomes active (i.e. it has parsed the view).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants