unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Thierry Volpiatto <thierry.volpiatto@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: elisp: Text-based file-chooser
Date: Thu, 06 Jan 2011 09:37:08 +0100	[thread overview]
Message-ID: <87wrmi5sy3.fsf@gmail.com> (raw)
In-Reply-To: 877heieaoq.fsf@gmail.com

Thierry Volpiatto <thierry.volpiatto@gmail.com> writes:

> 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.

Ok fixed, you can check it out on anything git repo.

>> 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 




  reply	other threads:[~2011-01-06  8:37 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-02 21:34 elisp: Text-based file-chooser Larry Kohlman
2011-01-02 22:17 ` Tim X
2011-01-02 22:19   ` Richard Riley
2011-01-02 23:22     ` Tim X
2011-01-02 23:23       ` Richard Riley
2011-01-03 18:52         ` suvayu ali
2011-01-03 19:01           ` Richard Riley
2011-01-03 20:24             ` suvayu ali
     [not found]         ` <mailman.10.1294080791.3992.help-gnu-emacs@gnu.org>
2011-01-03 22:41           ` Tim X
2011-01-03  2:44 ` rusi
2011-01-03  9:13   ` Thierry Volpiatto
     [not found]   ` <mailman.0.1294046010.4869.help-gnu-emacs@gnu.org>
2011-01-03 19:01     ` Larry Kohlman
2011-01-03 21:49       ` Drew Adams
2011-01-03 21:54       ` Thierry Volpiatto
     [not found]       ` <mailman.8.1294091516.614.help-gnu-emacs@gnu.org>
2011-01-05 18:23         ` Larry Kohlman
2011-01-05 18:58           ` Thierry Volpiatto
2011-01-05 19:06           ` Drew Adams
     [not found]           ` <mailman.12.1294254429.15599.help-gnu-emacs@gnu.org>
2011-01-05 22:16             ` Larry Kohlman
2011-01-05 23:11               ` suvayu ali
2011-01-05 23:15               ` Drew Adams
     [not found]           ` <mailman.11.1294253952.15599.help-gnu-emacs@gnu.org>
2011-01-05 23:46             ` Larry Kohlman
2011-01-06  7:46               ` Thierry Volpiatto
2011-01-06  8:37                 ` Thierry Volpiatto [this message]
2011-01-06  0:15           ` DevZero
2011-01-03 16:57 ` José A. Romero L.

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wrmi5sy3.fsf@gmail.com \
    --to=thierry.volpiatto@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).