--- Begin Message ---
Subject: |
29.0.50; Commands created with `insert-kbd-macro` are NOT getting repeated. |
Date: |
Thu, 24 Nov 2022 16:28:47 +0530 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.2 |
Commands created with `insert-kbd-macro` are NOT getting repeated. Can this
limitation be lifted?
For example, down below `my-cmd-a' and `my-cmd-b' are kbd macro commands bound
to `<f12> a' and `<f12> b' respectively.
With `repeat-mode' ON, I would expect that `a' and `b' keys to be repeatable .
That is I am expecting that
<f12> a a
<f12> a b
will move the cursor and NOT modify the buffer.
Can `repeat-mode' be enhanced to make `a' and `b' keys repeatable.
Sometimes I do complex edits, and it is fairly common in my case to alternate
between MANY kbd macro commands to quickly "fixup" things that I am editing. F
WIW, the text files that I edit are txt files created with pdftotext, and the
PDF files are usually books, or handouts which I want to read in epub format.
So, I have multiple kbd macros in my init file that remove headers, and
footers, removes indentation, changes bullets, remove hyphenation, linearize
columnar text etc. It would be convenient if these kbd macro commands are
repeatable.
(defalias 'my-cmd-a
(kmacro "C-f C-f"))
(defalias 'my-cmd-b
(kmacro "C-b C-b"))
(define-prefix-command 'my-kmacro-keymap)
(define-key my-kmacro-keymap (kbd "a") #'my-cmd-a)
(define-key my-kmacro-keymap (kbd "b") #'my-cmd-b)
(put 'my-cmd-a 'repeat-map 'my-kmacro-keymap)
(put 'my-cmd-b 'repeat-map 'my-kmacro-keymap)
(global-set-key (kbd "<f12>")
my-kmacro-keymap)
(repeat-mode -1)
(repeat-mode +1)
In GNU Emacs 29.0.50 (build 3, x86_64-pc-linux-gnu, GTK+ Version
3.24.34, cairo version 1.16.0) of 2022-11-19 built on debian
Repository revision: a6ae13af42ede6618c326855ea4c95e0298fb75b
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101004
System Description: Debian GNU/Linux bookworm/sid
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#59539: 29.0.50; Commands created with `insert-kbd-macro` are NOT getting repeated. |
Date: |
Tue, 27 Dec 2022 20:06:30 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) |
> `repeat-check-key` suggestion works for me.
Thanks for confirming. So closing this bug report.
For more improvements а new feature request could be created.
--- End Message ---