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 D1BDD40AB41 for ; Sat, 5 Jun 2010 04:13:34 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -1.999 X-Spam-Level: X-Spam-Status: No, score=-1.999 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=ham 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 MbXT6FmVJDze for ; Sat, 5 Jun 2010 04:13:20 -0700 (PDT) Received: from mail-bw0-f53.google.com (mail-bw0-f53.google.com [209.85.214.53]) by olra.theworths.org (Postfix) with ESMTP id 6D66C418C25 for ; Sat, 5 Jun 2010 04:13:02 -0700 (PDT) Received: by mail-bw0-f53.google.com with SMTP id 12so686857bwz.26 for ; Sat, 05 Jun 2010 04:13:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer:in-reply-to:references; bh=AabXUD5+EyzLxdOyc0k3F44xDRgFNvc+FTDUa9U386A=; b=fWPot2cKg5bGVrEZkAo9Kdj9bQrBzzFknMc8JCtmdpRbc+Q/e0UfIvhL0/PdpRxI8I qyXTPGiwI7jE9nhrcsZcgdm6simnk4tRJHEIH0QoBRnkVnpc2r6m1NhhRR3uM5+7Y9F/ O2d/ZGdfLaygPlRuA4D7czQPBM3PeaOxNkmlM= 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=XEOktKRGFySb3kCW7DvlrZlEsESshGA1PROtqp5O0ZITPqCbphPRL+DNGQQktCKWRe 7z0+cbUX3mmna2ld7QKtjw3EEJHwXk+RwzzU22pgBZFCiq5bSxRaOSZtDAnzBb3gY+Ou 3OO9u8KZ7LcCnubowYWAONdjyJB2UC0vcOrCQ= Received: by 10.204.6.68 with SMTP id 4mr4820878bky.163.1275736382084; Sat, 05 Jun 2010 04:13:02 -0700 (PDT) Received: from localhost (a91-153-253-80.elisa-laajakaista.fi [91.153.253.80]) by mx.google.com with ESMTPS id v14sm9601771bkz.2.2010.06.05.04.13.01 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 05 Jun 2010 04:13:01 -0700 (PDT) From: Felipe Contreras To: notmuch@notmuchmail.org Subject: [PATCH 5/9] vim: remove add_remove_tags_on_screen() Date: Sat, 5 Jun 2010 14:12:38 +0300 Message-Id: <1275736362-22771-6-git-send-email-felipe.contreras@gmail.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1275736362-22771-1-git-send-email-felipe.contreras@gmail.com> References: <1275736362-22771-1-git-send-email-felipe.contreras@gmail.com> Cc: Bart Trojanowski 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: Sat, 05 Jun 2010 11:13:35 -0000 It's not working properly; the current message is jumping around and the tags not really added/removed properly. Signed-off-by: Felipe Contreras --- vim/plugin/notmuch.vim | 17 ----------------- 1 files changed, 0 insertions(+), 17 deletions(-) diff --git a/vim/plugin/notmuch.vim b/vim/plugin/notmuch.vim index b8c9858..01ee10f 100644 --- a/vim/plugin/notmuch.vim +++ b/vim/plugin/notmuch.vim @@ -306,7 +306,6 @@ function! s:NM_search_edit() endfunction function! s:NM_search_archive_thread() - call NM_add_remove_tags_on_screen('', '-', ['inbox']) call NM_add_remove_tags([], '-', ['inbox']) norm j endfunction @@ -399,7 +398,6 @@ function! s:NM_search_add_remove_tags(prompt, prefix, intags) let tags = a:intags endif call NM_add_remove_tags([], a:prefix, tags) - call NM_add_remove_tags_on_screen('', a:prefix, tags) endfunction " --- implement show screen {{{1 @@ -569,7 +567,6 @@ function! s:NM_show_advance_marking_read_and_archiving() " if entire message fits on the screen, read/archive it, move to the next one if msg_top['id'] != msg_bot['id'] || msg_top['end'] <= vis_bot - call NM_add_remove_tags_on_screen(msg_top['start'], '-', advance_tags) exec printf('norm %dG', vis_top) call NM_show_next(0, 1) if has_key(msg_top,'match') && msg_top['match'] != '0' @@ -1325,20 +1322,6 @@ function! s:NM_add_remove_tags(filter, prefix, tags) call NM_run(args) endfunction -function! s:NM_add_remove_tags_on_screen(online, prefix, tags) - setlocal modifiable - if a:prefix == '-' - for tagname in a:tags - exec printf('silent! %ss/(\([^)]*\)\<%s\>\([^)]*\))$/(\1\2)/', string(a:online), tagname) - endfor - else - for tagname in a:tags - exec printf('silent! %ss/(\([^)]*\))$/(\1 %s)/', string(a:online), tagname) - endfor - endif - setlocal nomodifiable -endfunction - " --- process and set the defaults {{{1 function! NM_set_defaults(force) -- 1.7.1