Confused by what command is "dot repeatable"

Barry OReilly gundaetiapo at gmail.com
Mon Jul 16 17:23:19 CEST 2012


I defined york-bar the same as you and invoked M-x york-bar while in
normal state.  Then I did the . command and entered the elisp debugger
because of error:

Debugger entered--Lisp error: (void-variable p)
  eval(p nil)
  eval-last-sexp-1(nil)
  eval-last-sexp(nil)
  call-interactively(eval-last-sexp nil nil)
  execute-kbd-macro([115 101 120])
  evil-execute-repeat-info(([115 101 120]))
  evil-execute-repeat-info-with-count(nil ([115 101 120]))
  evil-repeat(nil nil)
  call-interactively(evil-repeat nil nil)

If I try to exit Emacs (such as clicking the Frame's close), the
minibuffer simply reports: "After 0 kbd macro iterations: Symbol's
function definition is void: t".  Only when I exit the debugger am I
able to quit Emacs.

I discovered that if I have an edit in the repeat ring, I witness the
behavior York describes instead of the the elisp errors.  I pasted the
york-bar from my web browser using X11, so it didn't go into the
repeat ring.



On 7/13/12, York Zhao <gtdplatform at gmail.com> wrote:
>> sorry for not answering immediately, but I've been on a business trip
>> last weak and had simply no time. The same will be true for large
>> parts of the next few months so please excuse if responses take some
>> time. I'll always try to answer as soon as possible.
>
> Really appreciate that you have taken your valuable time to answer my
> question,
> and your answer have been very useful so far.
>
>> Note that currently repeating only works for commands bound to
>> some key-bindings, calling them via M-x COMMAND RET may fail.
>
> Yes, you are right, I never binded these functions to any key, I used "M-x".
> And
> if I bind my command "bar" to a key the dot repeating works. What I still
> don't
> understand however, is that "M-x foo" is dot repeatable but not "M-x bar".
>
>> So please provide a complete example (full function definition, key
>> sequences, ...), preferably starting from a fresh emacs instance, that
>> demonstrates the problem. Otherwise it is really hard to isolate the
>> problem.
>
> Here's the scenario:
>
> First, in "scratch" buffer, input the following:
>
> (defun york-bar ()
>   (interactive)
>   (save-excursion
>     (insert "printf(\"checkpoint\")")))
>
> Type "C-M-x" to instrument the command `york-bar'.
>
> Then open a file in c++-mode and "M-x york-bar", "printf()" function
> call gets inserted.
>
> Hit ".", but nothing wouldn't get inserted again.
>
>> The mode *should* not make difference ...
>
> Yes, I've tried "M-x york-bar" in an org-mode buffer and got the same
> results.
>
> On the other hand, the command `york-foo' which is dot repeatable even when
> being executed by "M-x", is way more complicated, I have tried to isolate it
> but
> failed, it had been tightly "connected" with my other part of configuration
> files (huge).
>
> The bottom line is, however, `york-bar' is dot repeatable if having it
> binded to
> some key. Thanks again for the help.
>
> York
>
> _______________________________________________
> implementations-list mailing list
> implementations-list at lists.ourproject.org
> https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list
>



More information about the implementations-list mailing list