Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 9E1FC429E37 for ; Wed, 4 May 2011 13:13:39 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.799 X-Spam-Level: X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8JYAWLj6kCNe for ; Wed, 4 May 2011 13:13:38 -0700 (PDT) Received: from mail-ey0-f181.google.com (mail-ey0-f181.google.com [209.85.215.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 94248429E31 for ; Wed, 4 May 2011 13:13:31 -0700 (PDT) Received: by mail-ey0-f181.google.com with SMTP id 5so465261eyh.26 for ; Wed, 04 May 2011 13:13:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references; bh=FJrhQyFeo2wQeRIoce6aXOC9oDLYys/nsCI7F23xPf8=; b=CU6hPJR1a0rGjCReptPT5klN+y7vP2050JFGc+P5bLEr64pOhiA8/X2WXs44f7IMoS yrSdJBvz/ACb2rwXnA5iQh+dW34ty69xwPKg1CPUCYpnIkwDgrAGePrQNl3R2i7o1KyA LRZKxYluGrLY7zWGcuGrKhWcAt4UfezARmm4Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=WHU5sfey27QHOG5i6TA9Dpvul4wTPeGXVbuhCZjv2nAluA70sFlemmG9doTzP12vAE X98N7lNxbOEV6luEwsfelUTNSdXXgX8XayQW+DP5JmfwxZWmoKO8+sE7gKTWtePICCFB G1B/tyFQyHEZNMmKUWH/LQHRTL2pgpCfG8ei8= Received: by 10.14.22.13 with SMTP id s13mr736658ees.89.1304540011178; Wed, 04 May 2011 13:13:31 -0700 (PDT) Received: from localhost (a91-153-253-80.elisa-laajakaista.fi [91.153.253.80]) by mx.google.com with ESMTPS id s49sm1098764eei.12.2011.05.04.13.13.29 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 04 May 2011 13:13:30 -0700 (PDT) From: Felipe Contreras To: notmuch@notmuchmail.org Subject: [PATCH 4/4] vim: add delete commands Date: Wed, 4 May 2011 23:13:16 +0300 Message-Id: <1304539996-6686-5-git-send-email-felipe.contreras@gmail.com> X-Mailer: git-send-email 1.7.5 In-Reply-To: <1304539996-6686-1-git-send-email-felipe.contreras@gmail.com> References: <1304539996-6686-1-git-send-email-felipe.contreras@gmail.com> X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2011 20:13:40 -0000 Signed-off-by: Felipe Contreras --- vim/plugin/notmuch.vim | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/vim/plugin/notmuch.vim b/vim/plugin/notmuch.vim index c49ada5..0b1e0a3 100644 --- a/vim/plugin/notmuch.vim +++ b/vim/plugin/notmuch.vim @@ -152,6 +152,8 @@ let g:notmuch_show_maps = { \ 'I': ':call NM_show_mark_read_thread()', \ 'a': ':call NM_show_archive_thread()', \ 'A': ':call NM_show_mark_read_then_archive_thread()', + \ 'D': ':call NM_show_delete_thread()', + \ 'd': ':call NM_show_delete_message()', \ 'N': ':call NM_show_mark_read_then_next_open_message()', \ 'v': ':call NM_show_view_all_mime_parts()', \ '+': ':call NM_show_add_tag()', @@ -522,6 +524,16 @@ function! s:NM_show_mark_read_then_archive_thread() call NM_show_next_thread() endfunction +function! s:NM_show_delete_thread() + call NM_tag(b:nm_search_words, ['+delete', '-inbox', '-unread']) + call NM_show_next_thread() +endfunction + +function! s:NM_show_delete_message() + let msg = NM_show_get_message_for_line(line('.')) + call NM_tag([msg['id']], ['+delete', '-inbox', '-unread']) +endfunction + function! s:NM_show_mark_read_then_next_open_message() echo 'not implemented' endfunction -- 1.7.5