mu4e: add custom variable for list of visible flags to display in headers view

This commit is contained in:
2013-02-21 11:46:23 -08:00
parent 55619550e9
commit 9944a4fd62

View File

@ -127,6 +127,25 @@ sent messages into message threads."
:type 'boolean
:group 'mu4e-headers)
(defcustom mu4e-headers-visible-flags
'('draft 'flagged 'new 'passed 'replied 'seen 'trashed 'attach 'encrypted 'signed 'unread)
"An ordered list of flags to show in the headers buffer. Each
element is a symbol in the list (DRAFT FLAGGED NEW PASSED
REPLIED SEEN TRASHED ATTACH ENCRYPTED SIGNED UNREAD)."
:type '(set
(const :tag "Draft" 'draft)
(const :tag "Flagged" 'flagged)
(const :tag "New" 'new)
(const :tag "Passed" 'passed)
(const :tag "Replied" 'replied)
(const :tag "Seen" 'seen)
(const :tag "Trashed" 'trashed)
(const :tag "Attach" 'attach)
(const :tag "Encrypted" 'encrypted)
(const :tag "Signed" 'signed)
(const :tag "Unread" 'unread))
:group 'mu4e-headers)
;; marks for headers of the form; each is a cons-cell (basic . fancy)
;; each of which is basic ascii char and something fancy, respectively
(defvar mu4e-headers-draft-mark (purecopy '("D" . "")) "Draft.")
@ -322,10 +341,11 @@ Note that `mu4e-flags-to-string' is for internal use only; this
function is for display. (This difference is significant, since
internally, the Maildir spec determines what the flags look like,
while our display may be different)."
(let ((str)
(let ((str "")
(get-prefix
(lambda (cell) (if mu4e-use-fancy-chars (cdr cell) (car cell)))))
(dolist (flag flags)
(dolist (flag mu4e-headers-visible-flags)
(when (member flag flags)
(setq str
(concat str
(case flag
@ -339,7 +359,7 @@ while our display may be different)."
('attach (funcall get-prefix mu4e-headers-attach-mark))
('encrypted (funcall get-prefix mu4e-headers-encrypted-mark))
('signed (funcall get-prefix mu4e-headers-signed-mark))
('unread (funcall get-prefix mu4e-headers-unread-mark))))))
('unread (funcall get-prefix mu4e-headers-unread-mark)))))))
str))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;