From mboxrd@z Thu Jan  1 00:00:00 1970
Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail
From: Thierry Volpiatto <thievol@posteo.net>
Newsgroups: gmane.emacs.bugs
Subject: bug#66394: 29.1; Make register-read-with-preview more useful
Date: Sun, 26 Nov 2023 16:46:06 +0000
Message-ID: <87sf4so435.fsf@posteo.net>
References: <87il7ib6cu.fsf@posteo.net> <8734y5vnj7.fsf@posteo.net>
 <87bkcslr18.fsf@web.de> <87y1fwtyrl.fsf@posteo.net>
 <87y1fut1wp.fsf@web.de> <87ttqgpjiz.fsf@posteo.net>
 <87wmvbibpr.fsf@web.de> <877cnb2n63.fsf@posteo.net>
 <8734xyc8z0.fsf@web.de> <87zg05rewi.fsf@posteo.net>
 <87ttqcg8gw.fsf@web.de> <87h6mcr8ol.fsf@posteo.net>
 <87r0l73029.fsf@web.de> <877cmdx8ud.fsf@posteo.net>
 <jwvjzqcxrnq.fsf-monnier+emacs@gnu.org> <87sf50s1gh.fsf@posteo.net>
 <83o7ficesp.fsf@gnu.org> <878r6leh9d.fsf@posteo.net>
 <83il5pbnmh.fsf@gnu.org> <87zfz1cz7s.fsf@posteo.net>
 <837cm4bxzy.fsf@gnu.org>
Mime-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha512; protocol="application/pgp-signature"
Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214";
	logging-data="4698"; mail-complaints-to="usenet@ciao.gmane.io"
Cc: michael_heerdegen@web.de, 66394@debbugs.gnu.org, monnier@iro.umontreal.ca,
 stefankangas@gmail.com
To: Eli Zaretskii <eliz@gnu.org>
Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Nov 26 17:47:10 2023
Return-path: <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org>
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 <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org>)
	id 1r7IHm-0000yS-6R
	for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 26 Nov 2023 17:47:10 +0100
Original-Received: from localhost ([::1] helo=lists1p.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.90_1)
	(envelope-from <bug-gnu-emacs-bounces@gnu.org>)
	id 1r7IHc-0008Ii-BV; Sun, 26 Nov 2023 11:47:00 -0500
Original-Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>)
 id 1r7IHY-0008IY-Su
 for bug-gnu-emacs@gnu.org; Sun, 26 Nov 2023 11:46:57 -0500
Original-Received: from debbugs.gnu.org ([2001:470:142:5::43])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>)
 id 1r7IHY-00034z-Ki
 for bug-gnu-emacs@gnu.org; Sun, 26 Nov 2023 11:46:56 -0500
Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
 (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1r7IHe-0004dA-C8
 for bug-gnu-emacs@gnu.org; Sun, 26 Nov 2023 11:47:02 -0500
X-Loop: help-debbugs@gnu.org
Resent-From: Thierry Volpiatto <thievol@posteo.net>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@gnu.org
Resent-Date: Sun, 26 Nov 2023 16:47:02 +0000
Resent-Message-ID: <handler.66394.B66394.170101718917760@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 66394
X-GNU-PR-Package: emacs
Original-Received: via spool by 66394-submit@debbugs.gnu.org id=B66394.170101718917760
 (code B ref 66394); Sun, 26 Nov 2023 16:47:02 +0000
Original-Received: (at 66394) by debbugs.gnu.org; 26 Nov 2023 16:46:29 +0000
Original-Received: from localhost ([127.0.0.1]:42621 helo=debbugs.gnu.org)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
 id 1r7IH6-0004cO-Rs
 for submit@debbugs.gnu.org; Sun, 26 Nov 2023 11:46:29 -0500
Original-Received: from mout02.posteo.de ([185.67.36.66]:56511)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <thievol@posteo.net>) id 1r7IH4-0004c3-4O
 for 66394@debbugs.gnu.org; Sun, 26 Nov 2023 11:46:27 -0500
