Package Details: mutt-patched 1.5.24-4

Git Clone URL: (read-only)
Package Base: mutt-patched
Description: Small but very powerful text-based mail client (plus a huge pile of patches mostly from debian)
Upstream URL:
Licenses: GPL
Conflicts: mutt
Provides: mutt
Submitter: spacepluk
Maintainer: None
Last Packager: spacepluk
Votes: 15
Popularity: 0.000499
First Submitted: 2014-06-03 09:39
Last Updated: 2016-03-18 08:25

Required by (5)

Sources (43)

Latest Comments

spacepluk commented on 2016-12-16 17:27

Hi there,
I've been using neomutt for a while now and totally neglecting this package. So I'm gonna orphan it now, just in case somebody wants to take over.


xelxebar commented on 2016-12-06 21:20

I'm not exactly sure when it happened, but it seems that the pgpewrap binary got moved from /usr/lib/mutt to /usr/bin recently. However, the pgp5.rc and gpg.rc sample configurations in /usr/share/doc/mutt-patched/samples still refer to the old path.

For good measure, here's a patch that fixes gpg.rc and is confirmed working:

--- a/usr/share/doc/mutt-patched/samples/gpg.rc 2016-03-18 23:31:21.000000000 +0900
+++ b/usr/share/doc/mutt-patched/samples/gpg.rc 2016-12-07 06:09:00.063736415 +0900
@@ -49,11 +49,11 @@

# create a pgp/mime encrypted attachment
# set pgp_encrypt_only_command="pgpewrap gpg-2comp -v --batch --output - --encrypt --textmode --armor --always-trust -- -r %r -- %f"
-set pgp_encrypt_only_command="/usr/lib/mutt/pgpewrap gpg --batch --quiet --no-verbose --output - --encrypt --textmode --armor --always-trust -- -r %r -- %f"
+set pgp_encrypt_only_command="/usr/bin/pgpewrap gpg --batch --quiet --no-verbose --output - --encrypt --textmode --armor --always-trust -- -r %r -- %f"

# create a pgp/mime encrypted and signed attachment
# set pgp_encrypt_sign_command="pgpewrap gpg-2comp %?p?--passphrase-fd 0? -v --batch --output - --encrypt --sign %?a?-u %a? --armor --always-trust -- -r %r -- %f"
-set pgp_encrypt_sign_command="/usr/lib/mutt/pgpewrap gpg %?p?--passphrase-fd 0? --batch --quiet --no-verbose --textmode --output - --encrypt --sign %?a?-u %a? --armor --always-trust -- -r %r -- %f"
+set pgp_encrypt_sign_command="/usr/bin/pgpewrap gpg %?p?--passphrase-fd 0? --batch --quiet --no-verbose --textmode --output - --encrypt --sign %?a?-u %a? --armor --always-trust -- -r %r -- %f"

# import a key into the public key ring
set pgp_import_command="gpg --no-verbose --import %f"

tomxtobin commented on 2016-03-25 15:11

Okay, I figured out arbitrary levels of nesting: it's not that you add a single extra raw backslash for each level of nesting; instead, you need to escape (for the deepif parsing) the nested backslashes as well.

Here's an example I got working with two levels of nesting:

'[%?[1y?%\?[7d\?%\\\?[1d\\\?%.6[%l:%M%P]\\\&%=6.6[%a]\\\?\&%[%b %e]\?&%=6.6[%Y]?]'

So, for the top level, you're using '?' and '&'; for the first nested level, '\?' and '\&'; for the second nested level, '\\\?' and '\\\&', and so forth. (Again, those are all raw backslashes.)

I imagine this gets unreadable really fast from here, but I doubt I'd ever need more than two levels deep. (I hope.) ;-)

tomxtobin commented on 2016-03-25 14:11

Actually, I might be wrong about the nested_if patch letting you nest to arbitrary levels; I've only been able to get a single level of nesting working. [EDIT: You can; see my later comment.]

tomxtobin commented on 2016-03-25 13:35

Here's a working example of the date/time portion of my current index_format with the nested_if and date_conditional patches together:

'[%?[7d?%\?[1d\?%.6[%l:%M%P]\&%=6.6[%a]\?&%[%b %e]?]'

That's a single-quoted string, so backslashes are passed through as-is.

It shows a bracketed box with the time if the message was received in the past day, otherwise the weekday if it was received in the past seven days, otherwise the month and day. (I should add another level for messages older than a year, but this works for now.) :-)

tomxtobin commented on 2016-03-24 22:51

@spacepluk I figured it out. There's another version of the nested-if patch floating around out there with different syntax, and that's the version ats was referring to in the patch notes. That version replaces mutt's %<foo> syntax. The dgc patch is simpler; it allows you to nest conditionals as-is, as long as you quote the "?" and "&" characters with backslashes (raw ones, so doubled in double-quoted strings) once for each level of nesting the conditional is at. [EDIT: I wasn't quite right about the use of backslashes; see my later comment about how to properly nest to arbitrary levels.]

I'm not sure which syntax is better; I don't like the idea of replacing a built-in formatter (even if it's rarely used), but all that backslash-quoting can probably get confusing if you're several levels deep. For the most common cases, though, it's probably fine. It's working for me in combination with the date_conditional patch.

Here's the other nested-if patch at a different patched-mutt project:

tomxtobin commented on 2016-03-22 02:19

@spacepluk Thanks! I haven't tried the nested conditionals patch, but I'll give it a shot.

spacepluk commented on 2016-03-18 08:29

@tomxtobin I just added Aaron's date_conditional patch. Very useful! :)

I also tried to add the nested conditionals patch he recommends [1]. It applies, but Aaron's example didn't work and I couldn't figure it out. Have you tried that one?


spacepluk commented on 2016-03-03 14:11

Sure! That looks cool :)

I'm going through a small crisis at work and I'm very busy but I'll try to take a look at it during the weekend.


tomxtobin commented on 2016-03-03 14:08

Any chance of getting Aaron Schrab's date_conditional patch added in here? It's nice for customizing the index, e.g., showing a time if the message is from the last 24 hours, and a date otherwise.

FWIW I added it to the mutt-patched build locally; it applied cleanly, and I'm using it now. :-)

It's mentioned on Mutt's PatchList page [1]; Aaron's homepage [2] doesn't seem to load, but I found a copy in a repo at GitHub:


All comments