From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Davide Masserut via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#50137: Mark page navigation commands as repeatable Date: Fri, 20 Aug 2021 16:23:05 +0200 Message-ID: <87o89sjiuu.fsf@mssdvd.com> Reply-To: Davide Masserut Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18852"; mail-complaints-to="usenet@ciao.gmane.io" To: 50137@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Aug 20 16:56:14 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mH5wK-0004eo-1r for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 20 Aug 2021 16:56:14 +0200 Original-Received: from localhost ([::1]:60170 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mH5wH-0001lL-TJ for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 20 Aug 2021 10:56:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44540) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mH5wB-0001kv-2Z for bug-gnu-emacs@gnu.org; Fri, 20 Aug 2021 10:56:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51998) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mH5wA-0001ny-Qo for bug-gnu-emacs@gnu.org; Fri, 20 Aug 2021 10:56:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mH5wA-0006Qb-JD for bug-gnu-emacs@gnu.org; Fri, 20 Aug 2021 10:56:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Davide Masserut Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 20 Aug 2021 14:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 50137 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.162947130824628 (code B ref -1); Fri, 20 Aug 2021 14:56:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 20 Aug 2021 14:55:08 +0000 Original-Received: from localhost ([127.0.0.1]:35310 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mH5vH-0006P9-Hx for submit@debbugs.gnu.org; Fri, 20 Aug 2021 10:55:08 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:43028) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mH5QZ-0001GP-OO for submit@debbugs.gnu.org; Fri, 20 Aug 2021 10:23:24 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37370) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mH5QX-0001f4-6t for bug-gnu-emacs@gnu.org; Fri, 20 Aug 2021 10:23:22 -0400 Original-Received: from out2.migadu.com ([2001:41d0:2:aacc::]:40945) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mH5QT-00073o-DZ for bug-gnu-emacs@gnu.org; Fri, 20 Aug 2021 10:23:20 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mssdvd.com; s=key1; t=1629469386; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=3zQE/AFjJUnpU/L7Wm2mcFkFLqWjozl9lngMybmAikI=; b=TTySo874+g/T0dBhQ+5m+t6OCBeH63O2SqeZPAPvxKrSZZuRm/NHTcPPW7z4x9WfZNPQ+j fvIGEai2sErgMopIFe/rUNhxm2VlIUJ4+d8xEr9g8jFqxd+ZwHvBDRbjjPMiJq2dzPtJS7 jBa9HwgnuAkJ5e6wfR4nFnxb3kwvXFEQ7VGyv8yYoN7oPdZmJjHvWP2/ZQ++aBEc4NLSP3 g3VjdA31pXyB10CByiJb3HBDDLpYyTGWILlfr5/vh41Q4szrzcrEL1AnJgrwGuu0uhLwJE 9maGYCfdYr6vX2i6r/ZuhsZrW7+tZ2qVC4hu4lLuA6hfKQi57I6cLP6tVQayAA== X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: dm@mssdvd.com Received-SPF: pass client-ip=2001:41d0:2:aacc::; envelope-from=dm@mssdvd.com; helo=out2.migadu.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Fri, 20 Aug 2021 10:55:06 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:212282 Archived-At: --=-=-= Content-Type: text/plain Hi, I made a patch that allows to navigate through pages using repeat-mode. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Mark-page-navigation-commands-as-repeatable.patch >From 061dded6ea68a641cc172f37d721556044c2ff6b Mon Sep 17 00:00:00 2001 From: Davide Masserut 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 --=-=-= Content-Type: text/plain -- Davide Masserut --=-=-=--