Subject: RE: bug#11506: bug: "C-x z" ("repeat") no longer works correctly with M-x

From: "Drew Adams" <[email-masked]>
Date: Sun, 3 Jun 2012 09:59:31 -0700

> > M-x pwd RET C-x z z z ...
> > The first is not a problem in Icicles.
> 
> So, how does Icicle solve it?  Did you change C-x z?

No, I didn't change `C-x z' or anything associated with repeat.el.

I don't know what causes the problem (or the "solution"). ;-)

The code is here, in case someone more knowledgable about `e-e-c' or repeat.el
wants to take a look:
http://www.emacswiki.org/emacs/download/icicles-cmd1.el.

(That uses macro `icicle-define-command', which is defined here:
http://www.emacswiki.org/emacs/download/icicles-mac.el)

But I don't claim (or expect) that the code I use for this is a model for
anything.

The reason I defined `icicle-execute-extended-command' was not to move `e-e-c'
to Lisp but to define a multi-command version of it.  In effect, that lets you
use any command (via `M-x') as a multi-command.

(A multi-command just lets you act multiple times on multiple completion
candidates in the same command invocation.  In this case, the candidates are
command names.)

This page describes `i-e-e-c' and its use:
http://www.emacswiki.org/emacs/Icicles_-_Multi_M-x

And this page describes its implementation:
http://www.emacswiki.org/emacs/Icicles_-_Defining_Multi_M-x

Anyway, as I mentioned, it is only a partial solution to the problems mentioned
in this thread.

The second problem remains, in two senses: (1) When the command to be repeated
expects an argument entered by the user (minibuffer input), the `C-x z z' does
not re-prompt.  (2) If the command body (not the `interactive' spec) prompts for
input, and the user types or edits the minibuffer input, that breaks repetition.