[RFC PATCHv2 4/8] vim: mailcap: don't corrupt the view if filters write to stderr

Subject: [RFC PATCHv2 4/8] vim: mailcap: don't corrupt the view if filters write to stderr

Date: Thu, 13 Oct 2016 14:47:52 -0600

To: notmuch@notmuchmail.org

Cc: nlhowell@gmail.com

From: Nick Howell


---
 vim/notmuch.vim | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vim/notmuch.vim b/vim/notmuch.vim
index 89fa2dc..a20dd86 100644
--- a/vim/notmuch.vim
+++ b/vim/notmuch.vim
@@ -347,7 +347,7 @@ ruby << EOF
 			parts.each do |part|
 				b << "--- %s ---" % ( [part.mime_type || "unknown", part.filename].find_all { |x| x }.join(" ") )
 				begin
-					IO.popen(mailcap % (part.mime_type || "text/plain"), "r+b") do |io|
+					IO.popen("%s 2>/dev/null" % (mailcap % (part.mime_type || "text/plain")), "r+b") do |io|
 						io.write(part.decoded)
 						io.close_write
 						io.each_line do |l|
-- 
2.7.3


Thread: