completion of 'tag:' names is available.
</entry>
</row>
+ <row>
+ <entry>index,pager</entry>
+ <entry><literal><vfolder-from-query-readonly></literal></entry>
+ <entry>
+ The same as <literal><vfolder-from-query></literal>; however, the mailbox
+ will be read-only.
+ </entry>
+ </row>
<row>
<entry>index</entry>
<entry><literal><vfolder-window-forward></literal></entry>
{ "untag-pattern", OP_MAIN_UNTAG_PATTERN, "\024" },
#ifdef USE_NOTMUCH
{ "vfolder-from-query", OP_MAIN_VFOLDER_FROM_QUERY, NULL },
+ { "vfolder-from-query-readonly", OP_MAIN_VFOLDER_FROM_QUERY_READONLY, NULL },
{ "vfolder-window-backward", OP_MAIN_WINDOWED_VFOLDER_BACKWARD, NULL },
{ "vfolder-window-forward", OP_MAIN_WINDOWED_VFOLDER_FORWARD, NULL },
#endif
{ "undelete-thread", OP_UNDELETE_THREAD, "\025" },
#ifdef USE_NOTMUCH
{ "vfolder-from-query", OP_MAIN_VFOLDER_FROM_QUERY, NULL },
+ { "vfolder-from-query-readonly", OP_MAIN_VFOLDER_FROM_QUERY_READONLY, NULL },
#endif
{ "view-attachments", OP_VIEW_ATTACHMENTS, "v" },
{ "view-raw-message", OP_VIEW_RAW_MESSAGE, NULL },
mutt_folder_hook(buf, m ? m->desc : NULL);
const int flags =
- (ReadOnly || (op == OP_MAIN_CHANGE_FOLDER_READONLY)) ? MUTT_READONLY : 0;
+ (ReadOnly || (op == OP_MAIN_CHANGE_FOLDER_READONLY)
+#ifdef USE_NOTMUCH
+ || (op == OP_MAIN_VFOLDER_FROM_QUERY_READONLY)
+#endif
+ )
+ ? MUTT_READONLY
+ : 0;
+
Context = mx_mbox_open(m, buf, flags);
if (Context)
{
#ifdef USE_NOTMUCH
case OP_MAIN_VFOLDER_FROM_QUERY:
+ case OP_MAIN_VFOLDER_FROM_QUERY_READONLY:
buf[0] = '\0';
if (mutt_get_field("Query: ", buf, sizeof(buf), MUTT_NM_QUERY) != 0 || !buf[0])
{
_fmt(OP_MAIN_CHANGE_VFOLDER, N_("open a different virtual folder")) \
_fmt(OP_MAIN_ENTIRE_THREAD, N_("read entire thread of the current message")) \
_fmt(OP_MAIN_VFOLDER_FROM_QUERY, N_("generate virtual folder from query")) \
+ _fmt(OP_MAIN_VFOLDER_FROM_QUERY_READONLY, N_("generate a read-only virtual folder from query")) \
_fmt(OP_MAIN_WINDOWED_VFOLDER_BACKWARD, N_("shifts virtual folder time window backwards")) \
_fmt(OP_MAIN_WINDOWED_VFOLDER_FORWARD, N_("shifts virtual folder time window forwards"))
#else