--- mutt-1.5.8/PATCHES~ never +++ mutt-1.5.8/PATCHES Tue Mar 8 17:37:32 CST 2005 @@ -1,0 +1 @@ +patch-1.5.8.dgc.markmsg.2 diff -Pur mutt-1.5.8-base/OPS mutt-1.5.8/OPS --- mutt-1.5.8-base/OPS Fri Jul 4 12:07:11 2003 +++ mutt-1.5.8/OPS Tue Mar 8 17:36:05 2005 @@ -125,6 +125,7 @@ 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" diff -Pur mutt-1.5.8-base/curs_main.c mutt-1.5.8/curs_main.c --- mutt-1.5.8-base/curs_main.c Sat Feb 12 13:22:15 2005 +++ mutt-1.5.8/curs_main.c Tue Mar 8 17:36:05 2005 @@ -1944,6 +1944,32 @@ } break; + + case OP_MARK_MSG: + + 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), + M_CLEAR) && buf[0]) + { + snprintf(str, sizeof(str), "%s%s", MarkMacroPrefix, buf); + snprintf(macro, sizeof(macro), + "~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, macro); + 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; diff -Pur mutt-1.5.8-base/doc/muttrc.man mutt-1.5.8/doc/muttrc.man --- mutt-1.5.8-base/doc/muttrc.man Sat Feb 12 14:54:45 2005 +++ mutt-1.5.8/doc/muttrc.man Tue Mar 8 17:36:05 2005 @@ -2063,6 +2063,18 @@ .TP +.B mark_macro_prefix +.nf +Type: string +Default: \(lq'\(rq +.fi +.IP +Prefix for macros created using mark-message. A new macro +automatically generated with \fIa\fP will be composed +from this prefix and the letter \fIa\fP. + + +.TP .B mark_old .nf Type: boolean diff -Pur mutt-1.5.8-base/functions.h mutt-1.5.8/functions.h --- mutt-1.5.8-base/functions.h Fri Jan 28 07:13:12 2005 +++ mutt-1.5.8/functions.h Tue Mar 8 17:36:05 2005 @@ -49,6 +49,7 @@ { "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 }, diff -Pur mutt-1.5.8-base/globals.h mutt-1.5.8/globals.h --- mutt-1.5.8-base/globals.h Sat Feb 12 14:01:02 2005 +++ mutt-1.5.8/globals.h Tue Mar 8 17:37:16 2005 @@ -69,6 +69,7 @@ WHERE char *HeaderCache; WHERE char *HeaderCachePageSize; #endif +WHERE char *MarkMacroPrefix; WHERE char *MhFlagged; WHERE char *MhReplied; WHERE char *MhUnseen; diff -Pur mutt-1.5.8-base/init.h mutt-1.5.8/init.h --- mutt-1.5.8-base/init.h Sat Feb 12 14:01:10 2005 +++ mutt-1.5.8/init.h Tue Mar 8 17:36:06 2005 @@ -1000,6 +1000,14 @@ ** The locale used by \fIstrftime(3)\fP to format dates. Legal values are ** the strings your system accepts for the locale variable \fILC_TIME\fP. */ + /* this absurd location avoids conflict with ats.mark_old patch */ + { "mark_macro_prefix",DT_STR, R_NONE, UL &MarkMacroPrefix, UL "'" }, + /* + ** .pp + ** Prefix for macros created using mark-message. A new macro + ** automatically generated with \fIa\fP will be composed + ** from this prefix and the letter \fIa\fP. + */ { "mail_check", DT_NUM, R_NONE, UL &BuffyTimeout, 5 }, /* ** .pp