From: Tassilo Horn <tassilo@member.fsf.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Anything.el for Windows
Date: Tue, 19 Feb 2008 15:08:09 +0100 [thread overview]
Message-ID: <87lk5h6nue.fsf@member.fsf.org> (raw)
In-Reply-To: 874pc573y6.fsf@mundaneum.com
Sébastien Vauban <zthjwsqqafhv@spammotel.com> writes:
Hi Sébastien,
> delayed-sources = ((name . Tracker Search) (name . Locate))
>
> But I never saw any "Locate" results...
Ok, but at least the locate source should be processed.
Please eval the following defun and invoke anything. Then go to
*Messages* and see if there's an error message of the form
Error processing source: ...
--8<---------------cut here---------------start------------->8---
(defun anything-process-source (source)
"Display matches from SOURCE according to its settings."
(let (matches)
(if (equal anything-pattern "")
(progn
(setq matches (anything-get-cached-candidates source))
(if (> (length matches) anything-candidate-number-limit)
(setq matches
(subseq matches 0 anything-candidate-number-limit))))
(condition-case err-var
(let ((item-count 0)
(functions (assoc-default 'match source))
exit)
(unless functions
(setq functions
(list (lambda (candidate)
(string-match anything-pattern candidate)))))
(dolist (function functions)
(let (newmatches)
(dolist (candidate (anything-get-cached-candidates source))
(when (and (not (member candidate matches))
(funcall function (if (listp candidate)
(car candidate)
candidate)))
(push candidate newmatches)
(when anything-candidate-number-limit
(incf item-count)
(when (= item-count anything-candidate-number-limit)
(setq exit t)
(return)))))
(setq matches (append matches (reverse newmatches)))
(if exit
(return)))))
(invalid-regexp (setq matches nil))
(error (message "Error processing source %s: %s" source err-var))))
(let* ((transformer (assoc-default 'filtered-candidate-transformer source)))
(if transformer
(setq matches (funcall transformer matches source))))
(when matches
(anything-insert-header (assoc-default 'name source))
(dolist (match matches)
(when (and anything-enable-digit-shortcuts
(not (eq anything-digit-shortcut-count 9)))
(move-overlay (nth anything-digit-shortcut-count
anything-digit-overlays)
(line-beginning-position)
(line-beginning-position))
(incf anything-digit-shortcut-count))
(anything-insert-match match 'insert)))))
--8<---------------cut here---------------end--------------->8---
BTW: Do other sources that return files work for you, i.e. the file name
history source? If not, then the problem might be that a candidate
transformer for files doesn't work on windows.
Bye,
Tassilo
--
Some people wear Superman pajamas. Superman wears Chuck Norris pajamas.
next prev parent reply other threads:[~2008-02-19 14:08 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-04 12:03 Anything.el for Windows Sébastien Vauban
2008-02-04 20:36 ` Tassilo Horn
[not found] ` <mailman.6969.1202157424.18990.help-gnu-emacs@gnu.org>
2008-02-05 16:07 ` Sébastien Vauban
2008-02-05 17:00 ` Tassilo Horn
[not found] ` <mailman.7003.1202230839.18990.help-gnu-emacs@gnu.org>
2008-02-06 11:27 ` Sébastien Vauban
2008-02-06 13:49 ` Tassilo Horn
[not found] ` <mailman.7036.1202305782.18990.help-gnu-emacs@gnu.org>
2008-02-11 15:24 ` Sébastien Vauban
2008-02-11 17:10 ` Tassilo Horn
[not found] ` <mailman.7291.1202749829.18990.help-gnu-emacs@gnu.org>
2008-02-12 11:17 ` Sébastien Vauban
2008-02-12 15:47 ` Tassilo Horn
[not found] ` <mailman.7338.1202831286.18990.help-gnu-emacs@gnu.org>
2008-02-12 16:08 ` Sébastien Vauban
2008-02-13 7:55 ` Tassilo Horn
[not found] ` <mailman.7363.1202889358.18990.help-gnu-emacs@gnu.org>
2008-02-14 13:08 ` Sébastien Vauban
2008-02-14 13:57 ` Tassilo Horn
[not found] ` <mailman.7403.1202997494.18990.help-gnu-emacs@gnu.org>
2008-02-14 14:33 ` Sébastien Vauban
2008-02-14 14:54 ` Tassilo Horn
[not found] ` <mailman.7405.1203000915.18990.help-gnu-emacs@gnu.org>
2008-02-15 11:38 ` Sébastien Vauban
2008-02-15 12:44 ` Tassilo Horn
[not found] ` <mailman.7443.1203079486.18990.help-gnu-emacs@gnu.org>
2008-02-15 13:34 ` Sébastien Vauban
2008-02-15 19:47 ` Tassilo Horn
[not found] ` <mailman.7458.1203104854.18990.help-gnu-emacs@gnu.org>
2008-02-18 9:38 ` Sébastien Vauban
2008-02-18 13:26 ` Tassilo Horn
[not found] ` <mailman.7571.1203341195.18990.help-gnu-emacs@gnu.org>
2008-02-18 14:32 ` Sébastien Vauban
2008-02-18 15:04 ` Tassilo Horn
[not found] ` <mailman.7574.1203347089.18990.help-gnu-emacs@gnu.org>
2008-02-18 15:55 ` Sébastien Vauban
2008-02-18 17:07 ` Tassilo Horn
[not found] ` <mailman.7582.1203354459.18990.help-gnu-emacs@gnu.org>
2008-02-19 8:20 ` Sébastien Vauban
2008-02-19 14:08 ` Tassilo Horn [this message]
[not found] ` <mailman.7630.1203430115.18990.help-gnu-emacs@gnu.org>
2008-02-19 15:49 ` Sébastien Vauban
2008-02-19 17:00 ` Tassilo Horn
[not found] ` <mailman.7636.1203440454.18990.help-gnu-emacs@gnu.org>
2008-02-20 12:16 ` Sébastien Vauban
2008-02-20 13:33 ` Tassilo Horn
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87lk5h6nue.fsf@member.fsf.org \
--to=tassilo@member.fsf.org \
--cc=help-gnu-emacs@gnu.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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.