+static bool
+_get_message_flag (notmuch_message_t *message, notmuch_message_flag_t flag)
+{
+ notmuch_bool_t is_set;
+ notmuch_status_t status;
+
+ status = notmuch_message_get_flag_st (message, flag, &is_set);
+
+ if (print_status_message ("notmuch show", message, status))
+ INTERNAL_ERROR ("unexpected error getting message flag\n");
+
+ return is_set;
+}
+