Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shorten long subjects #9

Open
flatcap opened this issue Sep 14, 2020 · 2 comments
Open

Shorten long subjects #9

flatcap opened this issue Sep 14, 2020 · 2 comments
Labels
DYK:tips Submit your DYK tips

Comments

@flatcap
Copy link
Member

flatcap commented Sep 14, 2020

Coverity

Coverity reports have a pretty long subject. A simple regex-based substitution on the subject will make them look better:

-86  ( 21K)    +   [Jul 30 20 06:34]  [email protected]      New Defects reported by Coverity Scan for FreeBSD
+86  ( 21K)    +   [Jul 30 20 06:34]  [email protected]      Coverity - FreeBSD

The command to achieve that is subjectrx "^New Defects reported by Coverity Scan for (.*)$" "Coverity - %1".

Mailing lists

If you're like me and push mail from different mailing lists in different folders, you don't need to be reminded of which mailing list they belong to by their subject line. I like to modify them like this:

-1  (1.9K)        [Sep 23 19 20:06]  TclConference  [fossil-users] Schedule Up - 26th Annual Tcl/Tk Conference (Tcl'2019)
+1  (4.8K)        [Sep 23 19 20:06]  TclConference  Schedule Up - 26th Annual Tcl/Tk Conference (Tcl'2019)

The command to achieve that is subjectrx '(\[[^]]*\] )' '%L%R'.

Use %1, %2, ... to use capture groups in substitutions. Use %L and %R to use what comes to the left and to the right of the capture.

By: @gahr

@flatcap flatcap added the DYK:tips Submit your DYK tips label Sep 14, 2020
@flatcap
Copy link
Member Author

flatcap commented Sep 14, 2020

For our mailing lists:

subjectrx '\[neomutt-devel\] *' '%L%R'
subjectrx '\[neomutt-users\] *' '%L%R' 

@gahr
Copy link
Member

gahr commented Sep 15, 2020

Yep the general Mailing lists solution subjectrx '(\[[^]]*\] )' '%L%R' works fine for ours too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DYK:tips Submit your DYK tips
Projects
None yet
Development

No branches or pull requests

2 participants