unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH 0/4] First step of 'show' rewrite
@ 2011-11-28  2:21 Austin Clements
  2011-11-28  2:21 ` [PATCH 1/4] show: Pass notmuch_message_t instead of path to show_message_body Austin Clements
                   ` (5 more replies)
  0 siblings, 6 replies; 57+ messages in thread
From: Austin Clements @ 2011-11-28  2:21 UTC (permalink / raw)
  To: notmuch; +Cc: dkg

This is the first step in my rewrite of notmuch-show.  Currently, MIME
traversal is controlled by show_message_body, which invokes formatter
callbacks.  As a result, formatters have no control over traversal,
which complicates formatters and makes others (like raw) nigh
impossible to implement correctly.  The callback-driven approach
forces formatters to be written in many small pieces and masks the
true control flow.  It also results in an wide interface with
show_message_body that has been getting wider over time.

The goal of this rewrite is to reverse this relationship, so that
formatters control MIME traversal.  This lets formatters traverse the
MIME in the most appropriate way, eliminates the callbacks, makes the
control flow through a formatter clear, and dramatically narrows
interfaces.

This first series doesn't change the way formatters work, but it does
introduce the MIME-traversal API they'll use.  This API consists of a
total of two functions: one to get the root MIME part of a message and
one to get a child of a MIME part.  This allows basic MIME traversal
to be implemented in a simple, two-line for loop.  The series also
updates show_message_body to use this new API, though ultimately
show_message_body will go away entirely.

^ permalink raw reply	[flat|nested] 57+ messages in thread

end of thread, other threads:[~2011-12-28  3:23 UTC | newest]

Thread overview: 57+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-28  2:21 [PATCH 0/4] First step of 'show' rewrite Austin Clements
2011-11-28  2:21 ` [PATCH 1/4] show: Pass notmuch_message_t instead of path to show_message_body Austin Clements
2011-11-28  2:21 ` [PATCH 2/4] Introduce a generic tree-like abstraction for MIME traversal Austin Clements
2011-11-29 19:11   ` Jani Nikula
2011-12-04 19:26     ` Austin Clements
2011-11-28  2:21 ` [PATCH 3/4] Utility function to seek in MIME trees in depth-first order Austin Clements
2011-11-28  2:21 ` [PATCH 4/4] show: Rewrite show_message_body to use the MIME tree interface Austin Clements
2011-11-28 19:44   ` Jani Nikula
2011-11-29 14:37 ` [PATCH 0/4] First step of 'show' rewrite Jameson Graef Rollins
2011-12-04 19:31 ` [PATCH v2 " Austin Clements
2011-12-04 19:31   ` [PATCH 1/4] show: Pass notmuch_message_t instead of path to show_message_body Austin Clements
2011-12-09 19:05     ` Dmitry Kurochkin
2011-12-09 19:54       ` Austin Clements
2011-12-09 19:59         ` Dmitry Kurochkin
2011-12-04 19:31   ` [PATCH 2/4] Introduce a generic tree-like abstraction for MIME traversal Austin Clements
2011-12-04 19:31   ` [PATCH 3/4] Utility function to seek in MIME trees in depth-first order Austin Clements
2011-12-04 19:31   ` [PATCH 4/4] show: Rewrite show_message_body to use the MIME tree interface Austin Clements
2011-12-09 17:39   ` [PATCH v2 0/4] First step of 'show' rewrite Austin Clements
2011-12-09 17:40     ` Dmitry Kurochkin
2011-12-09 17:51       ` Jameson Graef Rollins
2011-12-09 19:54   ` [PATCH v3 " Austin Clements
2011-12-09 19:54     ` [PATCH 1/4] show: Pass notmuch_message_t instead of path to show_message_body Austin Clements
2011-12-09 19:54     ` [PATCH 2/4] Introduce a generic tree-like abstraction for MIME traversal Austin Clements
2011-12-09 23:25       ` Dmitry Kurochkin
2011-12-10 21:17         ` Jameson Graef Rollins
2011-12-24  3:45           ` Austin Clements
2011-12-24  3:45         ` Austin Clements
2011-12-27 14:27           ` Daniel Kahn Gillmor
2011-12-28  3:23             ` Austin Clements
2011-12-10 21:19       ` Jameson Graef Rollins
2011-12-09 19:54     ` [PATCH 3/4] Utility function to seek in MIME trees in depth-first order Austin Clements
2011-12-10 11:43       ` Dmitry Kurochkin
2011-12-24  3:46         ` Austin Clements
2011-12-25 23:39           ` Dmitry Kurochkin
2011-12-09 19:54     ` [PATCH 4/4] show: Rewrite show_message_body to use the MIME tree interface Austin Clements
2011-12-11 10:34       ` Dmitry Kurochkin
2011-12-24  3:46         ` Austin Clements
2011-12-10 21:16     ` [PATCH v3 0/4] First step of 'show' rewrite Jameson Graef Rollins
2011-12-11 10:41     ` Dmitry Kurochkin
2011-12-15 11:03       ` David Bremner
2011-12-24  3:45     ` [PATCH v4 " Austin Clements
2011-12-24  3:45       ` [PATCH v4 1/4] show: Pass notmuch_message_t instead of path to show_message_body Austin Clements
2011-12-24  3:45       ` [PATCH v4 2/4] Introduce a generic tree-like abstraction for MIME traversal Austin Clements
2011-12-24  7:55         ` Jameson Graef Rollins
2011-12-24  8:05           ` Dmitry Kurochkin
2011-12-24 19:03           ` Austin Clements
2011-12-24  3:45       ` [PATCH v4 3/4] Utility function to seek in MIME trees in depth-first order Austin Clements
2011-12-24  3:45       ` [PATCH v4 4/4] show: Rewrite show_message_body to use the MIME tree interface Austin Clements
2011-12-24  3:58       ` [PATCH v4 0/4] First step of 'show' rewrite Dmitry Kurochkin
2011-12-24  7:55       ` Jameson Graef Rollins
2011-12-24 18:52       ` [PATCH v5 " Austin Clements
2011-12-24 18:52         ` [PATCH v5 1/4] show: Pass notmuch_message_t instead of path to show_message_body Austin Clements
2011-12-24 18:52         ` [PATCH v5 2/4] Introduce a generic tree-like abstraction for MIME traversal Austin Clements
2011-12-24 18:52         ` [PATCH v5 3/4] Utility function to seek in MIME trees in depth-first order Austin Clements
2011-12-24 18:52         ` [PATCH v5 4/4] show: Rewrite show_message_body to use the MIME tree interface Austin Clements
2011-12-25 23:35         ` [PATCH v5 0/4] First step of 'show' rewrite Dmitry Kurochkin
2011-12-26  2:42         ` David Bremner

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).