unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Ramesh Nedunchezian <rameshnedunchezian@outlook.com>
To: 59539@debbugs.gnu.org
Subject: bug#59539: 29.0.50; Commands created with `insert-kbd-macro` are NOT getting repeated.
Date: Thu, 24 Nov 2022 16:28:47 +0530	[thread overview]
Message-ID: <TY2PR0101MB3693EF7ADB9389A508C60A64DA0F9@TY2PR0101MB3693.apcprd01.prod.exchangelabs.com> (raw)

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






             reply	other threads:[~2022-11-24 10:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-24 10:58 Ramesh Nedunchezian [this message]
2022-12-14 17:13 ` bug#59539: 29.0.50; Commands created with `insert-kbd-macro` are NOT getting repeated 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=TY2PR0101MB3693EF7ADB9389A508C60A64DA0F9@TY2PR0101MB3693.apcprd01.prod.exchangelabs.com \
    --to=rameshnedunchezian@outlook.com \
    --cc=59539@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).