[Top][All Lists]

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

Re: ;;; anything.el --- open anything

From: Tassilo Horn
Subject: Re: ;;; anything.el --- open anything
Date: Mon, 13 Aug 2007 15:29:50 +0200
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1.50 (gnu/linux)

"address@hidden" <address@hidden> writes:

Hi Tamas,

> One more unconventional example. :)


> It's an on-the-fly expression evaluator. You type the list expression
> and it shows the result instantly.
> (setq anything-sources
>       '(((name . "Calculation Result")
>          (requires-pattern)
>          (match (lambda (candidate)
>                   t))
>          (candidates  "dummy")
>          (filtered-candidate-transformer .
>           (lambda (candidates source)
>             (list
>              (condition-case nil
>                  (prin1-to-string
>                   (eval (read anything-pattern)))
>                (error "error")))))
>          (action ("Do Nothing" . ignore)))))

I renamed it to "Evaluation Result" and added it.  And I added an
on-the-fly math expression evaluator using `calc-eval' as "Calculation
Result" source.

VI VI VI - The Roman Number Of The Beast

reply via email to

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