You are not logged in.

#1 2018-04-22 12:27:51

LithoUser
Member
Registered: 2016-11-17
Posts: 139

[SOLVED] List all mutt accounts

Hello,

Mutt is great for managing my emails. I use it with several different accounts.

I use some keybinds (<f2>, <f3>, <f4>, etc.) to switch from one email account to another. However, I have to memorize those keyboard shortcuts. So I'd like to add a keybind to list all my accounts. Ideally, since "c" allows to switch folders, I'd like "C" to list all my accounts and allow to switch them.

Is this possible ? I know I could use the sidebar, but it just seems to be a huge waste of space (even if a keybind could be used to hide/display it, for sure).

Furthermore, I don't understand what the default "u" shortcut does : in my mutt interface (in french), it says "Récup.", however it doesn't seem to update the Inbox and get new emails on demand, as this label would suggest, so it confuses me...

Thanx in advance for any help,
Litho

Last edited by LithoUser (2018-04-27 05:16:30)

Offline

#2 2018-04-22 12:37:03

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,444
Website

Re: [SOLVED] List all mutt accounts

I'm not sure what command would give a listing of accounts (I suspect there is one) but the approach I use doesn't require listing them: I also use Fn keys to switch between accounts, but I've set status_format to list all of them for me.  So my status line has the current account/mailbox displayed on the left, and on the right a series like "F1: Work | F2: Personal | F3: Sent | F4: Archive"

(note, the 'y' default binding is for changing mailboxes, but this seems to depend on configuring a list of "incoming mailboxes" which I have not done, perhaps due to all my accounts being synced to local maildirs - edit, nope I just needed to add a "mailboxes" directive in muttrc and 'y' now works, this sounds like what you want)

Last edited by Trilby (2018-04-22 12:45:49)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2018-04-22 14:35:15

progandy
Member
Registered: 2012-05-17
Posts: 5,184

Re: [SOLVED] List all mutt accounts

If you don't want it in the status bar, you might be able use a keybind for a shell script that echos all mailboxes with their shortcuts and waits for a keypress to exit.

Last edited by progandy (2018-04-22 14:37:48)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#4 2018-04-22 17:20:10

LithoUser
Member
Registered: 2016-11-17
Posts: 139

Re: [SOLVED] List all mutt accounts

In fact there's no need for a shell script : as Trilby said, adding some mailboxes in muttrc does allow to list them with the 'y' keybind, so adding a "mailboxes" directive for each email account allows to list them as I wanted. Thank you very much !

As far as the 'u' keybind is concerned, I just had to type '?' to see what it does. Sorry for this wink So the 'u' key is used to 'un-delete' a message (that you previously marked to delete with the 'd' key). The 'Récup.' french label is not really explicit.

I just would like to keep this thread opened for a chance to have an answer on this one : while the solution provided by Trilby is great, it displays the entire mailbox name, which is not very explicit. If you have long names (eg. imaps://my_long_user_name@my_long_provider_name.com@mail.provider.tld), it becomes hard to make a distinction between your accounts. Furthermore, the current mailbox is simply displayed as "=INBOX", so you don't know which account it refers to.

So mailbox aliases would be nice. I've made some research, and, while a ticket exists, it doesn't seem to have been implemented... but maybe I'm wrong ? Would there be an easy way to give a simple name to your mailboxes ?

Offline

Board footer

Powered by FluxBB