···17581758<example id="ex-ec-comment">
17591759<title>Commenting configuration files</title>
17601760<screen>
17611761-my_hdr X-Disclaimer: Why are you listening to me? # This is a comment
17611761+my_hdr X-Disclaimer: Why are you listening to me? <emphasis role="comment"># This is a comment</emphasis>
17621762</screen>
17631763</example>
17641764···28322832<example id="ex-header-weeding">
28332833<title>Header weeding</title>
28342834<screen>
28352835-# Sven's draconian header weeding
28352835+<emphasis role="comment"># Sven's draconian header weeding</emphasis>
28362836ignore *
28372837unignore from date subject to cc
28382838unignore organization organisation x-mailer: x-newsreader: x-mailing-list:
···33373337<example id="ex-save-hook-exando">
33383338<title>Using %-expandos in <command>save-hook</command></title>
33393339<screen>
33403340-# default: save all to ~/Mail/<author name>
33403340+<emphasis role="comment"># default: save all to ~/Mail/<author name></emphasis>
33413341save-hook . ~/Mail/%F
3342334233433343-# save from me@turing.cs.hmc.edu and me@cs.hmc.edu to $folder/elkins
33433343+<emphasis role="comment"># save from me@turing.cs.hmc.edu and me@cs.hmc.edu to $folder/elkins</emphasis>
33443344save-hook me@(turing\\.)?cs\\.hmc\\.edu$ +elkins
3345334533463346-# save from aol.com to $folder/spam
33463346+<emphasis role="comment"># save from aol.com to $folder/spam</emphasis>
33473347save-hook aol\\.com$ +spam
33483348</screen>
33493349</example>
···4155415541564156source $my_cfgdir/hooks
41574157source $my_cfgdir/macros
41584158-# more source commands...
41584158+<emphasis role="comment"># more source commands...</emphasis>
41594159</screen>
41604160</example>
41614161···42314231<example id="ex-myvar4">
42324232<title>Type conversions using variables</title>
42334233<screen>
42344234-set my_lines = "5" # value is string "5"
42354235-set pager_index_lines = $my_lines # value is integer 5
42344234+set my_lines = "5" <emphasis role="comment"># value is string "5"</emphasis>
42354235+set pager_index_lines = $my_lines <emphasis role="comment"># value is integer 5</emphasis>
4236423642374237-set my_sort = "date-received" # value is string "date-received"
42384238-set sort = "last-$my_sort" # value is sort last-date-received
42374237+set my_sort = "date-received" <emphasis role="comment"># value is string "date-received"</emphasis>
42384238+set sort = "last-$my_sort" <emphasis role="comment"># value is sort last-date-received</emphasis>
4239423942404240-set my_inc = $read_inc # value is string "10" (default of $read_inc)
42414241-set my_foo = $my_inc # value is string "10"
42404240+set my_inc = $read_inc <emphasis role="comment"># value is string "10" (default of $read_inc)</emphasis>
42414241+set my_foo = $my_inc <emphasis role="comment"># value is string "10"</emphasis>
42424242</screen>
42434243</example>
42444244···42614261set my_pattern = "~A"
42624262set my_number = "10"
4263426342644264-# same as: score ~A +10
42644264+<emphasis role="comment"># same as: score ~A +10</emphasis>
42654265score $my_pattern +$my_number</screen>
4266426642674267<para>
···68176817</para>
6818681868196819<screen>
68206820-# I'm always running X :)
68206820+<emphasis role="comment"># I'm always running X :)</emphasis>
68216821video/*; xanim %s > /dev/null
68226822image/*; xv %s > /dev/null
6823682368246824-# I'm always running firefox (if my computer had more memory, maybe)
68246824+<emphasis role="comment"># I'm always running firefox (if my computer had more memory, maybe)</emphasis>
68256825text/html; firefox -remote 'openURL(%s)'
68266826</screen>
68276827···68306830</para>
6831683168326832<screen>
68336833-# Use xanim to view all videos Xanim produces a header on startup,
68346834-# send that to /dev/null so I don't see it
68336833+<emphasis role="comment"># Use xanim to view all videos Xanim produces a header on startup,
68346834+# send that to /dev/null so I don't see it</emphasis>
68356835video/*; xanim %s > /dev/null
6836683668376837-# Send html to a running firefox by remote
68376837+<emphasis role="comment"># Send html to a running firefox by remote</emphasis>
68386838text/html; firefox -remote 'openURL(%s)'; test=RunningFirefox
6839683968406840-# If I'm not running firefox but I am running X, start firefox on the
68416841-# object
68406840+<emphasis role="comment"># If I'm not running firefox but I am running X, start firefox on the
68416841+# object</emphasis>
68426842text/html; firefox %s; test=RunningX
6843684368446844-# Else use lynx to view it as text
68446844+<emphasis role="comment"># Else use lynx to view it as text</emphasis>
68456845text/html; lynx %s
6846684668476847-# This version would convert the text/html to text/plain
68476847+<emphasis role="comment"># This version would convert the text/html to text/plain</emphasis>
68486848text/html; lynx -dump %s; copiousoutput
6849684968506850-# I use enscript to print text in two columns to a page
68506850+<emphasis role="comment"># I use enscript to print text in two columns to a page</emphasis>
68516851text/*; more %s; print=enscript -2Gr %s
6852685268536853-# Firefox adds a flag to tell itself to view jpegs internally
68536853+<emphasis role="comment"># Firefox adds a flag to tell itself to view jpegs internally</emphasis>
68546854image/jpeg;xv %s; x-mozilla-flags=internal
6855685568566856-# Use xv to view images if I'm running X
68576857-# In addition, this uses the \ to extend the line and set my editor
68586858-# for images
68566856+<emphasis role="comment"># Use xv to view images if I'm running X</emphasis>
68576857+<emphasis role="comment"># In addition, this uses the \ to extend the line and set my editor</emphasis>
68586858+<emphasis role="comment"># for images</emphasis>
68596859image/*;xv %s; test=RunningX; \
68606860 edit=xpaint %s
6861686168626862-# Convert images to text using the netpbm tools
68626862+<emphasis role="comment"># Convert images to text using the netpbm tools</emphasis>
68636863image/*; (anytopnm %s | pnmscale -xysize 80 46 | ppmtopgm | pgmtopbm |
68646864pbmtoascii -1x2 ) 2>&1 ; copiousoutput
6865686568666866-# Send excel spreadsheets to my NT box
68666866+<emphasis role="comment"># Send excel spreadsheets to my NT box</emphasis>
68676867application/ms-excel; open.pl %s
68686868</screen>
68696869···70987098<example id="ex-attach-count">
70997099<title>Attachment counting</title>
71007100<screen>
71017101-## Removing a pattern from a list removes that pattern literally. It
71027102-## does not remove any type matching the pattern.
71037103-##
71047104-## attachments +A */.*
71057105-## attachments +A image/jpeg
71067106-## unattachments +A */.*
71077107-##
71087108-## This leaves "attached" image/jpeg files on the allowed attachments
71097109-## list. It does not remove all items, as you might expect, because the
71107110-## second */.* is not a matching expression at this time.
71117111-##
71127112-## Remember: "unattachments" only undoes what "attachments" has done!
71137113-## It does not trigger any matching on actual messages.
71017101+<emphasis role="comment">
71027102+# Removing a pattern from a list removes that pattern literally. It
71037103+# does not remove any type matching the pattern.
71047104+#
71057105+# attachments +A */.*
71067106+# attachments +A image/jpeg
71077107+# unattachments +A */.*
71087108+#
71097109+# This leaves "attached" image/jpeg files on the allowed attachments
71107110+# list. It does not remove all items, as you might expect, because the
71117111+# second */.* is not a matching expression at this time.
71127112+#
71137113+# Remember: "unattachments" only undoes what "attachments" has done!
71147114+# It does not trigger any matching on actual messages.
7114711571157115-## Qualify any MIME part with an "attachment" disposition, EXCEPT for
71167116-## text/x-vcard and application/pgp parts. (PGP parts are already known
71177117-## to mutt, and can be searched for with ~g, ~G, and ~k.)
71187118-##
71197119-## I've added x-pkcs7 to this, since it functions (for S/MIME)
71207120-## analogously to PGP signature attachments. S/MIME isn't supported
71217121-## in a stock mutt build, but we can still treat it specially here.
71227122-##
71167116+# Qualify any MIME part with an "attachment" disposition, EXCEPT for
71177117+# text/x-vcard and application/pgp parts. (PGP parts are already known
71187118+# to mutt, and can be searched for with ~g, ~G, and ~k.)
71197119+#
71207120+# I've added x-pkcs7 to this, since it functions (for S/MIME)
71217121+# analogously to PGP signature attachments. S/MIME isn't supported
71227122+# in a stock mutt build, but we can still treat it specially here.
71237123+#
71247124+</emphasis>
71237125attachments +A */.*
71247126attachments -A text/x-vcard application/pgp.*
71257127attachments -A application/x-pkcs7-.*
7126712871277127-## Discount all MIME parts with an "inline" disposition, unless they're
71287128-## text/plain. (Why inline a text/plain part unless it's external to the
71297129-## message flow?)
71307130-##
71297129+<emphasis role="comment">
71307130+# Discount all MIME parts with an "inline" disposition, unless they're
71317131+# text/plain. (Why inline a text/plain part unless it's external to the
71327132+# message flow?)
71337133+</emphasis>
71317134attachments +I text/plain
7132713571337133-## These two lines make Mutt qualify MIME containers. (So, for example,
71347134-## a message/rfc822 forward will count as an attachment.) The first
71357135-## line is unnecessary if you already have "attach-allow */.*", of
71367136-## course. These are off by default! The MIME elements contained
71377137-## within a message/* or multipart/* are still examined, even if the
71387138-## containers themselves don't qualify.
71397139-##
71367136+<emphasis role="comment">
71377137+# These two lines make Mutt qualify MIME containers. (So, for example,
71387138+# a message/rfc822 forward will count as an attachment.) The first
71397139+# line is unnecessary if you already have "attach-allow */.*", of
71407140+# course. These are off by default! The MIME elements contained
71417141+# within a message/* or multipart/* are still examined, even if the
71427142+# containers themselves don't qualify.
71437143+71407144#attachments +A message/.* multipart/.*
71417145#attachments +I message/.* multipart/.*
71467146+</emphasis>
7142714771437143-## You probably don't really care to know about deleted attachments.
71487148+<emphasis role="comment">## You probably don't really care to know about deleted attachments.</emphasis>
71447149attachments -A message/external-body
71457150attachments -I message/external-body
71467151</screen>
···79937998</para>
7994799979958000<screen>
79967996-# use very high $read_inc to speed up reading hcache'd maildirs
80018001+<emphasis role="comment"># use very high $read_inc to speed up reading hcache'd maildirs</emphasis>
79978002folder-hook . 'set read_inc=1000'
79987998-# use lower value for reading slower remote IMAP folders
80038003+<emphasis role="comment"># use lower value for reading slower remote IMAP folders</emphasis>
79998004folder-hook ^imap 'set read_inc=100'
80008000-# use even lower value for reading even slower remote POP folders
80058005+<emphasis role="comment"># use even lower value for reading even slower remote POP folders</emphasis>
80018006folder-hook ^pop 'set read_inc=1'</screen>
8002800780038008</listitem>