unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Mark Walters <markwalters1009@gmail.com>
To: notmuch@notmuchmail.org, adi@adirat.com
Subject: [PATCH v5 2/7] emacs: make the refresh functions more consistent
Date: Sun,  9 Oct 2016 21:33:38 +0100	[thread overview]
Message-ID: <1476045223-5238-3-git-send-email-markwalters1009@gmail.com> (raw)
In-Reply-To: <1476045223-5238-1-git-send-email-markwalters1009@gmail.com>

The different refreshed functions were called differently: some were
called interactively and some were not. Make them all interactive.
---
 emacs/notmuch-hello.el | 1 +
 emacs/notmuch-lib.el   | 9 ++++-----
 emacs/notmuch.el       | 1 +
 3 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
index d582bff..089a19d 100644
--- a/emacs/notmuch-hello.el
+++ b/emacs/notmuch-hello.el
@@ -607,6 +607,7 @@ with `notmuch-hello-query-counts'."
 (defun notmuch-hello-update (&optional no-display)
   "Update the current notmuch view."
   ;; Lazy - rebuild everything.
+  (interactive)
   (notmuch-hello no-display))
 
 (defun notmuch-hello-window-configuration-change ()
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)))
 
 (defun notmuch-poll-and-refresh-this-buffer ()
   "Invoke `notmuch-poll' to import mail, then refresh the current buffer."
diff --git a/emacs/notmuch.el b/emacs/notmuch.el
index 6c36ad8..673811c 100644
--- a/emacs/notmuch.el
+++ b/emacs/notmuch.el
@@ -991,6 +991,7 @@ query string as the current search. If the current thread is in
 the new search results, then point will be placed on the same
 thread. Otherwise, point will be moved to attempt to be in the
 same relative position within the new buffer."
+  (interactive)
   (let ((target-line (line-number-at-pos))
 	(oldest-first notmuch-search-oldest-first)
 	(target-thread (notmuch-search-find-thread-id 'bare))
-- 
2.1.4

  parent reply	other threads:[~2016-10-09 20:33 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 ` Mark Walters [this message]
2016-10-09 22:12   ` [PATCH v5 2/7] emacs: make the refresh functions more consistent Tomi Ollila
2016-10-10  7:21     ` Mark Walters
2016-10-10 18:17       ` Tomi Ollila
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=1476045223-5238-3-git-send-email-markwalters1009@gmail.com \
    --to=markwalters1009@gmail.com \
    --cc=adi@adirat.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).