On 12 Aug 2005, at 18:50, Drew Adams wrote:
The point is that users are free to get rid of the SPC bindings to
minibuffer-complete-word. I think that David was saying that he
never uses word completion - in that case, just removing the
bindings suffices. Those who do use it have several options,
including the alternatives of binding it to something else (to use
SPC for inserting a space) and binding something
else to a command to insert a space. You could even do it one way for
file-name completion and the other way 'round for other completion...
I think that would make a lot of sense.
Yes, but you then seem to argue against it (?):
You get me wrong: what makes a lot of sense is to do it "one way for
file-name completion and the other 'round for other completion".
Question: If you don't use word-completion anyway (you use only
TAB, not
SPC, for completion, I believe), then why is the current situation
a problem
for you? TAB will complete file names that contain spaces. Or are you
referring only to creating a _new_ file that has spaces in its name?
Well, find-file starts a new file and you give it a name. Also, when
you save the buffer, and it doesn't have a name yet (possible if
buffer created in another way, with "new" in my own implementation),
or when you "save" the buffer "as", you enter a file name.
Even when you want to enter a file name to load without using
completion, you get inconsistent behavior: SPC behaves differently
from 'a'. And it shouldn't.
IMO, `find-file*' should use completion, and the spacebar should, by
default, be bound to `minibuffer-word-complete'.
I respectfully agree for the UI reasons I mentioned before. Why not
map 'x' to the completion function? After all, only a few file names
have an 'x' in them!
The new `create-file'
command (or whatever it's called) could also use completion (to
help with
creating files with similar names), but without binding SPC to
minibuffer-complete-word.
I just think that SPC is too convenient for completion to give it
up (by
default) to space insertion. Our options include, in addition to
what I
outlined earlier (and in order of increasing restrictiveness):
1. Remove SPC for word completion altogether.
2. Do so only for word completion of file names.
3. Do so only for word completion of file names for new file creation.
I think you're arguing for #1 or (as a concession to others) #2.
I'm arguing for #2.
Another
possibility (similar to #3) is to remove word completion altogether
for file
creation (only) via `create-file', leaving only TAB (`minibuffer-
complete').
So is find-file going to open only existing files from now on?
There is lots that is unexpected or new in Emacs, and much of it is
desirable because it optimizes ease of use - IOW, some Emacs UI
features are
new to people, but they are good. It is better to help new users to
learn
the Emacs way of doing things, _if it is better_, than to cater to
their
inferior UI habits.
Sorry, but are you saying that entering a space with the space bar is
an inferior UI habit?
Are you saying that consistency is an inferior UI habit too?
The Emacs UI might seem odd, depending on what one is used to, but
that
doesn't, by itself, mean that it is inferior.
I think that's too big a discussion to start. The Space bar is
something so basic, you shouldn't redefine it, at least not by default.
This is a general problem that occurs: If the Emacs way is
unexpected, but
superior, we need to 1) teach it to users and encourage them to
adopt it,
but also 2) tell them how to obtain the inferior UI behavior that
they may
be used to.
Again, using Space to enter space characters can hardly be thought of
as inferior. Similarly, using shorter key commands (one modifier, one
key) to do stuff that I need often (like C-x C-f find-file, or save-
buffer), and longer ones to do stuff that's less frequent (e.g. M-u
upcase-word) is not inferior, but a smart move. Note that I'm not
arguing to change these things now - we're creatures of habit, after
all.
If we keep the default completion behavior, then we should
definitely let
users know how to insert a space (C-q SPC or, perhaps, C-SPC). This
information should be up front, in the Info discussion of
completion. It
could also be added to the *Completions* buffer header whenever SPC is
typed - that way, a newbie who types SPC trying to insert it in a
file name
will soon learn how to insert a space.
Jesus - more stuff to read for users. Great.
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel