help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Anything.el for Windows


From: Tassilo Horn
Subject: Re: Anything.el for Windows
Date: Mon, 18 Feb 2008 18:07:22 +0100
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.60 (gnu/linux)

Sébastien Vauban <address@hidden> writes:

Hi Sébastien,

>> Ok, I looked into anything.el and maybe I found the culprit.
>> What does
>>
>>   (sit-for anything-idle-delay)
>>
>> return on your system? If it returns nil, then that's the
>> problem.
>
> ... it does return `t'.

Ok, then eval this:

--8<---------------cut here---------------start------------->8---
(defun anything-update ()
  "Update the list of matches in the anything buffer according to
the current pattern."
  (setq anything-digit-shortcut-count 0)
  (anything-kill-async-processes)
  (with-current-buffer anything-buffer
    (erase-buffer)

    (if anything-enable-digit-shortcuts
        (dolist (overlay anything-digit-overlays)
          (delete-overlay overlay)))

    (let (delayed-sources)
      (dolist (source (anything-get-sources))
        (if (or (not anything-source-filter)
                (member (assoc-default 'name source) anything-source-filter))
          (if (equal anything-pattern "")
              (unless (assoc 'requires-pattern source)
                (if (assoc 'delayed source)
                    (push source delayed-sources)
                  (anything-process-source source)))

            (let ((min-pattern-length (assoc-default 'requires-pattern source)))
              (unless (and min-pattern-length
                           (< (length anything-pattern) min-pattern-length))
                (if (assoc 'delayed source)
                    (push source delayed-sources)
                  (anything-process-source source)))))))

      (message "delayed-sources = %s" (mapcar (lambda (s)
                                                (assoc 'name s))
                                                delayed-sources))

      (goto-char (point-min))
      (run-hooks 'anything-update-hook)
      (anything-next-line)

      (anything-maybe-fit-frame)

      (run-with-idle-timer (if (featurep 'xemacs)
                               0.1
                             0)
                           nil
                           'anything-process-delayed-sources
                           delayed-sources))))
--8<---------------cut here---------------end--------------->8---

Now invoke anything and type some pattern.  Then go to *Messages* and
see if something like

delayed-sources = ((name . Google Suggest) (name . Locate))

is there.

Bye,
Tassilo
-- 
"Ubuntu" - an African word, meaning "Slackware is too hard for me".





reply via email to

[Prev in Thread] Current Thread [Next in Thread]