aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtur Malabarba <bruce.connor.am@gmail.com>2015-05-02 12:39:25 +0100
committerArtur Malabarba <bruce.connor.am@gmail.com>2015-05-02 12:39:25 +0100
commit2255c9dd3804a4caaeeca5f6dad71f0e4c366ac9 (patch)
tree395ff949a3afc204fa268093fd98c02b1838675a
parentf3e1455cb8cc8cbe6e2fb78522db79504e0775ee (diff)
Do the question-hiding at print time.
-rw-r--r--sx-question-list.el16
1 files changed, 8 insertions, 8 deletions
diff --git a/sx-question-list.el b/sx-question-list.el
index 11c7210..f7ef2ee 100644
--- a/sx-question-list.el
+++ b/sx-question-list.el
@@ -486,20 +486,21 @@ a new list before redisplaying."
(let* ((question-list
(or (and no-update sx-question-list--dataset)
(and (functionp sx-question-list--refresh-function)
- (sx-question-list--remove-excluded-tags
- (funcall sx-question-list--refresh-function)))
+ (funcall sx-question-list--refresh-function))
(and (functionp sx-question-list--next-page-function)
- (sx-question-list--remove-excluded-tags
- (funcall sx-question-list--next-page-function 1)))
+ (funcall sx-question-list--next-page-function 1))
sx-question-list--dataset))
;; Preserve window positioning.
(window (get-buffer-window (current-buffer)))
(old-start (when window (window-start window))))
+ ;; The dataset contains everything. Hiding and filtering is done
+ ;; on the `tabulated-list-entries' below.
(setq sx-question-list--dataset question-list)
;; Print the result.
(setq tabulated-list-entries
(mapcar sx-question-list--print-function
- sx-question-list--dataset))
+ (sx-question-list--remove-excluded-tags
+ sx-question-list--dataset)))
(when redisplay
(tabulated-list-print 'remember)
;; Display weird chars correctly
@@ -595,9 +596,8 @@ we're not. Do the same for 3 lines from the top."
(when (functionp sx-question-list--next-page-function)
;; Try to get more questions
(let ((list
- (sx-question-list--remove-excluded-tags
- (funcall sx-question-list--next-page-function
- (1+ sx-question-list--pages-so-far)))))
+ (funcall sx-question-list--next-page-function
+ (1+ sx-question-list--pages-so-far))))
(if (null list)
(message "No further questions.")
;; If it worked, increment the variable.