[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, 23 Jul 2007 10:10:17 +0200 |
User-agent: |
Gnus/5.110007 (No Gnus v0.7) Emacs/22.1.50 (gnu/linux) |
Benjamin Andresen <address@hidden> writes:
Hi Benjamin,
> I'm just going to post my (small) patches to anything (config mainly)
>
> I'm more interested in your feedback than in the inclusion, because
> the gnus one needs a small hack to work when gnus isn't running. And
> it's obviously tinkered to my liking. (Opera ;-))
>
> The hack for gnus:
> (setq gnus-topic-alist nil), otherwise anything will complain that the
> variable is void.
>
> ,----[ diff -u anything-config.el.1 anything-config.el ]
> | --- anything-config.el.1 2007-07-22 13:26:10.000000000 +0200
> | +++ anything-config.el 2007-07-22 22:27:23.000000000 +0200
> | @@ -58,14 +58,16 @@
> |
> | (defvar anything-source-file-name-history
> | '((name . "File Name History")
> | - (candidates . file-name-history)
> | + (candidates . (lambda ()
> | + (ba-remove-duplicates-resolve-home file-name-history)))
> | (type . file)))
You can suppress duplicates in thi file-name-history with
,----[ C-h v history-delete-duplicates RET ]
| history-delete-duplicates is a variable defined in `C source code'.
| Its value is t
|
|
| Documentation:
| *Non-nil means to delete duplicates in history.
| If set to t when adding a new history element, all previous identical
| elements are deleted from the history list.
|
| You can customize this variable.
`----
> | ;;;; Recentf files
> |
> | (defvar anything-source-recentf
> | '((name . "Recentf")
> | - (candidates . recentf-list)
> | + (candidates . (lambda ()
> | + (ba-remove-duplicates-resolve-home recentf-list)))
> | (type . file)))
For recent files, that's a good idea. I'll include it with
`remove-duplicates' instead of `ba-remove-duplicates-resolve-home'.
> | ;;;; Files in current dir
> | @@ -126,7 +128,8 @@
> | "locate" "-i" "-r"
> | anything-pattern)))
> | (type . file)
> | - (requires-pattern . 3))
> | + (requires-pattern . 3)
> | + (delayed))
> | "Source for retrieving files matching the current input pattern
> | with locate.")
That's a matter of taste, I guess.
> | @@ -212,6 +215,91 @@
> |
> (anything-external-commands-list-1))
> | file))))))
> |
> | +;;; Benny own thingies.
> | +
> | +(defvar anything-source-gnus
> | + '((name . "Gnus")
> | + (candidates . (lambda ()
> | + (remove-duplicates
> | + (apply 'append
> | + (mapcar 'cdr
> | + gnus-topic-alist))
> | + :test #'equal)))
> | + (action . (lambda (x)
> | + (gnus-group-read-group nil nil x)))))
That won't work if you don't use gnus-topic-mode, I guess.
Bye,
Tassilo
--
[Emacs] is written in Lisp, which is the only computer language that is
beautiful. -- Neal Stephenson, _In the Beginning was the Command Line_
- Re: ;;; anything.el --- open anything, (continued)
- Re: ;;; anything.el --- open anything, Vagn Johansen, 2007/07/22
- Re: ;;; anything.el --- open anything, Tassilo Horn, 2007/07/22
- Message not available
- Re: ;;; anything.el --- open anything, Vagn Johansen, 2007/07/22
- Re: ;;; anything.el --- open anything, Tassilo Horn, 2007/07/23
- Re: ;;; anything.el --- open anything, Tassilo Horn, 2007/07/23
- Message not available
- Re: ;;; anything.el --- open anything, Benjamin Andresen, 2007/07/23
- Re: ;;; anything.el --- open anything,
Tassilo Horn <=
- Re: ;;; anything.el --- open anything, Tassilo Horn, 2007/07/23
- Re: ;;; anything.el --- open anything, address@hidden, 2007/07/23
- Re: ;;; anything.el --- open anything, address@hidden, 2007/07/23
- Re: ;;; anything.el --- open anything, Tassilo Horn, 2007/07/23
- Message not available
- Re: ;;; anything.el --- open anything, address@hidden, 2007/07/23
- Re: ;;; anything.el --- open anything, Tassilo Horn, 2007/07/23
- Message not available
- Re: ;;; anything.el --- open anything, billclem, 2007/07/24
- Re: ;;; anything.el --- open anything, Tassilo Horn, 2007/07/24
- Message not available
- Re: ;;; anything.el --- open anything, address@hidden, 2007/07/24
- Re: ;;; anything.el --- open anything, Holger Schauer, 2007/07/25