From unknown Fri Jun 20 18:13:17 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#37155 <37155@debbugs.gnu.org> To: bug#37155 <37155@debbugs.gnu.org> Subject: Status: 26.2; `describe-register-1' should not say "Garbage" for (get-register...) -> nil Reply-To: bug#37155 <37155@debbugs.gnu.org> Date: Sat, 21 Jun 2025 01:13:17 +0000 retitle 37155 26.2; `describe-register-1' should not say "Garbage" for (get= -register...) -> nil reassign 37155 emacs submitter 37155 Drew Adams severity 37155 minor tag 37155 fixed thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 23 02:07:08 2019 Received: (at submit) by debbugs.gnu.org; 23 Aug 2019 06:07:08 +0000 Received: from localhost ([127.0.0.1]:38951 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i12j5-0000M4-NJ for submit@debbugs.gnu.org; Fri, 23 Aug 2019 02:07:08 -0400 Received: from lists.gnu.org ([209.51.188.17]:34724) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i12j4-0000Lx-8I for submit@debbugs.gnu.org; Fri, 23 Aug 2019 02:07:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51760) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i12j3-0004vi-0p for bug-gnu-emacs@gnu.org; Fri, 23 Aug 2019 02:07:06 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_50,RCVD_IN_DNSWL_MED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i12j1-0007KE-DH for bug-gnu-emacs@gnu.org; Fri, 23 Aug 2019 02:07:04 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:57848) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i12j1-0007Iw-3r for bug-gnu-emacs@gnu.org; Fri, 23 Aug 2019 02:07:03 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x7N64IJX068457 for ; Fri, 23 Aug 2019 06:07:01 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : subject : content-type : content-transfer-encoding; s=corp-2019-08-05; bh=QV2ixG0SW+B+XC3lw0QG6a0xmz3XLzWH4nQizPOBzpI=; b=AhpNf/kFSLpYoSkT+Muer+vFeSdfYJafM88Cn02khBYien+AFB+gQvDewqR1vbfpqYO9 E50O0PiQOZxoGMFbKS1pxPzb0Ame1UQNjRxNnXBICgks0+2ZE2Mw7qsQhRjMCmoaNkr+ CJ+20F8RUeNJ3XcXOIQOrsnv4PCUuj4YJN/pbXO4e/Nu/s+HgZFry72oRg4rFjK/DXXo 2W2AK0zR4NENYosHARL+MugQKw8lNESjahcC7dbE4ThkdK4sZUoOP1VlfbkGHdtBCRWJ hz6fQUFdYFj9A6jUL6uLREP3F4vAaM2J0Z9rui2daUGBtxtX1N4WHJJEJ9OoDQDNisTl /Q== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by userp2120.oracle.com with ESMTP id 2uea7raemx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 23 Aug 2019 06:07:00 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x7N640hA133313 for ; Fri, 23 Aug 2019 06:07:00 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserp3020.oracle.com with ESMTP id 2uj1y04avq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 23 Aug 2019 06:07:00 +0000 Received: from abhmp0011.oracle.com (abhmp0011.oracle.com [141.146.116.17]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x7N66wB7004952 for ; Fri, 23 Aug 2019 06:06:59 GMT MIME-Version: 1.0 Message-ID: Date: Thu, 22 Aug 2019 23:06:58 -0700 (PDT) From: Drew Adams To: bug-gnu-emacs@gnu.org Subject: 26.2; `describe-register-1' should not say "Garbage" for (get-register...) -> nil X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4873.0 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9357 signatures=668684 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=849 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1906280000 definitions=main-1908230066 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9357 signatures=668684 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=919 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1906280000 definitions=main-1908230066 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 156.151.31.85 X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit 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: -2.3 (--) `register-alist' is an alist. It behaves like one and it should behave like one. It should be usable as one. `(get-register ?a)' returns nil for an alist entry of `(?a)', as it should. And, per the doc, `get-register' returning nil means the=20 register has NO content - it's empty. `M-x list-registers' handles such empty-register elements of the alist correctly: it does not list them at all. Those registers have no content. That's all as it should be. However, register previewing, and in particular `register-describe-oneline', is faulty/misleading when it comes to registers with no content. Like `list-registers' previewing should not list them at all. Instead, it lists them as having "Garbage:" as their content. This is wrong (and it's doubly wrong to include the `:' char with nothing following it). `view-register' is OK. It correctly says a register is empty when it is. Functions that use `describe-register-1' without testing with `get-register' to handle the empty case do the wrong thing. Example: (set-register ?a "aaa") (set-register ?b "bbb") (setq register-alist (append '((?a)) register-alist)) correctly empties register ?a. It gives ((?a) (?b . "bbb") (?a . "aaa")), which correctly has ?a as an empty register: (get-register ?a) returns nil. But `register-preview' and similar, which use `register-preview-default', which uses `register-describe-oneline', do the wrong thing. They show empty registers as being full of "Garbage:" rather than having no content. And they show two occurrences for=20 register ?a, both with "Garbage:". Instead, they should show zero occurrences of register ?a. In short, previewing should use `get-register'. It should respect alist behavior, recognizing an empty register per `get-register'. In GNU Emacs 26.2 (build 1, x86_64-w64-mingw32) of 2019-04-13 Repository revision: fd1b34bfba8f3f6298df47c8e10b61530426f749 Windowing system distributor `Microsoft Corp.', version 10.0.17763 Configured using: `configure --without-dbus --host=3Dx86_64-w64-mingw32 --without-compress-install 'CFLAGS=3D-O2 -static -g3' From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 20 18:19:41 2019 Received: (at 37155) by debbugs.gnu.org; 20 Sep 2019 22:19:41 +0000 Received: from localhost ([127.0.0.1]:58713 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iBRFd-0006YA-Bq for submit@debbugs.gnu.org; Fri, 20 Sep 2019 18:19:41 -0400 Received: from quimby.gnus.org ([80.91.231.51]:37758) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iBRFZ-0006Xw-NB for 37155@debbugs.gnu.org; Fri, 20 Sep 2019 18:19:40 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iBRFU-0007sn-Na; Sat, 21 Sep 2019 00:19:35 +0200 From: Lars Ingebrigtsen To: Drew Adams Subject: Re: bug#37155: 26.2; `describe-register-1' should not say "Garbage" for (get-register...) -> nil References: Date: Sat, 21 Sep 2019 00:19:32 +0200 In-Reply-To: (Drew Adams's message of "Thu, 22 Aug 2019 23:06:58 -0700 (PDT)") Message-ID: <87k1a2626j.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Drew Adams writes: > In short, previewing should use `get-register'. It should respect > alist behavior, recognizing an empty register per `get-register'. Makes sense. I've now done this on the Emacs trunk. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 37155 Cc: 37155@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: -1.0 (-) Drew Adams writes: > In short, previewing should use `get-register'. It should respect > alist behavior, recognizing an empty register per `get-register'. Makes sense. I've now done this on the Emacs trunk. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 20 18:19:43 2019 Received: (at control) by debbugs.gnu.org; 20 Sep 2019 22:19:43 +0000 Received: from localhost ([127.0.0.1]:58716 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iBRFf-0006YR-Ix for submit@debbugs.gnu.org; Fri, 20 Sep 2019 18:19:43 -0400 Received: from quimby.gnus.org ([80.91.231.51]:37772) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iBRFe-0006YH-HZ for control@debbugs.gnu.org; Fri, 20 Sep 2019 18:19:42 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iBRFb-0007tG-SV for control@debbugs.gnu.org; Sat, 21 Sep 2019 00:19:41 +0200 Date: Sat, 21 Sep 2019 00:19:39 +0200 Message-Id: <87impm626c.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #37155 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 37155 fixed close 37155 27.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control 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: -1.0 (-) tags 37155 fixed close 37155 27.1 quit From unknown Fri Jun 20 18:13:17 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 19 Oct 2019 11:24:08 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator