From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.devel Subject: Re: more on anything.el inclusion Date: Thu, 01 Jul 2010 04:36:26 -0400 Message-ID: References: <87y6dydn6q.fsf@tux.homenetwork> <87iq509yji.fsf@lifelogs.com> <87mxucxt8w.fsf@tux.homenetwork> <87tyok8guu.fsf_-_@lifelogs.com> <87hbkkxow6.fsf@tux.homenetwork> <87pqz721fd.fsf@tux.homenetwork> <87hbkjhc8p.fsf@tux.homenetwork> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1277973430 5876 80.91.229.12 (1 Jul 2010 08:37:10 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 1 Jul 2010 08:37:10 +0000 (UTC) Cc: rubikitch@ruby-lang.org, emacs-devel@gnu.org To: Thierry Volpiatto Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jul 01 10:37:08 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OUFGe-0002rH-8c for ged-emacs-devel@m.gmane.org; Thu, 01 Jul 2010 10:37:08 +0200 Original-Received: from localhost ([127.0.0.1]:44405 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OUFGd-0005Lc-91 for ged-emacs-devel@m.gmane.org; Thu, 01 Jul 2010 04:37:07 -0400 Original-Received: from [199.232.76.173] (port=39771 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OUFG1-00056i-Bg for emacs-devel@gnu.org; Thu, 01 Jul 2010 04:36:29 -0400 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1OUFFz-0000AB-Nc for emacs-devel@gnu.org; Thu, 01 Jul 2010 04:36:29 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]:44730) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1OUFFz-0000A5-GI for emacs-devel@gnu.org; Thu, 01 Jul 2010 04:36:27 -0400 Original-Received: from dann by fencepost.gnu.org with local (Exim 4.69) (envelope-from ) id 1OUFFy-0003xE-R1; Thu, 01 Jul 2010 04:36:26 -0400 In-Reply-To: <87hbkjhc8p.fsf@tux.homenetwork> (Thierry Volpiatto's message of "Thu\, 01 Jul 2010 09\:50\:30 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:126600 Archived-At: Thierry Volpiatto writes: > Dan Nicolaescu writes: > >> Thierry Volpiatto writes: >> >>> Dan Nicolaescu writes: >>> >>>>> Actually installing anything is easy and work out of the box with only: >>>>> >>>>> (require 'anything-config) >>>>> (require 'anything-match-plugin) ; facultatif >>>> >>>> For packages included in emacs we try to avoid using require to >>>> activate the package. [I don't know anything about this particular >>>> package, so...] >>> >>> A lot of autoload cookies are missing in anything-config, however, >>> >>> (autoload 'anything-find-files "anything-config.el" "" t) >>> >>> is enough to enable anything. >> >> That's the same as using require. The preferred way is to do it with >> a function call, or a mode. >> >>>>> Anything is now self documented both in mode-line and with C-h m or your >>>>> usual help command, but yes a manual would be nice. >>>> >>>> Can you please add some brief description of what it actually does? >>>> >>>> ;;;; anything.el --- open anything / QuickSilver-like candidate-selection framework >>>> >>>> does not tell much... >>> >>> anything is a framework that allow to setup an interactive and >>> incremental display to select candidate and provide diverses actions on >>> it or many of them. >>> >>> Basically, you can see that as a big completing-read, but incremental >>> with nice display, and providing differents action on candidate selected >>> in collection. >> >> And how do you use it? > > On the user side, if you use anything-config.el, there is already build > in sources ready for use, so you can use provided functions like any > other emacs one (e.g M-x anything-xfonts). This is still hard to grasp... Can you provide concrete examples of typical problems and how anything.el solves them? > > For the developper who want to write his own anything source the best > actually is to look at the sources wrote in anything-config.el. > > Basically, you run anything like that: > > (anything 'source) > > source is an alist that you can write like that: > (Where name, candidates, action are anything attributes. > You have a lot of attributes, for full info, use: > M-x anything-describe-anything-attribute) > > (defvar mysource > '((name . "A simple example that open all file with extension .el") > (candidates . (lambda () > (loop for i in (directory-files default-directory) > when (string= (file-name-extension i) "el") > collect i))) > (action . (("Open file" . find-file) > ("Do something else" . (lambda (candidate) > ;; Write here something more > ;; useful than nil > nil)))))) > > ;; [EVAL] (anything 'mysource) > > After evaluating line above to see if your new source work as expected, > you can now define your new anything command: > > (defun my-new-anything-command () > (interactive) > (anything 'mysource)) > > >> BTW, this might be obvious to you, but for people that have not used >> the package is not. Adding a few lines of describing what it does and >> how to use it is very helpful. [Please note that this has no relation >> to getting this package included in emacs, this is just what a >> potential user would like]. >> > > -- > Thierry Volpiatto > Gpg key: http://pgp.mit.edu/