On 2016-11-17 16:00:28 -0800, Brendan Cully wrote: > changeset: 6859:022b604bc46d > user: David Champion <d...@bikeshed.us> > date: Thu Nov 17 15:57:42 2016 -0800 > link: http://dev.mutt.org/hg/mutt/rev/022b604bc46d > > Adds <mark-message> binding to create "hotkeys" for messages.
There's an inconsistency between "hot-key" and "hotkey". See below. [...] > diff -r 3c6d322912e3 -r 022b604bc46d OPS > --- a/OPS Thu Nov 17 15:07:14 2016 -0800 > +++ b/OPS Thu Nov 17 15:57:42 2016 -0800 > @@ -131,6 +131,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 -r 3c6d322912e3 -r 022b604bc46d curs_main.c > --- a/curs_main.c Thu Nov 17 15:07:14 2016 -0800 > +++ b/curs_main.c Thu Nov 17 15:57:42 2016 -0800 > @@ -2204,6 +2204,34 @@ > } > 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"); ^^^^^^ And this message should be made translatable, starting with a lowercase character. Moreover, changing the prefix doesn't seem to work. I've changed it to # so I get: #z M <search>~i "<2016... Message hotkey but as soon as I hit #, I get an error saying that the key is not affected. -- Vincent Lefèvre <vinc...@vinc17.net> - Web: <https://www.vinc17.net/> 100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/> Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)