From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.bugs Subject: bug#58168: string-lessp glitches and inconsistencies Date: Sat, 8 Oct 2022 19:13:01 +0200 Message-ID: <0AF47642-F2E5-44B4-829D-BB5D0B6CD253@gmail.com> References: <7824372D-8002-4639-8AEE-E80A6D5FEFC6@gmail.com> <877d1l55rn.fsf@gnus.org> <469814C2-197A-4BCA-8E2A-245577340C1E@gmail.com> <878rlzj1zv.fsf@gnus.org> <878rlzfylg.fsf@gnus.org> <017DAAA2-0383-4B47-855E-28348B2E9F06@gmail.com> <831qrnx1jc.fsf@gnu.org> <83k05fv9nv.fsf@gnu.org> <52286A5C-D947-4279-812E-173BB44046E1@gmail.com> <83v8oxp5lk.fsf@gnu.org> <4CFC3078-64FB-4EAC-A536-F6CBCEE2087D@gmail.com> <83mta9owal.fsf@gnu.org> <58016C43-E429-4EF1-9660-0F29CA36B6FE@gmail.com> <83leprmyvu.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Content-Type: multipart/mixed; boundary="Apple-Mail=_EDE8C54F-818B-47C6-9B41-CE50FB462D51" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8654"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 58168@debbugs.gnu.org, Lars Ingebrigtsen To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 08 19:14:31 2022 Return-path: 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 ) id 1ohDPC-00025U-U8 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 08 Oct 2022 19:14:31 +0200 Original-Received: from localhost ([::1]:58296 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ohDPB-0003ro-P6 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 08 Oct 2022 13:14:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53652) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ohDOk-0003rQ-JH for bug-gnu-emacs@gnu.org; Sat, 08 Oct 2022 13:14:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42298) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ohDOk-0002hK-6P for bug-gnu-emacs@gnu.org; Sat, 08 Oct 2022 13:14:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ohDOj-00038X-MA for bug-gnu-emacs@gnu.org; Sat, 08 Oct 2022 13:14:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 08 Oct 2022 17:14:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58168 X-GNU-PR-Package: emacs Original-Received: via spool by 58168-submit@debbugs.gnu.org id=B58168.166524919511995 (code B ref 58168); Sat, 08 Oct 2022 17:14:01 +0000 Original-Received: (at 58168) by debbugs.gnu.org; 8 Oct 2022 17:13:15 +0000 Original-Received: from localhost ([127.0.0.1]:41376 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ohDNy-00037O-Tu for submit@debbugs.gnu.org; Sat, 08 Oct 2022 13:13:15 -0400 Original-Received: from mail-lf1-f42.google.com ([209.85.167.42]:44599) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ohDNt-000377-FX for 58168@debbugs.gnu.org; Sat, 08 Oct 2022 13:13:13 -0400 Original-Received: by mail-lf1-f42.google.com with SMTP id s20so11224464lfi.11 for <58168@debbugs.gnu.org>; Sat, 08 Oct 2022 10:13:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:sender:from:to:cc:subject:date:message-id:reply-to; bh=p0ojwIZLVfiXO2sq1AIS2x63Y6JSwEYUm799vpMbhWw=; b=AVZkEaNiXC3alMRF7snBIv8uZk900keN9Txy+xP5N9jLH83aKapVnRn4P/KZkvAT5t guEqIWzIoJNf9nWHr0fRJT5IJ4ugHQqOAg8Wi/JeaXUF/cuR4H1ZntUof1nE1g1/INI1 im7Lve6cyozjzILmyZf3LZ6iiSDH9bfdvayLe2dWEstJVK2KKeiNgK/yFiEjkoUJMWmD dgPEjkPDMjGZ0lLzEsodUjfyfZ97XaD1SB4CQ1zKgRspimjmrQ7JYklQuc/miC9sqVFn WAVl2Y8n839v/r6j+QNnnJwme1sui3VWbKnb7pVaAVgti9n2DAEaWPc6IZ2Zr77zQohi BnUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=p0ojwIZLVfiXO2sq1AIS2x63Y6JSwEYUm799vpMbhWw=; b=SP5EvrlN8SoD+GmiVNQTkYWor3aS9WYk/MSJGdznhSv4lRgfwasEWv76sV62m3/YGv aJ+lh3RJyCcxHGb75FDc25F87YBLmMbYWs1TZ90x5pkK5SOzfeR5ajotkuGtvn/3Ut1R 98pYp5Kn+lXIzDdTnll14ShBcAPN3v52USIN42byQGVOlJ58cBtcAdpLwPmCV+pTR7JP rNBRcxLPxOZ7LJrYNStP932X2RfU0A022d0mRc2gqZtTwTTXH9Qqhor8/MldzW9Hrr06 d78g+xxHVkqbHteyjXldRS+/lO3csJwn1+BerhZ3AkSypumr86lkxvvH1p7fe8QYjN/R kQzg== X-Gm-Message-State: ACrzQf2Nu7+Q4LXFS11VpclCpEXWHjCLF1hIIJ8J2yk6IIhkjcCohcrk woaXM+QD1dJcICfkMtNsvcQ= X-Google-Smtp-Source: AMsMyM6CazWb+2FU4htAwbzRpAzw2GSilm6vUSV7mBvhJbhQx+OfWoEoQiPGeZoqQRsI6yiPcnCaag== X-Received: by 2002:a05:6512:3f89:b0:4a1:b468:1a7 with SMTP id x9-20020a0565123f8900b004a1b46801a7mr3463691lfa.341.1665249183250; Sat, 08 Oct 2022 10:13:03 -0700 (PDT) Original-Received: from smtpclient.apple (c188-150-171-209.bredband.tele2.se. [188.150.171.209]) by smtp.gmail.com with ESMTPSA id j6-20020a2eb706000000b0026dcf81d804sm810883ljo.31.2022.10.08.10.13.01 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 08 Oct 2022 10:13:02 -0700 (PDT) In-Reply-To: <83leprmyvu.fsf@gnu.org> X-Mailer: Apple Mail (2.3654.120.0.1.13) 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" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:244924 Archived-At: --Apple-Mail=_EDE8C54F-818B-47C6-9B41-CE50FB462D51 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii 7 okt. 2022 kl. 17.33 skrev Eli Zaretskii : > I'd prefer to show it in octal, not in hex Then octal it is, and the patch has now been pushed with that = modification. > I think the more values we test the better. The codepoints between > #x80 and #xA0 in particular are treated differently than those above > #xA0, so at least one from each range should be beneficial. The patch already does ensure that we test one from each (#x80 and = #xFC); I've now added a third to alleviate your concerns. Updated patch attached. --Apple-Mail=_EDE8C54F-818B-47C6-9B41-CE50FB462D51 Content-Disposition: attachment; filename=0001-Improve-manual-display-tests-of-undisplayable-chars-.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-Improve-manual-display-tests-of-undisplayable-chars-.patch" Content-Transfer-Encoding: quoted-printable =46rom=2056a4d76c7f0dfa6a552c9a49f345c09eabc999f5=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20=3D?UTF-8?q?Mattias=3D20Engdeg=3DC3=3DA5rd?=3D=20= =0ADate:=20Fri,=207=20Oct=202022=2016:41:38=20+0200=0A= Subject:=20[PATCH]=20Improve=20manual=20display=20tests=20of=20= undisplayable=20chars=0A=20(bug#58168)=0A=0ATest=20display=20of=20= multibyte=20raw=20bytes,=20as=20well=20as=20undisplayable=0Amultibyte=20= chars=20(C1=20controls=20and=20other=20values).=0A=0AThe=20test=20still=20= assumes=20that=20raw=20bytes=20should=20be=20displayed=20identically=0A= to=20undisplayable=20characters=20(such=20as=20C1=20controls)=20because=20= that=20is=20how=0Athe=20display=20code=20currently=20works.=0A=0A*=20= test/manual/redisplay-testsuite.el=0A= (test-redisplay-5c-expected-overlay)=0A= (test-redisplay-5c-result-overlay)=0A(test-redisplay-5-toggle,=20= test-redisplay-5):=20Fix=20typo=20(#x3fffc)=20of=20raw=0Abyte=20value.=20= =20Add=20new=20test=20value=20(#xd7).=0A(test-redisplay-6):=20New.=0A---=0A= =20test/manual/redisplay-testsuite.el=20|=2048=20= +++++++++++++++++++++++++-----=0A=201=20file=20changed,=2040=20= insertions(+),=208=20deletions(-)=0A=0Adiff=20--git=20= a/test/manual/redisplay-testsuite.el=20= b/test/manual/redisplay-testsuite.el=0Aindex=2001b0a895a4..7449463b44=20= 100644=0A---=20a/test/manual/redisplay-testsuite.el=0A+++=20= b/test/manual/redisplay-testsuite.el=0A@@=20-298,6=20+298,8=20@@=20= test-redisplay-5a-expected-overlay=0A=20(defvar=20= test-redisplay-5a-result-overlay=20nil)=0A=20(defvar=20= test-redisplay-5b-expected-overlay=20nil)=0A=20(defvar=20= test-redisplay-5b-result-overlay=20nil)=0A+(defvar=20= test-redisplay-5c-expected-overlay=20nil)=0A+(defvar=20= test-redisplay-5c-result-overlay=20nil)=0A=20=0A=20(defun=20= test-redisplay-5-toggle=20(_event)=0A=20=20=20(interactive=20"e")=0A@@=20= -305,8=20+307,11=20@@=20test-redisplay-5-toggle=0A=20=20=20(let=20= ((label=20(if=20display-raw-bytes-as-hex=20"\\x80"=20"\\200")))=0A=20=20=20= =20=20(overlay-put=20test-redisplay-5a-expected-overlay=20'display=0A=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(propertize=20label=20= 'face=20'escape-glyph)))=0A-=20=20(let=20((label=20(if=20= display-raw-bytes-as-hex=20"\\x3fffc"=20"\\777774")))=0A+=20=20(let=20= ((label=20(if=20display-raw-bytes-as-hex=20"\\xfc"=20"\\374")))=0A=20=20=20= =20=20(overlay-put=20test-redisplay-5b-expected-overlay=20'display=0A+=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(propertize=20label=20= 'face=20'escape-glyph)))=0A+=20=20(let=20((label=20(if=20= display-raw-bytes-as-hex=20"\\xd7"=20"\\327")))=0A+=20=20=20=20= (overlay-put=20test-redisplay-5c-expected-overlay=20'display=0A=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20(propertize=20label=20'face=20= 'escape-glyph))))=0A=20=0A=20(defun=20test-redisplay-5=20()=0A@@=20= -320,18=20+325,44=20@@=20test-redisplay-5=0A=20=20=20=20=20=20=20=20=20= (test-insert-overlay=20"=20"=20'display=20"\200"))=0A=20=20=20(insert=20= "\n\n")=0A=20=20=20(insert=20"=20=20Expected:=20")=0A-=20=20;;=20This=20= tests=20a=20large=20codepoint,=20to=20make=20sure=20the=20internal=20= buffer=20we=0A-=20=20;;=20use=20to=20produce=20the=20representation=20is=20= large=20enough.=0A-=20=20(aset=20printable-chars=20#x3fffc=20nil)=0A=20=20= =20(setq=20test-redisplay-5b-expected-overlay=0A=20=20=20=20=20=20=20=20=20= (test-insert-overlay=20"=20"=20'display=0A-=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(propertize=20= "\\777774"=20'face=20'escape-glyph)))=0A+=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(propertize=20= "\\374"=20'face=20'escape-glyph)))=0A=20=20=20(insert=20"\n=20=20=20=20= Result:=20")=0A=20=20=20(setq=20test-redisplay-5b-result-overlay=0A-=20=20= =20=20=20=20=20=20(test-insert-overlay=20"=20"=20'display=20= (char-to-string=20#x3fffc)))=0A+=20=20=20=20=20=20=20=20= (test-insert-overlay=20"=20"=20'display=20(char-to-string=20#x3ffffc)))=0A= =20=20=20(insert=20"\n\n")=0A-=20=20(insert-button=20"Toggle=20between=20= octal=20and=20hex=20display"=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20'action=20'test-redisplay-5-toggle))=0A+=20=20(insert=20"=20=20= Expected:=20")=0A+=20=20(setq=20test-redisplay-5c-expected-overlay=0A+=20= =20=20=20=20=20=20=20(test-insert-overlay=20"=20"=20'display=0A+=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20(propertize=20"\\327"=20'face=20'escape-glyph)))=0A+=20=20(insert=20= "\n=20=20=20=20Result:=20")=0A+=20=20(setq=20= test-redisplay-5c-result-overlay=0A+=20=20=20=20=20=20=20=20= (test-insert-overlay=20"=20"=20'display=20"\xd7"))=0A+=20=20(insert=20= "\n\n")=0A+=20=20(insert-button=20"Toggle=20between=20octal=20and=20hex=20= display=20for=20raw=20bytes"=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20'action=20'test-redisplay-5-toggle)=0A+=20=20(insert=20"\n\n"))=0A= +=0A+(defun=20test-redisplay-6=20()=0A+=20=20(insert=20"Test=206:=20= Display=20of=20unprintable=20Unicode=20chars:\n\n")=0A+=20=20(insert=20"=20= =20Expected:=20")=0A+=20=20(test-insert-overlay=20"=20"=20'display=0A+=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (propertize=20"\\200"=20'face=20'escape-glyph))=0A+=20=20(insert=20"=20=20= (representing=20U+0100)")=0A+=20=20(insert=20"\n=20=20=20=20Result:=20")=0A= +=20=20(test-insert-overlay=20"=20"=20'display=20"\u0080")=0A+=20=20= (insert=20"\n\n")=0A+=20=20;;=20This=20tests=20a=20large=20codepoint,=20= to=20make=20sure=20the=20internal=20buffer=20we=0A+=20=20;;=20use=20to=20= produce=20the=20representation=20is=20large=20enough.=0A+=20=20(insert=20= "=20=20Expected:=20")=0A+=20=20(aset=20printable-chars=20#x10abcd=20nil)=0A= +=20=20(test-insert-overlay=20"=20"=20'display=0A+=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(propertize=20"\\4125715"=20= 'face=20'escape-glyph))=0A+=20=20(insert=20"=20=20(representing=20= U+0010ABCD)")=0A+=20=20(insert=20"\n=20=20=20=20Result:=20")=0A+=20=20= (test-insert-overlay=20"=20"=20'display=20"\U0010ABCD")=0A+=20=20(insert=20= "\n\n"))=0A=20=0A=20(defun=20test-redisplay=20()=0A=20=20=20= (interactive)=0A@@=20-349,6=20+380,7=20@@=20test-redisplay=0A=20=20=20=20= =20(test-redisplay-3)=0A=20=20=20=20=20(test-redisplay-4)=0A=20=20=20=20=20= (test-redisplay-5)=0A+=20=20=20=20(test-redisplay-6)=0A=20=20=20=20=20= (goto-char=20(point-min))))=0A=20=0A=20;;;=20redisplay-testsuite.el=20= ends=20here=0A--=20=0A2.32.0=20(Apple=20Git-132)=0A=0A= --Apple-Mail=_EDE8C54F-818B-47C6-9B41-CE50FB462D51--