unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#50137: Mark page navigation commands as repeatable
@ 2021-08-20 14:23 Davide Masserut via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2021-08-20 15:50 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 5+ messages in thread
From: Davide Masserut via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-08-20 14:23 UTC (permalink / raw)
  To: 50137

[-- Attachment #1: Type: text/plain, Size: 77 bytes --]

Hi, I made a patch that allows to navigate through pages using
repeat-mode.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Mark-page-navigation-commands-as-repeatable.patch --]
[-- Type: text/x-patch, Size: 2849 bytes --]

From 061dded6ea68a641cc172f37d721556044c2ff6b Mon Sep 17 00:00:00 2001
From: Davide Masserut <dm@mssdvd.com>
Date: Fri, 20 Aug 2021 15:29:13 +0200
Subject: [PATCH] Mark page navigation commands as repeatable

* doc/emacs/basic.texi (Repeating): Document page navigation
repeatability

* lisp/bindings.el (page-navigation-repeat-map): Add new map
---
 doc/emacs/basic.texi | 17 +++++++++--------
 lisp/bindings.el     | 11 +++++++++++
 2 files changed, 20 insertions(+), 8 deletions(-)

diff --git a/doc/emacs/basic.texi b/doc/emacs/basic.texi
index ba8d822b18..88e2777515 100644
--- a/doc/emacs/basic.texi
+++ b/doc/emacs/basic.texi
@@ -887,15 +887,16 @@ Repeating
 subsequent @kbd{z} repeats it once again.
 
 @findex repeat-mode
-  Also you can activate @code{repeat-mode} that temporarily enables
-a transient mode with short keys after a limited number of commands.
+  Also you can activate @code{repeat-mode} that temporarily enables a
+transient mode with short keys after a limited number of commands.
 Currently supported shorter key sequences are @kbd{C-x u u} instead of
 @kbd{C-x u C-x u} to undo many changes, @kbd{C-x o o} instead of
 @kbd{C-x o C-x o} to switch several windows, @kbd{C-x @{ @{ @} @} ^ ^
 v v} to resize the selected window interactively, @kbd{M-g n n p p} to
