Subject: 24.3; macre step edit and use of registers

From: Tim Nielens <[email-masked]>
Date: Thu, 2 Oct 2014 09:45:19 +0200

Hello, I get an unwanted behavior when I use the step edit through macros
on a macro involving insertions of register content.

Step to reproduce: Create a macro involving a string insert from a macro
(C-x r i i).  Start the step edit through it.  When you arrive to that
step press yes to perform the action and go to the next edit step,
you'll see that the register key will disapear. If you finish the step
edit and save it, the macro will no longer be valid since the register
key disappeared. Other scenario to bump into a problem: when you arrive
at the insertion, press "r" to replace that operation and try to repeat
the insertion action (C-x r i i). It will fail with this error message:
Error in post-command-hook (kmacro-step-edit-post-command):
(void-variable kmacro-step-edit-active).

My exact macro was :

M-x            ;; execute-extended-command
copye-            ;; self-insert-command * 6
2*DEL            ;; delete-backward-char
-fil            ;; self-insert-command * 4
TAB            ;; message-tab
RET            ;; newline
C-a            ;; message-beginning-of-line
C-k            ;; kill-line
C-x r i            ;; insert-register
f            ;; self-insert-command
RET            ;; newline
C-a            ;; message-beginning-of-line
C-k            ;; kill-line
C-x r i            ;; insert-register
t            ;; self-insert-command
RET            ;; newline
tes            ;; self-insert-command * 3
3*DEL            ;; delete-backward-char
yes            ;; self-insert-command * 3
RET            ;; newline
M-:            ;; eval-expression
(message"macro        ;; self-insert-command * 14
SPC            ;; self-insert-command
done")            ;; self-insert-command * 6
RET            ;; newline

Thanks in advance,
Tim

In GNU Emacs 24.3.1 (i386-mingw-nt6.1.7601)
 of 2013-03-17 on MARVIN
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --with-gcc (4.7) --cflags
 -ID:/devel/emacs/libs/libXpm-3.5.8/include
 -ID:/devel/emacs/libs/libXpm-3.5.8/src
 -ID:/devel/emacs/libs/libpng-dev_1.4.3-1/include
 -ID:/devel/emacs/libs/zlib-dev_1.2.5-2/include
 -ID:/devel/emacs/libs/giflib-4.1.4-1/include
 -ID:/devel/emacs/libs/jpeg-6b-4/include
 -ID:/devel/emacs/libs/tiff-3.8.2-1/include
 -ID:/devel/emacs/libs/gnutls-3.0.9/include
 -ID:/devel/emacs/libs/libiconv-1.13.1-1-dev/include
 -ID:/devel/emacs/libs/libxml2-2.7.8/include/libxml2'

Important settings:
  value of $LANG: FRB
  locale-coding-system: cp1252
  default enable-multibyte-characters: t

Major mode: Fundamental

Minor modes in effect:
  global-auto-complete-mode: t
  global-eclim-mode: t
  savehist-mode: t
  delete-selection-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t

Recent input:
<f4> <f4> <f4> <f4> <f4> <f4> <f4> C-x C-k C-e C-n
C-e C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n
C-n C-n C-n C-n C-n C-n C-j m <backspace> M - x M-x
m e s s <tab> <backspace> <backspace> <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> <backspace> : <return> ( m e s s a g e
SPC ' <backspace> " m a r c o SPC d o n e ' <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> <return> m a c r o <backspace> <backspace>
<backspace> <backspace> <backspace> " m a c r o <return>
S P C SPC <return> d o n e " <return> <backspace> )
<return> R E T C-c C-c <f4> <help-echo> <help-echo>
<help-echo> M-x c o p y e - <backspace> <backspace>
- t o <tab> r e <tab> <return> j C-x C-k SPC y y y
y y y y y y y y y y y y y y r M-x M-x M-x M-x M-x M-x
M-x M-x M-x M-x M-x M-x M-x M-x M-x M-x M-x M-x M-x
M-x M-x M-x C-n C-n C-n <C-tab> C-x C-k SPC y y y y
y y y y y y y y y y y y y r C-x r i C-g C-g C-g C-x
k SPC C-g C-x C-k SPC <tab> <tab> <tab> <tab> <tab>
<tab> <tab> <tab> r C-x r i C-g C-x b m e s s <backspace>
<backspace> <backspace> <backspace> M r e <backspace>
<backspace> e s s <tab> <return> <down-mouse-1> <mouse-movement>
<mouse-movement> <mouse-movement> <mouse-movement>
<drag-mouse-1> M-w C-h ? <help-echo> M-x r <backspace>
M-x r e p o r t <backspace> e <backspace> t <backspace>
t - e m a c s - b u g <return>

Recent messages:
command-execute: The mark is not set now, so there is no region
completing-read-default: Command attempted to use minibuffer while in
minibuffer
Error in pre-command-hook (kmacro-step-edit-pre-command):
(wrong-type-argument arrayp nil) [2 times]
completing-read-default: Command attempted to use minibuffer while in
minibuffer [21 times]
Quit
byte-code: End of buffer [3 times]
Quit
Error in post-command-hook (kmacro-step-edit-post-command): (void-variable
kmacro-step-edit-active)
Quit [4 times]
Error in post-command-hook (kmacro-step-edit-post-command): (void-variable
kmacro-step-edit-active)

Load-path shadows:
~/.emacs.d/company-mode-master/.dir-locals hides c:/Program
Files/emacs-24.3/lisp/gnus/.dir-locals

Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader help-mode find-func company-emacs-eclim company
pcase ac-emacs-eclim-source eclim-completion thingatpt
auto-complete-config auto-complete popup help-at-pt eclimd eclim
eclim-problems eclim-maven compile comint ansi-color eclim-ant
eclim-java advice help-fns advice-preload json eclim-project easy-mmode
rx s ucs-normalize etags ring batch-mode color-theme cl-macs gv edmacro
kmacro wid-edit cl cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr mail-utils reporter easymenu server savehist delsel time-date
tooltip ediff-hook vc-hooks lisp-float-type mwheel dos-w32 ls-lisp
w32-common-fns disp-table w32-win w32-vars tool-bar dnd fontset image
regexp-opt fringe tabulated-list newcomment lisp-mode register page
menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core frame cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote make-network-process w32 multi-tty emacs)