Re: Complex virtual folder
Erik Hetzner <[email protected]> Thu, 03 Jan 2019 16:45:15 -0800
| Newsgroups | gmane.mail.wanderlust.general |
|---|---|
| Message-ID | <5c2eac9c.1c69fb81.cc229.1c42__10880.3427000113$1546562674$gmane$org@mx.google.com> |
Hi all, On Thu, 03 Jan 2019 15:23:59 -0800, "Greg A. Woods" <[email protected]> wrote: > > […] > > The parenthesis, if indeed they are being sent as they appear above, are > invalid syntax for IMAPv4 "SEARCH". > > I can also do direct (IMAP) "AND" and "OR" searches on flags: > > . SEARCH KEYWORD NotJunk KEYWORD JunkRecorded > * SEARCH > . OK Completed (0 msgs in 0.000 secs) > . SEARCH OR KEYWORD NotJunk KEYWORD JunkRecorded > * SEARCH 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 80 88 93 94 95 98 102 103 104 115 116 118 119 122 123 126 127 128 129 130 132 133 134 135 139 140 146 147 149 150 152 > . OK Completed (84 msgs in 0.000 secs) > > So, I'm reasonably certain elmo-imap4 is not writing valid SEARCH > commands to the server. Anecdotally, both AND and OR work fine for me on dovecot. AND works for me on gmail, but not OR. I’m no IMAP expert but I thought the parentheses were allowed. See, e.g. https://www.limilabs.com/blog/imap-search-requires-parentheses The parentheses in the OR search are added by `elmo-imap4-search-generate-or': you could easily modify that function to remove the parentheses to see if that corrects the issue. As an aside, with gmail you’re probably better off using X-GM-RAW, which allows access to gmail’s search. For example, type V to start a virtual folder, then X-GM-RAW, then your search condition: from:greg OR from:john (this uses gmail syntax). You can add "X-GM-RAW" to `wl-additional-search-condition-fields' for easier completion. best, Erik -- Sent from my free software system <http://fsf.org/>.