From: Tomi Ollila <tomi.ollila@iki.fi>
To: Mark Walters <markwalters1009@gmail.com>,
notmuch@notmuchmail.org, adi@adirat.com
Subject: Re: [PATCH v5 2/7] emacs: make the refresh functions more consistent
Date: Mon, 10 Oct 2016 21:17:11 +0300 [thread overview]
Message-ID: <m2mvic9ihk.fsf@guru.guru-group.fi> (raw)
In-Reply-To: <87twckbred.fsf@qmul.ac.uk>
On Mon, Oct 10 2016, Mark Walters <markwalters1009@gmail.com> wrote:
> On Sun, 09 Oct 2016, Tomi Ollila <tomi.ollila@iki.fi> wrote:
>> On Sun, Oct 09 2016, Mark Walters <markwalters1009@gmail.com> wrote:
>>
>>> diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el
>>> index b2cdace..8b55ca7 100644
>>> --- a/emacs/notmuch-lib.el
>>> +++ b/emacs/notmuch-lib.el
>>> @@ -416,11 +416,10 @@ of its command symbol."
>>> (defun notmuch-refresh-this-buffer ()
>>> "Refresh the current buffer."
>>> (interactive)
>>> - (when notmuch-buffer-refresh-function
>>> - (if (commandp notmuch-buffer-refresh-function)
>>> - ;; Pass prefix argument, etc.
>>> - (call-interactively notmuch-buffer-refresh-function)
>>> - (funcall notmuch-buffer-refresh-function))))
>>> + (when (and notmuch-buffer-refresh-function
>>> + (commandp notmuch-buffer-refresh-function))
>>> + ;; Pass prefix argument, etc.
>>> + (call-interactively notmuch-buffer-refresh-function)))
>
> Hi
>
> Thanks for the review.
>
>> If there is going to be more rounds, IMO this (currently wrong, missing
>> second argument t) commandp check should be dropped. It is better to
>> signal programmer error than silently ignore non-nil variable that is
>> not referring to interactive function (the code is also simpler this way).
>
> Yes I agree. Do you have any preference between just dropping the test,
> and putting our own error instead?
I'd just drop the test. e.g.
(if/when notmuch-buffer-refresh-function
(call-interactively notmuch-buffer-refresh-function))
Tomi
>
>> and a quesstion: the last patch in this series defines this
>> refresh all buffers function -- why is it not interactive ?
>
> Because I forgot to amend the last commit :-) The interactive is in my
> tree, and was in what I tested -- I agree it should be.
>
> Best wishes
>
> Mark
>
>
>> Otherwise series looks good to me.
>
>
>>
>> Tomi
next prev parent reply other threads:[~2016-10-10 18:16 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-09 20:33 [PATCH v5 0/7] Add refresh all buffers functionality Mark Walters
2016-10-09 20:33 ` [PATCH v5 1/7] emacs: tree: make refresh use generic binding Mark Walters
2016-10-09 20:33 ` [PATCH v5 2/7] emacs: make the refresh functions more consistent Mark Walters
2016-10-09 22:12 ` Tomi Ollila
2016-10-10 7:21 ` Mark Walters
2016-10-10 18:17 ` Tomi Ollila [this message]
2016-10-09 20:33 ` [PATCH v5 3/7] emacs: hello: stop update from forcing the buffer to be displayed Mark Walters
2016-10-09 20:33 ` [PATCH v5 4/7] emacs: notmuch-search: add no-display functionality Mark Walters
2016-10-09 20:33 ` [PATCH v5 5/7] emacs: notmuch-search-refresh-view: reuse buffer Mark Walters
2016-10-09 20:33 ` [PATCH v5 6/7] emacs: notmuch-show: refresh all windows displaying buffer Mark Walters
2016-10-09 20:33 ` [PATCH v5 7/7] emacs: notmuch-lib: add refresh all buffers function Mark Walters
2016-10-10 13:27 ` [PATCH v5 0/7] Add refresh all buffers functionality Ioan-Adrian Ratiu
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=m2mvic9ihk.fsf@guru.guru-group.fi \
--to=tomi.ollila@iki.fi \
--cc=adi@adirat.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).