unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#59539: 29.0.50; Commands created with `insert-kbd-macro` are NOT getting repeated.
@ 2022-11-24 10:58 Ramesh Nedunchezian
  2022-12-14 17:13 ` Robert Pluim
  0 siblings, 1 reply; 7+ messages in thread
From: Ramesh Nedunchezian @ 2022-11-24 10:58 UTC (permalink / raw)
  To: 59539

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






^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-12-27 18:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-24 10:58 bug#59539: 29.0.50; Commands created with `insert-kbd-macro` are NOT getting repeated Ramesh Nedunchezian
2022-12-14 17:13 ` Robert Pluim
2022-12-15  7:20   ` Juri Linkov
2022-12-15  9:45     ` Robert Pluim
2022-12-17 17:20       ` Juri Linkov
2022-12-27  9:19     ` Ramesh Nedunchezian
2022-12-27 18:06       ` Juri Linkov

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).