OP_MAIN_TAG_PATTERN "tag messages matching a pattern"
OP_MAIN_UNDELETE_PATTERN "undelete messages matching a pattern"
OP_MAIN_UNTAG_PATTERN "untag messages matching a pattern"
+OP_MARK_MSG "create a hot-key macro for the current message"
OP_MIDDLE_PAGE "move to the middle of the page"
OP_NEXT_ENTRY "move to the next entry"
OP_NEXT_LINE "scroll down one line"
}
break;
+
+ case OP_MARK_MSG:
+
+ CHECK_MSGCOUNT;
+ CHECK_VISIBLE;
+ if (CURHDR->env->message_id)
+ {
+ char str[STRING], macro[STRING];
+ char buf[128];
+
+ buf[0] = '\0';
+ if (!mutt_get_field ("Enter macro stroke: ", buf, sizeof(buf),
+ MUTT_CLEAR) && buf[0])
+ {
+ snprintf(str, sizeof(str), "%s%s", MarkMacroPrefix, buf);
+ snprintf(macro, sizeof(macro),
+ "<search>~i \"%s\"\n", CURHDR->env->message_id);
+ km_bind(str, MENU_GENERIC, OP_MACRO, macro, "Message hotkey");
+
+ snprintf(buf, sizeof(buf), _("Message bound to %s."), str);
+ mutt_message(buf);
+ dprint (1, (debugfile, "Mark: %s => %s\n", str, macro));
+ }
+ }
+ else
+ mutt_error _("No message ID to macro.");
+ break;
+
case OP_RECALL_MESSAGE:
CHECK_ATTACH;
</sect1>
+<sect1 id="markmsg">
+<title>Marking Messages</title>
+
+<para>
+There are times that it's useful to ask Mutt to "remember" which message
+you're currently looking at, while you move elsewhere in your mailbox.
+You can do this with the <quote>mark-message</quote> operator, which
+is bound to the <quote>~</quote> key by default. Press this key to
+enter an identifier for the marked message. When you want to return to
+this message, press <quote>'</quote> and the name that you previously
+entered.
+</para>
+
+<para>
+(Message marking is really just a shortcut for defining a macro
+that returns you to the current message by searching for its
+Message-ID. You can choose a different prefix by setting the <link
+linkend="mark-macro-prefix">$mark_macro_prefix</link> variable.)
+</para>
+</sect1>
+
<sect1 id="tags">
<title>Using Tags</title>
{ "previous-line", OP_PREV_LINE, "<" },
{ "half-up", OP_HALF_UP, "[" },
{ "half-down", OP_HALF_DOWN, "]" },
+ { "mark-message", OP_MARK_MSG, "~" },
{ "help", OP_HELP, "?" },
{ "tag-prefix", OP_TAG_PREFIX, ";" },
{ "tag-prefix-cond", OP_TAG_PREFIX_COND, NULL },
WHERE char *HeaderCachePageSize;
#endif /* HAVE_GDBM || HAVE_DB4 */
#endif /* USE_HCACHE */
+WHERE char *MarkMacroPrefix;
WHERE char *MhFlagged;
WHERE char *MhReplied;
WHERE char *MhUnseen;
** slow down polling for new messages in large folders, since mutt has
** to scan all cur messages.
*/
+ { "mark_macro_prefix",DT_STR, R_NONE, UL &MarkMacroPrefix, UL "'" },
+ /*
+ ** .pp
+ ** Prefix for macros created using mark-message. A new macro
+ ** automatically generated with \fI<mark-message>a\fP will be composed
+ ** from this prefix and the letter \fIa\fP.
+ */
{ "mark_old", DT_BOOL, R_BOTH, OPTMARKOLD, 1 },
/*
** .pp