[neomutt-users] new users questions about virtual folders and searches

Jakub Jindra jakub.jindra at socialbakers.com
Sun Mar 14 14:38:58 CET 2021


Hi Béla,

Ad searching the messages with the same subject. As Robert advises the 
vfolder-from-query will do the work.

The remaining issue will be to get the message subject for constructing 
vfolder query. We've already done similar thing before:
https://github.com/neomutt/neomutt/issues/2050#issuecomment-569099375

You can just recycle the macro and config file snippet:

# macro
macro index,pager <f3> \
"<pipe-message>formail -X subject:|awk '{$1=\"\";$0=$0;$1=$1}1' > /tmp/subj<enter>\
<enter-command>source ~/.neomuttrc.tmp2<enter>"

# ~/.neomuttrc.tmp2
push "<vfolder-from-query>subject:\"`cat /tmp/subj`\""

Please not this doesn't work in every case.  There are situations when 
it doesn't work but it shouldn't be hard to address them
1) formail returns qencoded subject
2) the subject may contain characters that needs to be escaped?

Best,
Jakub

On 2021-03-14 11:39, Robert Krátký wrote:
>On Sat, Mar 13 21 19:14, Béla Törös wrote:
>> Hi,
>
>Hi,
>
>> I'm new to neomutt and using it with notmuch + gmi for handling gmail
>> accounts primarily.
>>
>> So far it is really great and fast, I have however 2 problems that I
>> don't really know how to fix up. The first is that I have a few
>> ticketing systems that doesn't indicate any threading just uses the
>> same subject line to indicate it's for the same thread. Is there a way
>> to make neomutt understand that these belong to the same thread?
>> strict_threads=no doesn't seem to help.
>
>Do you have 'sort_re' unset?
>
>> My other question is somewhat related to that, is that I would like to
>> make an index macro that will execute a notmuch search for the same
>> subject as the current email, and display in a new virtual mailbox, or
>> any other random notmuch query, that will run across all mail not only
>> the current virtual mailbox.
>
>I think you're looking for the 'virtual-mailboxes' command and/or the 'vfolder-from-query' function. See https://neomutt.org/feature/notmuch
>
>> Any helps or pointers to docs would be greatly appreciated.
>
>HTH
>
>Regards,
>Robert
>

-- 
Jakub Jindra
Mobile: +420732114225
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://mailman.neomutt.org/pipermail/neomutt-users-neomutt.org/attachments/20210314/63690dad/attachment.sig>


More information about the neomutt-users mailing list