[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Sequential instead of recursive minibuffers?
From: |
David Reitter |
Subject: |
Sequential instead of recursive minibuffers? |
Date: |
Thu, 15 Dec 2005 19:02:28 +0000 |
Is it possible to automatically signal a `quit' to the current
minibuffer prompt function when another minibuffer is set up?
We've had a discussion back in summer:
http://lists.gnu.org/archive/html/help-gnu-emacs/2005-07/msg00021.html
To explain this a little further: I can currently choose between
normal (simple) minibuffers and recursive minibuffers.
The difference is in the behavior if a user presses a key sequence
bound to an interactive command, sees the prompt and decides that it
was the wrong command. Now (without a C-g in between) he remembers
the correct command and enters that one.
The first option will always signal an error ("Command attempted to
use minibuffer while in minibuffer"), which is somewhat confusing and
certainly annoying to me. A couple of months ago, when I didn't know
anything about this minibuffer business, I was confused big time!
The "recursive minibuffer" setting will do just what it says - which
means that the old prompt will reappear as soon as the new command is
finished. This is equally confusing, in particular to new users. I
often get caught in situations where several minibuffers stack up and
I have to C-g several times to get out of the situation.
In the previously mentioned discussion, some UI-based workarounds
have been proposed (e.g. different colors depending on minibuffer
state).
What I'd like to configure in my Emacs is a sequential minibuffer: As
soon as I enter another interactive command, the currently running
one is quit. My first attempt at doing that was
(setq enable-recursive-minibuffers nil)
(add-hook 'minibuffer-setup-hook
'keyboard-quit)
which fails because `keyboard-quit' is, of course, executed in the
wrong context.
Again, the logic could be:
- if we're in an interactive command (call-interactively) that uses
the minibuffer (A)
- and another interactive is called (but not via a minibuffer-
specific keymap) which prompts for some input in the minibuffer (B)
then signal 'quit' to A and continue with B.
That way I can do M-x M-x ...., or something like C-x C-f di C-h
f ding RET (where I confused C-h f with C-x C-f) without any error
messages, without remaining minibuffers that I don't want and with
exactly the desired result.
I have no idea how to accomplish this -- any suggestions would be
appreciated.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Sequential instead of recursive minibuffers?,
David Reitter <=