unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] Vim: Fix a deprecated call to the 'mail' gem
@ 2021-02-16 22:20 Jules Aguillon
  2021-05-02 10:43 ` David Bremner
  0 siblings, 1 reply; 4+ messages in thread
From: Jules Aguillon @ 2021-02-16 22:20 UTC (permalink / raw)
  To: notmuch; +Cc: Jules Aguillon

The Field.new function from the 'mail' gem changed recently (since
2.7.0, Nov 2017) and now prints a message on stdout:

> 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.
---
 NEWS            | 5 +++++
 vim/notmuch.vim | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/NEWS b/NEWS
index 6484567e..f2d2b43a 100644
--- a/NEWS
+++ b/NEWS
@@ -16,6 +16,11 @@ Library
 
 Fix for memory error in notmuch_database_get_config_list
 
+Vim
+---
+
+Fix a deprecation warning since the version 2.7.0 of the 'mail' gem.
+
 Notmuch 0.31.2 (2020-11-08)
 ===========================
 
diff --git a/vim/notmuch.vim b/vim/notmuch.vim
index ad8b7c80..332fefee 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.new("subject", subject).to_s
 				else
 					subject = subject.force_encoding('utf-8')
 				end
-- 
2.30.0

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

end of thread, other threads:[~2021-05-03  9:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-16 22:20 [PATCH] Vim: Fix a deprecated call to the 'mail' gem Jules Aguillon
2021-05-02 10:43 ` David Bremner
2021-05-02 21:51   ` Felipe Contreras
2021-05-03  9:31     ` Jules Aguillon

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).