Original-Received: from submission (posteo.de [185.67.36.169]) 
 by mout02.posteo.de (Postfix) with ESMTPS id AF5EB240101
 for <66394@debbugs.gnu.org>; Sun, 26 Nov 2023 17:46:14 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1701017174; bh=KZzmFK1P6jnMX1i2cVSmFtyS1zIAGBtLgkqv0sXzuK0=;
 h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Autocrypt:OpenPGP:
 From;
 b=QfoG3/6TI2tNElqzX8kRW3tNt47mFjjRQjITgrctWHndGL/6apGJXsdA/OEMwzENp
 bVEdzAQ1act4WQmGfywtQMwX1pu9XKuWf5mYZgPSXc6Rht4lIH+4P0hKPna3qgvarA
 1fq32b9Qx4TPYzk5x+dI2bRK1+N4KL/aCUHg0/HQnqTRm68imQfo+lBnQq8tc6lf96
 1XHwHoZJ1O1Rsge1whXa6d5wu9irI4QIic/8H+Z5W+e1TS8+gOMA9eQ2pTApjd3PzA
 oWKCpBe+j81wVdEdZD4Ne+dm4s2A9W8eU0cK+gJR/RXi9bGeYDtSOfPKHh5+TWjv+c
 KY7azQSxpxKcA==
Original-Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4SdZNh6Zflz6tvm;
 Sun, 26 Nov 2023 17:46:12 +0100 (CET)
In-Reply-To: <837cm4bxzy.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 26 Nov
 2023 12:38:25 +0200 (6 hours, 3 minutes, 53 seconds ago)")
Autocrypt: addr=thievol@posteo.net; prefer-encrypt=mutual;
 keydata=xsDNBF8ylcIBDADG+hy+zR6L4/vbdDDZuSaMmSrU3A5QZJpeBCvxTr7MpzzruZbhLPW1K3R6N2MA
 edi8Y+C8o27FVRIjpdbaKMGu9je7JV/TbUQYo3SOwCK1vM4LUn4V6ZLzSYkuiEt4eyMoiDdyvN0p
 kcK6P9x9DCetcEVszXzQg+yzCVrQ2hXWDXWT4M18EC3wtO7RHPouMqGiwBFhBAYErCqFWFxQHkfb
 tG/4yGyJ58rglb65O3qijjMWvYwcWZun9/7qm8Z4/4mHopmo2zgU+OrptnLSZfkZGz3Y7Uf452xQ
 GVq0Fv75NPvQru7y+DYVhuVXXyAmGxt+vf4rIiixMBbhKEPjcxEPAa2LTzex2IsTZR+QVG9uDnqC
 WcgaOEQ58fzXNvNhtwwF/Rgio2XWAJVdmFWS59/k9W58CIUSNKBMZh2XeGdEmtHvDtCxW3z6FJha
 36RzOM3fMNNiAGdFZJA84gcdloJR+sHCDTTPT3784fjr+V8An7sI581NGFzkRQqPvEQCZbUAEQEA
 Ac0SdGhpZXZvbEBwb3N0ZW8ubmV0wsEOBBMBCgA4AhsDBQsJCAcCBhUKCQgLAgQWAgMBAh4BAheA
 FiEEI9twfRN7r3nig/xwDsVtFB0W75MFAmL3HCoACgkQDsVtFB0W75OVEAv/f6XxmtIFz08fUb8h
 Bp/zJP6IC4/rhhh+0GMRIRzLN8DK0jV8JCzYdFHiRJOy2lNIOpmrrCmjRRxferc2G42+ePFIsslx
 hU46VSz1Z83NwIG3mpdYNV5WUTUdgzxExHTNTFCd7NKv0nlHKQaA 
OpenPGP: url=https://posteo.de/keys/thievol@posteo.net.asc; preference=encrypt
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" <bug-gnu-emacs.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-gnu-emacs>,
 <mailto:bug-gnu-emacs-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/bug-gnu-emacs>
