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: [RE] Make register-read-with-preview more useful
Date: Thu, 12 Oct 2023 06:43:55 +0000
Message-ID: <871qe02uyw.fsf@posteo.net>
References: <87il7ib6cu.fsf@posteo.net>
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="15526"; mail-complaints-to="usenet@ciao.gmane.io"
To: 66394@debbugs.gnu.org
Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Oct 12 08:54:07 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 1qqpaB-0003oz-1n
	for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 12 Oct 2023 08:54:07 +0200
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 1qqpZy-0003M3-7w; Thu, 12 Oct 2023 02:53:54 -0400
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 1qqpZl-0003La-Cd
 for bug-gnu-emacs@gnu.org; Thu, 12 Oct 2023 02:53:42 -0400
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 1qqpZl-0004Pn-4Z
 for bug-gnu-emacs@gnu.org; Thu, 12 Oct 2023 02:53:41 -0400
Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
 (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1qqpa7-0006wV-3Q
 for bug-gnu-emacs@gnu.org; Thu, 12 Oct 2023 02:54:03 -0400
X-Loop: help-debbugs@gnu.org
In-Reply-To: <87il7ib6cu.fsf@posteo.net>
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: Thu, 12 Oct 2023 06:54:03 +0000
Resent-Message-ID: <handler.66394.B66394.169709359826623@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.169709359826623
 (code B ref 66394); Thu, 12 Oct 2023 06:54:03 +0000
Original-Received: (at 66394) by debbugs.gnu.org; 12 Oct 2023 06:53:18 +0000
Original-Received: from localhost ([127.0.0.1]:40481 helo=debbugs.gnu.org)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
 id 1qqpZO-0006vK-B2
 for submit@debbugs.gnu.org; Thu, 12 Oct 2023 02:53:18 -0400
Original-Received: from mout02.posteo.de ([185.67.36.66]:39839)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <thievol@posteo.net>) id 1qqpZL-0006v5-Cm
 for 66394@debbugs.gnu.org; Thu, 12 Oct 2023 02:53:16 -0400
Original-Received: from submission (posteo.de [185.67.36.169]) 
 by mout02.posteo.de (Postfix) with ESMTPS id AA6AA240104
 for <66394@debbugs.gnu.org>; Thu, 12 Oct 2023 08:52:46 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1697093566; bh=v/pygO3CdNQpwqdpxayCqQ44ZcywvXmEMFa3B636vNU=;
 h=From:To:Subject:Date:Message-ID:MIME-Version:From;
 b=CzZTfdNFdAR9zK0pGByYel6Rwz3JrmnFFnAEq2zmi2hgoMtHMsRskU/QnlcpytadD
 ++qQymdMAUvUET0NrC4oSem/aV+bJsKV8WlUuQ0uTm1pXz37PQH11etISjsbk1A0QT
 Q7acCEa74wfLSrNeHBgiKyrxSTxuinaMwK2TFxKaGmpvh2Xet6alXzrEk6KtCuvEmr
 1iXapYgk+7oO2scUJ+fjg2IUrVAZx0w6gUHhlrzwoqybVxJI3iyg9p70qjK7FrSItI
 jWRv27Yoly2XQPTkVlI0K7BrXNuQkmXgUZlskQVF4GTp5EYLRPOkKEr4fkGrWz1mu1
 YuNCxw+4c9FvA==
Original-Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4S5gLj5C05z6txf
 for <66394@debbugs.gnu.org>; Thu, 12 Oct 2023 08:52:45 +0200 (CEST)
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:272278
Archived-At: <http://permalink.gmane.org/gmane.emacs.bugs/272278>

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


I moved the code here if any interest.
https://gist.github.com/thierryvolpiatto/2219f99ac96ed1b468fac204bca23b4a

I added filters to register-preview (jump-to-register should show
only positions and insert-register should show only text).
Also added navigation (up and down) in preview buffer (see gif).

Still need to modify (or add) docstrings and also decide what to do with
`register-preview-delay` (just a flag in this patch).
AFAIU the only reason to delay preview is when executing kbd macro, in
this case we could use executing-kbd-macro, but maybe I miss something
and there is other reasons to delay this.

=2D-=20
Thierry

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

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

iQHHBAEBCgAxFiEEI9twfRN7r3nig/xwDsVtFB0W75MFAmUnl7cTHHRoaWV2b2xA
cG9zdGVvLm5ldAAKCRAOxW0UHRbvkzHXDACWPu93kl7KCjvDBPIrvl86LfMP2CkK
Hs7KHe4VwrEYHW/4yIcBqef3qMoS26jqzOykyNgZsvMgPNbQnfy2Hc02heHMWUCP
MDhz3dL4iNB8WIy1I9QB5DpiAE+hc/aHxIqR0N9Q0XWh+ZQXhLJYMU32UBC2Afha
S4W6IMkMTfqar6t310oH127lZy+J5pwSIy45nWecpZKw/xh7SPk861oyz1WycfqT
WlFJSRF7rfSgUXSHbP+wNf9XE9jDlv7uAuAntIAM1Y9tAOakHKJ+UxAJsAJhlqCP
cUWJgpQHcdbwcngG0GxX/FuTvgMpzM47U3SIotHHsodtgGsVevlfqv43VMtExyQl
qDlJRDwQMtVLtFox95grWgdZVjs2+WZlQDFNs/rpn5ttnlP2sWKfoQVjjfQ0IWIq
wKRF39uCaq/pPqNiDdjZ6oejp7sYX3A/UpZfSfZ3s0u8qFlNmE1IBbdpMs7hyE6y
N+IkH4Z0j1Ct4mlSLvt/4/eSYeQX+b9my0E=
=3CGz
-----END PGP SIGNATURE-----
--=-=-=--