8.2.1 Applying and clearing labels

The label mark lets you apply labels to messages, which are short strings to attach to this message which you can query using the label: field.

To see them in your headers / message views, you need to add :labels to the mu4e-headers-fields and/or mu4e-view-fields, respectively.

For instance:

(setq mu4e-headers-fields
   '((:human-date      .  10)
     (:flags           .  4)
     (:from-or-to      .  20)
     (:mailing-list    .  8)
     (:maildir         .  8)
     (:labels          .  8)
     (:thread-subject  .  nil)))
(setq mu4e-view-fields
   '(:from :date :to :cc :bcc :subject
     :flags  :maildir
     :message-id :labels))

To change the labels for some message, you specify a label expression, which consists of a space-separated sequence of labels, each prefixed with either a + to add the label, or - to remove it.

For instance, to remove the boring label and add urgent to the message at point or the messages in region, press l and enter:

+urgent -boring

For clearing all labels, you can mark with L (’unlabel’).

You can search for labels using the label: field. For instance, label:urgent retrieves all messages labeled urgent.

Important: the labels are only stored in the database (the message files are not changed). This means that you would lose this information when you remove the database and recreate it, unless you export the labels before removing the database and re-import them after re-creating and re-indexing it; see the mu-labels man-page for further details.