On 17Apr2017 10:04, derek martin <[email protected]> wrote:
On Wed, Apr 12, 2017 at 03:26:51PM +0200, Oliver Graute wrote:
how can I strip of the first 23 chars of my filename string in the
folder_format setting?
so that:
11 N Apr 12 08:19 [email protected]/Mailinglists.mutt-users/
looks like this
11 N Apr 12 08:19 Mailinglists.mutt-users/
An alternative, which may or may not help with other aspects of
managing your mail, is to reorganize your mail folders. For example,
if you made Mailinglist a directory rather than a prefix, you could
set folder = ~/$YOUR_MAIL_ROOT/[email protected]/Mailinglists
and then add a Mailboxes for mutt-users and your other mailing lists.
If you had a number of these folders for different providers, you
could perhaps use a macro to change the value of folder. Or, it may
be simplest to forgo using a deep directory tree entirely and just put
all your mail folders in the same mail root directory.
And another alternative is to aggressively set the X-Label: header when you
file your email. Almost all my mail rules set this, and I stick the X-Label
value on the right of the listing.
Example (artificially narrowed to fit in this message, this is more readable in
a normal terminal):
12Apr2017 03:53 derek martin N ├> Mutt-Dev 1.7K
11Apr2017 02:21 Kevin J. McCart - ┌> Mutt-Dev 1.9K
10Apr2017 04:58 Derek Schrock - [PATCH] Add option $beep
13Apr2017 23:31 Brendan Cully N mutt: 4 new changesets M
13Apr2017 06:02 Will Yardley N ┌> Mutt-Users 0.7K
13Apr2017 05:12 Charles Cazabon N ┌> Mutt-Users 1.4K
See the "Mutt-Dev" and "Mutt-Users" on the right? I do have my mail folder set
in the header line, where there is more room.
My settings are as follows:
set folder_format="%4C %t %N %f"
set index_format="%D %-15.15F %S %?M?(%M) ?%?H?[%H] ?%s%> %y %4c"
The mail filing rule I use to get that "Mutt-Dev" above is this:
mutt Mutt-Dev sender:[email protected]
My motivation for the X-Label is that I file similar topics in shared folders
(mutt/mail, python, unix/shell, etc) so the label tells me the list associated
with it. But you can put all sorts of stuff in there; for non-lists I use
"Personal" and so forth as seems useful.
Combined with Derek's suggestion this might go some distance to your wishes.
Cheers,
Cameron Simpson <[email protected]>