Sometimes Mail incorrectly parses multipart messages. See: https://github.com/mikel/mail/issues/1438 Check for empty parts instead of crashing. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> --- vim/notmuch.vim | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/vim/notmuch.vim b/vim/notmuch.vim index 541698cd..e2362a2d 100644 --- a/vim/notmuch.vim +++ b/vim/notmuch.vim @@ -332,9 +332,13 @@ ruby << EOF b << "Cc: %s" % msg['cc'] b << "Date: %s" % msg['date'] nm_m.body_start = b.count - b << "--- %s ---" % part.mime_type - part.convert.each_line do |l| - b << l.chomp + if part + b << "--- %s ---" % part.mime_type + part.convert.each_line do |l| + b << l.chomp + end + else + b << "--- %s ---" % 'missing' end b << "" nm_m.end = b.count -- 2.31.0 _______________________________________________ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-leave@notmuchmail.org