[PATCH 01/13] vim: fix Mail 2.8.0 warning

Subject: [PATCH 01/13] vim: fix Mail 2.8.0 warning

Date: Sun, 18 Apr 2021 17:48:39 -0500

To: notmuch@notmuchmail.org

Cc: Felipe Contreras

From: Felipe Contreras


  Passing an unparsed header field to Mail::Field.new is deprecated and will be removed in Mail 2.8.0. Use Mail::Field.parse instead.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 vim/notmuch.vim | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vim/notmuch.vim b/vim/notmuch.vim
index ad8b7c80..541698cd 100644
--- a/vim/notmuch.vim
+++ b/vim/notmuch.vim
@@ -666,7 +666,7 @@ ruby << EOF
 				date = Time.at(e.newest_date).strftime(date_fmt)
 				subject = e.messages.first['subject']
 				if $mail_installed
-					subject = Mail::Field.new("Subject: " + subject).to_s
+					subject = Mail::Field.parse("Subject: " + subject).to_s
 				else
 					subject = subject.force_encoding('utf-8')
 				end
-- 
2.31.0
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: