From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.help Subject: RE: elisp: Text-based file-chooser Date: Wed, 5 Jan 2011 15:15:11 -0800 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1294269707 1504 80.91.229.12 (5 Jan 2011 23:21:47 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 5 Jan 2011 23:21:47 +0000 (UTC) To: "'Larry Kohlman'" , Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jan 06 00:21:42 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 1Pacfm-0006hU-38 for geh-help-gnu-emacs@m.gmane.org; Thu, 06 Jan 2011 00:21:42 +0100 Original-Received: from localhost ([127.0.0.1]:34122 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PacaZ-0004uh-Mu for geh-help-gnu-emacs@m.gmane.org; Wed, 05 Jan 2011 18:16:19 -0500 Original-Received: from [140.186.70.92] (port=56534 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Paca0-0004tT-Kq for help-gnu-emacs@gnu.org; Wed, 05 Jan 2011 18:15:45 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PacZy-0003Sk-Qr for help-gnu-emacs@gnu.org; Wed, 05 Jan 2011 18:15:44 -0500 Original-Received: from rcsinet10.oracle.com ([148.87.113.121]:58012) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PacZy-0003Rh-LD for help-gnu-emacs@gnu.org; Wed, 05 Jan 2011 18:15:42 -0500 Original-Received: from rcsinet13.oracle.com (rcsinet13.oracle.com [148.87.113.125]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id p05NFcxW007305 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 5 Jan 2011 23:15:39 GMT Original-Received: from acsmt353.oracle.com (acsmt353.oracle.com [141.146.40.153]) by rcsinet13.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id p05LlCVp002283; Wed, 5 Jan 2011 23:15:37 GMT Original-Received: from abhmt007.oracle.com by acsmt354.oracle.com with ESMTP id 933597271294269308; Wed, 05 Jan 2011 15:15:08 -0800 Original-Received: from dradamslap1 (/130.35.178.194) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 05 Jan 2011 15:15:08 -0800 X-Mailer: Microsoft Office Outlook 11 Thread-Index: AcutKYgrjtcByHPRRpyZ7SgX3egqPAAAVLgg In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5994 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:78239 Archived-At: > >> All I get when I do that is a one-line prompt for a > >> filename. It gives me completion > > > > Which should show you a list of files that match your > > input. With empty input, TAB TAB should show you all > > files and subdirs in the directory. > > Thanks, I didn't know that was there. It's rather clumsy if you don't > have a mouse available but it's sufficient if nothing better comes > along. You do not need a mouse, and having a mouse does not make it any more or less clumsy. Just type and complete to the file name you want. This is nothing new or secret. It is standard input completion, available in Emacs since Day One. File-name completion is similar to command-name completion, variable-name completion, and all the rest. > "Browsing", to me, means one can see a list of files and > directories and navigate through the list to select what > they want. That's just what `read-file-name' completion shows you, in buffer *Completions*. It shows you the files and subdirs in the current directory. And you can edit the current directory in the minibuffer, so you can see the files and subdirs of any directory on your file system. > Seeing just one name at a time isn't what I'd consider > browsing. What one name at a time? You see a whole directory at a time. And your input filters the directory (unlike in Dired). > Imagine "browsing" a web page by seeing only one line each > time you press a key. Wrong analogy, I think. That's not browsing the web or a web site. It's just scanning a page. Imagine browsing a web _site_ by typing in different URLs. At least `read-file-name shows you all of the child "pages" in a directory, i.e., a whole site or sub-site at once. > >> The manual is vague on whether read-file-name even has a > >> text dialog. > > > > I don't know what a text dialog is, so I wouldn't know if > > the manual is vague about it. If you think it is, consider > > `M-x report-emacs-bug' to get it cleared up. > > Might have been clearer if I'd said "a text-mode dialog". Not to me - same diff. But there's nothing wrong with finding that the manual is vague. You should seriously consider reporting that as a bug, so it can be improved. All I can guess wrt your text(-mode) dialog is that you want something like what a graphic file-selection box shows, but without the graphics. That's pretty similar to what both `read-file-name' and `dired' show (IMO). And people here have already mentioned Icicles and Anything, which also provide text-based listings that you can browse/navigate using completion - and which are updated as you type. They also let you cycle through the candidates that match your input, which I would suppose (just a guess) more nearly matches your idea of keyboard-based browsing. But you apparently want something altogether different, which I guess you saw in Emacs at some point. As I said, I hope someone else can help you.