From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 0CF0A431FCF for ; Thu, 22 Jan 2015 12:41:25 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 1.639 X-Spam-Level: * X-Spam-Status: No, score=1.639 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DNS_FROM_AHBL_RHSBL=2.438, 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 D6NAtTGxSG-I for ; Thu, 22 Jan 2015 12:41:21 -0800 (PST) Received: from mail-wi0-f170.google.com (mail-wi0-f170.google.com [209.85.212.170]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id C7C3B431FCB for ; Thu, 22 Jan 2015 12:41:20 -0800 (PST) Received: by mail-wi0-f170.google.com with SMTP id em10so24159949wid.1 for ; Thu, 22 Jan 2015 12:41:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:message-id:in-reply-to:references:subject :mime-version:content-type:content-transfer-encoding:attach; bh=ix4VF47cEzIYuVV3zrhc/TVLqwR+DOWt7jh9d950z0k=; b=YHVyJno6ZnbLTcIgfoYETWctmKzthtteNCJ/uUYqYbttWTUTnb6AwyTSY+I551wUuo QyX4CbZqzfTw+O0yPkhS+IlN9x2NWy/muE41Ke9dmuTUF3ZA5MF3gSS2aIuF50DHiAQx BKEh0e3nBUr+2Rod6iCPMk4ri018Aon8fbCNlVV0y2fopVE/VyjC0IXjkLro2+Y8khm6 Geogn+ADvc6YP0Nu+weyxuQMDTZV63tA+anyCYoeVpPnE7mxpZCHpoJKVtlxOyFYCCQI NJAScWb4mFmvpCnZAZCaSb0EQVUmnMDEr4iRY2EhAezi9UqsPqX8BY5RcUKlVpwD46lI Yqww== X-Received: by 10.180.83.5 with SMTP id m5mr8757031wiy.74.1421959279543; Thu, 22 Jan 2015 12:41:19 -0800 (PST) Received: from localhost (p579BA329.dip0.t-ipconnect.de. [87.155.163.41]) by mx.google.com with ESMTPSA id h8sm241893wiy.4.2015.01.22.12.41.17 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Jan 2015 12:41:18 -0800 (PST) Date: Thu, 22 Jan 2015 21:41:47 +0100 From: Franz Fellner To: Bartosz Message-ID: <54c1608bd22a9_67b66d530832@TP_L520.notmuch> In-Reply-To: <1420891384-992-2-git-send-email-telenczuk@unic.cnrs-gif.fr> References: <1420891384-992-1-git-send-email-telenczuk@unic.cnrs-gif.fr> <1420891384-992-2-git-send-email-telenczuk@unic.cnrs-gif.fr> Subject: RE: [PATCH 1/4] VIM: implemented message folding in thread view Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Attach: Cc: notmuch@notmuchmail.org, Bartosz 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: Thu, 22 Jan 2015 20:41:25 -0000 Hi Bartosz, We already had folding via syntax in Ians fork. It turned out to be not that great. https://github.com/imain/notmuch-vim/issues/3 In short: Those syntax fold marks are for one specific notmuch-show-buffer. If you open a second show-buffer those new fold marks will overwrite the ones from the previous show-buffer. Switching between those two show-buffers will spin up CPU for quite some time and completely lock vim. The fix I worked out was to switch to manual folding. Manual folds get chached for each buffer. I could come up with a patch, but I think there are more important things, like attachments or storing sent mails. It also would help a lot if we could reoranize the sources as in Ians fork. Would simplify testing, coding (proper filetype) and backporting patches. Franz Bartosz wrote: > --- > vim/notmuch.vim | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/vim/notmuch.vim b/vim/notmuch.vim > index cad9517..34d4f92 100644 > --- a/vim/notmuch.vim > +++ b/vim/notmuch.vim > @@ -345,8 +345,13 @@ ruby << EOF > VIM::command("syntax region nmShowMsg#{i}Desc start='\\%%%il' end='\\%%%il' contains=@nmShowMsgDesc" % [msg.start, msg.start + 1]) > VIM::command("syntax region nmShowMsg#{i}Head start='\\%%%il' end='\\%%%il' contains=@nmShowMsgHead" % [msg.start + 1, msg.body_start]) > VIM::command("syntax region nmShowMsg#{i}Body start='\\%%%il' end='\\%%%dl' contains=@nmShowMsgBody" % [msg.body_start, msg.end]) > + VIM::command("syntax region nmShowMsg#{i}Fold start='\\%%%il' end='\\%%%dl' contains=nmShowMsg#{i}Body,nmShowMsg#{i}Head,nmShowMsg#{i}Desc fold" % [msg.start, msg.end]) > end > + VIM::command("g/^.*(.*unread.*)$/normal zo") > + VIM::command("nohl") > + VIM::command("normal gg/unread/1") > EOF > + set foldmethod=syntax > setlocal nomodifiable > call s:set_map(g:notmuch_show_maps) > endfunction > @@ -957,5 +962,6 @@ EOF > endfunction > > command -nargs=* NotMuch call s:NotMuch() > +set foldtext=v:folddashes.substitute(getline(v:foldstart),'{{{','','g') > > " vim: set noexpandtab: > -- > 1.9.3 (Apple Git-50) > > _______________________________________________ > notmuch mailing list > notmuch@notmuchmail.org > http://notmuchmail.org/mailman/listinfo/notmuch