Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/rougier/mu4e-thread-folding

Functions for folding threads in mu4e headers view
https://github.com/rougier/mu4e-thread-folding

emacs mail mu4e

Last synced: 3 months ago
JSON representation

Functions for folding threads in mu4e headers view

Awesome Lists containing this project

README

        

*** mu4e thread folding

[[file:mu4e-thread-folding.el][mu4e-thread-folding.el]] is a small library to enable threads folding in
[[https://www.djcbsoftware.nl/code/mu/mu4e.html][mu4e]]. This works by using overlays with an [[https://www.gnu.org/software/emacs/manual/html_node/elisp/Overlay-Properties.html][invisible property]] and
setting hooks at the right place. It is possible to configure colors
to better highlight a thread and also to have a prefix string
indicating if a thread is folded or not. Note that when a thread is
folded, any unread child remains visible.

*** Usage

The prefix string is displayed over the header line and it is thus
recommended to have an empty field at the start of an header line.
Have a look at ~mu4e-headers-fields~.

#+begin_src lisp
(require 'mu4e-thread-folding)

(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)))
#+end_src

*** Keybindings

#+begin_src lisp
(define-key mu4e-headers-mode-map (kbd "") 'mu4e-headers-toggle-at-point)
(define-key mu4e-headers-mode-map (kbd "") 'mu4e-headers-fold-at-point)
(define-key mu4e-headers-mode-map (kbd "") 'mu4e-headers-fold-all)
(define-key mu4e-headers-mode-map (kbd "") 'mu4e-headers-unfold-at-point)
(define-key mu4e-headers-mode-map (kbd "") 'mu4e-headers-unfold-all)
#+end_src

*** Customization

Options are accessible from the ~mu4e-thread-folding~ customization group.

*** Screenshot

[[./screenshot.png]]