From 0b94c720ebb9477ee0908035b7cf2d9ef34c24b2 Mon Sep 17 00:00:00 2001 From: Franz Fellner Date: Wed, 21 Jan 2015 19:53:56 +0100 Subject: [PATCH] RE: [PATCH v3] VIM: Improve moving between messages in a thread --- 63/d95c0e6f223f5bf388e717b9c2033944c47d86 | 84 +++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 63/d95c0e6f223f5bf388e717b9c2033944c47d86 diff --git a/63/d95c0e6f223f5bf388e717b9c2033944c47d86 b/63/d95c0e6f223f5bf388e717b9c2033944c47d86 new file mode 100644 index 000000000..77d4b7342 --- /dev/null +++ b/63/d95c0e6f223f5bf388e717b9c2033944c47d86 @@ -0,0 +1,84 @@ +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 EBC36431FC9 + for ; Wed, 21 Jan 2015 10:53:34 -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 a1NDSwZJdFWo for ; + Wed, 21 Jan 2015 10:53:31 -0800 (PST) +Received: from mail-we0-f178.google.com (mail-we0-f178.google.com + [74.125.82.178]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 86F9B431FBC + for ; Wed, 21 Jan 2015 10:53:31 -0800 (PST) +Received: by mail-we0-f178.google.com with SMTP id p10so44804304wes.9 + for ; Wed, 21 Jan 2015 10:53:27 -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=Jo0epJohfJO1rLuu0pNDXfy8JYumztPxlrwNI6LFRh0=; + b=v0S8Vsf3tMejhUa+eNF7/tJXGdSnRR3WQ9UvnJL6LHPdj2u1Y6zNjJjrjfBLrxZ7uT + 83+dAnImvRZdlG8ow2x1jUUsGhdmS97kbZUpYcnsQySvUv/357A7qnh+s0ZOU+5P1HcN + PjguYUmwVXhtDF3bsLrCZAEGPXN4yv6i/FjhlPpS4YDvjErSNLDOYIlLfdwktuaOuEXU + JvMDfCsh91r4iBALZexibmWQbQGmhJk48G5C3VClol5FxIj1xWaR51nUC3V7cxtgaUG9 + psWNredeuQ878+ak1/XWcyXZkSOIoSZQNVR6gDz6bN37GSyath6DDNFSwOIYbZeckWCC + NOAA== +X-Received: by 10.181.12.11 with SMTP id em11mr59663793wid.1.1421866407144; + Wed, 21 Jan 2015 10:53:27 -0800 (PST) +Received: from localhost (p4FFB8A19.dip0.t-ipconnect.de. [79.251.138.25]) + by mx.google.com with ESMTPSA id s9sm8405515wiz.12.2015.01.21.10.53.25 + (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); + Wed, 21 Jan 2015 10:53:26 -0800 (PST) +Date: Wed, 21 Jan 2015 19:53:56 +0100 +From: Franz Fellner +To: Bartosz Telenczuk +Message-ID: <54bff5c426e50_5b9d145d304d6@TP_L520.notmuch> +In-Reply-To: <54b45d071fd20_7f93fe5bd4401f087@bts-MacBook-Pro.local.notmuch> +References: <1412618116-27586-1-git-send-email-imain@stemwinder.org> + <1413828111-2879-1-git-send-email-imain@stemwinder.org> + <54b45d071fd20_7f93fe5bd4401f087@bts-MacBook-Pro.local.notmuch> +Subject: RE: [PATCH v3] VIM: Improve moving between messages in a thread +Mime-Version: 1.0 +Content-Type: text/plain; + charset=utf-8 +Content-Transfer-Encoding: 7bit +Attach: +Cc: notmuch@notmuchmail.org +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, 21 Jan 2015 18:53:35 -0000 + +Bartosz Telenczuk wrote: +> Hi Ian, +> +> The patch looks good. I tested it on my system and it works fine. I just have one suggestion regarding coding style. +> +> > +function! s:show_prev_msg() +> > function! s:show_next_msg() +> +> Since these functions are almost the same, you could avoid code repetition by replacing them by a function which takes (positive or negative) increment as an argument. + +I think the API should be clear and easy to understand, because people will probably bind them to custom shortcuts. You should not have to think about what that weird extra parameter (-1, false, ...) means and go read the docs. +But I agree that the code duplication is not optimal. The code in Ians repo already has split out the ruby code. There is still code duplication. But that can easily be split out into a function on its own. + +Franz -- 2.26.2