From 1064be50248484887538181842c744114b4ab7b6 Mon Sep 17 00:00:00 2001 From: Thierry Volpiatto Date: Wed, 9 Nov 2011 18:23:01 +0100 Subject: [PATCH] * anything.el (anything-update): Revert precedent changes, clarify. * anything-config.el (anything-c-source-apt): Remove delayed attr. --- anything-config.el | 1 - anything.el | 38 ++++++++++++++++++-------------------- 2 files changed, 18 insertions(+), 21 deletions(-) diff --git a/anything-config.el b/anything-config.el index e918eaa..d7baed0 100644 --- a/anything-config.el +++ b/anything-config.el @@ -8907,7 +8907,6 @@ Only math* symbols are collected." (candidate-transformer anything-c-apt-candidate-transformer) (display-to-real . anything-c-apt-display-to-real) (requires-pattern . 2) - (delayed) (update . anything-c-apt-refresh) (action ("Show package description" . anything-c-apt-cache-show) diff --git a/anything.el b/anything.el index 62f2cff..aeedaf7 100644 --- a/anything.el +++ b/anything.el @@ -2329,30 +2329,28 @@ is done on whole `anything-buffer' and not on current source." (when anything-enable-shortcuts (mapc 'delete-overlay anything-digit-overlays)) (let (delayed-sources) - (unwind-protect - (setq delayed-sources - (loop for source in (remove-if-not 'anything-update-source-p - (anything-get-sources)) - if (anything-delayed-source-p source) - collect source - else do (anything-process-source source))) + (unwind-protect ; Process normal sources and store delayed one's. + (setq delayed-sources + (loop for source in (remove-if-not 'anything-update-source-p + (anything-get-sources)) + if (anything-delayed-source-p source) + collect source + else do (anything-process-source source))) (anything-log-eval (mapcar (lambda (s) (assoc-default 'name s)) delayed-sources)) - (anything-update-move-first-line) + (anything-update-move-first-line) ; Run anything-update-hook. (if anything-test-mode (mapc 'anything-process-source delayed-sources) - (when delayed-sources - ;; Process delayed sources once outside of timer - ;; to be sure `anything-after-update-hook' and preselection - ;; are executed effectively AFTER processing delayed sources. - (anything-process-delayed-sources delayed-sources) - ;; Then start a new timer. - (anything-new-timer - 'anything-process-delayed-sources-timer - (run-with-idle-timer - anything-idle-delay nil - 'anything-process-delayed-sources delayed-sources))) - (anything-log-run-hook 'anything-after-update-hook)) + (when delayed-sources + (anything-new-timer + 'anything-process-delayed-sources-timer + (run-with-idle-timer + ;; Be sure anything-idle-delay is > + ;; to anything-input-idle-delay + ;; otherwise use value of anything-input-idle-delay. + (max anything-idle-delay anything-input-idle-delay) nil + 'anything-process-delayed-sources delayed-sources))) + (anything-log-run-hook 'anything-after-update-hook)) (and preselect (anything-preselect preselect)) (anything-log "end update"))))) -- 2.11.4.GIT