Alternative to no longer supported folder:foo* wildcard matching ?
Jean-Marc Liotier
jm at liotier.org
Mon Mar 9 17:16:52 PDT 2015
On 09/03/2015 23:06, David Bremner wrote:
> Jean-Marc Liotier <jm at liotier.org> writes:
>> So nowadays, is there any other way to express "this folder and all its subfolders" ? The path: keyword does not seem useful for that with a maildir with a flat structure of dot.delimited.directories - or is there something like a dot.delimited.* wildcard ?
> One option is to create symlink farm. Since it's only directories being
> symlinked, it isn't that bad. I don't know how well this scales, but it
> seems to work for about 200k messages in 184 mailing lists.
On the plus side: it works. Here is my interpretation of the idea:
% cd ~/Maildir
% mkdir .NM_myTopLevelFolder
% ln -rs .myTopLevelFolder* -t .NM_myTopLevelFolder
% rm -f .NM_myTopLevelFolder/.myTopLevelFolder
% notmuch new
% notmuch-mutt --remove-dups --output-dir ~/Maildir/.=Search \
search keyword and "path:.NM_myTopLevelFolder/**"
So, thanks for this workaround suggestion.
On the downside:
- It doubles the number of messages to index (though then even
multiplied by two, my 300k messages are Not Much Mail™ - but still...)
- myTopLevelFolder gets a NM_myTopLevelFolder twin and restricting the
search scope to it requires using its twin's name
- The additional messages are duplicates, so --remove-dups becomes
mandatory in any search query
- This method is good for restricting the search scope to a directory,
but not for excluding a directory from the search scope... Which alas is
what I desire most...
> Roughly
> speaking:
>
> % mkdir list
> % cd list
> % ln -s ../.list.* .
> % mmv .list.* * # zsh specific, optional
> % notmuch new
>
> Notmuch new took about 10 minutes, but now I can search
>
> 'path:list/**'
>
>
More information about the notmuch
mailing list