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 from 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 loose this information when you remove the database and recreate it, unless you export the labels before removin the database and re-import them after re-creating and re-indexing it; see the mu-labels man-page for further details.

8.2.2 Doing something

something is a special kind of mark; you can use it to mark messages for ‘something’, and then decide later what the ‘something’ should be14 Later, you can set the actual mark using M-x mu4e-mark-resolve-deferred-marks (#). Alternatively, mu4e will ask you when you try to execute the marks (x).

After marking a message, the left-most columns in the headers view indicate the kind of mark. This is informative, but if you mark many (say, thousands) messages, this slows things down significantly15. For this reason, you can disable this by setting mu4e-headers-show-target to nil.


Footnotes

(14)

This kind of ‘deferred marking’ is similar to the facility in dired, midnight commander (https://www.midnight-commander.org/) and the like, and uses the same key binding (insert).

(15)

this uses an Emacs feature called overlays, which are slow when used a lot in a buffer