[Top][All Lists]

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

RE: completion-auto-help

From: Drew Adams
Subject: RE: completion-auto-help
Date: Fri, 11 Nov 2005 14:43:38 -0800

            > gets called inside `completing-read', upon insertion, but I
            > see no way to get `completing-read' to display *Completions*
            > without any user action.

            IIRC you can do it from minibuffer-setup-hook.

        I've tried that. This is not about minibuffer setup, and
        it's not about
        completion-list setup (for which there is also a hook).
        This is about _completion_ setup.

        I believe that what's needed is a hook that kicks in as soon as
        completing-read (and read-file-name...) displays its prompt
        (just before or after). That hook doesn't exist.

    My bad. I did try `minibuffer-setup-hook' previously with no luck, but I
    must not have done things correctly. I just retried, and it
    does what I want
    in this regard.

     (add-hook 'minibuffer-setup-hook 'show-it)

     (defun show-it ()
        "Show *Completions* on empty input."
        (with-output-to-temp-buffer "*Completions*"
          (display-completion-list (all-completions "" my-completions)))

Guess I'll have to flip-flop again. minibuffer-setup-hook is used for all
entrance to the minibuffer, not just for completion functions.

I'm looking for a hook specific to completion. I think we still need a hook
that runs whenever a completion function (e.g. completing-read) displays its

reply via email to

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