[Top][All Lists]

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

RE: Entering filenames with spaces

From: Drew Adams
Subject: RE: Entering filenames with spaces
Date: Fri, 12 Aug 2005 10:50:16 -0700

    > 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 (?):

    Either way, I want to stress that the default binding of the space
    bar should be too insert a space. Think of a new user, or of a user
    like me who doesn't use a lot of spaces in file names. Don't pressure
    someone into googling for a solution for something as simple as that.
    It's not smart from a UI perspective to assign a highly application-
    specific function to a commonly used key with a fixed meaning, just
    because it's slightly more convenient to a small fraction of users
    instead of hitting Tab.

    Remove the binding and allow specialist users who know what they are
    doing to add the binding with a simple define-key.
    For non-filename minibuffers where spaces aren't inserted, I don't care.

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?

If so, then perhaps you could use, instead, the new command that we
discussed recently for creating a new file (I don't know its name, or even
if it was finally implemented). We discussed it in the context of the File
menu-bar menu, but it would presumably also be made available for use with

IMO, `find-file*' should use completion, and the spacebar should, by
default, be bound to `minibuffer-word-complete'. 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

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. Another
possibility (similar to #3) is to remove word completion altogether for file
creation (only) via `create-file', leaving only TAB (`minibuffer-complete').

You also argue that SPC for space insertion is natural and expected by
people, so it should be the default - non-novices can always rebind it.

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. If we did not do this, Emacs would abandon all its C-,
M- etc. crazy key bindings that make novices roll their eyes at first sight.
The Emacs UI might seem odd, depending on what one is used to, but that
doesn't, by itself, mean that it is inferior.

The question then is whether or not SPC for completion is one of the "good"
UI features. I think it is, but you disagree. If (take a poll?) we do think
it is a good thing, then it should continue to be the default, but we can
always make it clearer to people how to change the behavior if they don't
like it.

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.

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.

reply via email to

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