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

Folding all messages does not apply after #24

Open
guibor opened this issue Jul 25, 2021 · 3 comments
Open

Folding all messages does not apply after #24

guibor opened this issue Jul 25, 2021 · 3 comments

Comments

@guibor
Copy link

guibor commented Jul 25, 2021

I would expect (add-hook 'mu4e-headers-found-hook 'mu4e-headers-fold-all) to automatically fold threads after any query (for some reason setting the default mode to 'folded doesn't apply.

For some reason threads are all unfolded, even though running (mu4e-headers-fold-all) immediately folds all threads when run explicitly.

@guibor
Copy link
Author

guibor commented Jul 25, 2021

I tried (advice-add 'mu4e-headers-mark-threads :after 'mu4e-headers-fold-all) and got the appropriate behavior, but it seems hacky. I would also perhaps expect setting the default mode to 'folded to apply after any search (or perhaps have a different configuration for this.

Otherwise, the package has gone through a lot of improvements over the last few weeks and is great!

@guibor
Copy link
Author

guibor commented Jul 25, 2021

Actually the previous solution presented problems.

This worked:

(setq mu4e-headers-found-hook '(mu4e-headers-mark-threads mu4e-headers-fold-all))

essentially ensuring that hooks are executed in the right order. It looks like mu4e-headers-mark-threads unfolds all threads. I'm sure there's a more elegant solution (either through the package, or just as a way to order hooks appropriately)

@rougier
Copy link
Owner

rougier commented Jul 26, 2021

Thanks for the fix. Not sure about the difference between the add-hook and setq versions. Does that mean add-hook prepend the hook ?

Also, could you make a PR to include your change (with possibly an adaptation whether default mode is folded/unfolded)?

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

2 participants