2025-12-07 EMACS GNUS: SPECIFY WHICH MAIL FOLDERS TO SEE AT
ALL TIMES
The ultimate way to read, send and manage email (and RSS feeds, and
Usenet) is with Emacs Gnus. Here are two ways to instruct Gnus to always
show a select few mail folders.
At the 2025 Emacs Conf[1], which took place on 6 and 7 December, Amin
Bandali gave a 20 minutes introduction[2] on how to get started with Gnus[3].
Amin on his blog[4] shared the sample Gnus config file that he uses for
the demo. He suggests to use the following code to make the Gnus *Group*
buffer to always show all mail folders:
,----
| ;; Always show INBOX groups even if they have no unread or ticked
| ;; messages.
| (setopt gnus-permanently-visible-groups ":INBOX$")
`----
This option uses a regexp to match all mail folders , and make them
visible. I was mistaken about this. See the "update", below[4]
I did not know or had forgotten about this setting, and seeing it in the
demo made me check which settings I use.
1 Focus
=======
Out of the box, the Gnus *Group* will always show the mail folders
that have new (unread) mail. If you have several tens or even a few
hundred of mail folders, seeing only those that have new messages,
helps to focus.
If you have a lot of mail folders you will, firstly, want to use
*gnus-topic-mode* to help sort them. Enter "t" in the *Group* buffer.
Secondly, it might then be helpful to show in your *Group* buffer - at
all times - a few important mail folders. You see them even if there
is no new mail in them. For example, the overall INBOX, and the email
folder for mail from the boss (INBOX.boss) or INBOX.home.
Here is how. You can select the ones you always want to see, by using
Gnus' "Topic Parameters"
`gnus-topic-edit-parameters'
You get there by entering "G p" on a mailbox in the Group buffer. and
write:
,----
| (visible . t)
`----
2 List all groups
=================
If needed, I can use "L" (gnus-group-list-all-groups) to show me the
entire list, and "l" (gnus-group-list-groups) to toggle it back to the
minimal list.
3 Update
========
Via email, Amin pointed out that his regexp is for all mail folder
/ending/ in INBOX. Woops, of course. And there should be just one of
those.
He also explained his motivation: to manage it from within the Gnus
configuration file.
TIL: we can use the same ‘gnus-permanently-visible-groups’ to list
several mailboxes. It requires a different regexp:
,----
| (setopt gnus-permanently-visible-groups "INBOX.boss\\|INBOX.home\\|INBOX$")
`----
[1]:
[2]:
[3]:
[4]: