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 12:02:59 -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> <87r5jn8txt.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 1278001939 16352 80.91.229.12 (1 Jul 2010 16:32:19 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 1 Jul 2010 16:32:19 +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 18:32:15 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 1OUMgM-0000IQ-Qj for ged-emacs-devel@m.gmane.org; Thu, 01 Jul 2010 18:32:11 +0200 Original-Received: from localhost ([127.0.0.1]:58836 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OUMMq-0006xc-4X for ged-emacs-devel@m.gmane.org; Thu, 01 Jul 2010 12:12:00 -0400 Original-Received: from [199.232.76.173] (port=46346 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OUMEA-0000VL-CD for emacs-devel@gnu.org; Thu, 01 Jul 2010 12:03:02 -0400 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1OUME8-0000IA-ID for emacs-devel@gnu.org; Thu, 01 Jul 2010 12:03:01 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]:51849) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1OUME8-0000I4-60 for emacs-devel@gnu.org; Thu, 01 Jul 2010 12:03:00 -0400 Original-Received: from dann by fencepost.gnu.org with local (Exim 4.69) (envelope-from ) id 1OUME7-0006NU-7t; Thu, 01 Jul 2010 12:02:59 -0400 In-Reply-To: <87r5jn8txt.fsf@tux.homenetwork> (Thierry Volpiatto's message of "Thu\, 01 Jul 2010 10\:53\:02 +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:126634 Archived-At: Thierry Volpiatto writes: > 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 Does this happen automatically when you do x-choose-font? As a user do I need to know a lot of anything-* function names, or this happens automatically when I use completion? > 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? No, I am looking at this from the point of view of a user, not a programmer. You might want to step back, and think about how to present this to someone that has not idea what anything.el is, and what it can do. (I still don't know after a few emails...) > >> >> >> >>> >>> 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/