emacs-devel
[Top][All Lists]
Advanced

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

RE: filename input wildcard `?'


From: Drew Adams
Subject: RE: filename input wildcard `?'
Date: Thu, 27 Oct 2005 08:39:37 -0700

        If these are the only ways to input a `?' as a file-name
        wildcard, shouldn't this be mentioned in the Emacs manual?
        As it stands, it gives (me) the impression that you can
        just type `foo?.el', which you cannot (AFAICT).

    Thanks.

Thank you.


I don't really want to open a can of worms, so ignore this if you think it's
a bad idea or controversial: I wonder if we might consider allowing `?' to
be bound, in the minibuffer, to `self-insert-command' instead of
`minibuffer-completion-help', and use `C-h' for
`minibuffer-completion-help'?

That is:

(define-key minibuffer-local-completion-map
            "?" 'self-insert-command)
(define-key minibuffer-local-completion-map
            [remap help-command] 'minibuffer-completion-help)

Advantages:

1) `?' would be available, without `C-q' quoting, not only as a file-name
wildcard, but also as a normal, self-insertable character, for inclusion in
command names, buffer names, menu items, data-entry values, ... , _any_
input for `completing-read'.

Function `completing-read' is general, and it can be used by programmers for
many different applications - why should it treat `?' specially when typed
as input? If a programmer using `completing-read' wants to let users type
`?' as input (without quoting), he must currently jump through a few hoops
to make that happen.

2) `C-h' is a control character, not a printable character. It rarely needs
to be included in an input string. Anyone wanting to include it will likely
know about using `C-q' (which is not true for people typing `?').

3) `C-h' (or <f1>) is more likely to be people's first guess at finding
completion help. Except for those already in the habit, people are unlikely
to expect `?' to do what it does now.

4) Less potential confusion. Currently, if people do `C-h' during minibuffer
completion (perhaps by accident):

 a. They are prompted for another help-command character. ("Huh, whatzis?")

 b. The help command is processed. ("Whereami now?")

 c. They end up back in minibuffer completion. They need to look for, and
notice, the minibuffer prompt, to recognize this (probably unexpected)
state. It's easy to mistakenly think you're back at top level. ("Ah, finally
back home, safe. address@hidden whatzis?")

This current behavior can be disorienting to the uninitiated - and some of
the `help-for-help' options can disorient more than others, taking users far
afield of minibuffer input and completion (imagine reading the News, then
coming back to minibuffer completion!).

Better to have `C-h' do only one, simple thing, and that one help action to
be specific to input completion. People can always exit the minibuffer first
(`C-g'), if they really want `help-for-help' or one of the other global help
commands.

Disadvantages: ?







reply via email to

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