From: Juri Linkov <juri@linkov.net>
To: Ramesh Nedunchezian <rameshnedunchezian@outlook.com>
Cc: 47688-done@debbugs.gnu.org
Subject: bug#47688: 28.0.50; repeat-mode: Make rectangle commands repeatable. Also some misc. queries, comments
Date: Wed, 14 Apr 2021 21:12:54 +0300 [thread overview]
Message-ID: <87fszsn3u1.fsf@mail.linkov.net> (raw)
In-Reply-To: <TY2PR0101MB3693266D647E5AABAEC0AF0EDA729@TY2PR0101MB3693.apcprd01.prod.exchangelabs.com> (Ramesh Nedunchezian's message of "Sat, 10 Apr 2021 13:53:06 +0530")
> Could you please add rectangle commands to the repeatable set? This
> is what I have in my .emacs.
> ...
> (rectangle-backward-char . "b")
> (rectangle-backward-char . ,(kbd "C-b"))
> (rectangle-exchange-point-and-mark . "x")
> (rectangle-exchange-point-and-mark . ,(kbd "C-x C-x"))
> (rectangle-forward-char . "f")
> (rectangle-forward-char . ,(kbd "C-f"))
> (rectangle-left-char . ,(kbd "<left>"))
> (rectangle-mark-mode . " ")
> (rectangle-mark-mode . ,(kbd "C-x SPC"))
> (rectangle-next-line . ,(kbd "<down>"))
> (rectangle-next-line . ,(kbd "C-n"))
> (rectangle-number-lines . "N")
> (rectangle-previous-line . ,(kbd "<up>"))
> (rectangle-previous-line . ,(kbd "C-p"))
> (rectangle-right-char . ,(kbd "<right>"))
Thanks for the suggestions. 'C-x SPC' activates 'rectangle-mark-mode'
that already supports short key sequences similar to 'repeat-mode':
(defvar rectangle-mark-mode-map
(let ((map (make-sparse-keymap)))
(define-key map [?\C-o] 'open-rectangle)
(define-key map [?\C-t] 'string-rectangle)
(define-key map [remap exchange-point-and-mark]
'rectangle-exchange-point-and-mark)
(dolist (cmd '(right-char left-char forward-char backward-char
next-line previous-line))
(define-key map (vector 'remap cmd)
(intern (format "rectangle-%s" cmd))))
There are already single keys to edit the rectangle.
If you want, you can request more short keys to be
added to rectangle-mark-mode-map in a separate report.
So it seems this request can be closed now.
next prev parent reply other threads:[~2021-04-14 18:12 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-10 8:23 bug#47688: 28.0.50; repeat-mode: Make rectangle commands repeatable. Also some misc. queries, comments Ramesh Nedunchezian
2021-04-10 10:34 ` Dmitry Gutov
2021-04-10 13:04 ` Ramesh Nedunchezian
2021-04-10 14:54 ` Dmitry Gutov
2021-04-10 12:32 ` Ramesh Nedunchezian
2021-04-12 16:16 ` Juri Linkov
2021-04-13 16:09 ` Juri Linkov
2021-04-14 18:12 ` Juri Linkov [this message]
[not found] ` <handler.47688.D47688.161842410719411.notifdone@debbugs.gnu.org>
2021-05-04 4:19 ` bug#47688: closed (Re: bug#47688: 28.0.50; repeat-mode: Make rectangle commands repeatable. Also some misc. queries, comments) Ramesh Nedunchezian
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=87fszsn3u1.fsf@mail.linkov.net \
--to=juri@linkov.net \
--cc=47688-done@debbugs.gnu.org \
--cc=rameshnedunchezian@outlook.com \
/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).