From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thierry Volpiatto Newsgroups: gmane.emacs.devel Subject: Re: more on anything.el inclusion Date: Thu, 01 Jul 2010 10:53:02 +0200 Organization: ThierryVolpiatto Message-ID: <87r5jn8txt.fsf@tux.homenetwork> 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 1277974585 9661 80.91.229.12 (1 Jul 2010 08:56:25 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 1 Jul 2010 08:56:25 +0000 (UTC) Cc: rubikitch@ruby-lang.org, emacs-devel@gnu.org To: Dan Nicolaescu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jul 01 10:56:22 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 1OUFZE-0006Gg-O1 for ged-emacs-devel@m.gmane.org; Thu, 01 Jul 2010 10:56:21 +0200 Original-Received: from localhost ([127.0.0.1]:59341 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OUFZE-0005TF-6P for ged-emacs-devel@m.gmane.org; Thu, 01 Jul 2010 04:56:20 -0400 Original-Received: from [140.186.70.92] (port=43996 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OUFZ4-0005S5-36 for emacs-devel@gnu.org; Thu, 01 Jul 2010 04:56:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OUFZ2-0002Ug-LK for emacs-devel@gnu.org; Thu, 01 Jul 2010 04:56:09 -0400 Original-Received: from mail-ww0-f49.google.com ([74.125.82.49]:47763) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OUFZ2-0002UY-BP; Thu, 01 Jul 2010 04:56:08 -0400 Original-Received: by wwi14 with SMTP id 14so1397522wwi.30 for ; Thu, 01 Jul 2010 01:56:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject :organization:references:date:in-reply-to:message-id:user-agent :mime-version:content-type; bh=KTx++fMUnQrQNm6x5agDWdtHW+FneJW7bt+3O2SXaI0=; b=WALrqBQ4Jkux7H/mNiMMofxtW79NX9BxojQ6xkex3wX9K9sn+dbqIdtvOSimgNkKzH MGpFSOMODc2uGqfeOTJdB4EBpS/dlUr/nBT8bEBrJl4BNxRIf+x+DxadvN5lM+xbJjFM YY0bCDNWfgWC6ZadMe8g1G/1qAYvKaakk3y6g= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:organization:references:date:in-reply-to :message-id:user-agent:mime-version:content-type; b=VE1H03bemPMAN6gawnpjBbEFjkmq7xcGD/we3s3PJvi4Fqhytfmv/O9RnpiFELDR+T 4+VsgIBsZ7MB1CT7TKpMoh5rKno9Z5tMKw9AXVUGMdL8O2ZPSaQNnuSz8E+3/cBgyJ29 RQZghSavoQiK4v8vNVFoNIqmagGfojks85m4Y= Original-Received: by 10.213.24.24 with SMTP id t24mr4966601ebb.83.1277974566867; Thu, 01 Jul 2010 01:56:06 -0700 (PDT) Original-Received: from tux.homenetwork (207.211.85-79.rev.gaoland.net [79.85.211.207]) by mx.google.com with ESMTPS id v59sm5769648eeh.0.2010.07.01.01.56.05 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 01 Jul 2010 01:56:06 -0700 (PDT) In-Reply-To: (Dan Nicolaescu's message of "Thu, 01 Jul 2010 04:36:26 -0400") User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) 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:126602 Archived-At: Dan Nicolaescu writes: > 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? Say you want to see how look dejavu fonts in emacs: M-x anything-xfonts RET enter in prompt: deja Move anything overlay with C-n/p or down/up Hit C-z Hit TAB to see provided actions Hit C-g to exit doing nothing Hit RET to exit doing the default action. Did you read example i provide under here? > > > >> >> 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/ > -- Thierry Volpiatto Gpg key: http://pgp.mit.edu/