-navigate @code{next-error} matches.  Any other key exits transient mode
-and then is executed normally.  The user option @code{repeat-exit-key}
-defines an additional key to exit this transient mode.  Also it's
-possible to break the repetition chain automatically after idle time
-by customizing the user option @code{repeat-exit-timeout} to a number
-of seconds.
+navigate @code{next-error} matches, @kbd{C-x ] ] [ [} to navigate
+through pages.  Any other key exits transient mode and then is
+executed normally.  The user option @code{repeat-exit-key} defines an
+additional key to exit this transient mode.  Also it's possible to
+break the repetition chain automatically after idle time by
+customizing the user option @code{repeat-exit-timeout} to a number of
+seconds.
diff --git a/lisp/bindings.el b/lisp/bindings.el
index 0345944894..b67c6ad638 100644
--- a/lisp/bindings.el
+++ b/lisp/bindings.el
@@ -1434,6 +1434,17 @@ ctl-x-map
 
 (define-key ctl-x-map "[" 'backward-page)
 (define-key ctl-x-map "]" 'forward-page)
+
+(defvar page-navigation-repeat-map
+  (let ((map (make-sparse-keymap)))
+    (define-key map (kbd "]") #'forward-page)
+    (define-key map (kbd "[") #'backward-page)
+    map)
+  "Keymap to repeat page navigation key sequences.  Used in `repeat-mode'.")
+
+(put 'forward-page 'repeat-map 'page-navigation-repeat-map)
+(put 'backward-page 'repeat-map 'page-navigation-repeat-map)
+
 (define-key ctl-x-map "\C-p" 'mark-page)
 (define-key ctl-x-map "l" 'count-lines-page)
 (define-key ctl-x-map "np" 'narrow-to-page)
-- 
2.33.0


[-- Attachment #3: Type: text/plain, Size: 21 bytes --]


-- 
Davide Masserut

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

* bug#50137: Mark page navigation commands as repeatable
  2021-08-20 14:23 bug#50137: Mark page navigation commands as repeatable Davide Masserut via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2021-08-20 15:50 ` Lars Ingebrigtsen
  2021-08-20 16:06   ` Davide Masserut via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 5+ messages in thread
From: Lars Ingebrigtsen @ 2021-08-20 15:50 UTC (permalink / raw)
  To: Davide Masserut; +Cc: 50137

Davide Masserut <dm@mssdvd.com> writes:

> Hi, I made a patch that allows to navigate through pages using
> repeat-mode.

Thanks; looks good to me, so I've pushed it to Emacs 28.

This change was small enough to apply without assigning copyright to the
FSF, but for future patches you want to submit, it might make sense to
get the paperwork started now, so that subsequent patches can be applied
speedily. Would you be willing to sign such paperwork?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

* bug#50137: Mark page navigation commands as repeatable
  2021-08-20 15:50 ` Lars Ingebrigtsen
@ 2021-08-20 16:06   ` Davide Masserut via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2021-08-20 16:09     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 5+ messages in thread
From: Davide Masserut via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-08-20 16:06 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 50137

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Thanks; looks good to me, so I've pushed it to Emacs 28.
Great!

> This change was small enough to apply without assigning copyright to the
> FSF, but for future patches you want to submit, it might make sense to
> get the paperwork started now, so that subsequent patches can be applied
> speedily. Would you be willing to sign such paperwork?

Sure!

-- 
Davide Masserut





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

* bug#50137: Mark page navigation commands as repeatable
  2021-08-20 16:06   ` Davide Masserut via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2021-08-20 16:09     ` Lars Ingebrigtsen
  2021-08-20 16:15       ` Davide Masserut via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 5+ messages in thread
From: Lars Ingebrigtsen @ 2021-08-20 16:09 UTC (permalink / raw)
  To: Davide Masserut; +Cc: 50137

Davide Masserut <dm@mssdvd.com> writes:

>> This change was small enough to apply without assigning copyright to the
>> FSF, but for future patches you want to submit, it might make sense to
>> get the paperwork started now, so that subsequent patches can be applied
>> speedily. Would you be willing to sign such paperwork?
>
> Sure!

Great!  Here's the form to get started:


Please email the following information to assign@gnu.org, and we
will send you the assignment form for your past and future changes.

Please use your full legal name (in ASCII characters) as the subject
line of the message.
----------------------------------------------------------------------
REQUEST: SEND FORM FOR PAST AND FUTURE CHANGES

[What is the name of the program or package you're contributing to?]
Emacs

[Did you copy any files or text written by someone else in these changes?
Even if that material is free software, we need to know about it.]

[Do you have an employer who might have a basis to claim to own
your changes?  Do you attend a school which might make such a claim?]

[For the copyright registration, what country are you a citizen of?]

[What year were you born?]

[Please write your email address here.]

[Please write your postal address here.]

[Which files have you changed so far, and which new files have you written
so far?]





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

* bug#50137: Mark page navigation commands as repeatable
  2021-08-20 16:09     ` Lars Ingebrigtsen
@ 2021-08-20 16:15       ` Davide Masserut via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 0 replies; 5+ messages in thread
From: Davide Masserut via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-08-20 16:15 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 50137

Thanks!
-- 
Davide Masserut





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

end of thread, other threads:[~2021-08-20 16:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-20 14:23 bug#50137: Mark page navigation commands as repeatable Davide Masserut via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-08-20 15:50 ` Lars Ingebrigtsen
2021-08-20 16:06   ` Davide Masserut via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-08-20 16:09     ` Lars Ingebrigtsen
2021-08-20 16:15       ` Davide Masserut via Bug reports for GNU Emacs, the Swiss army knife of text editors

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).