💭 Ideas for a new mutt architecture
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
LICENSE.md
Makefile
README.md
article.c
article.h
calendar.c
calendar.h
config.c
config.h
contact.c
contact.h
contact_list.c
contact_list.h
container.c
container.h
email.c
email.h
event.c
event.h
folder.c
folder.h
fruit.conf
imap.c
imap.h
inherit.gv
item.c
item.h
maildir.c
maildir.h
main.c
mbox.c
mbox.h
month.c
month.h
nntp.c
nntp.h
object.c
object.h
plugin.c
plugin.h
rss.c
rss.h
search.c
search.h
source.c
source.h
task.c
task.h
task_list.c
task_list.h
view.c
view.h

README.md

Arch

What is it?

This is a sample application showing what I'd like mutt to look like: a set of objects with inheritance; virtual functions; reference counting.

Why?

The mutt code is a mass of interdependent components which all rely on global variables.

Mutt needs to be broken up to give better independence between components. This will make mutt more robust and easier to maintain.

What am I looking at?

This is the inheritance graph for the objects in the application.

inheritance

To understand how the objects fit together, start with the sources. Each source represents one connection to a data source: 1 imap connection, 1 contact list, etc.

The sources store their data in items, which can be grouped into folders. A folder can represent a real directory, or something virtual like a tag. Because all the objects are reference counted, the items can appear in zero, one or multiple folders. Because of the inheritance (in theory) an email object could be passed between sources.

sources are owned by views. A view may contain multiple sources, e.g. several email servers, multiple contact lists. The views directly map onto what gets displayed on screen (and would fit into my panel manager ideally).

Plugins

The application has a sample source for every text-based information source I thought useful.

  • Email:

    • imap
    • maildir
    • mbox
    • notmuch (search engine)
  • News:

    • NNTP (usenet)
    • RSS
  • General office:

    • Contact list
    • Task lists
    • Calendar

Who?

flatcap

License

The code is released under the GPLv3. See LICENSE.md for more details.