[PATCH] vim: Patch Ruby Mail's depracated method

classic Classic list List threaded Threaded
2 messages Options
Tarvi Verro Tarvi Verro
Reply | Threaded
Open this post in threaded view
|

[PATCH] vim: Patch Ruby Mail's depracated method

Method is not supported in Ruby's Mail 2.8.0+.
---
 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.21.0

_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch
Daniel Kahn Gillmor Daniel Kahn Gillmor
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] vim: Patch Ruby Mail's depracated method

On Mon 2019-03-18 15:10:51 +0100, Tarvi Verro wrote:

> Method is not supported in Ruby's Mail 2.8.0+.
> ---
>  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
> --
I see this patch is marked "notmuch::moreinfo", but i don't see any
request for more info specifically, so i thought i'd fill that in here.

I don't know vim or ruby, but i would expect a patch like this to
contain at least a pointer to Ruby's Mail package's documentation about
a backward-incompatible change introduced in a certain version, if not
documentation about the expected upgrade path.  Can you provide those
pointers?

Thanks for offering fixes to the notmuch-vim codebase!

              --dkg

_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch

signature.asc (233 bytes) Download Attachment