[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: elisp: Text-based file-chooser
From: |
Thierry Volpiatto |
Subject: |
Re: elisp: Text-based file-chooser |
Date: |
Thu, 06 Jan 2011 08:46:45 +0100 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/23.2.91 (gnu/linux) |
Hi Larry,
Larry Kohlman <nospam@nospam.invalid> writes:
> Thanks. Just to see how that functions I changed the code to:
>
> (defun my-file-browser ()
> (let ((fname (anything-c-read-file-name "AnyPrompt: ")))
> (message "FILENAME: %s" name)))
>
> Calling that yields the following error message:
>
> anything-compute-matches: error when processing source:
> Read file name (`C-.':Go to precedent level)
Indeed, thanks to report.
The problem is tramp that is not loaded.
If you do as following, things should work as expected:
emacs -Q
In scratch buffer, eval:
(add-to-list 'load-path "path/to/your/anything/files")
(require 'anything-config)
(require 'tramp)
(defun my-file-browser ()
(let ((fname (anything-c-read-file-name "AnyPrompt: ")))
(message "FILENAME: %s" name)))
(my-file-browser)
> Next I used the Anything menu (Anything->Find Files) to see if Anything
> would work when run normally. It did. On a hunch I tried the above code
> again and it also worked. Then I checked and found that Anything->Find
> Files doesn't even invoke anything-c-read-file-name. After that I exited
> Emacs and was able to repeat everything several times in a row.
Yes, because anything-find-files load tramp, but
anything-c-read-file-name doesn't.
I will fix it as soon as possible.
> Ah, well, mysterious things happen when you use functions that weren't
> intended for external use. I'll just mess around with this until it
> works.
What mysterious things?
Can you give examples?
--
A+ Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997
- Re: elisp: Text-based file-chooser, (continued)
- Message not available
- Re: elisp: Text-based file-chooser, Larry Kohlman, 2011/01/03
- RE: elisp: Text-based file-chooser, Drew Adams, 2011/01/03
- Re: elisp: Text-based file-chooser, Thierry Volpiatto, 2011/01/03
- Message not available
- Re: elisp: Text-based file-chooser, Larry Kohlman, 2011/01/05
- Re: elisp: Text-based file-chooser, Thierry Volpiatto, 2011/01/05
- RE: elisp: Text-based file-chooser, Drew Adams, 2011/01/05
- Message not available
- Re: elisp: Text-based file-chooser, Larry Kohlman, 2011/01/05
- Re: elisp: Text-based file-chooser, suvayu ali, 2011/01/05
- RE: elisp: Text-based file-chooser, Drew Adams, 2011/01/05
- Message not available
- Re: elisp: Text-based file-chooser, Larry Kohlman, 2011/01/05
- Re: elisp: Text-based file-chooser,
Thierry Volpiatto <=
- Re: elisp: Text-based file-chooser, Thierry Volpiatto, 2011/01/06
- Re: elisp: Text-based file-chooser, DevZero, 2011/01/05
Re: elisp: Text-based file-chooser, José A . Romero L ., 2011/01/03