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: Thu, 14 Dec 2023 05:30:54 +0000
Message-ID: <87ttolgxkh.fsf@posteo.net>
References: <87il7ib6cu.fsf@posteo.net> <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>
 <83bkbc7j1o.fsf@gnu.org> <8734wov2wv.fsf@posteo.net>
 <83v89j6arv.fsf@gnu.org> <87cyvpf8y6.fsf@posteo.net>
 <83plzp82mb.fsf@gnu.org> <87a5qhxf05.fsf@posteo.net>
 <83jzpkvs4z.fsf@gnu.org> <87v8947ulo.fsf@posteo.net>
 <871qbsk5le.fsf@posteo.net>
 <f7f749d1-3a2d-0ea0-a106-6c586f4faca7@gutov.dev>
 <87v894hr2e.fsf@posteo.net> <87cyvbepi0.fsf@posteo.net>
 <91460437-4f54-8e35-46a4-86bcbd9a500b@gutov.dev>
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="39195"; mail-complaints-to="usenet@ciao.gmane.io"
Cc: michael_heerdegen@web.de, Eli Zaretskii <eliz@gnu.org>,
 stefankangas@gmail.com, monnier@iro.umontreal.ca, 66394@debbugs.gnu.org
To: Dmitry Gutov <dmitry@gutov.dev>
Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Dec 14 06:32: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 1rDeKM-0009zD-ST
	for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 14 Dec 2023 06:32:07 +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 1rDeK4-0007W8-8Q; Thu, 14 Dec 2023 00:31:48 -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 1rDeK1-0007Vw-U4
 for bug-gnu-emacs@gnu.org; Thu, 14 Dec 2023 00:31:45 -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 1rDeK1-0006px-M7
 for bug-gnu-emacs@gnu.org; Thu, 14 Dec 2023 00:31:45 -0500
Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
 (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1rDeKH-00075g-Pi
 for bug-gnu-emacs@gnu.org; Thu, 14 Dec 2023 00:32:01 -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: Thu, 14 Dec 2023 05:32:01 +0000
Resent-Message-ID: <handler.66394.B66394.170253188927217@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.170253188927217
 (code B ref 66394); Thu, 14 Dec 2023 05:32:01 +0000
Original-Received: (at 66394) by debbugs.gnu.org; 14 Dec 2023 05:31:29 +0000
Original-Received: from localhost ([127.0.0.1]:60005 helo=debbugs.gnu.org)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
 id 1rDeJl-00074u-1Q
 for submit@debbugs.gnu.org; Thu, 14 Dec 2023 00:31:29 -0500
Original-Received: from mout01.posteo.de ([185.67.36.65]:34161)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <thievol@posteo.net>) id 1rDeJf-00074a-Ls
 for 66394@debbugs.gnu.org; Thu, 14 Dec 2023 00:31:27 -0500
Original-Received: from submission (posteo.de [185.67.36.169]) 
 by mout01.posteo.de (Postfix) with ESMTPS id D49CA240029
 for <66394@debbugs.gnu.org>; Thu, 14 Dec 2023 06:31:00 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1702531860; bh=KJ+jchZDIWtsYSx65SnULZKcWfg9y2qRGAwD2Zlagbg=;
 h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Autocrypt:OpenPGP:
 From;
 b=VenW1gmh1EXNgAB/lJVjfNH9B5lYF6t1pA3KkfGimk5K2wMg5Yu6NWNRHao4yaVP+
 ERnoYt+SkOas7ObB1p42WeQQGUGYoaxdlcaVQPgGZHIszqW5FXtqIKfh7uA4EyKZFy
 hrFOjdcqDzRaqXlHMWJAXY2JETSUGkKPUJdBXN0hCM7ssUbb2hgcAYMnrJDiISSSO0
 BSyMe53aj8ws8jJgGcysPrfLPOQiGR+hefWN58mUXNUjBk4IoT05ylCAtZkF1Xm7AT
 ygWJr9cvZQlkh+QKWYoqa6pxxHv1hEKB5mZVS4nw+MtXXj1s/cazNd8+Oy+agYBb7W
 eyXHhtjeQZzqQ==
