From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thierry Volpiatto Newsgroups: gmane.emacs.help Subject: Re: elisp: Text-based file-chooser Date: Wed, 05 Jan 2011 19:58:51 +0100 Message-ID: <87zkrfkwic.fsf@gmail.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1294253979 17372 80.91.229.12 (5 Jan 2011 18:59:39 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 5 Jan 2011 18:59:39 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jan 05 19:59:33 2011 Return-path: Envelope-to: geh-help-gnu-emacs@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 1PaYa4-00045x-NF for geh-help-gnu-emacs@m.gmane.org; Wed, 05 Jan 2011 19:59:32 +0100 Original-Received: from localhost ([127.0.0.1]:41498 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PaYa4-0004Ml-43 for geh-help-gnu-emacs@m.gmane.org; Wed, 05 Jan 2011 13:59:32 -0500 Original-Received: from [140.186.70.92] (port=38167 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PaYZi-0004MW-JO for help-gnu-emacs@gnu.org; Wed, 05 Jan 2011 13:59:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PaYZg-0007QD-2s for help-gnu-emacs@gnu.org; Wed, 05 Jan 2011 13:59:10 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:53489) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PaYZf-0007Q6-Qz for help-gnu-emacs@gnu.org; Wed, 05 Jan 2011 13:59:08 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PaYZd-0003o3-4m for help-gnu-emacs@gnu.org; Wed, 05 Jan 2011 19:59:05 +0100 Original-Received: from 117.211.85-79.rev.gaoland.net ([79.85.211.117]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 05 Jan 2011 19:59:05 +0100 Original-Received: from thierry.volpiatto by 117.211.85-79.rev.gaoland.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 05 Jan 2011 19:59:05 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 28 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 117.211.85-79.rev.gaoland.net User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.2.91 (gnu/linux) Cancel-Lock: sha1:hucZW4TGsSwEJ2j6IL2HFzurSG0= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:78220 Archived-At: Larry Kohlman writes: > I want a file-browsing dialog box, but I want it to be text-mode so it > can be used on a raw terminal or inside an xterm. Something roughly like > dired but that lets the user browse files and directories and only > returns the path with a selected or entered filename and does absolutely > nothing else. I know it's out there because I've seen it before, but I > just can't find the magic command or plugin. See in anything-config.el `anything-c-read-file-name'. http://repo.or.cz/w/anything-config.git You use it like that: (defun my-file-browser () (let ((fname (anything-c-read-file-name "AnyPrompt: "))) (do-what-you-want-on-fname fname))) It have full support for tramp. It work on windows and in tty. For more questions about anything ask on https://groups.google.com/group/emacs-anything?hl=en -- A+ Thierry Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997