From: Floyd Anderson Date: Wed, 18 Apr 2018 03:37:24 +0000 (+0200) Subject: Reformat elements: too long or multi lines X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=89e01c773ff156ddcc8527b8f181b626bd9cded1;p=neomutt Reformat elements: too long or multi lines ...and tidy comments, dashes, potential Vim modelines, whitespace. --- diff --git a/doc/manual.xml.head b/doc/manual.xml.head index 9fabd7fe5..61c5ba043 100644 --- a/doc/manual.xml.head +++ b/doc/manual.xml.head @@ -307,14 +307,17 @@ vim: ts=2 sw=2 sts=2 expandtab: Let's turn on the Sidebar: - + + set sidebar_visible set sidebar_format = "%B%?F? [%F]?%* %?N?%N/?%S" set mail_check_stats + You will see something like this. A list of mailboxes on the left. A list of emails, from the selected mailbox, on the right. - + + Fruit [1] 3/8| 1 + Jan 24 Rhys Lee (192) Yew Animals [1] 2/6| 2 + Feb 11 Grace Hall (167) Ilama Cars 4| 3 Feb 23 Aimee Scott (450) Nectarine @@ -326,6 +329,7 @@ Seas 1/7| 4 ! Feb 28 Summer Jackson (264) Lemon | | + This user has four mailboxes: Fruit, Cars, @@ -346,7 +350,8 @@ Seas 1/7| 4 ! Feb 28 Summer Jackson (264) Lemon <change-folder>to the Animals mailbox. The Sidebar automatically updated the indicator to match. - + + Fruit [1] 3/8| 1 Jan 03 Tia Gibson (362) Caiman Animals [1] 2/6| 2 + Jan 22 Rhys Lee ( 48) Dolphin Cars 4| 3 ! Aug 16 Ewan Brown (333) Hummingbird @@ -358,17 +363,21 @@ Seas 1/7| 4 Sep 25 Grace Hall ( 27) Capybara | | + Let's map some functions: - -bind index,pager \CP sidebar-prev # Ctrl-Shift-P - Previous Mailbox -bind index,pager \CN sidebar-next # Ctrl-Shift-N - Next Mailbox -bind index,pager \CO sidebar-open # Ctrl-Shift-O - Open Highlighted Mailbox + + +bind index,pager \CP sidebar-prev # Ctrl-Shift-P – Previous Mailbox +bind index,pager \CN sidebar-next # Ctrl-Shift-N – Next Mailbox +bind index,pager \CO sidebar-open # Ctrl-Shift-O – Open Highlighted Mailbox + Press Ctrl-Shift-N(Next mailbox) twice will move the Sidebar highlight to down to the Seas mailbox. - + + Fruit [1] 3/8| 1 Jan 03 Tia Gibson (362) Caiman Animals [1] 2/6| 2 + Jan 22 Rhys Lee ( 48) Dolphin Cars 4| 3 ! Aug 16 Ewan Brown (333) Hummingbird @@ -380,6 +389,7 @@ Cars 4| 3 ! Aug 16 Ewan Brown (333) Hummingbird | | + Functions <sidebar-next>and @@ -392,7 +402,8 @@ Cars 4| 3 ! Aug 16 Ewan Brown (333) Hummingbird Ctrl-Shift-O( <sidebar-open>) to open the highlighted mailbox. - + + Fruit [1] 3/8| 1 ! Mar 07 Finley Jones (139) Molucca Sea Animals [1] 2/6| 2 + Mar 24 Summer Jackson ( 25) Arafura Sea Cars 4| 3 + Feb 28 Imogen Baker (193) Pechora Sea @@ -404,6 +415,7 @@ Cars 4| 3 + Feb 28 Imogen Baker (193) Pechora Sea | | + @@ -537,10 +549,12 @@ Cars 4| 3 + Feb 28 Imogen Baker (193) Pechora Sea $sidebar_visible. You can set this in your neomuttrc, or bind a key to the function <sidebar-toggle-visible>. - + + set sidebar_visible # Make the Sidebar visible by default bind index,pager B sidebar-toggle-visible # Use 'B' to switch the Sidebar on and off + Next, decide how wide you want the Sidebar to be. 25 characters might be enough for the mailbox name and some numbers. Remember, you can hide/show the Sidebar at the press of @@ -549,10 +563,12 @@ bind index,pager B sidebar-toggle-visible # Use 'B' t default, Sidebar draws an ASCII line between it and the Index panel If your terminal supports it, you can use a Unicode line-drawing character. - + + set sidebar_width = 25 # Plenty of space set sidebar_divider_char = '│' # Pretty line-drawing character + @@ -678,7 +694,8 @@ set sidebar_divider_char = '│' # Pretty line * = Can be optionally printed if nonzero † = To use this expandos, you must first: - set mail_check_stats + + set mail_check_stats ‡ = Only applicable to the current folder Here are some examples. They show the number of (F)lagged, (N)ew and (S)ize. @@ -743,21 +760,26 @@ set sidebar_divider_char = '│' # Pretty line This example works well if your mailboxes have unique names after the last separator. Add some mailboxes of different depths. - + + set folder="~/mail" mailboxes =fruit/apple =fruit/banana =fruit/cherry mailboxes =water/sea/sicily =water/sea/archipelago =water/sea/sibuyan mailboxes =water/ocean/atlantic =water/ocean/pacific =water/ocean/arctic + Shorten the names: - + + set sidebar_short_path # Shorten mailbox names (truncate all subdirs) set sidebar_component_depth=1 # Shorten mailbox names (truncate 1 subdirs) set sidebar_delim_chars="/" # Delete everything up to the last or Nth / character + The screenshot below shows what the Sidebar would look like before and after shortening using sidebar_short_path. - + + |fruit/apple |apple |fruit/banana |banana |fruit/cherry |cherry @@ -768,9 +790,11 @@ set sidebar_delim_chars="/" # Delete everyt |water/ocean/pacific |pacific |water/ocean/arctic |arctic + The screenshot below shows what the Sidebar would look like before and after shortening using sidebar_component_depth=1. - + + |fruit/apple |apple |fruit/banana |banana |fruit/cherry |cherry @@ -781,6 +805,7 @@ set sidebar_delim_chars="/" # Delete everyt |water/ocean/pacific |ocean/pacific |water/ocean/arctic |ocean/arctic + @@ -788,7 +813,8 @@ set sidebar_delim_chars="/" # Delete everyt This example works well if you have lots of mailboxes which are arranged in a tree. Add some mailboxes of different depths. - + + set folder="~/mail" mailboxes =fruit mailboxes =fruit/apple =fruit/banana =fruit/cherry @@ -798,16 +824,20 @@ mailboxes =water/sea/sicily =water/sea/archipelago =water/sea/sibuyan mailboxes =water/ocean mailboxes =water/ocean/atlantic =water/ocean/pacific =water/ocean/arctic + Shorten the names: - + + set sidebar_short_path # Shorten mailbox names set sidebar_delim_chars="/" # Delete everything up to the last / character set sidebar_folder_indent # Indent folders whose names we've shortened set sidebar_indent_string=" " # Indent with two spaces + The screenshot below shows what the Sidebar would look like before and after shortening. - + + |fruit |fruit |fruit/apple | apple |fruit/banana | banana @@ -822,6 +852,7 @@ set sidebar_indent_string=" " # Indent with t |water/ocean/pacific | pacific |water/ocean/arctic | arctic + Sometimes, it will be necessary to add mailboxes, that you don't use, to fill in part of the tree. This will trade vertical space for horizontal space (but it looks good). @@ -837,26 +868,29 @@ set sidebar_indent_string=" " # Indent with t If you want some mailboxes to be always visible, then use the sidebar_whitelist command. It takes a list of mailboxes as parameters. - + + set sidebar_new_mail_only # Only mailboxes with new/flagged email sidebar_whitelist fruit fruit/apple # Always display these two mailboxes + Colors Here is a sample color scheme: - -color sidebar_indicator default color17 # Dark blue background -color sidebar_highlight white color238 # Grey background -color sidebar_spoolfile yellow default # Yellow -color sidebar_new green default # Green -color sidebar_ordinary default default # Default colors -color sidebar_flagged red default # Red -color sidebar_divider color8 default - # Dark grey + + +color sidebar_indicator default color17 # Dark blue background +color sidebar_highlight white color238 # Grey background +color sidebar_spoolfile yellow default # Yellow +color sidebar_new green default # Green +color sidebar_ordinary default default # Default colors +color sidebar_flagged red default # Red +color sidebar_divider color8 default # Dark grey + There is a priority order when coloring Sidebar mailboxes. e.g. If a mailbox has new mail it will have the sidebar_new color, even if it also contains flagged @@ -1778,10 +1812,14 @@ color sidebar_divider color8 default sequences for character attributes. NeoMutt translates them into the correct color and character settings. The sequences NeoMutt supports are: - \e[ - Ps; - Ps;.. - Ps;m + + +\e[ +Ps; +Ps;.. +Ps;m + + where Ps can be one of the codes shown in . @@ -3254,8 +3292,11 @@ color sidebar_divider color8 default the line is ignored. Commenting configuration files - my_hdr X-Disclaimer: Why are you listening to me? - # This is a comment + + +my_hdr X-Disclaimer: Why are you listening to me? # This is a comment + + Single quotes ( ') and double quotes ( @@ -3292,11 +3333,13 @@ color sidebar_divider color8 default out the first line only. Splitting long configuration commands over several lines - + + set status_format="some very \ long value split \ over several lines" + It is also possible to substitute the output of a Unix command in an initialization file. This is accomplished by enclosing the command in @@ -3444,10 +3487,12 @@ over several lines" alternates commands by specifying the optional -group option. For example, - + + alternates -group me address1 address2 alternates -group me -group work address3 + would create a group named me which contains all your addresses and a group named work which contains only your work address @@ -3516,10 +3561,12 @@ alternates -group me -group work address3 group. To remove an alias or aliases ( *means all aliases): - + + alias muttdude me@cs.hmc.edu (Michael Elkins) alias theguys manny, moe, jack + Unlike other mailers, NeoMutt doesn't require aliases to be defined in a special file. The alias command can appear anywhere in a configuration @@ -3541,11 +3588,13 @@ alias theguys manny, moe, jack this file too. Configuring external alias files - + + source /usr/local/share/NeoMutt.aliases source ~/.mail_aliases set alias_file=~/.mail_aliases + To use aliases, you merely use the alias at any place in NeoMutt where NeoMutt prompts for addresses, such as the @@ -3844,17 +3893,23 @@ set alias_file=~/.mail_aliases Warnings about Duplicated Bindings Due to a limitation of NeoMutt, creating key bindings, or macros, will overwrite existing mappings with similar, shorter, names. - + + bind index g group-reply -bind index gg first-entry +bind index gg first-entry + + In this example, the g binding will be overwritten and cannot be used. Newer versions of NeoMutt will warn the user about this. To avoid warnings on startup, first set the shorter binding to noop (no operation). - + + bind index g noop -bind index gg first-entry +bind index gg first-entry + + @@ -3952,10 +4007,12 @@ bind index gg first-entry work in their name. Setting sort method based on mailbox name - + + folder-hook . "set sort=date-sent" folder-hook work "set sort=threads" + @@ -4332,10 +4389,12 @@ folder-hook work "set sort=threads" $COLORFGBG environment variable to the default colors of your terminal for this to work; for example (for Bourne-like shells): - + + set COLORFGBG="green;black" export COLORFGBG + The S-Lang library requires you to use the @@ -4499,13 +4558,15 @@ export COLORFGBG list. Header weeding - + + # Sven's draconian header weeding ignore * unignore from date subject to cc unignore organization organisation x-mailer: x-newsreader: x-mailing-list: unignore posted-to: + @@ -4858,7 +4919,11 @@ unignore posted-to: .neomuttrc. Defining custom headers - my_hdr Organization: A Really Big Company, Anytown, USA + + +my_hdr Organization: A Really Big Company, Anytown, USA + + Space characters are @@ -4907,7 +4972,8 @@ unignore posted-to: Using %-expandos in <command>save-hook</command> - + + # default: save all to ~/Mail/<author name> save-hook . ~/Mail/%F # save from me@turing.cs.hmc.edu and me@cs.hmc.edu to $folder/elkins @@ -4915,6 +4981,7 @@ save-hook me@(turing\\.)?cs\\.hmc\\.edu$ +elkins # save from aol.com to $folder/spam save-hook aol\\.com$ +spam + Also see the @@ -5100,10 +5167,12 @@ save-hook aol\\.com$ +spam for information on the exact format of pattern. Example: - + + message-hook ~A 'set pager=builtin' message-hook '~f freshmeat-news' 'set pager="less \"+/^ subject: .*\""' + @@ -5260,9 +5329,11 @@ message-hook '~f freshmeat-news' 'set pager="less \"+/^ subject: .*\""' ~(), will not work by default. A workaround is to push the scoring command in a folder hook. This will cause the mailbox to be rescored after it is opened and input starts being processed: - + + folder-hook . 'push "<enter-command>score ~= 10<enter>"' + @@ -5337,12 +5408,14 @@ folder-hook . 'push "<enter-command>score ~= 10<enter>"' . Configuring spam detection - + + spam "X-DCC-.*-Metrics:.*(....)=many" "90+/DCC-%1" spam "X-Spam-Status: Yes" "90+/SA" spam "X-PerlMX-Spam: .*Probability=([0-9]+)%" "%1/PM" set spam_separator=", " + If then a message is received that DCC registered with many hits under the @@ -5655,11 +5728,13 @@ set spam_separator=", " Using user-defined variables for config file readability - + + set my_cfgdir = $HOME/neomutt/config source $my_cfgdir/hooks $my_cfgdir/macros # more source commands... + A custom variable can also be used in macros to backup the current value of another variable. In the following example, the @@ -5672,13 +5747,15 @@ source $my_cfgdir/hooks $my_cfgdir/macros Using user-defined variables for backing up other config option values - + + macro pager ,x '\ <enter-command>set my_delete=$delete<enter>\ <enter-command>set delete=yes<enter>\ ...\ <enter-command>set delete=$my_delete<enter>' + Since NeoMutt expands such values already when parsing the configuration file(s), the value of @@ -5694,13 +5771,15 @@ macro pager ,x '\ sign. Deferring user-defined variable expansion to runtime - + + macro pager <PageDown> "\ <enter-command> set my_old_pager_stop=\$pager_stop pager_stop<Enter>\ <next-page>\ <enter-command> set pager_stop=\$my_old_pager_stop<Enter>\ <enter-command> unset my_old_pager_stop<Enter>" + Note that there is a space between <enter-command>and the @@ -5723,15 +5802,16 @@ macro pager <PageDown> "\ demonstrates type conversions. Type conversions using variables - + + set my_lines = "5" # value is string "5" set pager_index_lines = $my_lines # value is integer 5 set my_sort = "date-received" # value is string "date-received" set sort = "last-$my_sort" # value is sort last-date-received set my_inc = $read_inc # value is string "10" (default of $read_inc) -set my_foo = $my_inc - # value is string "10" +set my_foo = $my_inc # value is string "10" + These assignments are all valid. If, however, the value of $my_lines would have been @@ -5742,16 +5822,22 @@ set my_foo = $my_inc Type conversion applies to all configuration commands which take arguments. But please note that every expanded value of a variable is considered just a single token. A working example is: - + + set my_pattern = "~A" set my_number = "10" # same as: score ~A +10 -score $my_pattern +$my_number +score $my_pattern +$my_number + + What does not work is: - + + set my_mx = "+mailbox1 +mailbox2" -mailboxes $my_mx +mailbox3 +mailboxes $my_mx +mailbox3 + + because the value of $my_mx is interpreted as a single mailbox named +mailbox1 +mailbox2 and not two distinct @@ -5887,7 +5973,11 @@ mailboxes $my_mx +mailbox3 %?n?%n new messages.? You can also switch between two strings using the following construct: - %?<sequence_char>?<if_string>&<else_string>? + + +%?<sequence_char>?<if_string>&<else_string>? + + If the value of sequence_char is non-zero, if_string will be expanded, otherwise @@ -5895,10 +5985,12 @@ mailboxes $my_mx +mailbox3 The conditional sequences can also be nested by using the %< and > operators. The %? notation can still be used but requires quoting. For example: - + + %<x?true&false> %<x?%<y?%<z?xyz&xy>&x>&none> + For more examples, see @@ -5945,7 +6037,11 @@ mailboxes $my_mx +mailbox3 the character X. For example, filling the rest of the line with dashes is done by setting: - set status_format = "%v on %h: %B: %?n?%n&no? new messages %|-" + + +set status_format = "%v on %h: %B: %?n?%n&no? new messages %|-" + + @@ -5962,7 +6058,11 @@ mailboxes $my_mx +mailbox3 right and fill the gap with spaces, one might use (note the space after %>): - set status_format = "%B: %?n?%n&no? new messages %> (%v on %h)" + + +set status_format = "%B: %?n?%n&no? new messages %> (%v on %h)" + + @@ -5982,7 +6082,11 @@ mailboxes $my_mx +mailbox3 fits on screen, one might use (note two spaces after %*: the second ensures there's a space between the truncated right-hand side and the subject): - set index_format="%4C %Z %{%b %d} %-15.15L (%?l?%4l&%4c?)%* %s" + + +set index_format="%4C %Z %{%b %d} %-15.15L (%?l?%4l&%4c?)%* %s" + + @@ -5998,11 +6102,13 @@ mailboxes $my_mx +mailbox3 %<[y?%<[d?%[%H:%M]&%[%m/%d]>&%[%y.%m]>for the date in the $index_format will produce a display like: - + + 1 + 14.12 Grace Hall ( 13) Gulliver's Travels 2 + 10/02 Callum Harrison ( 48) Huckleberry Finn 3 12:17 Rhys Lee ( 42) The Lord Of The Rings + @@ -7144,7 +7250,11 @@ mailboxes $my_mx +mailbox3 ^Junk +From +Me$and it must be from either Jim +Somebody or Ed +SomeoneElse: - '~s "^Junk +From +Me$" ~f ("Jim +Somebody"|"Ed +SomeoneElse")' + + +'~s "^Junk +From +Me$" ~f ("Jim +Somebody"|"Ed +SomeoneElse")' + + If a regular expression contains parenthesis, or a vertical bar ("|"), you @@ -7501,10 +7611,12 @@ mailboxes $my_mx +mailbox3 Specifying a <quote>default</quote> hook - + + send-hook . 'unmy_hdr From:' send-hook ~C'^b@b\.b$' my_hdr from: c@c.c + In , by default the value of @@ -7539,7 +7651,11 @@ send-hook ~C'^b@b\.b$' my_hdr from: c@c.c etc.). For example, if you wanted to set your return address based upon sending mail to a specific address, you could do something like: - send-hook '~t ^user@work\.com$' 'my_hdr From: John Smith <user@host>' + + +send-hook '~t ^user@work\.com$' 'my_hdr From: John Smith <user@host>' + + which would execute the given command when sending mail to user@work.com. However, it is not required that you write the pattern to match @@ -7562,19 +7678,21 @@ send-hook ~C'^b@b\.b$' my_hdr from: c@c.c mailbox shortcut expansion on the regex parameter. There is some overlap between these, so special attention should be paid to the first character of the regex. - -# Here, ^ will expand to "the current mailbox" not "beginning of string": + + +# Here, ^ will expand to "the current mailbox" not "beginning of string": folder-hook ^/home/user/Mail/bar "set sort=threads" -# If you want ^ to be interpreted as "beginning of string", one workaround -# is to enclose the regex in parenthesis: +# If you want ^ to be interpreted as "beginning of string", one workaround +# is to enclose the regex in parenthesis: folder-hook (^/home/user/Mail/bar) "set sort=threads" -# This will expand to the default save folder for the alias "imap.example.com", which -# is probably not what you want: +# This will expand to the default save folder for the alias "imap.example.com", which +# is probably not what you want: folder-hook @imap.example.com "set sort=threads" -# A workaround is to use parenthesis or a backslash: +# A workaround is to use parenthesis or a backslash: folder-hook (@imap.example.com) "set sort=threads" folder-hook '\@imap.example.com' "set sort=threads" + Keep in mind that mailbox shortcut expansion on the regex parameter takes place when the hook is initially parsed, not when the hook is matching against a mailbox. When NeoMutt starts up and is reading @@ -7594,12 +7712,14 @@ folder-hook '\@imap.example.com' "set sort=threads" not shell-style!) You can also query current environment values by prefixing a ?character. - + + setenv TERM vt100 setenv ORGANIZATION "The NeoMutt Development Team" unsetenv DISPLAY setenv ?LESS + @@ -7617,12 +7737,14 @@ setenv ?LESS addresses, return a non-zero exit code and a one line error message. An example multiple response output: - + + Searching database ... 20 entries ... 3 matching: me@cs.hmc.edu Michael Elkins mutt dude blong@fiction.net Brandon Long mutt and more roessler@does-not-exist.org Thomas Roessler mutt pgp + There are two mechanisms for accessing the query function of NeoMutt. One is to do a query from the index menu using the <query>function (default: Q). This will prompt @@ -7938,17 +8060,17 @@ roessler@does-not-exist.org Thomas Roessler mutt pgp removed. Subject Munging - -# Erase [rt #12345] tags from Request Tracker (RT) e-mails -subjectrx '\[rt #[0-9]+\] *' '%L%R' -# Servicedesk is another RT that sends more complex subjects. - -# Keep the ticket number. + +# Erase [rt #12345] tags from Request Tracker (RT) e-mails +subjectrx '\[rt #[0-9]+\] *' '%L%R' +# Servicedesk is another RT that sends more complex subjects. +# Keep the ticket number. subjectrx '\[servicedesk #([0-9]+)\] ([^.]+)\.([^.]+) - (new|open|pending|update) - ' '%L[#%1] %R' -# Strip out annoying [listname] prefixes in subjects +# Strip out annoying [listname] prefixes in subjects subjectrx '\[[^]]*\]:? *' '%L%R' + @@ -8132,10 +8254,12 @@ subjectrx '\[[^]]*\]:? *' '%L%R' ftp://ftp.mutt.org/mutt/contrib/and the configuration commands: - + + macro index \cb |urlview\n macro pager \cb |urlview\n + @@ -8248,10 +8372,12 @@ macro pager \cb |urlview\n application/pgp. NeoMutt will denote attachments with a couple lines describing them. These lines are of the form: - + + [-- Attachment #1: Description --] [-- Type: text/plain, Encoding: 7bit, Size: 10000 --] + Where the Description is the description or filename given for the attachment, and the @@ -8259,7 +8385,11 @@ macro pager \cb |urlview\n encodings. If NeoMutt cannot deal with a MIME type, it will display a message like: - [-- image/gif is unsupported (use 'v' to view this part) --] + + +[-- image/gif is unsupported (use 'v' to view this part) --] + + @@ -8298,10 +8428,12 @@ macro pager \cb |urlview\n a list of tagged attachments. You can also modifying the attachment information, notably the type, encoding and description. Attachments appear as follows by default: - + + - 1 [text/plain, 7bit, 1K] /tmp/neomutt-euler-8082-0 <no description> 2 [applica/x-gunzip, base64, 422K] ~/src/neomutt-0.85.tar.gz <no description> + The -denotes that NeoMutt will delete the file after sending (or postponing, or canceling) the message. It can be toggled with the @@ -8347,11 +8479,13 @@ macro pager \cb |urlview\n <literal>mime.types</literal> - + + application/postscript ps eps application/pgp pgp audio/x-aiff aif aifc aiff + A sample mime.types file comes with the NeoMutt distribution, and @@ -8581,10 +8715,12 @@ audio/x-aiff aif aifc aiff Perhaps you wish to use lynx to view text/html files, and a pager on all other text formats, then you would use the following: - + + text/html; lynx %s text/*; more + @@ -8614,10 +8750,12 @@ text/*; more following example (using $charset inside the backtick expansion is safe, since it is not itself subject to any further expansion): - + + text/test-mailcap-bug; cat %s; copiousoutput; test=charset=%{charset} \ && test "`echo $charset | tr '[A-Z]' '[a-z]'`" != iso-8859-1 + @@ -8652,7 +8790,11 @@ text/test-mailcap-bug; cat %s; copiousoutput; test=charset=%{charset} \ the pager. Some programs make use of this environment variable automatically. Others provide a command line argument that can use this to set the output width: - text/html; lynx -dump -width ${COLUMNS:-80} %s; copiousoutput + + +text/html; lynx -dump -width ${COLUMNS:-80} %s; copiousoutput + + Note that when using the built-in pager, only entries with this flag will be considered a handler for a MIME type — all other entries will @@ -8741,10 +8883,12 @@ text/test-mailcap-bug; cat %s; copiousoutput; test=charset=%{charset} \ and NeoMutt continues searching for the right entry. Note that the content-type must match before NeoMutt performs the test. For example: - + + text/html; firefox -remote 'openURL(%s)' ; test=RunningX text/html; lynx %s + In this example, NeoMutt will run the program RunningX which will return 0 if the X Window manager is running, and non-zero if it isn't. If @@ -8767,11 +8911,13 @@ text/html; lynx %s image/gif, and you have the following entries in your mailcap file, NeoMutt will search for an entry with the print command: - + + image/*; xv %s -image/gif; ; print= anytopnm %s | pnmtops | lpr; \ +image/gif; ; print=anytopnm %s | pnmtops | lpr; \ nametemplate=%s.gif + NeoMutt will skip the image/*entry and use the image/gif entry with the print command. @@ -8785,11 +8931,13 @@ image/gif; ; print= anytopnm %s | pnmtops | lpr; \ m by default). In addition, you can then use the test feature to determine which viewer to use interactively depending on your environment. - + + text/html; firefox -remote 'openURL(%s)' ; test=RunningX text/html; lynx %s; nametemplate=%s.html text/html; lynx -dump %s; nametemplate=%s.html; copiousoutput + For auto_view @@ -8881,22 +9029,25 @@ text/html; lynx -dump %s; nametemplate=%s.html; copiousoutput Example Mailcap Files This mailcap file is fairly simple and standard: - + + # I'm always running X :) video/*; xanim %s > /dev/null image/*; xv %s > /dev/null # I'm always running firefox (if my computer had more memory, maybe) text/html; firefox -remote 'openURL(%s)' + This mailcap file shows quite a number of examples: - -# Use xanim to view all videos Xanim produces a header on startup, -# send that to /dev/null so I don't see it + + +# Use xanim to view all videos Xanim produces a header on startup, +# send that to /dev/null so I don't see it video/*; xanim %s > /dev/null # Send html to a running firefox by remote text/html; firefox -remote 'openURL(%s)'; test=RunningFirefox -# If I'm not running firefox but I am running X, start firefox on the -# object +# If I'm not running firefox but I am running X, start firefox on the +# object text/html; firefox %s; test=RunningX # Else use lynx to view it as text text/html; lynx %s @@ -8905,18 +9056,18 @@ text/html; lynx -dump %s; copiousoutput # I use enscript to print text in two columns to a page text/*; more %s; print=enscript -2Gr %s # Firefox adds a flag to tell itself to view jpegs internally -image/jpeg;xv %s; x-mozilla-flags=internal +image/jpeg; xv %s; x-mozilla-flags=internal # Use xv to view images if I'm running X # In addition, this uses the \ to extend the line and set my editor # for images -image/*;xv %s; test=RunningX; \ - edit=xpaint %s +image/*; xv %s; test=RunningX; edit=xpaint %s # Convert images to text using the netpbm tools -image/*; (anytopnm %s | pnmscale -xysize 80 46 | ppmtopgm | pgmtopbm | -pbmtoascii -1x2 ) 2>&1 ; copiousoutput +image/*; (anytopnm %s | pnmscale -xysize 80 46 | ppmtopgm | pgmtopbm | \ + pbmtoascii -1x2) 2>&1 ; copiousoutput # Send excel spreadsheets to my NT box -application/ms-excel; open.pl %s +application/ms-excel; open.pl %s + @@ -8955,21 +9106,25 @@ application/ms-excel; open.pl %s auto_view configuration command to list the content-types that you wish to view automatically. For instance, if you set it to: - + + auto_view text/html application/x-gunzip \ application/postscript image/gif application/x-tar-gz + ...NeoMutt would try to find corresponding entries for rendering attachments of these types as text. A corresponding mailcap could look like: - -text/html; lynx -dump %s; copiousoutput; nametemplate=%s.html -image/*; anytopnm %s | pnmscale -xsize 80 -ysize 50 | ppmtopgm | \ - pgmtopbm | pbmtoascii ; copiousoutput + + +text/html; lynx -dump %s; copiousoutput; nametemplate=%s.html +image/*; anytopnm %s | pnmscale -xsize 80 -ysize 50 | ppmtopgm | \ + pgmtopbm | pbmtoascii ; copiousoutput application/x-gunzip; gzcat; copiousoutput -application/x-tar-gz; gunzip -c %s | tar -tf - ; copiousoutput +application/x-tar-gz; gunzip -c %s | tar -tf - ; copiousoutput application/postscript; ps2ascii %s; copiousoutput + unauto_view can be used to remove previous entries from the @@ -8998,10 +9153,12 @@ application/postscript; ps2ascii %s; copiousoutput available types is preferred. It consists of a number of MIME types in order, including support for implicit and explicit wildcards. For example: - + + alternative_order text/enriched text/plain text \ application/postscript image/* + Next, NeoMutt will check if any of the types have a defined @@ -9102,59 +9259,50 @@ alternative_order text/enriched text/plain text \ commented out define the default configuration of the lists. Attachment counting - - -# Removing a pattern from a list removes that pattern literally. It -# does not remove any type matching the pattern. - -# -# attachments +A */.* -# attachments +A image/jpeg -# unattachments +A */.* -# -# This leaves "attached" image/jpeg files on the allowed attachments -# list. It does not remove all items, as you might expect, because the -# second */.* is not a matching expression at this time. - -# -# Remember: "unattachments" only undoes what "attachments" has done! - -# It does not trigger any matching on actual messages. - -# Qualify any MIME part with an "attachment" disposition, EXCEPT for -# text/x-vcard and application/pgp parts. (PGP parts are already known -# to NeoMutt, and can be searched for with ~g, ~G, and ~k.) -# -# I've added x-pkcs7 to this, since it functions (for S/MIME) -# analogously to PGP signature attachments. S/MIME isn't supported -# in a stock NeoMutt build, but we can still treat it specially here. - -# - -attachments +A */.* -attachments -A text/x-vcard application/pgp.* -attachments -A application/x-pkcs7-.* - -# Discount all MIME parts with an "inline" disposition, unless they're -# text/plain. (Why inline a text/plain part unless it's external to the -# message flow?) - -attachments +I text/plain - -# These two lines make NeoMutt qualify MIME containers. (So, for example, -# a message/rfc822 forward will count as an attachment.) The first -# line is unnecessary if you already have "attach-allow */.*", of -# course. These are off by default! The MIME elements contained -# within a message/* or multipart/* are still examined, even if the -# containers themselves don't qualify. - -#attachments +A message/.* multipart/.* -#attachments +I message/.* multipart/.* - + + +# Removing a pattern from a list removes that pattern literally. It +# does not remove any type matching the pattern. +# +# attachments +A */.* +# attachments +A image/jpeg +# unattachments +A */.* +# +# This leaves "attached" image/jpeg files on the allowed attachments +# list. It does not remove all items, as you might expect, because the +# second */.* is not a matching expression at this time. +# +# Remember: "unattachments" only undoes what "attachments" has done! +# It does not trigger any matching on actual messages. +# Qualify any MIME part with an "attachment" disposition, EXCEPT for +# text/x-vcard and application/pgp parts. (PGP parts are already known +# to NeoMutt, and can be searched for with ~g, ~G, and ~k.) +# +# I've added x-pkcs7 to this, since it functions (for S/MIME) +# analogously to PGP signature attachments. S/MIME isn't supported +# in a stock NeoMutt build, but we can still treat it specially here. +# +attachments +A */.* +attachments -A text/x-vcard application/pgp.* +attachments -A application/x-pkcs7-.* +# Discount all MIME parts with an "inline" disposition, unless they're +# text/plain. (Why inline a text/plain part unless it's external to the +# message flow?) +attachments +I text/plain +# These two lines make NeoMutt qualify MIME containers. (So, for example, +# a message/rfc822 forward will count as an attachment.) The first +# line is unnecessary if you already have "attach-allow */.*", of +# course. These are off by default! The MIME elements contained +# within a message/* or multipart/* are still examined, even if the +# containers themselves don't qualify. + +#attachments +A message/.* multipart/.* +#attachments +I message/.* multipart/.* ## You probably don't really care to know about deleted attachments. -attachments -A message/external-body -attachments -I message/external-body +attachments -A message/external-body +attachments -I message/external-body + Entering the command @@ -9198,7 +9346,11 @@ attachments -I message/external-body rules in the mailcap file and according to any other configuration options (such as auto_view) specified. Common usage would be: - mime_lookup application/octet-stream application/X-Lotus-Manuscript + + +mime_lookup application/octet-stream application/X-Lotus-Manuscript + + In addition, the unmime_lookup command may be used to disable this feature for any particular MIME type if it had been set, for example, in @@ -9270,11 +9422,13 @@ attachments -I message/external-body elsewhere. URLs - + + pops://host/ imaps://user@host/INBOX/Sent smtp://user@host:587/ + @@ -9357,10 +9511,12 @@ smtp://user@host:587/ $mail_check and $timeout variables. Reasonable values are: - + + set mail_check=90 set timeout=15 + with relatively good results even over slow modem lines. Note that if you are using mbox as the mail store on UW servers @@ -9508,12 +9664,14 @@ set timeout=15 account-hook was last used). Some examples: - + + account-hook . 'unset imap_user; unset imap_pass; unset tunnel' account-hook imap://host1/ 'set imap_user=me1 imap_pass=foo' account-hook imap://host2/ 'set tunnel="ssh host2 /usr/libexec/imapd"' account-hook smtp://user@host3/ 'set tunnel="ssh host3 /usr/libexec/smtpd"' + To manage multiple accounts with, for example, different values of $record or sender addresses, @@ -9524,12 +9682,14 @@ account-hook smtp://user@host3/ 'set tunnel="ssh host3 /usr/libexec/smtpd"' command. Managing multiple accounts - + + mailboxes imap://user@host1/INBOX folder-hook imap://user@host1/ 'set folder=imap://host1/ ; set record=+INBOX/Sent' mailboxes imap://user@host2/INBOX folder-hook imap://user@host2/ 'set folder=imap://host2/ ; set record=+INBOX/Sent' + In example the folders are defined using @@ -9578,7 +9738,7 @@ folder-hook imap://user@host2/ 'set folder=imap://host2/ ; set record=+INBOX/Sen looking at possibly thousands of single files (since Maildir and MH use one file per message.) Header caching can be enabled by configuring one of the database - backends. One of tokyocabinet, kyotocabinet, qdbm, gdbm, lmdb or + backends. One of tokyocabinet, kyotocabinet, qdbm, gdbm, lmdb or bdb. If enabled, $header_cache can be used to either @@ -9723,31 +9883,33 @@ folder-hook imap://user@host2/ 'set folder=imap://host2/ ; set record=+INBOX/Sen neomuttrc - -# Example NeoMutt config file for the attach-headers-color feature. -# Color if the attachment is autoviewed -color attach_headers brightgreen default "Autoview" + +# Example NeoMutt config file for the attach-headers-color feature. + +# Color if the attachment is autoviewed +color attach_headers brightgreen default "Autoview" # Color only the brackets around the headers -color attach_headers brightyellow default "^\\[--" -color attach_headers brightyellow default "--]$" +color attach_headers brightyellow default "^\\[--" +color attach_headers brightyellow default "--]$" # Color the mime type and the size -color attach_headers green default "Type: [a-z]+/[a-z0-9\-]+" -color attach_headers green default "Size: [0-9\.]+[KM]" +color attach_headers green default "Type: [a-z]+/[a-z0-9\-]+" +color attach_headers green default "Size: [0-9\.]+[KM]" # Color GPGME signature checks -color attach_headers brightgreen default "Good signature from.*" -color attach_headers brightred default "Bad signature from.*" -color attach_headers brightred default "BAD signature from.*" -color attach_headers brightred default "Note: This key has expired!" -color attach_headers brightmagenta default "Problem signature from.*" -color attach_headers brightmagenta default "WARNING: This key is not certified with a trusted signature!" -color attach_headers brightmagenta default " There is no indication that the signature belongs to the owner." -color attach_headers brightmagenta default "can't handle these multiple signatures" -color attach_headers brightmagenta default "signature verification suppressed" -color attach_headers brightmagenta default "invalid node with packet of type" - - # vim: syntax=neomuttrc +color attach_headers brightgreen default "Good signature from.*" +color attach_headers brightred default "Bad signature from.*" +color attach_headers brightred default "BAD signature from.*" +color attach_headers brightred default "Note: This key has expired!" +color attach_headers brightmagenta default "Problem signature from.*" +color attach_headers brightmagenta default "WARNING: This key is not certified with a trusted signature!" +color attach_headers brightmagenta default " There is no indication that the signature belongs to the owner." +color attach_headers brightmagenta default "can't handle these multiple signatures" +color attach_headers brightmagenta default "signature verification suppressed" +color attach_headers brightmagenta default "invalid node with packet of type" + +# vim: syntax=neomuttrc + @@ -9834,17 +9996,19 @@ color attach_headers brightmagenta default "invalid node with pac neomuttrc - -# Example NeoMutt config file for the compose-to-sender feature. -# -------------------------------------------------------------------------- -# FUNCTIONS - shown with an example mapping -# -------------------------------------------------------------------------- -# Compose a new email (not a reply) to the sender + +# Example NeoMutt config file for the compose-to-sender feature. + +# -------------------------------------------------------------------------- +# FUNCTIONS – shown with an example mapping +# -------------------------------------------------------------------------- +# Compose a new email (not a reply) to the sender bind index,pager @ compose-to-sender - # vim: syntax=neomuttrc +# vim: syntax=neomuttrc + @@ -10005,7 +10169,11 @@ bind index,pager @ compose-to-sender Example of <literal>open-hook</literal> - open-hook '\.gz$' "gzip --stdout --decompress '%f' > '%t'" + + +open-hook '\.gz$' "gzip --stdout --decompress '%f' > '%t'" + + NeoMutt finds a file, @@ -10098,7 +10266,11 @@ bind index,pager @ compose-to-sender Example of <literal>append-hook</literal> - append-hook '\.gz$' "gzip --stdout '%t' >> '%f'" + + +append-hook '\.gz$' "gzip --stdout '%t' >> '%f'" + + NeoMutt wants to append an email to a folder, @@ -10149,19 +10321,20 @@ bind index,pager @ compose-to-sender neomuttrc - -# Example NeoMutt config file for the compress feature. -# This feature adds three hooks to NeoMutt which allow it to -# work with compressed, or encrypted, mailboxes. + +# Example NeoMutt config file for the compress feature. -# The hooks are of the form: -# open-hook regex "shell-command" -# close-hook regex "shell-command" -# append-hook regex "shell-command" -# The 'append-hook' is optional. +# This feature adds three hooks to NeoMutt which allow it to +# work with compressed, or encrypted, mailboxes. -# Handler for gzip compressed mailboxes +# The hooks are of the form: +# open-hook regex "shell-command" +# close-hook regex "shell-command" +# append-hook regex "shell-command" +# The 'append-hook' is optional. + +# Handler for gzip compressed mailboxes open-hook '\.gz$' "gzip --stdout --decompress '%f' > '%t'" close-hook '\.gz$' "gzip --stdout '%t' > '%f'" append-hook '\.gz$' "gzip --stdout '%t' >> '%f'" @@ -10173,17 +10346,18 @@ append-hook '\.bz2$' "bzip2 --stdout '%t' >> '%f'" open-hook '\.xz$' "xz --stdout --decompress '%f' > '%t'" close-hook '\.xz$' "xz --stdout '%t' > '%f'" append-hook '\.xz$' "xz --stdout '%t' >> '%f'" -# Handler for pgp encrypted mailboxes -# PGP does not support appending to an encrypted file +# Handler for pgp encrypted mailboxes +# PGP does not support appending to an encrypted file open-hook '\.pgp$' "pgp -f < '%f' > '%t'" close-hook '\.pgp$' "pgp -fe YourPgpUserIdOrKeyId < '%t' > '%f'" -# Handler for gpg encrypted mailboxes -# gpg does not support appending to an encrypted file +# Handler for gpg encrypted mailboxes +# gpg does not support appending to an encrypted file open-hook '\.gpg$' "gpg --decrypt < '%f' > '%t'" close-hook '\.gpg$' "gpg --encrypt --recipient YourGpgUserIdOrKeyId < '%t' > '%f'" - # vim: syntax=neomuttrc +# vim: syntax=neomuttrc + @@ -10477,11 +10651,13 @@ close-hook '\.gpg$' "gpg --encrypt --recipient YourGpgUserIdOrKeyId < '%t' & %?[1m?%[%b %d]&%[%Y-%m-%d]? Reparsed a little, for clarity, you can see the test condition and the two format strings. - + + %?[1m? & ? %[%b %d] %[%Y-%m-%d] + @@ -10543,18 +10719,28 @@ close-hook '\.gpg$' "gpg --encrypt --recipient YourGpgUserIdOrKeyId < '%t' & The $index_format string would contain: - %<[y?%<[m?%<[d?%[%H:%M ]&%[%a %d]>&%[%b %d]>&%[%m/%y ]> + + +%<[y?%<[m?%<[d?%[%H:%M ]&%[%a %d]>&%[%b %d]>&%[%m/%y ]> + + Reparsed a little, for clarity, you can see the test conditions and the four format strings. - + + %<[y? &%[%m/%y ]> Older %<[m? &%[%b %d]> This year %<[d? &%[%a %d]> This month %[%H:%M ] Today + This a another view of the same example, with some whitespace for clarity. - %<[y? %<[m? %<[d? AAA & BBB > & CCC > & DDD > + + +%<[y? %<[m? %<[d? AAA & BBB > & CCC > & DDD > + + AAA = %[%H:%M ] BBB = %[%a %d] CCC = %[%b %d] DDD = %[%m/%y ] @@ -10569,23 +10755,26 @@ close-hook '\.gpg$' "gpg --encrypt --recipient YourGpgUserIdOrKeyId < '%t' & neomuttrc - -# Example NeoMutt config file for the cond-date feature. - -# -# The default index_format is: -# '%4C %Z %{%b %d} %-15.15L (%?l?%4l&%4c?) %s' -# -# We replace the date field '%{%b %d}', giving: + + +# Example NeoMutt config file for the cond-date feature. + +# +# The default index_format is: +# '%4C %Z %{%b %d} %-15.15L (%?l?%4l&%4c?) %s' +# +# We replace the date field '%{%b %d}', giving: set index_format='%4C %Z %<[y?%<[m?%<[d?%[%H:%M ]&%[%a %d]>&%[%b %d]>&%[%m/%y ]> %-15.15L (%?l?%4l&%4c?) %s' -# Test Date Range Format String Example -# -------------------------------------------- -# %[d Today %[%H:%M ] 12:34 -# %[m This month %[%a %d] Thu 12 -# %[y This year %[%b %d] Dec 10 -# - Older %[%m/%y ] 06/15 -# vim: syntax=neomuttrc +# Test Date Range Format String Example +# -------------------------------------------- +# %[d Today %[%H:%M ] 12:34 +# %[m This month %[%a %d] Thu 12 +# %[y This year %[%b %d] Dec 10 +# — Older %[%m/%y ] 06/15 + +# vim: syntax=neomuttrc + @@ -10662,18 +10851,22 @@ set index_format='%4C %Z %<[y?%<[m?%<[d?%[%H:%M ]&%[%a %d]>& $smime_self_encrypt, then set $smime_default_key to your personal S/MIME key id. - + + set smime_self_encrypt = yes set smime_default_key = bb345e23.0 + Or, if you use PGP, $pgp_self_encrypt, then set $pgp_default_key to your personal PGP key id. - + + set pgp_self_encrypt = yes set pgp_default_key = A4AF18C5582473BD35A1E9CE78BB3D480042198E + If you have different key for signing, then you can set $pgp_sign_as or $smime_sign_as respectively. @@ -10742,24 +10935,26 @@ set pgp_default_key = A4AF18C5582473BD35A1E9CE78BB3D480042198E neomuttrc - -# Example NeoMutt config file for the encrypt-to-self feature. -# -------------------------------------------------------------------------- -# VARIABLES - shown with their default values -# -------------------------------------------------------------------------- -# Save a copy of outgoing email, encrypted to yourself + +# Example NeoMutt config file for the encrypt-to-self feature. + +# -------------------------------------------------------------------------- +# VARIABLES – shown with their default values +# -------------------------------------------------------------------------- +# Save a copy of outgoing email, encrypted to yourself set pgp_self_encrypt = "yes" set pgp_default_key = "PGP-KEY" -# set pgp_sign_as = "PGP-SIGNING-KEY" +# set pgp_sign_as = "PGP-SIGNING-KEY" -# Save a copy of outgoing email, encrypted to yourself +# Save a copy of outgoing email, encrypted to yourself set smime_self_encrypt = "yes" set smime_default_key = "SMIME-KEY" -# set smime_sign_as = "SMIME-SIGNING-KEY" +# set smime_sign_as = "SMIME-SIGNING-KEY" -# vim: syntax=neomuttrc +# vim: syntax=neomuttrc + @@ -10929,32 +11124,35 @@ set smime_default_key = "SMIME-KEY" neomuttrc - -# Example NeoMutt config file for the forgotten-attachment feature. - -# The 'forgotten-attachment' feature provides a new setting for NeoMutt that -# alerts the user if the message body contains a certain regular expression but there are -# no attachments added. This is meant to ensure that the user does not forget -# to attach a file after promising to do so in the mail. - -# Ask if the user wishes to abort sending if $abort_noattach_regex is found in the -# body, but no attachments have been added -# It can be set to: -# "yes" : always abort -# "ask-yes" : ask whether to abort -# "no" : send the mail + + +# Example NeoMutt config file for the forgotten-attachment feature. + +# The 'forgotten-attachment' feature provides a new setting for NeoMutt that +# alerts the user if the message body contains a certain regular expression but there are +# no attachments added. This is meant to ensure that the user does not forget +# to attach a file after promising to do so in the mail. + +# Ask if the user wishes to abort sending if $abort_noattach_regex is found in the +# body, but no attachments have been added +# It can be set to: +# "yes" : always abort +# "ask-yes" : ask whether to abort +# "no" : send the mail set abort_noattach = no -# Search for the following regular expression in the body of the email -# English: attach, attached, attachment, attachments +# Search for the following regular expression in the body of the email +# English: attach, attached, attachment, attachments set abort_noattach_regex = "\\<attach(|ed|ments?)\\>" -# Nederlands: -# set abort_noattach_regex = "\\<(bijvoegen|bijgevoegd|bijlage|bijlagen)\\>" -# Deutsch: -# set abort_noattach_regex = "\\<(anhängen|angehängt|anhang|anhänge|hängt an)\\>" -# Français: -# set abort_noattach_regex = "\\<(attaché|attachés|attache|attachons|joint|jointe|joints|jointes|joins|joignons)\\>" -# vim: syntax=neomuttrc +# Nederlands: +# set abort_noattach_regex = "\\<(bijvoegen|bijgevoegd|bijlage|bijlagen)\\>" +# Deutsch: +# set abort_noattach_regex = "\\<(anhängen|angehängt|anhang|anhänge|hängt an)\\>" +# Français: +# set abort_noattach_regex = "\\<(attaché|attachés|attache|attachons|joint|jointe|joints|jointes|joins|joignons)\\>" + +# vim: syntax=neomuttrc + @@ -11087,21 +11285,23 @@ set abort_noattach_regex = "\\<attach(|ed|ments?)\\>" neomuttrc - -# Example NeoMutt config file for the global hooks feature. -# -------------------------------------------------------------------------- -# COMMANDS - shown with an example argument -# -------------------------------------------------------------------------- -# After $timeout seconds of inactivity, run this NeoMutt command + +# Example NeoMutt config file for the global hooks feature. + +# -------------------------------------------------------------------------- +# COMMANDS – shown with an example argument +# -------------------------------------------------------------------------- +# After $timeout seconds of inactivity, run this NeoMutt command timeout-hook 'exec sync-mailbox' # When NeoMutt first loads, run this NeoMutt command startup-hook 'exec sync-mailbox' # When NeoMutt quits, run this NeoMutt command shutdown-hook 'exec sync-mailbox' - # vim: syntax=neomuttrc +# vim: syntax=neomuttrc + @@ -11157,11 +11357,13 @@ shutdown-hook 'exec sync-mailbox' ifdef feature introduces three new commands to NeoMutt and allow you to share one config file between versions of NeoMutt that may have different features compiled in. - + + ifdef symbol config-command [args...] # If a symbol is defined ifndef symbol config-command [args...] # If a symbol is not defined finish # Finish reading the current file + Here a symbol can be a $variable, <function>, @@ -11173,10 +11375,12 @@ finish # Finish readin finish is particularly useful when combined with ifndef. e.g. - + + # Sidebar config file ifndef sidebar finish + @@ -11204,37 +11408,39 @@ ifndef sidebar finish neomuttrc - -# Example NeoMutt config file for the ifdef feature. -# This feature introduces three useful commands which allow you to share -# one config file between versions of NeoMutt that may have different -# features compiled in. + +# Example NeoMutt config file for the ifdef feature. + +# This feature introduces three useful commands which allow you to share +# one config file between versions of NeoMutt that may have different +# features compiled in. -# ifdef symbol config-command [args...] -# ifndef symbol config-command [args...] -# finish -# The 'ifdef' command tests whether NeoMutt understands the name of -# a variable, function, command or compile-time symbol. +# ifdef symbol config-command [args...] +# ifndef symbol config-command [args...] +# finish +# The 'ifdef' command tests whether NeoMutt understands the name of +# a variable, function, command or compile-time symbol. -# If it does, then it executes a config command. +# If it does, then it executes a config command. -# The 'ifndef' command tests whether a symbol does NOT exist. +# The 'ifndef' command tests whether a symbol does NOT exist. -# The 'finish' command tells NeoMutt to stop reading current config file. +# The 'finish' command tells NeoMutt to stop reading current config file. -# If the 'trash' variable exists, set it. +# If the 'trash' variable exists, set it. ifdef trash 'set trash=~/Mail/trash' # If the 'tag-pattern' function exists, bind a key to it. ifdef tag-pattern 'bind index <F6> tag-pattern' # If the 'imap-fetch-mail' command exists, read my IMAP config. ifdef imap-fetch-mail 'source ~/.neomutt/imap.rc' -# If the compile-time symbol 'sidebar' does not exist, then -# stop reading the current config file. +# If the compile-time symbol 'sidebar' does not exist, then +# stop reading the current config file. ifndef sidebar finish - # vim: syntax=neomuttrc +# vim: syntax=neomuttrc + @@ -11304,7 +11510,8 @@ ifndef sidebar finish default, i.e. unset. The index objects can be themed using the color command. Some objects require a pattern. - + + color index-object foreground background color index-object foreground background pattern @@ -11390,21 +11597,22 @@ color index-object foreground background pattern neomuttrc - -# Example NeoMutt config file for the index-color feature. -# Entire index line + +# Example NeoMutt config file for the index-color feature. + +# Entire index line color index white black '.*' -# Author name, %A %a %F %L %n -# Give the author column a dark grey background +# Author name, %A %a %F %L %n +# Give the author column a dark grey background color index_author default color234 '.*' # Highlight a particular from (~f) color index_author brightyellow color234 '~fRay Charles' -# Message flags, %S %Z -# Highlight the flags for flagged (~F) emails +# Message flags, %S %Z +# Highlight the flags for flagged (~F) emails color index_flags default red '~F' -# Subject, %s -# Look for a particular subject (~s) +# Subject, %s +# Look for a particular subject (~s) color index_subject brightcyan default '~s\(closes #[0-9]+\)' # Number of messages in a collapsed thread, %M color index_collapsed default brightblue @@ -11417,8 +11625,9 @@ color index_number red default # Message size, %c %l color index_size cyan default - # vim: syntax=neomuttrc +# vim: syntax=neomuttrc + @@ -11522,31 +11731,34 @@ color index_size cyan default neomuttrc - -# Example NeoMutt config file for the initials feature. -# The 'initials' feature has no config of its own. + +# Example NeoMutt config file for the initials feature. -# It adds an expando for an author's initials, -# which can be used in the 'index_format' variable. +# The 'initials' feature has no config of its own. -# The default 'index_format' is: +# It adds an expando for an author's initials, +# which can be used in the 'index_format' variable. + +# The default 'index_format' is: set index_format='%4C %Z %{%b %d} %-15.15L (%?l?%4l&%4c?) %s' -# Where %L represents the author/recipient -# This might look like: -# 1 + Nov 17 David Bowie Changesbowie ( 689) -# 2 ! Nov 17 Stevie Nicks Rumours ( 555) -# 3 + Nov 16 Jimi Hendrix Voodoo Child ( 263) -# 4 + Nov 16 Debbie Harry Parallel Lines ( 540) -# Using the %I expando: +# Where %L represents the author/recipient +# This might look like: +# 1 + Nov 17 David Bowie Changesbowie ( 689) +# 2 ! Nov 17 Stevie Nicks Rumours ( 555) +# 3 + Nov 16 Jimi Hendrix Voodoo Child ( 263) +# 4 + Nov 16 Debbie Harry Parallel Lines ( 540) +# Using the %I expando: set index_format='%4C %Z %{%b %d} %I (%?l?%4l&%4c?) %s' -# This might look like: -# 1 + Nov 17 DB Changesbowie ( 689) -# 2 ! Nov 17 SN Rumours ( 555) -# 3 + Nov 16 JH Voodoo Child ( 263) -# 4 + Nov 16 DH Parallel Lines ( 540) -# vim: syntax=neomuttrc +# This might look like: +# 1 + Nov 17 DB Changesbowie ( 689) +# 2 ! Nov 17 SN Rumours ( 555) +# 3 + Nov 16 JH Voodoo Child ( 263) +# 4 + Nov 16 DH Parallel Lines ( 540) + +# vim: syntax=neomuttrc + @@ -11722,14 +11934,16 @@ set index_format='%4C %Z %{%b %d} %I (%?l?%4l&%4c?) %s' neomuttrc - -# Example NeoMutt config file for the limit-current-thread feature. -# Limit view to current thread + +# Example NeoMutt config file for the limit-current-thread feature. + +# Limit view to current thread bind index <esc>L limit-current-thread - # vim: syntax=neomuttrc +# vim: syntax=neomuttrc + @@ -11915,18 +12129,21 @@ bind index <esc>L limit-current-thread of refreshing the screen periodically. A simple nested condition might be: (Some whitespace has been introduced for clarity) - + + %<x? %<y? XY & X > & %<y? Y & NONE > > Conditions %<y? XY & X > x>0 XY x>0,y>0 X x>0,y=0 - + + %<x? %<y? XY & X > & %<y? Y & NONE > > Conditions %<y? Y & NONE > x=0 Y x=0,y>0 NONE x=0,y=0 + Equivalent to: if (x > 0) { if (y > 0) { @@ -11942,11 +12159,19 @@ bind index <esc>L limit-current-thread } } Examples: - set index_format='%4C %Z %{%b %d} %-25.25n %s%> %<M?%M Msgs &%<l?%l Lines&%c Bytes>>' + + +set index_format='%4C %Z %{%b %d} %-25.25n %s%> %<M?%M Msgs &%<l?%l Lines&%c Bytes>>' + + if a thread is folded display the number of messages (%M) else if we know how many lines in the message display lines in message (%l) else display the size of the message in bytes (%c) - set index_format='%4C %Z %{%b %d} %-25.25n %<M?[%M] %s&%s%* %<l?%l&%c>>' + + +set index_format='%4C %Z %{%b %d} %-25.25n %<M?[%M] %s&%s%* %<l?%l&%c>>' + + if a thread is folded display the number of messages (%M) and the subject (%s) else if we know how many lines are in the message display subject (%s) and the lines in message (%l) else display the subject (%s) and the size of the message in bytes (%c) @@ -11968,31 +12193,34 @@ else display the subject (%s) and the size of the message in bytes (%c) neomuttrc - -# Example NeoMutt config file for the nested-if feature. - -# This feature uses the format: '%<VAR?TRUE&FALSE>' for conditional -# format strings that can be nested. - -# Example 1 -# if a thread is folded -# display the number of messages (%M) -# else if we know how many lines in the message -# display lines in message (%l) -# else display the size of the message in bytes (%c) + + +# Example NeoMutt config file for the nested-if feature. + +# This feature uses the format: '%<VAR?TRUE&FALSE>' for conditional +# format strings that can be nested. + +# Example 1 +# if a thread is folded +# display the number of messages (%M) +# else if we know how many lines in the message +# display lines in message (%l) +# else display the size of the message in bytes (%c) set index_format='%4C %Z %{%b %d} %-25.25n %s%> %<M?%M Msgs &%<l?%l Lines&%c Bytes>>' -# Example 2 -# if a thread is folded -# display the number of messages (%M) -# display the subject (%s) -# else if we know how many lines in the message -# display lines in message (%l) -# else -# display the size of the message in bytes (%c) + +# Example 2 +# if a thread is folded +# display the number of messages (%M) +# display the subject (%s) +# else if we know how many lines in the message +# display lines in message (%l) +# else +# display the size of the message in bytes (%c) set index_format='%4C %Z %{%b %d} %-25.25n %<M?[%M] %s&%s%* %<l?%l&%c>>' - # vim: syntax=neomuttrc +# vim: syntax=neomuttrc + @@ -12062,16 +12290,26 @@ set index_format='%4C %Z %{%b %d} %-25.25n %<M?[%M] %s&%s%* %<l?%l& $status_format. When the notification is sent, the folder of the new mail is no longer known. - This is a limitation of NeoMutt. The `%f` expando will show the open folder. + This is a limitation of NeoMutt. The `%f` expando will show the open folder. For example in Linux you can use (most distributions already provide notify-send): - set new_mail_command="notify-send --icon='/home/santiago/Pictures/neomutt.png' 'New Email' '%n new messages, %u unread.' &" + + +set new_mail_command="notify-send --icon='/home/santiago/Pictures/neomutt.png' \ + 'New Email' '%n new messages, %u unread.' &" + + And in OS X you will need to install a command line interface for Notification Center, for example terminal-notifier: - set new_mail_command="terminal-notifier -title '%v' -subtitle 'New Mail' -message '%n new messages, %u unread.' -activate 'com.apple.Terminal'" + + +set new_mail_command="terminal-notifier -title '%v' -subtitle 'New Mail' \ + -message '%n new messages, %u unread.' -activate 'com.apple.Terminal'" + + @@ -12102,21 +12340,26 @@ set index_format='%4C %Z %{%b %d} %-25.25n %<M?[%M] %s&%s%* %<l?%l& neomuttrc - -# Example NeoMutt config file for the new-mail feature. -# -------------------------------------------------------------------------- -# VARIABLES - shown with their default values -# -------------------------------------------------------------------------- -# Set the command you want NeoMutt to execute upon the receipt of a new email + +# Example NeoMutt config file for the new-mail feature. + +# -------------------------------------------------------------------------- +# VARIABLES – shown with their default values +# -------------------------------------------------------------------------- +# Set the command you want NeoMutt to execute upon the receipt of a new email set new_mail_command = "" -# Linux example: -# set new_command="notify-send --icon='/home/santiago/Pictures/neomutt.png' 'New Email in %f' '%n new messages, %u unread.' &" -# OS X example: -# set new_mail_command="terminal-notifier -title '%v' -subtitle 'New Mail in %f' -message '%n new messages, %u unread.' -activate 'com.apple.Terminal'" -# -------------------------------------------------------------------------- -# vim: syntax=neomuttrc +# Linux example: +# set new_command="notify-send --icon='/home/santiago/Pictures/neomutt.png' \ +# 'New Email in %f' '%n new messages, %u unread.' &" +# OS X example: +# set new_mail_command="terminal-notifier -title '%v' -subtitle 'New Mail in %f' \ +# -message '%n new messages, %u unread.' -activate 'com.apple.Terminal'" +# -------------------------------------------------------------------------- + +# vim: syntax=neomuttrc + @@ -12558,12 +12801,13 @@ set new_mail_command = "" neomuttrc - -# Example NeoMutt config file for the nntp feature. -# -------------------------------------------------------------------------- -# VARIABLES - shown with their default values -# -------------------------------------------------------------------------- + +# Example NeoMutt config file for the nntp feature. + +# -------------------------------------------------------------------------- +# VARIABLES – shown with their default values +# -------------------------------------------------------------------------- set ask_follow_up = no set ask_x_comment_to = no set catchup_newsgroup = ask-yes @@ -12587,10 +12831,10 @@ set save_unsubscribed = no set show_new_news = yes set show_only_unread = no set x_comment_to = no -# -------------------------------------------------------------------------- -# FUNCTIONS - shown with an example mapping -# -------------------------------------------------------------------------- -# mark all articles in newsgroup as read +# -------------------------------------------------------------------------- +# FUNCTIONS – shown with an example mapping +# -------------------------------------------------------------------------- +# mark all articles in newsgroup as read bind browser,index y catchup # open a different newsgroup bind index,pager i change-newsgroup @@ -12620,17 +12864,19 @@ bind browser U unsubscribe-pattern bind index,pager \ei change-newsgroup-readonly # forward to newsgroup bind attach,index,pager \eF forward-to-group -# get all children of the current message -# bind index ??? get-children -# get parent of the current message +# get all children of the current message +# bind index ??? get-children +# get parent of the current message bind index \eG get-parent -# reconstruct thread containing current message -# bind index ??? reconstruct-thread -# get message with Message-Id +# reconstruct thread containing current message +# bind index ??? reconstruct-thread +# get message with Message-Id bind index \CG get-message -# -------------------------------------------------------------------------- -# vim: syntax=neomuttrc +# -------------------------------------------------------------------------- + +# vim: syntax=neomuttrc + @@ -12838,67 +13084,70 @@ bind index \CG get-message neomuttrc - -# Example NeoMutt config file for the custom tags feature. -# VARIABLES - shown with their default values -# -------------------------------------------------------------------------- -# This variable specifies private notmuch tags which should not be printed -# on screen (index, pager). + +# Example NeoMutt config file for the custom tags feature. + +# VARIABLES – shown with their default values +# -------------------------------------------------------------------------- +# This variable specifies private notmuch tags which should not be printed +# on screen (index, pager). set nm_hidden_tags = "unread,draft,flagged,passed,replied,attachment,signed,encrypted" -# -------------------------------------------------------------------------- -# FUNCTIONS - shown with an example mapping -# -------------------------------------------------------------------------- -# modify (notmuch/imap) tags +# -------------------------------------------------------------------------- +# FUNCTIONS – shown with an example mapping +# -------------------------------------------------------------------------- +# modify (notmuch/imap) tags bind index,pager \` modify-labels # modify (notmuch/imap) tag non-interactively. bind index,pager tt "<modify-labels>!todo\n" "Toggle the 'todo' tag" -# modify labels and then hide message -# bind index,pager ??? modify-labels-then-hide -# -------------------------------------------------------------------------- -# COMMANDS - shown with an example -# -------------------------------------------------------------------------- -# Replace some tags with icons -# tag-transforms tag transformed-string { tag transformed-string ...} -# tag-transforms "inbox" "i" \ -# "unread" "u" \ -# "replied" "↻ " \ -# "sent" "➥ " \ -# "todo" "T" \ -# "deleted" "DEL" \ -# "invites" "CAL" - -# The formats must start with 'G' and the entire sequence is case sensitive. -# tag-formats tag format-string { tag format-string ...} -# tag-formats "inbox" "GI" \ -# "unread" "GU" \ -# "replied" "GR" \ -# "sent" "GS" \ -# "todo" "Gt" \ -# "deleted" "GD" \ -# "invites" "Gi" - -# Now instead of using '%g' or '%J' in your $index_format, which lists all tags -# in a non-deterministic order, you can something like the following which puts -# a transformed tag name in a specific spot on the index line: -# set index_format='%4C %S %[%y.%m.%d] %-18.18n %?GU?%GU& ? %?GR?%GR& ? %?GI?%GI& ? %s' - -# The %G formatting sequence may display all tags including tags hidden by -# nm_hidden_tags. -# -# -------------------------------------------------------------------------- -# COLORS - some unpleasant examples are given -# -------------------------------------------------------------------------- -# These symbols are added to the index-color feature: -# an individual message tag, %G, uses tag name -# this symbol uses a pattern +# modify labels and then hide message +# bind index,pager ??? modify-labels-then-hide +# -------------------------------------------------------------------------- +# COMMANDS – shown with an example +# -------------------------------------------------------------------------- +# Replace some tags with icons +# tag-transforms tag transformed-string { tag transformed-string ...} +# tag-transforms "inbox" "i" \ +# "unread" "u" \ +# "replied" "↻ " \ +# "sent" "➥ " \ +# "todo" "T" \ +# "deleted" "DEL" \ +# "invites" "CAL" + +# The formats must start with 'G' and the entire sequence is case sensitive. +# tag-formats tag format-string { tag format-string ...} +# tag-formats "inbox" "GI" \ +# "unread" "GU" \ +# "replied" "GR" \ +# "sent" "GS" \ +# "todo" "Gt" \ +# "deleted" "GD" \ +# "invites" "Gi" + +# Now instead of using '%g' or '%J' in your $index_format, which lists all tags +# in a non-deterministic order, you can something like the following which puts +# a transformed tag name in a specific spot on the index line: +# set index_format='%4C %S %[%y.%m.%d] %-18.18n %?GU?%GU& ? %?GR?%GR& ? %?GI?%GI& ? %s' + +# The %G formatting sequence may display all tags including tags hidden by +# nm_hidden_tags. +# +# -------------------------------------------------------------------------- +# COLORS – some unpleasant examples are given +# -------------------------------------------------------------------------- +# These symbols are added to the index-color feature: +# an individual message tag, %G, uses tag name +# this symbol uses a pattern color index_tag red white "inbox" -# the transformed message tags, %g -# this symbol does not use a pattern +# the transformed message tags, %g +# this symbol does not use a pattern color index_tags green default -# -------------------------------------------------------------------------- -# vim: syntax=neomuttrc +# -------------------------------------------------------------------------- + +# vim: syntax=neomuttrc + @@ -12983,10 +13232,12 @@ color index_tags green default If the "<path>" is not defined then $nm_default_uri or $folder is used, for example: - + + set nm_default_uri = "notmuch:///home/foo/maildir" virtual-mailboxes "My INBOX" "notmuch://?query=tag:inbox" + @@ -13310,62 +13561,61 @@ virtual-mailboxes "My INBOX" "notmuch://?query=tag:inbox" neomuttrc - -# Example NeoMutt config file for the notmuch feature. -# -------------------------------------------------------------------------- -# VARIABLES - shown with their default values -# -------------------------------------------------------------------------- -# This variable specifies notmuch query limit. + +# Example NeoMutt config file for the notmuch feature. + +# -------------------------------------------------------------------------- +# VARIABLES – shown with their default values +# -------------------------------------------------------------------------- +# This variable specifies notmuch query limit. set nm_db_limit = 0 -# This variable specifies the default Notmuch database in format: -# notmuch://<absolute path> +# This variable specifies the default Notmuch database in format: +# notmuch://<absolute path> set nm_default_uri = "" -# The messages tagged with these tags are excluded and not loaded -# from notmuch DB to NeoMutt unless specified explicitly. +# The messages tagged with these tags are excluded and not loaded +# from notmuch DB to NeoMutt unless specified explicitly. set nm_exclude_tags = "" # This option specifies timeout for Notmuch database. Default is 5 seconds. set nm_open_timeout = 5 -# This variable specifies notmuch query type, supported types: 'threads' and -# 'messages'. +# This variable specifies notmuch query type, supported types: 'threads' and +# 'messages'. set nm_query_type = messages -# Add messages stored to the NeoMutt record (see $record in the NeoMutt docs) also to notmuch DB. If you reply to an email then the new email inherits tags from the original email. - +# Add messages stored to the NeoMutt record (see $record in the NeoMutt docs) +# also to notmuch DB. If you reply to an email then the new email inherits +# tags from the original email. set nm_record = no -# Tags that should be removed or added to the to the messages stored in the NeoMutt record. - -example: -set record = "~/sent-mails" -set nm_record = yes -set nm_record_tags = "-inbox,archive,me" - +# Tags that should be removed or added to the to the messages stored in the NeoMutt record. +# example: +# set record = "~/sent-mails" +# set nm_record = yes +# set nm_record_tags = "-inbox,archive,me" set nm_record_tags = "" # This variable specifies notmuch tag which is used for unread messages. set nm_unread_tag = unread -# This variable allows you to customize the file browser display for virtual -# folders to your personal taste. -# %C current folder number -# %f folder name (description) -# %m number of messages in the mailbox * -# %n number of unread messages in the mailbox * -# %N N if mailbox has new mail, blank otherwise -# %>X right justify the rest of the string and pad with character ``X'' -# %|X pad to the end of the line with character ``X'' -# %*X soft-fill with character ``X'' as pad - +# This variable allows you to customize the file browser display for virtual +# folders to your personal taste. +# %C current folder number +# %f folder name (description) +# %m number of messages in the mailbox * +# %n number of unread messages in the mailbox * +# %N N if mailbox has new mail, blank otherwise +# %>X right justify the rest of the string and pad with character ``X'' +# %|X pad to the end of the line with character ``X'' +# %*X soft-fill with character ``X'' as pad set vfolder_format = "%6n(%6N) %f" -# When set, NeoMutt will use the first virtual mailbox (see virtual-mailboxes) -# as a spoolfile. +# When set, NeoMutt will use the first virtual mailbox (see virtual-mailboxes) +# as a spoolfile. set virtual_spoolfile = no -# setup time window preferences -# first setup the duration, and then the time unit of that duration -# when set to 0 (the default) the search window feature is disabled +# setup time window preferences +# first setup the duration, and then the time unit of that duration +# when set to 0 (the default) the search window feature is disabled set nm_query_window_duration=2 set nm_query_window_timebase="week" # or "hour", "day", "week", "month", "year" -# -------------------------------------------------------------------------- -# FUNCTIONS - shown with an example mapping -# -------------------------------------------------------------------------- -# open a different virtual folder +# -------------------------------------------------------------------------- +# FUNCTIONS – shown with an example mapping +# -------------------------------------------------------------------------- +# open a different virtual folder bind index,pager X change-vfolder # read entire thread of the current message bind index,pager + entire-thread @@ -13374,18 +13624,20 @@ bind index,pager \eX vfolder-from-query # generate virtual folder from query with time window bind index,pager < vfolder-window-backward bind index,pager > vfolder-window-forward -# toggle between mailboxes and virtual mailboxes -# bind index,pager ??? sidebar-toggle-virtual -# -------------------------------------------------------------------------- -# COMMANDS - shown with an example -# -------------------------------------------------------------------------- -# virtual-mailboxes description notmuch-URI { description notmuch-URI ...} -# virtual-mailboxes "Climbing" "notmuch://?query=climbing" -# unvirtual-mailboxes { * | mailbox ...} -# -# -------------------------------------------------------------------------- -# vim: syntax=neomuttrc +# toggle between mailboxes and virtual mailboxes +# bind index,pager ??? sidebar-toggle-virtual +# -------------------------------------------------------------------------- +# COMMANDS – shown with an example +# -------------------------------------------------------------------------- +# virtual-mailboxes description notmuch-URI { description notmuch-URI ...} +# virtual-mailboxes "Climbing" "notmuch://?query=climbing" +# unvirtual-mailboxes { * | mailbox ...} +# +# -------------------------------------------------------------------------- + +# vim: syntax=neomuttrc + @@ -13559,18 +13811,20 @@ bind index,pager > vfolder-window-forward neomuttrc - -# Example NeoMutt config file for the progress feature. -# The 'progress' feature provides clear visual feedback for -# slow tasks, such as indexing a large folder over the net. + +# Example NeoMutt config file for the progress feature. + +# The 'progress' feature provides clear visual feedback for +# slow tasks, such as indexing a large folder over the net. -# Set the color of the progress bar -# White text on a red background +# Set the color of the progress bar +# White text on a red background color progress white red - # vim: syntax=neomuttrc +# vim: syntax=neomuttrc + @@ -13669,15 +13923,17 @@ color progress white red neomuttrc - -# Example NeoMutt config file for the quasi-delete feature. -# The 'quasi-delete' function marks an email that should be hidden -# from the index, but NOT deleted. + +# Example NeoMutt config file for the quasi-delete feature. + +# The 'quasi-delete' function marks an email that should be hidden +# from the index, but NOT deleted. bind index,pager Q quasi-delete - # vim: syntax=neomuttrc +# vim: syntax=neomuttrc + @@ -13761,18 +14017,20 @@ bind index,pager Q quasi-delete neomuttrc - -# Example NeoMutt config file for the reply-with-xorig feature. - -# -------------------------------------------------------------------------- -# VARIABLES - shown with their default values -# -------------------------------------------------------------------------- -# Use X-Original-To header to reply when reverse is disabled or no alternate -# is found. + + +# Example NeoMutt config file for the reply-with-xorig feature. + +# -------------------------------------------------------------------------- +# VARIABLES – shown with their default values +# -------------------------------------------------------------------------- +# Use X-Original-To header to reply when reverse is disabled or no alternate +# is found. set reply_with_xorig = "yes" - # vim: syntax=neomuttrc +# vim: syntax=neomuttrc + @@ -13812,11 +14070,13 @@ set reply_with_xorig = "yes" This is for users who like their mailboxes in a fixed order, e.g. alphabetical, or unsorted (in the order of the config file). - + + # Fixed order set sort_browser="alpha" set sort_browser="unsorted" + When you first start the browser, e.g. c?your current mailbox will be highlighted. When you navigate to a parent mailbox ( @@ -13831,11 +14091,13 @@ set sort_browser="unsorted" This is for users who like their mailboxes sorted by a characteristic that changes, e.g. count of new mail, or the size of mailbox. - + + # Variable order set sort_browser="reverse-count" set sort_browser="reverse-size" + When you first start the browser, e.g. c?the highlight will be on the first mailbox, e.g. the one with the most new mail. @@ -14298,86 +14560,87 @@ set sort_browser="reverse-size" neomuttrc - -# Example NeoMutt config file for the sidebar feature. -# -------------------------------------------------------------------------- -# VARIABLES - shown with their default values -# -------------------------------------------------------------------------- -# Should the Sidebar be shown? + +# Example NeoMutt config file for the sidebar feature. + +# -------------------------------------------------------------------------- +# VARIABLES – shown with their default values +# -------------------------------------------------------------------------- +# Should the Sidebar be shown? set sidebar_visible = no -# How wide should the Sidebar be in screen columns? +# How wide should the Sidebar be in screen columns? -# Note: Some characters, e.g. Chinese, take up two columns each. +# Note: Some characters, e.g. Chinese, take up two columns each. set sidebar_width = 20 # Should the mailbox paths be abbreviated? set sidebar_short_path = no # Number of top-level mailbox path subdirectories to truncate for display set sidebar_component_depth = 0 -# When abbreviating mailbox path names, use any of these characters as path -# separators. Only the part after the last separators will be shown. -# For file folders '/' is good. For IMAP folders, often '.' is useful. +# When abbreviating mailbox path names, use any of these characters as path +# separators. Only the part after the last separators will be shown. +# For file folders '/' is good. For IMAP folders, often '.' is useful. set sidebar_delim_chars = '/.' # If the mailbox path is abbreviated, should it be indented? set sidebar_folder_indent = no # Indent mailbox paths with this string. set sidebar_indent_string = ' ' -# Make the Sidebar only display mailboxes that contain new, or flagged, -# mail. +# Make the Sidebar only display mailboxes that contain new, or flagged, +# mail. set sidebar_new_mail_only = no -# Any mailboxes that are whitelisted will always be visible, even if the -# sidebar_new_mail_only option is enabled. +# Any mailboxes that are whitelisted will always be visible, even if the +# sidebar_new_mail_only option is enabled. sidebar_whitelist '/home/user/mailbox1' sidebar_whitelist '/home/user/mailbox2' -# When searching for mailboxes containing new mail, should the search wrap -# around when it reaches the end of the list? +# When searching for mailboxes containing new mail, should the search wrap +# around when it reaches the end of the list? set sidebar_next_new_wrap = no # Show the Sidebar on the right-hand side of the screen set sidebar_on_right = no -# The character to use as the divider between the Sidebar and the other NeoMutt -# panels. +# The character to use as the divider between the Sidebar and the other NeoMutt +# panels. set sidebar_divider_char = '|' -# Enable extended buffy mode to calculate total, new, and flagged -# message counts for each mailbox. +# Enable extended buffy mode to calculate total, new, and flagged +# message counts for each mailbox. set mail_check_stats # Display the Sidebar mailboxes using this format string. set sidebar_format = '%B%?F? [%F]?%* %?N?%N/?%S' -# Sort the mailboxes in the Sidebar using this method: -# count - total number of messages -# flagged - number of flagged messages -# new - number of new messages -# path - mailbox path -# unsorted - do not sort the mailboxes +# Sort the mailboxes in the Sidebar using this method: +# count – total number of messages +# flagged – number of flagged messages +# new – number of new messages +# path – mailbox path +# unsorted – do not sort the mailboxes set sidebar_sort_method = 'unsorted' -# -------------------------------------------------------------------------- -# FUNCTIONS - shown with an example mapping -# -------------------------------------------------------------------------- -# Move the highlight to the previous mailbox +# -------------------------------------------------------------------------- +# FUNCTIONS – shown with an example mapping +# -------------------------------------------------------------------------- +# Move the highlight to the previous mailbox bind index,pager \Cp sidebar-prev # Move the highlight to the next mailbox bind index,pager \Cn sidebar-next # Open the highlighted mailbox bind index,pager \Co sidebar-open -# Move the highlight to the previous page -# This is useful if you have a LOT of mailboxes. +# Move the highlight to the previous page +# This is useful if you have a LOT of mailboxes. bind index,pager <F3> sidebar-page-up -# Move the highlight to the next page -# This is useful if you have a LOT of mailboxes. +# Move the highlight to the next page +# This is useful if you have a LOT of mailboxes. bind index,pager <F4> sidebar-page-down -# Move the highlight to the previous mailbox containing new, or flagged, -# mail. +# Move the highlight to the previous mailbox containing new, or flagged, +# mail. bind index,pager <F5> sidebar-prev-new # Move the highlight to the next mailbox containing new, or flagged, mail. bind index,pager <F6> sidebar-next-new # Toggle the visibility of the Sidebar. bind index,pager B sidebar-toggle-visible -# -------------------------------------------------------------------------- -# COLORS - some unpleasant examples are given -# -------------------------------------------------------------------------- -# Note: All color operations are of the form: -# color OBJECT FOREGROUND BACKGROUND -# Color of the current, open, mailbox -# Note: This is a general NeoMutt option which colors all selected items. +# -------------------------------------------------------------------------- +# COLORS – some unpleasant examples are given +# -------------------------------------------------------------------------- +# Note: All color operations are of the form: +# color OBJECT FOREGROUND BACKGROUND +# Color of the current, open, mailbox +# Note: This is a general NeoMutt option which colors all selected items. color indicator cyan black # Color of the highlighted, but not open, mailbox. color sidebar_highlight black color8 @@ -14389,9 +14652,11 @@ color sidebar_flagged red black color sidebar_new green black # Color to give mailboxes containing no new/flagged mail, etc. color sidebar_ordinary color245 default -# -------------------------------------------------------------------------- -# vim: syntax=neomuttrc +# -------------------------------------------------------------------------- + +# vim: syntax=neomuttrc + @@ -14527,18 +14792,20 @@ color sidebar_ordinary color245 default neomuttrc - -# Example NeoMutt config file for the skip-quoted feature. -# The 'S' (skip-quoted) command scrolls the pager past the quoted text (usually -# indented with '> '. Setting 'skip_quoted_offset' leaves some lines of quoted -# text on screen for context. + +# Example NeoMutt config file for the skip-quoted feature. -# Show three quoted lines before the reply +# The 'S' (skip-quoted) command scrolls the pager past the quoted text (usually +# indented with '> '. Setting 'skip_quoted_offset' leaves some lines of quoted +# text on screen for context. + +# Show three quoted lines before the reply set skip_quoted_offset = 3 - # vim: syntax=neomuttrc +# vim: syntax=neomuttrc + @@ -14643,44 +14910,48 @@ set skip_quoted_offset = 3 neomuttrc - -# Example NeoMutt config file for the status-color feature. -# The 'status-color' feature allows you to theme different parts of -# the status bar (also when it's used by the index). + +# Example NeoMutt config file for the status-color feature. -# For the examples below, set some defaults -set status_format='-%r-NeoMutt: %f [Msgs:%?M?%M/?%m%?n? New:%n?%?o? Old:%o?%?d? Del:%d?%?F? Flag:%F?%?t? Tag:%t?%?p? Post:%p?%?b? Inc:%b?%?l? %l?]---(%s/%S)-%>-(%P)---' +# The 'status-color' feature allows you to theme different parts of +# the status bar (also when it's used by the index). + +# For the examples below, set some defaults +set status_format='-%r-NeoMutt: %f [Msgs:%?M?%M/?%m%?n? New:%n?%?o? Old:%o?%?d? Del:%d?%?F? \ + Flag:%F?%?t? Tag:%t?%?p? Post:%p?%?b? Inc:%b?%?l? %l?]---(%s/%S)-%>-(%P)---' set index_format='%4C %Z %{%b %d} %-15.15L (%?l?%4l&%4c?) %s' set sort=threads set sort_aux=last-date-received -# 'status color' can take up to 2 extra parameters -# color status foreground background [ regex [ num ]] -# 0 extra parameters -# Set the default color for the entire status line +# 'status color' can take up to 2 extra parameters +# color status foreground background [ regex [ num ]] +# 0 extra parameters +# Set the default color for the entire status line color status blue white -# 1 extra parameter -# Set the color for a matching pattern -# color status foreground background regex -# Highlight New, Deleted, or Flagged emails +# 1 extra parameter +# Set the color for a matching pattern +# color status foreground background regex +# Highlight New, Deleted, or Flagged emails color status brightred white '(New|Del|Flag):[0-9]+' -# Highlight mailbox ordering if it's different from the default -# First, highlight anything (*/*) +# Highlight mailbox ordering if it's different from the default +# First, highlight anything (*/*) color status brightred default '\([^)]+/[^)]+\)' # Then override the color for one specific case -color status default default '\(threads/last-date-received\)' -# 2 extra parameters -# Set the color for the nth submatch of a pattern -# color status foreground background regex num -# Highlight the contents of the []s but not the [] themselves +color status default default '\(threads/last-date-received\)' +# 2 extra parameters +# Set the color for the nth submatch of a pattern +# color status foreground background regex num +# Highlight the contents of the []s but not the [] themselves color status red default '\[([^]]+)\]' 1 -# The '1' refers to the first regex submatch, which is the inner -# part in ()s -# Highlight the mailbox +# The '1' refers to the first regex submatch, which is the inner +# part in ()s +# Highlight the mailbox color status brightwhite default 'NeoMutt: ([^ ]+)' 1 -# Search for 'NeoMutt: ' but only highlight what comes after it -# vim: syntax=neomuttrc +# Search for 'NeoMutt: ' but only highlight what comes after it + +# vim: syntax=neomuttrc + @@ -14776,7 +15047,11 @@ color status brightwhite default 'NeoMutt: ([^ ]+)' 1 This has been tested against Exim 4.80, which optionally logs SNI and can perform vhosting. To verify TLS SNI support by a server, you can use: - openssl s_client -host <imap server> -port <port> -tls1 -servername <imap server> + + +openssl s_client -host <imap server> -port <port> -tls1 -servername <imap server> + + @@ -14906,23 +15181,25 @@ color status brightwhite default 'NeoMutt: ([^ ]+)' 1 neomuttrc - -# Example NeoMutt config file for the 'trash' feature. -# This feature defines a new 'trash' folder. + +# Example NeoMutt config file for the 'trash' feature. + +# This feature defines a new 'trash' folder. -# When mail is deleted it will be moved to this folder. +# When mail is deleted it will be moved to this folder. -# Folder in which to put deleted emails +# Folder in which to put deleted emails set trash='+Trash' set trash='/home/flatcap/Mail/Trash' -# The default delete key 'd' will move an email to the 'trash' folder -# Bind 'D' to REALLY delete an email +# The default delete key 'd' will move an email to the 'trash' folder +# Bind 'D' to REALLY delete an email bind index D purge-message -# Note: Deleting emails from the 'trash' folder will REALLY delete them. +# Note: Deleting emails from the 'trash' folder will REALLY delete them. -# vim: syntax=neomuttrc +# vim: syntax=neomuttrc + @@ -15088,13 +15365,16 @@ bind index D purge-message tuned on on a folder-basis using folder-hooks: - + + # use very high $read_inc to speed up reading hcache'd maildirs folder-hook . 'set read_inc=1000' # use lower value for reading slower remote IMAP folders folder-hook ^imap 'set read_inc=100' # use even lower value for reading even slower remote POP folders -folder-hook ^pop 'set read_inc=1' +folder-hook ^pop 'set read_inc=1' + + These settings work on a per-message basis. However, as messages @@ -15331,7 +15611,11 @@ folder-hook ^pop 'set read_inc=1' NeoMutt also supports a batch mode to send prepared messages. Simply redirect input from the file you wish to send. For example, - neomutt -s "data set for run #2" professor@bigschool.edu < ~/run2.dat + + +neomutt -s "data set for run #2" professor@bigschool.edu < ~/run2.dat + + will send a message to <professor@bigschool.edu>with a subject of data set for run #2. In the body of the message will be @@ -15368,7 +15652,11 @@ folder-hook ^pop 'set read_inc=1' mailto:schema as specified in RFC2368. This is useful when configuring a web browser to launch NeoMutt when clicking on mailto links. - neomutt mailto:some@one.org?subject=test&cc=other@one.org + + +neomutt mailto:some@one.org?subject=test&cc=other@one.org + +