emacs-devel
[Top][All Lists]
Advanced

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

C-x C-f, Tab (in)completion and visiting the wrong, new files


From: David Reitter
Subject: C-x C-f, Tab (in)completion and visiting the wrong, new files
Date: Sun, 12 Aug 2007 07:17:09 +0100

Does this happen to you, too?

I've got several files in my directory:

foo.tex
foo.aux
foo.pdf
foo.1.tex
bar.txt


To open one, I do

C-x C-f
ba <TAB>
<RET>

and because I'm used to it, I do:

C-x C-f
fo <TAB>
<RET>

What happens then is that only "foo." is in the minibuffer, and a buffer visiting the non-existant file of that name is visited. Usually that means that I have to kill it and start again, navigating to the appropriate file. That is highly annoying.

Of course I could all blame it on myself and bind C-x C-f to `find- file-existing'. But if the same happens to others as well, perhaps a more general change could make Emacs more convenient in this respect.

One option would be the following:

Whenever Tab is used to (partially) complete a file name (or even any other symbol), we assume that the user wants to input the name of an existing file (or element of the completion list). If the file name or symbol is incomplete due to an ambiguity, an immediately following RET just does `ding'. Otherwise, i.e. a further RET or some editing action in the buffer, just exists the minibuffer as before.

I think it is safe to assume the TAB means that a string existing in the completion table is to be entered, at least in the case of file name completion.







reply via email to

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