Hi Sean, Thanks for your reply! In fact I was following the advices from you blog[1] to set up my accounts using nnmaildir which helped me a lot :)
Please also see my replies below. Sean Whitton <[email protected]> writes: > Hello, > > On Tue 16 Dec 2025 at 04:12am -08, Xiyue Deng wrote: > >> Hi, >> >> I have been using nnmaildir together with offlineimap and notmuch for my >> Gmail and Outlook email accounts. This turns out to work reasonably >> well (even though slower than notmuch.el but bearable.) However a small >> annoyance is that nnmaildir does not subscribe to the Gmail specific >> folders by default, e.g. "[Gmail].Sent Mail", "[Gmail].Spam", etc. With >> some initial digging I found that they are given group level 9 which I >> think is the reason. >> >> I then tried to use `gnus-subscribe-group' to manually subscribe them. >> This kind of worked and those folders did show up in the topic buffer. >> But then they are not scanned for new messages by default until I >> manually checked them (by hitting RET on each one.) And this state is >> reset next time I launch Gnus, which is cumbersome. >> >> Note that this is happening on nnmaildir backend. When using nnimap >> those folders are subscribed by default, which I think means that they >> are given a lower group level value in nnimap. >> >> So I wonder how a group level is determined in nnmaildir and why it's >> different than in nnimap? Hopefully this can help me understand the >> internals of Gnus better so that I can change the settings to meet my >> expectations better. > > My knowledge of the internals is not strong, but my strategy is to > programmatically set subscription levels in a function added to > gnus-started-hook. > Yes, this is what I did: I do `gnus-subscribe-group' on those folders in a callback function added to this hook. > Also, if you're not aware of gnus-activate-level, take a look, that > might be why things aren't being scanned when you expect them to be. I did set gnus-activate-level to 9 (which I think is the highest number by default) but it didn't help. And actually as I have already done `gnus-subscribe-group' on those folders, they already have a group level of 3 like other auto-subscribed folders, so I would expect them to act the same. I sense that there may be some kind of filter that explicitly lowers the group level those internal Gmail folders in nnmaildir (and maybe some other backends). nnimap doesn't do that so all folders have the same behavior by default. Will continue to dig the internals. [1] https://spwhitton.name/blog/entry/gnus+notmuch/ -- Regards, Xiyue Deng
signature.asc
Description: PGP signature
