From unknown Sat Sep 20 06:51:38 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#79474 <79474@debbugs.gnu.org> To: bug#79474 <79474@debbugs.gnu.org> Subject: Status: [PATCH] (register-preview-info): sort registers in preview buffer Reply-To: bug#79474 <79474@debbugs.gnu.org> Date: Sat, 20 Sep 2025 13:51:38 +0000 retitle 79474 [PATCH] (register-preview-info): sort registers in preview bu= ffer reassign 79474 emacs submitter 79474 Masatake YAMATO severity 79474 normal tag 79474 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 19 16:03:49 2025 Received: (at submit) by debbugs.gnu.org; 19 Sep 2025 20:03:49 +0000 Received: from localhost ([127.0.0.1]:41553 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uzhKe-00066M-VP for submit@debbugs.gnu.org; Fri, 19 Sep 2025 16:03:49 -0400 Received: from lists.gnu.org ([2001:470:142::17]:52032) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uzhKb-000663-Re for submit@debbugs.gnu.org; Fri, 19 Sep 2025 16:03:47 -0400 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 ) id 1uzhKV-0003sP-6A for bug-gnu-emacs@gnu.org; Fri, 19 Sep 2025 16:03:39 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uzhKS-0000SY-FV for bug-gnu-emacs@gnu.org; Fri, 19 Sep 2025 16:03:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1758312214; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type; bh=MsQm95Qn1FwO6NXWlvVjiJgJAw9vsO2nuCnDQpcABBU=; b=BZa69UrZUn8UWClMmMMSDPQ26TRWhduMjOmyQkzLwPS8x/DzDSVOwmIylgx9v2RXAxeCup j65xiNQrOOyFSd2FGylj+7QzHATg4wSQBjpNsc9lJqYNJ7KRQKhBDlxpMJPVCLn+wkbajQ B08LyN+SBiR9UFn3m6cfjG5C7L+ajUc= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-452-q0P0Il2mNcu1bXVWB2JEhQ-1; Fri, 19 Sep 2025 16:02:23 -0400 X-MC-Unique: q0P0Il2mNcu1bXVWB2JEhQ-1 X-Mimecast-MFC-AGG-ID: q0P0Il2mNcu1bXVWB2JEhQ_1758312143 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id C5590195608B for ; Fri, 19 Sep 2025 20:02:22 +0000 (UTC) Received: from localhost (unknown [10.67.32.50]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id C710219560BB; Fri, 19 Sep 2025 20:02:20 +0000 (UTC) Date: Sat, 20 Sep 2025 05:02:18 +0900 (JST) Message-Id: <20250920.050218.1218104274393506388.yamato@redhat.com> To: bug-gnu-emacs@gnu.org Subject: [PATCH] (register-preview-info): sort registers in preview buffer From: Masatake YAMATO Organization: Red Hat Japan, K.K. Mime-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: A9S7rJrlHwPcJdy6hez68Rl9WeoqECYjFXajdzqB7IY_1758312143 X-Mimecast-Originator: redhat.com Content-Type: Multipart/Mixed; boundary="--Next_Part(Sat_Sep_20_05_02_18_2025_824)--" Received-SPF: pass client-ip=170.10.133.124; envelope-from=yamato@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.105, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.9 (/) X-Debbugs-Envelope-To: submit Cc: yamato@redhat.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.1 (/) ----Next_Part(Sat_Sep_20_05_02_18_2025_824)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi, This change makes the "*Register Preview*" buffer show sorted items. This change is helpful a user find a non-occupied register. Thanks ----Next_Part(Sat_Sep_20_05_02_18_2025_824)-- Content-Type: Text/X-Patch; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="0001-register-preview-info-sort-registers-in-preview-buff.patch" >From 8dff73143c5001049b647303d4bd5d19a32c15e7 Mon Sep 17 00:00:00 2001 From: Masatake YAMATO Date: Thu, 18 Sep 2025 03:21:22 +0900 Subject: [PATCH] (register-preview-info): sort registers in preview buffer * lisp/register.el (register-preview): Sort alist returned from `register-of-type-alist'. --- etc/NEWS | 4 ++++ lisp/register.el | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/etc/NEWS b/etc/NEWS index bd928345283..b57440f2e0f 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -799,6 +799,10 @@ with finer grained control. That was already the case for the "fancy" UI but is now also true in the default UI you get, i.e., when 'register-use-preview' is 'traditional'. +--- +*** The "*Register Preview*" buffer shows sorted items. +This is helpful a user find a non-occupied register. + ** Tree-sitter +++ diff --git a/lisp/register.el b/lisp/register.el index 9b2a10f02d7..7dbda04d176 100644 --- a/lisp/register.el +++ b/lisp/register.el @@ -246,7 +246,7 @@ register-preview nil (with-current-buffer standard-output (setq cursor-in-non-selected-windows nil) - (dolist (elem registers) + (dolist (elem (sort registers :key #'car)) (when (cdr elem) (let ((beg (point))) (insert (funcall register-preview-function elem)) -- 2.51.0 ----Next_Part(Sat_Sep_20_05_02_18_2025_824)---- From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 20 02:47:26 2025 Received: (at 79474) by debbugs.gnu.org; 20 Sep 2025 06:47:26 +0000 Received: from localhost ([127.0.0.1]:43709 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uzrNV-0006ox-Vu for submit@debbugs.gnu.org; Sat, 20 Sep 2025 02:47:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44584) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uzrNT-0006oN-LD for 79474@debbugs.gnu.org; Sat, 20 Sep 2025 02:47:24 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uzrNO-0001yA-00; Sat, 20 Sep 2025 02:47:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=x1ZYRqfKa2FvwJ/I53KebhBPEW9XxghVXl9qZRPLEPA=; b=YkzN08zOHnxx 6Knrtzec0J5VITZo+S8gAvx7PcYVOT4fgs1YC4CSc31mVjP+MbDPOgljIW337SJuHPNvQJ0DSw1Gt dtmZDxXNMLwKXybX8uKjp4V0upnadHtDFNzABS3Eq/12t4hImbTdGpitDEERhGWieiunmPVZu8JYG Q1mNzVYFcMH2cIuY/aly6RdBekbC5e6QccR4lcDNc9mo7fmh4mly3lmL1otsmE2uelVXOkniLQ1YH bjyVXzQt7n6nRYjqV1+sGRzIM4dnCbqWgiuMuwUvrVsL6x5ge3lCOHOs7p1Ac7hzASWpK0dLT6YAr ds/EBpdWoLOjgWIdYUmoZQ==; Date: Sat, 20 Sep 2025 09:47:14 +0300 Message-Id: <86h5wxipsd.fsf@gnu.org> From: Eli Zaretskii To: Masatake YAMATO , Thierry Volpiatto In-Reply-To: <20250920.050218.1218104274393506388.yamato@redhat.com> (bug-gnu-emacs@gnu.org) Subject: Re: bug#79474: [PATCH] (register-preview-info): sort registers in preview buffer References: <20250920.050218.1218104274393506388.yamato@redhat.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 79474 Cc: yamato@redhat.com, 79474@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: yamato@redhat.com > Date: Sat, 20 Sep 2025 05:02:18 +0900 (JST) > From: Masatake YAMATO via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > This change makes the "*Register Preview*" buffer show sorted items. > This change is helpful a user find a non-occupied register. Thanks. Thierry, any comments? Is it okay to make this the default behavior, and do that unconditionally? > +--- > +*** The "*Register Preview*" buffer shows sorted items. > +This is helpful a user find a non-occupied register. I don't think we need to explain in NEWS why this change is for the better, if we decide to make this change unconditionally.