* [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
* Re: [PATCH] Vim: Fix a deprecated call to the 'mail' gem
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
0 siblings, 1 reply; 4+ messages in thread
From: David Bremner @ 2021-05-02 10:43 UTC (permalink / raw)
To: Jules Aguillon, notmuch; +Cc: Felipe Contreras
Jules Aguillon <juloo.dsi@gmail.com> writes:
> 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.
I believe this problem was fixed in a different way by Felipe's patch
applied as 8af4cd16
d
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Vim: Fix a deprecated call to the 'mail' gem
2021-05-02 10:43 ` David Bremner
@ 2021-05-02 21:51 ` Felipe Contreras
2021-05-03 9:31 ` Jules Aguillon
0 siblings, 1 reply; 4+ messages in thread
From: Felipe Contreras @ 2021-05-02 21:51 UTC (permalink / raw)
To: David Bremner; +Cc: Jules Aguillon, notmuch@notmuchmail.org
On Sun, May 2, 2021 at 5:43 AM David Bremner <david@tethera.net> wrote:
>
> Jules Aguillon <juloo.dsi@gmail.com> writes:
>
> > 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.
>
> I believe this problem was fixed in a different way by Felipe's patch
> applied as 8af4cd16
Indeed, but Jules' patch may be a better solution, I will investigate.
--
Felipe Contreras
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Vim: Fix a deprecated call to the 'mail' gem
2021-05-02 21:51 ` Felipe Contreras
@ 2021-05-03 9:31 ` Jules Aguillon
0 siblings, 0 replies; 4+ messages in thread
From: Jules Aguillon @ 2021-05-03 9:31 UTC (permalink / raw)
To: Felipe Contreras; +Cc: notmuch@notmuchmail.org
[-- Attachment #1.1: Type: text/plain, Size: 861 bytes --]
Hi !
This is indeed fixed on master. My patch has the advantage of removing the
extraneous "to string" and "parsing" steps but that's not a big deal.
Thanks!
On Sun, May 2, 2021 at 11:51 PM Felipe Contreras <felipe.contreras@gmail.com>
wrote:
> On Sun, May 2, 2021 at 5:43 AM David Bremner <david@tethera.net> wrote:
> >
> > Jules Aguillon <juloo.dsi@gmail.com> writes:
> >
> > > 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.
> >
> > I believe this problem was fixed in a different way by Felipe's patch
> > applied as 8af4cd16
>
> Indeed, but Jules' patch may be a better solution, I will investigate.
>
> --
> Felipe Contreras
>
[-- Attachment #1.2: Type: text/html, Size: 1728 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [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).