unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / Atom feed
* [PATCH] Vim: Fix a deprecated call to the 'mail' gem
@ 2021-02-16 22:20 Jules Aguillon
  0 siblings, 0 replies; only message 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	[flat|nested] only message in thread

only message in thread, other threads:[~2021-02-16 22:20 UTC | newest]

Thread overview: (only message) (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

unofficial mirror of notmuch@notmuchmail.org

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/notmuch/0 notmuch/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 notmuch notmuch/ https://yhetil.org/notmuch \
		notmuch@notmuchmail.org
	public-inbox-index notmuch

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.mail.notmuch.general
	nntp://news.gmane.io/gmane.mail.notmuch.general


AGPL code for this site: git clone http://ou63pmih66umazou.onion/public-inbox.git