List-Post: <mailto:bug-gnu-emacs@gnu.org>
List-Help: <mailto:bug-gnu-emacs-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-gnu-emacs>,
 <mailto:bug-gnu-emacs-request@gnu.org?subject=subscribe>
Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org
Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org
Xref: news.gmane.io gmane.emacs.bugs:275066
Archived-At: <http://permalink.gmane.org/gmane.emacs.bugs/275066>

--=-=-=
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Thierry Volpiatto <thievol@posteo.net>
>> Cc: monnier@iro.umontreal.ca,  michael_heerdegen@web.de,
>>   stefankangas@gmail.com,  66394@debbugs.gnu.org
>> Date: Sat, 25 Nov 2023 21:14:31 +0000
>>=20
>> Here a patch with the change suggested by Stefan applied, slighly
>> modified though because it fails if I put the call to
>> cl--generic-prefill-dispatchers at the recommended place.
>>=20
>> I recompiled Emacs with this patch with no errors.
>
> Thanks.
>
> Stefan, any further comments, or should I install this as submitted?

Do you want the ability to jump to more than one line at the time before
merging, (e.g. C-u 3 C-n and C-u 3 C-p) or is it ok like this for you?

diff --git a/lisp/register.el b/lisp/register.el
index 61bef503f91..bca967a4efe 100644
=2D-- a/lisp/register.el
+++ b/lisp/register.el
@@ -207,7 +207,7 @@ Do nothing when defining or executing kmacros."
                          (overlay-start (car ovs))
                          (point-min)))
           (setq pos (point))
=2D          (and ovs (forward-line arg))
+          (forward-line (if ovs arg (1- arg)))
           (when (and (funcall fn)
                      (or (> arg 0) (eql pos (point))))
             (goto-char (funcall posfn)))
@@ -218,15 +218,15 @@ Do nothing when defining or executing kmacros."
             (delete-minibuffer-contents)
             (insert str)))))))
=20
=2D(defun register-preview-next ()
+(defun register-preview-next (&optional arg)
   "Goto next line in register preview buffer."
=2D  (interactive)
=2D  (register-preview-forward-line 1))
+  (interactive "p")
+  (register-preview-forward-line arg))
=20
=2D(defun register-preview-previous ()
+(defun register-preview-previous (&optional arg)
   "Goto previous line in register preview buffer."
=2D  (interactive)
=2D  (register-preview-forward-line -1))
+  (interactive "p")
+  (register-preview-forward-line (- arg)))
=20
 (defun register-type (register)
   "Return REGISTER type.
=20
=2D-=20
Thierry

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQHHBAEBCgAxFiEEI9twfRN7r3nig/xwDsVtFB0W75MFAmVjdk8THHRoaWV2b2xA
cG9zdGVvLm5ldAAKCRAOxW0UHRbvkzAhC/9wa8vIr+9Xy0yZBEsGiHc1l43gwBYt
6eQs3HtKlQc9/wpu3RdVnE7wMuTko/Y/dKDG8mi7PncTmPWpIQuq+89FXfWMOceJ
4NgYCNBBkWoKg5xzMCEis9W0I9ogQpIKEj3TLdwwjBWPMyS+etjCIc7dNPdgmorM
HJfKrl4pokY4RseSJSAo+Iijjx1wlAGLeb1Cwpn0D5Hmr2YgfpltrFCjB0sIRX1y
Pp1puPMUj4Ik8Yys0rVUNjaDC1k3jRAmIPjpdyzd3ZLy9lEfniuaAFjipfBI+J2X
WcZiQ3wdJPmWrvqJ4L1G9lIPyhd+DwYPM72XYez9b1C7pmbDBZFeMkK+flPf6nKP
y1NbcU6aChYuI9diSFDFa0DjL1Go2XGj/JYIeJF3NQhBFeKPhjKrC6bgbso3zEz2
oY+Bhc6HaPlNT6drNiFPckAhKABAAPfN72HLbC0cvXzj6S3S8ryT2K+asmBViOGu
UW0tWorHBjMjOblFoTHRPV/DVQd8MvtI7G0=
=9J8d
-----END PGP SIGNATURE-----
--=-=-=--