[Top][All Lists]

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

RE: elisp: Text-based file-chooser

From: Drew Adams
Subject: RE: elisp: Text-based file-chooser
Date: Wed, 5 Jan 2011 15:15:11 -0800

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

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.

reply via email to

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