Original-Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4SrLYF4qMlz6tsj;
 Thu, 14 Dec 2023 06:30:57 +0100 (CET)
In-Reply-To: <91460437-4f54-8e35-46a4-86bcbd9a500b@gutov.dev> (Dmitry Gutov's
 message of "Thu, 14 Dec 2023 04:10:31 +0200 (3 hours, 18 minutes, 
 17 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:276170
Archived-At: <http://permalink.gmane.org/gmane.emacs.bugs/276170>

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

Dmitry Gutov <dmitry@gutov.dev> writes:

> On 12/12/2023 11:31, Thierry Volpiatto wrote:
>> Thierry Volpiatto<thievol@posteo.net>  writes:
>>=20
>>> Dmitry Gutov<dmitry@gutov.dev>  writes:
>>>
>>>> On 11/12/2023 19:32, Thierry Volpiatto wrote:
>>>>> I made a little error in one of the patch when merging from a working
>>>>> file for emacs-29.1, attaching here the two patches again with error
>>>>> corrected (read `register-use-preview` instead of
>>>>> `register-preview-use-preview`), sorry for this.
>>>> JFYI, the second patch doesn't apply cleanly, which may make testing
>>>> them a bit more difficult.
>>>>
>>>> It's because of commit 598ab9ca10d35d6 by Eli with documentation
>>>> updates. When reverted, the second patch applies without problem.
>>> Dmitry thanks, here the patches again after rebasing.
>> I found another (merge) error in patch 0001 with defmethod names (read
>> register-command-info instead of register-preview-command-info), here
>> the patches corrected.  Without this changes, and with
>> register-use-preview =3D=3D nil, confirmation is needed for copy-to-regi=
ster
>> and friends, now fixed.
>
> I did some testing.
>
> Something I'm seeing with my custom config, but not with 'emacs -Q':
> the register preview is eating my windows. :-) No matter if I choose
> something, or C-g out of it.
>
> To reproduce:
>
> (defun split-window-prefer-side-by-side (&optional window)
>   (let ((split-height-threshold (and (< (window-width window)
>                                         split-width-threshold)
>                                      split-height-threshold)))
>     (split-window-sensibly window)))
>
> (setq split-window-preferred-function 'split-window-prefer-side-by-side)
>
> Then split the frame horizontally or vertically, create a register and
> jump to it.
>
> The problem is that with this setup the preview is not creating a new
> window but reuses an existing one. And then deletes it at the end.

I think I can fix this, will look at it as soon as possible.

Thanks.

> Again, I'm not a heavy user of registers, so if this is easy enough to
> fix, great. If not, never mind.

=2D-=20
Thierry

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

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

iQHHBAEBCgAxFiEEI9twfRN7r3nig/xwDsVtFB0W75MFAmV6kw4THHRoaWV2b2xA
cG9zdGVvLm5ldAAKCRAOxW0UHRbvk0WcC/9w0z9qWrIZmvzdkk617TBfZGTfEzTg
IQ/1BW9dD8yu9a0qBkb1HKdepcVsNdd9K+ayi5CAtN4Nm/IsMTZBum4JCss9GQfv
ikxGDNeWSyFBCaXTheXdRdtLaKUXMIcwD6y3cP7yRajWjBiOKaBt2H6D1s6gOJBN
EB4//vBNsNc1avZPuDeKpHXNv9JoY3Mmhk92ejjm/8qdNOWFtUF4IOVYRSNmjUvu
CQYloE/0Guf3GEbqKiWbIoi+vyWadGDGblbReix8f3klAGwSTHKP1DW+jw1AYgPo
Kfce0A7FjByZt1GHfdLi93Axa+1Lr4FQrMgQIR9F7AN44l4DHpun5DUNRpsnpI5U
YvKVrRxcik8o1akvUfjn7MCaRlOhllH2KhiF3QB8wYLGYgQP8KYIvji/gKBBAR65
bd3GQhLfcS1yUL0XCK8hdD5+T2DuT3z0nLbbxMArSFHfqUkwaPC9PUAJ9ojtK43m
OZ6+ckTPMcfXMeCnaYjKiPgNZ9uEjTYETF8=
=CXT7
-----END PGP SIGNATURE-----
--=-=-=--