From: Matt Armstrong <marmstrong@google.com>
To: Mark Walters <markwalters1009@gmail.com>, notmuch@notmuchmail.org
Subject: Re: [PATCH v3] Add notmuch-show--build-queries.
Date: Wed, 19 Oct 2016 15:06:43 -0700 [thread overview]
Message-ID: <qf5twc8ro24.fsf@marmstrong-linux.kir.corp.google.com> (raw)
In-Reply-To: <87vawu5chb.fsf@qmul.ac.uk>
Mark Walters <markwalters1009@gmail.com> writes:
>> diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
[...]
>> +(defun notmuch-show--build-queries ()
[...]
> We may want to call this from tree-mode later, so I wonder whether
> passing it notmuch-show-thread-id and notmuch-show-query-context as
> arguments would make sense. I quite like the idea of this function being
> self contained (ie not referencing global state variables). My instinct
> is that referencing truly global variables like customise variables is
> fine, but I am less keen on referencing buffer-local global variables.
Done.
Perhaps a useful rule of thumb is that functions referencing
buffer-local vars should be interactive? I'm not sure that follows for
all cases, but I certainly agree that global and buffer-local vars
should probably not be referenced gratuitously, and pure functions are
generally good.
> However, some of this depends on what your later plans are.
Calling what I have in mind "plans" may be a stretch. ;-) I'm not sure
this function is useful for notmuch-tree as written. At minimum, I
would expect a shared function to have a different name. But I think
you're right that there is probably opportunity for code sharing,
especially if notmuch grows more complex features with respect to
searching vs. expanding messages in threads.
Look for a v4 of this patch soon. I appreciate your review so far.
next prev parent reply other threads:[~2016-10-19 22:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-13 19:37 Matt Armstrong
2016-10-13 19:37 ` [PATCH v3] Add notmuch-show--build-queries Matt Armstrong
2016-10-15 6:54 ` Mark Walters
2016-10-19 22:06 ` Matt Armstrong [this message]
2016-10-13 19:42 ` Matt Armstrong
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=qf5twc8ro24.fsf@marmstrong-linux.kir.corp.google.com \
--to=marmstrong@google.com \
--cc=markwalters1009@gmail.com \
--cc=notmuch@notmuchmail.org \
/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).