help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Anything.el for Windows


From: Sébastien Vauban
Subject: Re: Anything.el for Windows
Date: Tue, 12 Feb 2008 17:08:33 +0100
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.60 (gnu/linux)

Hi Tassilo,

>>> Strange. Could you please eval the following expression and
>>> report back what happens?
>>>
>>> (let ((buf "*locate*"))
>>>   (apply 'start-process "locate-process" buf
>>>          (append anything-c-locate-options
>>>                  (list "pattern")))
>>>   (pop-to-buffer buf)) ;; <-- Press `C-x C-e' behind the last closing
>>>                        ;;     parenthesis.
>>
>> Yes, it does create a new buffer, in which the following is
>> to be found:
>
> [...]
>
> Really strange. The code above is a copy of the command
> anything-c-source-locate uses to get the candidates list. Did
> you redefine it or use an home-brewn locate source in
> anything-sources?

Nope. See the relevant extract from my `.emacs' file:

--8<---------------cut here---------------start------------->8---
;; open anything
(GNUEmacs
    (when (require 'anything-config)  ; loads `anything.el' too

        ;; source of candidates for anything
        (setq anything-sources
              (list anything-c-source-locate
                    anything-c-source-tracker-search
                    anything-c-source-bookmarks          ;; 1
                    anything-c-source-file-name-history  ;; 2
                    anything-c-source-buffers            ;; 3
                    anything-c-source-man-pages          ;; 4
                    anything-c-source-info-pages         ;; 5
                    ))

        ;; do not show more candidates than this limit from inidividual sources
        (setq anything-candidate-number-limit 10)

        ;; make anything minibuffer better input latency
        (defadvice anything-check-minibuffer-input (around sit-for activate)
          (if (sit-for anything-idle-delay t)
              ad-do-it))

        ;; select anything
        (global-set-key [(f3)] 'anything)))
--8<---------------cut here---------------end--------------->8---


> Anyway, please paste your anything-sources, so that I can
> check if I can reproduce the bug here.

Yes, sure. Here it is (`C-h v' in GNU Emacs/Windows):

--8<---------------cut here---------------start------------->8---
anything-sources is a variable defined in `anything.el'.
Its value is shown below.

Documentation:
The source of candidates for anything.

[...]

Value: 
(((name . "Locate")
  (candidates lambda nil
              (apply 'start-process "locate-process" nil
                     (append anything-c-locate-options
                             (list anything-pattern))))
  (type . file)
  (requires-pattern . 3)
  (delayed))
 ((name . "Tracker Search")
  (candidates lambda nil
              (start-process "tracker-search-process" nil "tracker-search" 
anything-pattern))
  (type . file)
  (requires-pattern . 3)
  (delayed))
 ((name . "Bookmarks")
  (init lambda nil
        (require 'bookmark))
  (candidates . bookmark-all-names)
  (action
   ("Jump to Bookmark" . bookmark-jump)))
 ((name . "File Name History")
  (candidates . file-name-history)
  (match anything-c-match-on-file-name anything-c-match-on-directory-name)
  (type . file))
 ((name . "Buffers")
  (candidates . anything-c-buffer-list)
  (volatile)
  (type . buffer))
 ((name . "Manual Pages")
  (candidates lambda nil
              (if anything-c-man-pages anything-c-man-pages
                (setq anything-c-man-pages
                      (condition-case nil
                          (progn
                            (require 'woman)
                            (woman-file-name "")
                            (sort
                             (mapcar 'car woman-topic-all-completions)
                             'string-lessp))
                        (error nil)))))
  (action
   ("Show with Woman" . woman))
  (requires-pattern . 2))
 ((name . "Info Pages")
  (candidates lambda nil
              (if anything-c-info-pages anything-c-info-pages
                (setq anything-c-info-pages
                      (save-window-excursion
                        (save-excursion
                          (require 'info)
                          (Info-find-node "dir" "top")
                          (goto-char
                           (point-min))
                          (let
                              ((info-topic-regexp "\\* +\\([^:]+: 
([^)]+)[^.]*\\)\\.")
                               topics)
                            (while
                                (re-search-forward info-topic-regexp nil t)
                              (add-to-list 'topics
                                           (match-string-no-properties 1)))
                            (goto-char
                             (point-min))
                            (Info-exit)
                            topics))))))
  (action
   ("Show with Info" lambda
    (node-str)
    (info
     (replace-regexp-in-string "^[^:]+: " "" node-str))))
  (requires-pattern . 2)))
--8<---------------cut here---------------end--------------->8---

Thanks again for your help!!!

Best regards,
  Seb

-- 
Sébastien Vauban


reply via email to

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