--- /dev/null
+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 BE377431FD0\r
+ for <notmuch@notmuchmail.org>; Sat, 2 Nov 2013 07:04:22 -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 HyBFQkIhB9bf for <notmuch@notmuchmail.org>;\r
+ Sat, 2 Nov 2013 07:04:18 -0700 (PDT)\r
+Received: from mail-ob0-f175.google.com (mail-ob0-f175.google.com\r
+ [209.85.214.175]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id CF4FF429E37\r
+ for <notmuch@notmuchmail.org>; Sat, 2 Nov 2013 07:03:26 -0700 (PDT)\r
+Received: by mail-ob0-f175.google.com with SMTP id wm4so5575023obc.20\r
+ for <notmuch@notmuchmail.org>; Sat, 02 Nov 2013 07:03:26 -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=hfrliAQJRvT4gMQX8cUffF9yJOuhSYapF4I7Y4QvZLI=;\r
+ b=KWQEKu/oG3nwPsWHLXrXELTkXkbsc2e0DFAp96LQSNe42ZC6QATknTtcD5iunPP+JY\r
+ tGIIxKTObZcqRMyUuEHyeLoR1oBQr/XllAP1ylOlg9fMAISlaZgN/K06UATeoJStd2/i\r
+ omvZepVAOr7Qfn89u5dWt8j39DkxwPip+rlPuWlg6xT9zej0R2v0+KJpwf4GohRAcJHf\r
+ bl8WpLB2wA0aFiJNrQH2kzRJO47ypbzBQITbmdl0ZjEF+Sps7EPyDTDegD8Fp9KvLT1B\r
+ 3VA9iIcGKk8XbB7OemlzNM57SxbBoGWlzZdzigynC1Pp6iafW9uV89FzWa2Nv6Lccodk\r
+ na8Q==\r
+X-Received: by 10.182.104.130 with SMTP id ge2mr6465043obb.6.1383401006412;\r
+ Sat, 02 Nov 2013 07:03:26 -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
+ xr8sm11584147obc.12.2013.11.02.07.03.24 for <multiple recipients>\r
+ (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\r
+ Sat, 02 Nov 2013 07:03:25 -0700 (PDT)\r
+From: Felipe Contreras <felipe.contreras@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 20/21] vim: check compose is done on delete\r
+Date: Sat, 2 Nov 2013 07:55:53 -0600\r
+Message-Id: <1383400554-1832-21-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:04:23 -0000\r
+\r
+Not on unload, which happens when we switch buffers.\r
+\r
+Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>\r
+---\r
+ vim/notmuch.vim | 6 +++---\r
+ 1 file changed, 3 insertions(+), 3 deletions(-)\r
+\r
+diff --git a/vim/notmuch.vim b/vim/notmuch.vim\r
+index 9109470..d7b310c 100644\r
+--- a/vim/notmuch.vim\r
++++ b/vim/notmuch.vim\r
+@@ -67,7 +67,7 @@ function! s:new_file_buffer(type, fname)\r
+ ruby $curbuf.init(VIM::evaluate('a:type'))\r
+ endfunction\r
+ \r
+-function! s:compose_unload()\r
++function! s:on_compose_delete()\r
+ if b:compose_done\r
+ return\r
+ endif\r
+@@ -126,7 +126,7 @@ function! s:show_reply()\r
+ ruby open_reply get_message.mail\r
+ let b:compose_done = 0\r
+ call s:set_map(g:notmuch_compose_maps)\r
+- autocmd BufUnload <buffer> call s:compose_unload()\r
++ autocmd BufDelete <buffer> call s:on_compose_delete()\r
+ startinsert!\r
+ endfunction\r
+ \r
+@@ -134,7 +134,7 @@ function! s:compose()\r
+ ruby open_compose\r
+ let b:compose_done = 0\r
+ call s:set_map(g:notmuch_compose_maps)\r
+- autocmd BufUnload <buffer> call s:compose_unload()\r
++ autocmd BufDelete <buffer> call s:on_compose_delete()\r
+ startinsert!\r
+ endfunction\r
+ \r
+-- \r
+1.8.4.2+fc1\r
+\r