src += 2;
/* Notmuch and mailto schemes can include a query */
-#ifdef USE_NOTMUCH
if ((u->scheme == U_NOTMUCH) || (u->scheme == U_MAILTO))
-#else
- if (u->scheme == U_MAILTO)
-#endif
{
t = strrchr(src, '?');
if (t)
/* check to see if the folder is the currently selected folder before polling */
if (!Context || (Context->mailbox->path[0] == '\0') ||
- ((m->magic == MUTT_IMAP ||
-#ifdef USE_NNTP
- m->magic == MUTT_NNTP ||
-#endif
-#ifdef USE_NOTMUCH
- m->magic == MUTT_NOTMUCH ||
-#endif
- m->magic == MUTT_POP) ?
+ ((m->magic == MUTT_IMAP || m->magic == MUTT_NNTP ||
+ m->magic == MUTT_NOTMUCH || m->magic == MUTT_POP) ?
(mutt_str_strcmp(m->path, Context->mailbox->path) != 0) :
(sb.st_dev != ctx_sb->st_dev || sb.st_ino != ctx_sb->st_ino)))
{
*s = '\0';
}
-#ifdef USE_NOTMUCH
-/**
- * mutt_mailbox_vfolder - Find the first virtual folder with new mail
- * @param buf Buffer for the folder name
- * @param buflen Length of the buffer
- */
-void mutt_mailbox_vfolder(char *buf, size_t buflen)
-{
- if (mutt_mailbox_check(0))
- {
- bool found = false;
- for (int pass = 0; pass < 2; pass++)
- {
- struct MailboxNode *np = NULL;
- STAILQ_FOREACH(np, &AllMailboxes, entries)
- {
- if (np->m->magic != MUTT_NOTMUCH)
- continue;
- if ((found || pass) && np->m->has_new)
- {
- mutt_str_strfcpy(buf, np->m->desc, buflen);
- return;
- }
- if (mutt_str_strcmp(buf, np->m->path) == 0)
- found = true;
- }
- }
-
- mutt_mailbox_check(MUTT_MAILBOX_CHECK_FORCE); /* Mailbox was wrong - resync things */
- }
-
- /* no folders with new mail */
- *buf = '\0';
-}
-#endif
-
/**
* mutt_context_free - Free a Context
* @param ctx Context to free
extern struct MailboxList AllMailboxes;
-#ifdef USE_NOTMUCH
-void mutt_mailbox_vfolder(char *buf, size_t buflen);
-#endif
-
struct Mailbox *mailbox_new(void);
void mailbox_free(struct Mailbox **m);
void mutt_context_free(struct Context **ctx);
#define MUTT_COMMAND (1 << 6) /**< do command completion */
#define MUTT_PATTERN (1 << 7) /**< pattern mode - only used for history classes */
#define MUTT_LABEL (1 << 8) /**< do label completion */
-#ifdef USE_NOTMUCH
#define MUTT_NM_QUERY (1 << 9) /**< Notmuch query mode. */
#define MUTT_NM_TAG (1 << 10) /**< Notmuch tag +/- mode. */
-#endif
/* flags for mutt_extract_token() */
#define MUTT_TOKEN_EQUAL (1<<0) /**< treat '=' as a special */
#ifdef USE_IMAP
#include "imap/imap.h"
#endif
-#ifdef USE_NOTMUCH
-#include "notmuch/mutt_notmuch.h"
-#endif
/* These Config Variables are only used in muttlib.c */
struct Regex *GecosMask; ///< Config: Regex for parsing GECOS field of /etc/passwd
scheme = url_check_scheme(buf);
-#ifdef USE_IMAP
if (scheme == U_IMAP || scheme == U_IMAPS)
{
imap_pretty_mailbox(buf, Folder);
return;
}
-#endif
-#ifdef USE_NOTMUCH
if (scheme == U_NOTMUCH)
return;
-#endif
/* if buf is an url, only collapse path component */
if (scheme != U_UNKNOWN)
#include "options.h"
#include "protos.h"
#include "sort.h"
-#ifdef USE_NOTMUCH
-#include "notmuch/mutt_notmuch.h"
-#endif
/* These Config Variables are only used in status.c */
struct MbTable *StatusChars; ///< Config: Indicator characters for the status bar
case 'f':
{
struct Mailbox *m = Context ? Context->mailbox : NULL;
-#ifdef USE_NOTMUCH
- if (m && (m->magic == MUTT_NOTMUCH) && m->desc)
- mutt_str_strfcpy(tmp, m->desc, sizeof(tmp));
- else
-#endif
+
#ifdef USE_COMPRESSED
- if (m && m->compress_info && (m->realpath[0] != '\0'))
+ if (m && m->compress_info && (m->realpath[0] != '\0'))
{
mutt_str_strfcpy(tmp, m->realpath, sizeof(tmp));
mutt_pretty_mailbox(tmp, sizeof(tmp));
}
else
#endif
- if (m && (m->path[0] != '\0'))
+ if (m && (m->magic == MUTT_NOTMUCH) && m->desc)
+ {
+ mutt_str_strfcpy(tmp, m->desc, sizeof(tmp));
+ }
+ else if (m && (m->path[0] != '\0'))
{
mutt_str_strfcpy(tmp, m->path, sizeof(tmp));
mutt_pretty_mailbox(tmp, sizeof(tmp));