[PATCH 05/21] vim: show first message of the thread
authorFelipe Contreras <felipe.contreras@gmail.com>
Sat, 2 Nov 2013 13:55:38 +0000 (07:55 +1800)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:57:53 +0000 (09:57 -0800)
a3/f27a7e8c993f0e2c4096f2e127952e1ff92c65 [new file with mode: 0644]

diff --git a/a3/f27a7e8c993f0e2c4096f2e127952e1ff92c65 b/a3/f27a7e8c993f0e2c4096f2e127952e1ff92c65
new file mode 100644 (file)
index 0000000..c0cd2bf
--- /dev/null
@@ -0,0 +1,96 @@
+Return-Path: <felipe.contreras@gmail.com>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id E3C54431FDB\r
+       for <notmuch@notmuchmail.org>; Sat,  2 Nov 2013 07:03:03 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.799\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
+       tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+       FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id v7rO-hxoAhkU for <notmuch@notmuchmail.org>;\r
+       Sat,  2 Nov 2013 07:02:59 -0700 (PDT)\r
+Received: from mail-ob0-f181.google.com (mail-ob0-f181.google.com\r
+       [209.85.214.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 5025F431FD0\r
+       for <notmuch@notmuchmail.org>; Sat,  2 Nov 2013 07:02:50 -0700 (PDT)\r
+Received: by mail-ob0-f181.google.com with SMTP id wp4so5521549obc.26\r
+       for <notmuch@notmuchmail.org>; Sat, 02 Nov 2013 07:02:49 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
+       h=from:to:cc:subject:date:message-id:in-reply-to:references;\r
+       bh=1Sgp2+h0xqGl1bwmFSUE0r6eGqS/MhJs59Kv9sxdF9Y=;\r
+       b=ksE0KstSZAf60rm/Tw0Vm5qkOXqGxiUnhwf1xqT76fUz/8aIMH7Plw/Y+BRTc2vd23\r
+       BKZE2I/ebUDbYGnPrjj2lQajEkn3krmeOHuvQlJc450d300DI3DmPXQxgofeKC1Ah6dj\r
+       5e8ru6sDIWXFciwzOIm7bvGSYPHWOLTY1x8V2fgOwWUAC7CgCZMfRuXQXe2/6xPWtEmN\r
+       YI+CDNEnqeXYDXezHEIylH8XiZRikUHmfLOlMnYW/KK4q+fgvsh/mrBYLqWE6Us8+5Q8\r
+       m1QSnECynaKPGauORxejd85H+ERL0z790txUEe9YJwFZTMyyMj0V/jt3s7SN1aPYWh9s\r
+       YKcA==\r
+X-Received: by 10.60.58.166 with SMTP id s6mr6509456oeq.40.1383400969803;\r
+       Sat, 02 Nov 2013 07:02:49 -0700 (PDT)\r
+Received: from localhost (187-162-140-241.static.axtel.net. [187.162.140.241])\r
+       by mx.google.com with ESMTPSA id\r
+       z5sm19911864obg.13.2013.11.02.07.02.48 for <multiple recipients>\r
+       (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\r
+       Sat, 02 Nov 2013 07:02:49 -0700 (PDT)\r
+From: Felipe Contreras <felipe.contreras@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 05/21] vim: show first message of the thread\r
+Date: Sat,  2 Nov 2013 07:55:38 -0600\r
+Message-Id: <1383400554-1832-6-git-send-email-felipe.contreras@gmail.com>\r
+X-Mailer: git-send-email 1.8.4.2+fc1\r
+In-Reply-To: <1383400554-1832-1-git-send-email-felipe.contreras@gmail.com>\r
+References: <1383400554-1832-1-git-send-email-felipe.contreras@gmail.com>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sat, 02 Nov 2013 14:03:04 -0000\r
+\r
+Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>\r
+---\r
+ vim/notmuch.vim | 6 ++++--\r
+ 1 file changed, 4 insertions(+), 2 deletions(-)\r
+\r
+diff --git a/vim/notmuch.vim b/vim/notmuch.vim\r
+index 72bf73b..11ea4fd 100644\r
+--- a/vim/notmuch.vim\r
++++ b/vim/notmuch.vim\r
+@@ -557,6 +557,7 @@ ruby << EOF\r
+       def search_render(search)\r
+               date_fmt = VIM::evaluate('g:notmuch_rb_date_format')\r
+               q = $curbuf.query(search)\r
++              q.sort = Notmuch::SORT_NEWEST_FIRST\r
+               $threads.clear\r
+               t = q.search_threads\r
\r
+@@ -564,10 +565,11 @@ ruby << EOF\r
+                       items.each do |e|\r
+                               authors = e.authors.to_utf8.split(/[,|]/).map { |a| author_filter(a) }.join(",")\r
+                               date = Time.at(e.newest_date).strftime(date_fmt)\r
++                              subject = e.messages.first['subject']\r
+                               if $mail_installed\r
+-                                      subject = Mail::Field.new("Subject: " + e.subject).to_s\r
++                                      subject = Mail::Field.new("Subject: " + subject).to_s\r
+                               else\r
+-                                      subject = e.subject.force_encoding('utf-8')\r
++                                      subject = subject.force_encoding('utf-8')\r
+                               end\r
+                               b << "%-12s %3s %-20.20s | %s (%s)" % [date, e.matched_messages, authors, subject, e.tags]\r
+                               $threads << e.thread_id\r
+-- \r
+1.8.4.2+fc1\r
+\r