From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id WLO8FHu3fGBFxgAAgWs5BA (envelope-from ) for ; Mon, 19 Apr 2021 00:49:31 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id +LBgD3u3fGA7XgAAbx9fmQ (envelope-from ) for ; Sun, 18 Apr 2021 22:49:31 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [144.217.243.247]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id F318D27F72 for ; Mon, 19 Apr 2021 00:49:30 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 960CF271A0; Sun, 18 Apr 2021 18:49:09 -0400 (EDT) Received: from mail-oi1-x230.google.com (mail-oi1-x230.google.com [IPv6:2607:f8b0:4864:20::230]) by mail.notmuchmail.org (Postfix) with ESMTPS id 0AC662718F for ; Sun, 18 Apr 2021 18:49:04 -0400 (EDT) Received: by mail-oi1-x230.google.com with SMTP id k25so33739647oic.4 for ; Sun, 18 Apr 2021 15:49:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=XLVqvvC/UQP7IAU1R6zj89Q2+SpXmOF7Tu+3YbrH/CE=; b=j0Q0dIs3eMRbAZEny48Zwxsq70Kq++tPefDdWzTC65Jeq1gOIbQEwtP7dgFX9zFxFZ +lRkk3uidw0JneVuE3qu9OYYVumIKoxwCMnq+H17aBaEbSZBoaoeZOus8Z7EvELfmvXk d69/LmfEkV+mMZybXiM5lCT7tBxwO94Hona/oCDgEynYqIzc1qor1+2J3H6RaJFY0Jzl ymwzCP0t8l+rcVa6acSjhRa6PGVJNRFg/vUmfa/t4w9Xxq3P61PAugdzZIdKS7WPKGxJ GvwuzH1E8gnRPwCWQ/X2Kh5W2VqhpjS0nZlEuzUqXaM4ADTaQdJYUAT454uisTDQYghn 4e+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=XLVqvvC/UQP7IAU1R6zj89Q2+SpXmOF7Tu+3YbrH/CE=; b=MHZ6J3Z1NEdSQ3U/1n9BWiInku7rWC5z+Hoz3elJ7Mmh4alIZrbO3ugPTBkDfmLXFb dbkG5Aa2RbicOWIKzNoC4BXuECF96DjnSyqrxWk4g4dopPXFpxWHfsNwagJnLi6IC3aA tT8lfjX9sk88a2lvEQbsYg3JUwYQBBs47yIJTsabTI8OOgAibFp9ZvqN3o7yt8Bqwciq Zlf8Q478/EkRU6AeGw7YU3uR+0Srqpv/RriTs3ZwZ/zdp5BHNY+lg26xsw5zhOtMN+dB 1t3Kir0+PJm4yFBe1V1VT0j6KpkwDBVKmg6wt4izoIh5M3slcaaK1plZig7XeDhCYsmg Igyg== X-Gm-Message-State: AOAM531GNsOUapOxcbmGZGnS1ip9SgIaEuZITE5lhFv4Kz6FoKVP4aGw BFiHQy9fAZZCvUSVgEEtWrRTybus79G+8w== X-Google-Smtp-Source: ABdhPJxix5AFYuKp0kmWu599MZe36rxQ3e9KGxxBNaXkU+Yx+8rtT1TVQhv7SKJ2Bv1OmAnK1UvUww== X-Received: by 2002:a05:6808:1387:: with SMTP id c7mr13978900oiw.18.1618786143077; Sun, 18 Apr 2021 15:49:03 -0700 (PDT) Received: from localhost ([2806:2f0:4000:bfd0:a2c5:89ff:fe0c:1151]) by smtp.gmail.com with ESMTPSA id s7sm512405oij.15.2021.04.18.15.49.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 18 Apr 2021 15:49:02 -0700 (PDT) From: Felipe Contreras To: notmuch@notmuchmail.org Cc: Felipe Contreras Subject: [PATCH 05/13] vim: show first part if no text part is detected Date: Sun, 18 Apr 2021 17:48:43 -0500 Message-Id: <20210418224851.88240-6-felipe.contreras@gmail.com> X-Mailer: git-send-email 2.31.0 In-Reply-To: <20210418224851.88240-1-felipe.contreras@gmail.com> References: <20210418224851.88240-1-felipe.contreras@gmail.com> MIME-Version: 1.0 Message-ID-Hash: VIREVVPXKE3BBZCSMSEXE52Q462BP3DR X-Message-ID-Hash: VIREVVPXKE3BBZCSMSEXE52Q462BP3DR X-MailFrom: felipe.contreras@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.1 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1618786171; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=6gO8nffSL9bW7VBvAQSGvF3Gl6Og5rYhHKG4rvwPl0Y=; b=ugj0vpAVk2ykr02sQxJ5otRIueUVdB16B6Ugy6aj4r4zbu1imRDS4m64uLmJVb4S6FbBIS my8iuSK2EAgGMOok8Jx79YNq6pqq7zQa1o4vOF3YU0HxN3OZTP3py8mwBMXg+4EMeJRlAU sPkf1ml/LfVfKtvEWgklUTavvCbs5qOi9WvyQm9zXPl7XPXQMbZHKx2kguEzFHpA0gDp2B a3dqry7VyYRiBnKsgKcF10LvIoeGZScmxaedK2kcn6yNTDG0kZqasfGwnzoKzLkLPKtjKN bMWObGOUM131FsTqCl7OBF3B7Z4qo/7W10cNoSs6vKNhmoP4BVPhonaOrI7LgQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1618786171; a=rsa-sha256; cv=none; b=WuWd34FVypCCGL5JDm4nLyhyzYTYKFCxi/AIwSLu3NXu+e6VzOxT7JWnWF94GJVd7NNHEh /zOU+DkI5UgMomXtRg0EhoTnBxp5+L+ZpB4d8f1xKV+oI+PADNGEQ1SqLSskeEmkxNwlEO VK8228hn0cIVTWZ04x+bRmA3rR1H/hdFC+cWaOeIkCzq9okDTx0aFBleNZf49P+r/gpJNH GbeT9PZhoUchynkrM4A/KeAPaEeL/J5KQN3pBpsPUXQLP9Jt+q0OXkIZWA+ZPLozXqBpu4 +DYX1xNFrZHPPqqfgWBT0EbIBnT9ih1JbVfAUW09eJ8Fd5I7tk0O1e/jrgOLSw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20161025 header.b=j0Q0dIs3; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 144.217.243.247 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -0.96 Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20161025 header.b=j0Q0dIs3; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 144.217.243.247 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: F318D27F72 X-Spam-Score: -0.96 X-Migadu-Scanner: scn0.migadu.com X-TUID: W701T0VMdlET Better something than nothing. Signed-off-by: Felipe Contreras --- vim/notmuch.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vim/notmuch.vim b/vim/notmuch.vim index e2362a2d..dd715828 100644 --- a/vim/notmuch.vim +++ b/vim/notmuch.vim @@ -333,7 +333,7 @@ ruby << EOF b << "Date: %s" % msg['date'] nm_m.body_start = b.count if part - b << "--- %s ---" % part.mime_type + b << "--- %s ---" % [part.mime_type || 'none'] part.convert.each_line do |l| b << l.chomp end @@ -925,7 +925,7 @@ ruby << EOF def find_first_text return self if not multipart? - return text_part || html_part + return text_part || html_part || parts.first end def convert -- 2.31.0