From Mutt to Neomutt

I had been a user of mutt since 1996 when it had just been created by Michael Elkins. In June 2016 I learned about "neomutt". And i think it it the way to go now.. this page: the source.. no colours ;) here i document my findings along the way to move from mutt to neomutt.

= Setup =

here are the setup files i have created along the way:

Sven's Setup for Neomutt (2016-08-16)

= HomePage =

= Icon =

new icon, anyone?
(hund -> dog, knochen -> bone, brown, gesicht -> face)

= Communication =

== chat ==

we are talking on the Freenode of IRC on channel #neomutt:

== maillist ==

since 2016-08-14:


mails from yourself to the list will look like this:

    From: $you
    Subject: [neomutt-list]

Note: X-max-size: 5KB
please avoid attachments; upload data to a site
and include a url to these instead. thankyou. :)

= Development =

$ git shortlog -sn --since "1 year ago" | head
   529  Richard Russon

= Installation =

preliminary remark:
i use "time" before some command simply to see
how long they take, to get a feel about that time.
as i am a user on a shared host (at
i am installing extra software in my $HOME directory.

here goes:

  my shell function to compile neomutt:

  _compile_neomutt () {
          ./configure --prefix=$HOME
          --disable-nls  --disable-pop --disable-dependency-tracking
          --enable-fcntl --enable-hcache --enable-imap
          --enable-locales-fix --enable-nntp  --enable-sidebar
          --with-curses  --with-gnutls --with-idn
          --with-included-gettext --with-regex --with-ssl

  cd; mkdir neomutt
  (4.4sec) $ time git clone

  Cloning into 'neomutt'...
  remote: Counting objects: 35640, done.
  remote: Compressing objects: 100% (93/93), done.
  remote: Total 35640 (delta 43), reused 0 (delta 0), pack-reused 35547
  Receiving objects: 100% (35640/35640), 18.66 MiB | 9.21 MiB/s, done.
  Resolving deltas: 100% (27296/27296), done.
  Checking connectivity... done.
  git clone  4.56s user 0.69s system 120% cpu 4.375 total

           $ cd neomutt
  (5.9sec) $ time autoreconf -if installing './compile' installing './config.guess' installing './config.sub' installing './install-sh' installing './missing' installing './depcomp'
  autoreconf -if  3.65s user 0.14s system 64% cpu 5.896 total

  (12.5sec)$ time ( _compile_neomutt )

  Version:           1.6.2
  Host OS:           linux-gnu
  Install prefix:    /home/user/guckes
  Compiler:          gcc -std=gnu99
  CFlags:            -Wall -pedantic -Wno-long-long -g -O2  -isystem /usr/include/mit-krb5 -I/include -I$(top_srcdir)/intl
  LDFlags:            -L/lib

  GPGME:             no
  PGP:               yes
  SMIME:             yes
  Sidebar:           yes
  Notmuch:           no
  Compressed Folder: no
  Header Cache:      GDBM

  ( _compile_neomutt; )  5.84s user 1.62s system 59% cpu 12.495 total

  (40.4sec)  $ time make

  cp ./ smime_keys
  chmod +x smime_keys
  make[2]: Leaving directory '/home/user/guckes/test/neomutt'
  make[1]: Leaving directory '/home/user/guckes/test/neomutt'
  make  36.89s user 1.64s system 95% cpu 40.393 total

  (0.5sec) $ time make install

  make[3]: Leaving directory '/home/user/guckes/test/neomutt'
  make[2]: Leaving directory '/home/user/guckes/test/neomutt'
  make[1]: Leaving directory '/home/user/guckes/test/neomutt'
  make install  0.02s user 0.02s system 10% cpu 0.431 total

           $ cd ~/bin
           $ ls -lrt

  -rwxr-xr-x 1 guckes guckes 3432768 Aug 14 08:39 mutt
  -rwxr-xr-x 1 guckes guckes  119648 Aug 14 08:39 pgpewrap
  -rwxr-xr-x 1 guckes guckes  239376 Aug 14 08:39 pgpring
  -rwxr-xr-x 1 guckes guckes   30807 Aug 14 08:39 smime_keys

    cd ~/bin; NEWNEOMUTT="neomutt-1.7.0-$(date +%Y%m%d)"
    mv mutt  $NEWNEOMUTT
    ln -is   $NEWNEOMUTT mutt
    ln -is   $NEWNEOMUTT neomutt

so as ~/bin is in my shell's $PATH,
i can now start it with both "mutt"
and "neomutt".  the binary is called
eg "neomutt-".

== neomutt developer branch ==

    git clone -b neomutt-dev neomutt-dev
    cd neomutt-dev
    time autoreconf -if
    time ( _compile_neomutt )
    time make
    time make install

== neomutt-1.7.0 branch ==

    git clone
    cd neomutt-1.7.0
    time autoreconf -if
    time ( _compile_neomutt )
    time make
    time make install

and now [2016-08-23] neomutt's version string now reads like this:
"NeoMutt neomutt.1-20160821 (2016-08-21)"

= Configuration =

[setup files]
neomutt now checks for the config files:

the /etc/Neomuttrc is installed but is empty.
system admins can give their users a pre-config.

the ~/.neomuttrc is read after the /etc/Neomuttrc
so users can set everything they want,
including overrides for preset configs.

if you have already been using mutt before
then you can simply let neomutt read in your
existing setup through a source command.
i suggest setting neomutt specific configuration first
and applying the source command at the end:

    # neomutt config here:
    # last statement:
    source ~/.muttrc

= Ideas =
some more ideas and wishes for mutt.
most of these have not been implemented yet.
any takers?

[s/mine certificares]
when checking on s/mime signatures, neomutt simple
says "S/MIME signature could NOT be verified." :-/
it would be great if it gave some info about
the signature.

you can add quite a few save-hooks -
and one of them will "win".  however,
when there are multiple matching save-hooks
then why not add a (numbered) list and
let the user decide which one to use?!

saving a message not to just one, but many folders.
saving to a list of folders is desirable,
eg when the message should be placed
for a project and some todo list.
example: eg "!,=PROJECT,~/TODO,/tmp/bar,../blah".

add an extra line to show whatever,
eg status of options, such as
"verify signature".

[signed messages]
"S/MIME signature could NOT be verified."
that error message is pretty annoying.
however, i'd like to be able to see these
signatures with a different flag in the index.

add a "post" command on mailing lists.
this will initiate a new mail to the mailing list
which is identified in the header of the current mail:


    List-Id: Teaching an Old Dog New Tricks 


    From: myself
    To: Teaching an Old Dog New Tricks 
    Subject: (new email)

  "Mutt 1.6.2-neo (2016-08-08)" - please use "neomutt" now!
eg "Neomutt 2.0.0 (2016-08-16)"
or "Neomutt-2016-08-16"

Name:      Neomutt
binary:    neomutt
versions:  "Neomutt-YYYY-MM-DD" or "Neomutt-X.Y.Z [YYYY-MM-DD]"

add longname options "--help" and "--version".  (DONE?)
make the output of "-v" and "--version" *terse*.
add a hint to "-vv" and "--version-verbose".

    $ neomutt -v
    Neomutt-2.0.16 (2016-08-16)

    use "-vv" or "--version-verbose" for more info.
    use "-h"  or "--help" for a summary of options.

    If you find a bug in NeoMutt, please raise an issue at:
    maintainer: Richard Russon 

change the names of patches
from "patch-$NAME-neo-git"
  to "patch-neomutt-$NAME".

resulting list:

add a manual for neomutt.
-> "man neomutt"
add a document/manual which describes
the differences between mutt and neomutt
eg "doc/" and "man mutt2neomutt"

All menus should show "NeoMutt" the top - together with its version.
this way, users *always* know they are using neomutt.
and every screenshot says so, too.  no need to accompany
every screenshot with "no, it's not mutt, but neomutt".
it's also good for the context within bug reports.

[error messages]
some error messages flash by - and they
are immediately erased afterwards.
so they do not appear in a screen backlog.
this makes debugging hard.
wish: add a backlog window for error messages.

add tests

add files to describe new features and changes in detail.
eg docs/feature.menus.txt
   this adds menus as they are in elinks and jed

== Commands ==

command "show-version":
it currently shows "Mutt 1.6.2-neo (2016-07-23)".
is there any way to make it show the currently used binary?
like "ls -l =mutt"?

command "version":
shows everything about the running instance of neomutt,
like ":version" does in vim.
good for screenshots (hardcopies) ->
bug reports, documentation, examples.

command edit-label:
you basically edit a line with a comma-separated list of value.
altught this shouldnt be line, it might be better to have an
interface with allows to delete a label easily.  (pop-up list?)

new command mapleader:
allow to set a variable "mapleader" for mappings:
    bind index c  command
then for "mapleader=ESC", you can
access this command through ESC-c.
switching all these bindings to
some other key is then really easy.
[idea taken from vim]

"color index_alias fb bg"
this colorizes all messages known from aliases,
ie when the address appears in an alias definition
then it will recevive coloring as "fg/bg",
eg "color index_alias brightyellow default".

when using "%a" to show the address user@domain
allow different colours for user and domain parts.
[idea by flip214]

a list of commands as a "circle".
they might all change the same value,
eg index_format or header_order.
two commands to back or forth
within the ring structure.
thus you can should the effect of
different value to a setting.
let the use "source file"
to show what is possible.

add an option to toggle the display of quoted text.
(the command "toggle-quoted" has to be applied for
each reading of a message.. again and again.. :-/)

[Send Menu]:

  Current Send Menu:
| -----------------------------------------------------
| Mutt 1.6.1: SendMenu [Parts: 1 | TotalSize: 0.1K]
|     From: Sven Guckes 
|       To:
|       Cc:
|      Bcc:
|  Subject:
| Reply-To:
|      Fcc: =foo
| Security: None
| -----------------------------------------------------

[NEW Send Menu]
| -----------------------------------------------------
| Mutt 1.6.1: SendMenu [Parts: 1 | TotalSize: 0.1K]
| Alt-F   From: Sven Guckes 
| t         To:
| c         Cc:
| b        Bcc:
| s    Subject:
| r   Reply-To:
| -----------------------------------------------------
| f        Fcc: =foo
| p   Security: None
| -----------------------------------------------------
| NEW  Subject: neomutt's new send menu

also needs access to "mixmaster" and "sign as".

== NNTP ==

=== Commands ===

all command are UNbound to any keys by default.
-- y       catchup                     mark all articles in newsgroup as read
--         change-newsgroup            open a different newsgroup
-- i  change-newsgroup-readonly   open a different newsgroup in read only mode
-- F  forward-to-group            forward to newsgroup
--         followup-message            followup to newsgroup
--         post-message                post message to newsgroup
-- I       macro                       ?

"Mutt: Subscribed newsgroups"

=== Q&A ===

[NNTP overview at startup]
Q: Is there a startup switch to go directly into
the newsgroup overview ("Subscribed newsgroups")?
A: ??

  $ neomutt -h | grep NNTP
  -g    specify a news server (if compiled with NNTP)
  -G            select a newsgroup (if compiled with NNTP)

Q: is there a way to get prompted about how many news
   articles to fetch upon entering a newsgroup?
A: ??

prefix all *command descriptions* with IMAP/NNTP,
so the can be searched more easily in the help menu.
-> "?/NTTP\n"

when skimming through a lot of messages it is
quite desirable to keep hiding quoted text.
add a new option: show-quoted-text (default: set)
quoted text is shown by default with all messages.
turning this off was done with the command "toggle-quoted",
but this was reset with every new messages shown. :(
now the command toggle-quoted can be converted
to a binding of ":toggle show-quoted-text".
advantage: the value of this options
*stays* until it is toggled again.
the old way can be done with a default message-hook.


 123  SX ...
 124 NsX ...

while the flags about New/Old and signed/Signed are quite alright,
the "X" ("not-for-you") doesnt makes sense and takes up space. :-/

use the address of the sender of the
current mail and limit the view by it.
     From: Joe Doe 
-> limit folder by ""

[leaving newsgroup]
when you are changing to another newsgroup
you are of course leaving the current newsgroup
and you will be prompted with:
"Mark all articles read? ([yes]/no):"
but there is no indication to which
newsgroup this will be applied to. :-(

* direct startup:
    skip reading the inbox; instead:
    connect directly to server (as given by $news_server),
    show the server name at top of menu (optionally with timeout),
    show the overview to all subscribed newsgroups,
    hide all newsgroups with no new news,
    sort by number of new messages.
    "Sort by (d)ate, (a)lpha, si(z)e, d(e)scription, (c)ount, ne(w) count, or do(n)'t sort?"
    [somehow, ordering by "count" or "new count" doesnt change anything.  bug?]
* entering newsgroup:
    ask how many new messages to fetch (default given by $nntp_context)
    optionally get N or only the new ones up to N.
    (getting 1000 for context is a bit much for under 42 new messages).
* subscription:
    the command "subscribe-pattern" adds all matches right away.
    getting rid of these can be quite a hassle.
    a command to simply show newsgroups matching a pattern is quite desired.
* quitting from a newsgroup:
  ask whether to return to the overview or to leave neomutt.
  add an option to catchup (mark all new messages as read) automatically.

== Marks ==

"marks" are like "labels", but only single-character,
from the set of letters and digits, ie "a-zA-Z0-9" (62).
you use the command 'M' to set a letter/digit as a mark.
so "Ma" marks the current message with 'a',
and "Mb" marks it with 'b'.
the marks are added to the "X-Marks:" header
so you can easily edit the within the message header.
eg "X-Marks: abcDEF123".
and you can limit your messages by marks
with pattern "~M", eg "~M aeiouA-Ds6-9".
TODO: adding a pattern to the index_folder.

#### Date  Time  Marks Size From              Subject
0815 Aug08 13:37 abcde 1.0K Rich Russon       new feature: marks
0816 Aug08 14:40 abmop 2.3K Michael Elkins    Re: neomutt?
0817 Aug08 17:23 zAQ09 3.3K Richard Stallman  switching to vim
0818 Aug08 17:42 PNG42 4.2K Sven Guckes       Re: using marks..

TODO: adding a colour system for each letter/digit.

= Bug =

possible bugs:

adding and editing a message's label through command
"edit-label" adds/changes an "X-Label:" header.
when you use view-message it shows - but only once.
after that, it's gone. o_O and when
you edit-message then it isnt there.
however, you can find it using "limit" on "~yfoo".

when you edit-message and add three X-Label lines
    X-Label: kudu
    X-Label: moo
    X-Label: kudu, moo
then edit-label shows "Label: kudu, moo, kudu, moo, ".
so the values of all three lines are simply
collected and appended to each other.

how it *should* work:
the X-Label: line should be visible
according to the unignored lines.
when "ignore x-" is used then it isnt shown.
use "unignore x-label" to make it show!
the line is added to the header and
is also available through edit-message
when option "edit_headers" is set.
all additional X-Label headers are respected.
add values are concatenated, sorted, and duplicates removed.
there is only one resulting X-Label line used and written.

the value of X-Label can only be revaled through
edit-label which calls for an abort (CTRL-G),
resulting in the message "No labels changed".
two things too much: a command and a message.
therefore, there should also be a "show-label"
command which simply shows the current label.

use "catchup" yields hundreds of messages
"Fetching message... 0".
shouldnt this be a real quick thing
rather than giving off lots of messages
(and taking really long)?

= News =

neomutt now checks for /etc/Neomuttrc and ~/.neomuttrc.

2016-11-16 by Kevin J. McCarthy on

  Debian changed the default to use GPGME for GPG and S/MIME encryption.
  Please try putting "unset crypt_use_gpgme" in your .muttrc and restart
  mutt.  (You must restart mutt for this option to have any effect).

2016-11-16 by Richard Russon:

  there is a vim syntax file for neomutt now:
  originally written by Preben Guldberg,
  now maintained by Kyle Wheeler.

= FAQs =

Q: How to cancel a command?
A: type CTRL-G.
   The CTRL-G will abort any prompt you might get from a dialog,
   ie questions for you to answer, eg: "Do this? (Y/n)"

Q: How to undelete messages?
A: Use 'u' (undelete-message) to undelete the currently
   selected message, ie take away the 'D' flag from it.
   Also, use 'J' (next-entry) and 'K' (previous-entry)
   to navigate in the index to select messages
   because these will *not* jump over to-be-deleted messages
   as 'j' (next-undeleted) and 'k' (previous-undeleted) do.
   of course, entering the numbers of messages to jump on them
   works, too.  however, this might become a chore pretty fast
   when the numbers have three or four digits.

= Links =
lots of good info! :)

2015-09-09 by Will Foster:
"Take Control of your Email with Mutt, OfflineIMAP and Notmuch"

= Personal =

Sven has been one of the first users of "mutt" since 1996.
he has written the "Mutt Pages" and has given several workshops
on mutt (startup, "from pine to mutt", gpg+mutt).

== TUEBIX ==

On June 11th 2016 he gave a workshop at Tübix (in on
mutt config:
Elimar Riesebieter attended and told him about neomutt.
That's how he learned that Richard Russon (
is doing work on mutt.

Sven uses a lot of texttools, esp screen, sed, vim and zsh.

== "mutt vs neomutt" ==

neomutt aims at being a successor to mutt.
if this succeeds then either "mutt" is abandoned or
all "neomutt" has to be renamed to "mutt" everywhere.
both seem to be unlikely and undesirable.

i am in favor of continuing development on neomutt.
"neo" as in "new documentation, new features, new colour".

while it once was a nice idea to keep "one mutt",
it certainly does not have to be that wawy.
the dependency on mutt simply becomes a
long wait which hampers that development.

besides, Elimar's announcement of neomutt
on the mutt-devel maillist was responded
by Kevin McCarthy with "take this elsewhere".

"we are already working in mutt.
 we dont need another mutt."
the same could have been said about /bin/mail
and then there wouldnt have been elm,
(al)pine, and several more.
let the users make their choice!

even though "muttneo" would fit nicer within the alphabetical list
of package names.. however, is already here!
so let it be "neomutt".  woof!
besides, the new kind of vim is named "neovim".

users of mutt might be quite happy to find new options to customize
their setups for neomutt - and when a new package gets installed of
mutt then it will complain about unknown option names again.

if it were for "vi" to be "vi" forever, then there wouldnt be a "vim".

the world can continue with packages of mutt, mutt-vanilla (read:
no patches at all), and neomutt.  they can all co-exist.
and administrators can install one or all of these.

== sidebar ==

the big scanning at the startup takes between 60secs and 80secs.
i find this quite annoying, especially with many startups during testing.

i keep trying to "switch" between the sidebar and the index/messages.
but both are accessible through command of the same folder index menu.
so the commands have to be integrated into that same menu.. confusing!

and the mailboxes in the sideabr cannot be sorted by *time*.
"show me the mailboxes which received new mails just now."
this is what i am used to.  this is how i want to keep it.

== NNTP ==

even though the nesserver is right next to the maschine
i log into, updates in the index are really slow. meh!

= wishlist =

what i really want of a "new mutt" is this:

Add interface to these things:
  * alternate addresses
  * colors
  * header order
  * hooks

so far there is no visible representation
so debugging these can be really hard.

first, just a menu to display the current setup
as it has assempbled from reading the config files.
second, some commands to effectively rearrange the current
order so you can find out how to find a better setup.

= Need Help? =

if you got a problem then talk to us on IRC
(Freenode, channel #neomutt).

you can help us help you faster by knowing a few commands to get some info.

Q: what is your version of neomutt?
A: "neomutt -v | head -1"

Q: does your neomutt understand $protocol?
A: "mutt -v | less"
    this catches the output of "mutt -v" with "less",
    a "pager" which allows you to go up and down.
    very much like within an editor -
    but without the ediiting commands. ;)

Q: what is the value of "option"?
A: ":set option="
    the colon ':' is a command to switch you to the "command line".
    there the first word is a command, here: "set".
    then you enter the name of the option, eg "from".
    then enter the equal sign (=) and
    then press the tabulator key (aka TAB).
    neomutt will enter the current value
    of the option for you.  you can now
    move about to change that value.
    hit ENTER to make neomutt execute the command.

Q: i have changed my setup file (~/.neomuttrc)
   why wont neomutt change anything about it?
A: neomutt, as almost every other command,
   does not keep keep checking its setup files
   all the time for changes. if it would then
   most of the computing time would be taken up
   by processes checking their config files. ;-)
   neomutt will check on ~/.neomuttrc at startup,
   and execute the commands within.  this is when
   the values of options change automatically.
   while running, you can change values by
   entering commands on the command line.

= MORE =

NeoMutt Sidebar Matcher - asciinema
2016-08-12 by Richard Russon

New version of the INSTALL file:
2016-08-14 by Joshua Jordi JakkinStewart IRC:Jakkin

= Twitter =
 2015-03-30 Trevor Bramble @TrevorBramble
 "So when Neovim is done, can we get a Neomutt?"
 2016-04-05 Sec News Bot @SecNewsBot
 "Hacker News - NeoMutt – a place to gather all the patches against the Mutt MUA"
 2016-04-05 Hacker News - NeoMutt
 2016-04-05 #root @_cirrus_minor_ Apr 5
 "Geekity: NeoMutt"
 2016-04-06 AUR updates bot @AUR_updates
 'AUR Package Update: "neomutt" (Small but powerful text-based mail client)'

= Historic =



"dynamic memory allocation" ->
insight!  limiting by "~b myname"