[RFC PATCHv2 8/8] vim: mailcap: handle mailcap failure gracefully

Nick Howell nlhowell at gmail.com
Thu Oct 13 13:47:56 PDT 2016


---
 vim/notmuch.vim | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/vim/notmuch.vim b/vim/notmuch.vim
index cdcaa5f..79a0e27 100644
--- a/vim/notmuch.vim
+++ b/vim/notmuch.vim
@@ -374,6 +374,12 @@ ruby << EOF
 						io.each_line do |l|
 							b << l.chomp
 						end
+						if $? != 0
+							b << "--- ERROR: mailcap failed ---"
+							part.decoded.each_line do |l|
+								b << l.chomp
+							end
+						end
 					end
 				rescue
 					b << "--- unavailable ---"
-- 
2.7.3



More information about the notmuch mailing list