From: Franz Fellner <alpine.art.de@gmail.com>
To: Bartosz Telenczuk <telenczuk@unic.cnrs-gif.fr>
Cc: notmuch@notmuchmail.org
Subject: RE: [PATCH v3] VIM: Improve moving between messages in a thread
Date: Wed, 21 Jan 2015 19:53:56 +0100 [thread overview]
Message-ID: <54bff5c426e50_5b9d145d304d6@TP_L520.notmuch> (raw)
In-Reply-To: <54b45d071fd20_7f93fe5bd4401f087@bts-MacBook-Pro.local.notmuch>
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
next prev parent reply other threads:[~2015-01-21 18:53 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-06 7:12 [PATCH] Improve moving between messages in a thread Ian Main
2014-10-06 17:25 ` Ian Main
2014-10-06 17:55 ` [PATCH] VIM: " Ian Main
2014-10-10 9:21 ` Franz Fellner
2014-10-10 18:21 ` Ian Main
2014-10-18 20:30 ` Franz Fellner
2014-10-19 9:51 ` Tomi Ollila
2014-10-20 18:01 ` [PATCH v3] " Ian Main
2015-01-12 23:47 ` Bartosz Telenczuk
2015-01-21 18:53 ` Franz Fellner [this message]
2015-02-02 23:44 ` Bartosz Telenczuk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54bff5c426e50_5b9d145d304d6@TP_L520.notmuch \
--to=alpine.art.de@gmail.com \
--cc=notmuch@notmuchmail.org \
--cc=telenczuk@unic.cnrs-gif.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).