From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Michal Nazarewicz Newsgroups: gmane.emacs.bugs Subject: bug#24603: [PATCH 0/3] Case table updates Date: Mon, 24 Oct 2016 17:11:22 +0200 Organization: http://mina86.com/ Message-ID: References: <1476741825-32172-1-git-send-email-mina86@mina86.com> <83bmyixixc.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1477327639 11969 195.159.176.226 (24 Oct 2016 16:47:19 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 24 Oct 2016 16:47:19 +0000 (UTC) User-Agent: Notmuch/0.19+53~g2e63a09 (http://notmuchmail.org) Emacs/25.1.50.2 (x86_64-unknown-linux-gnu) Cc: 24603@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Oct 24 18:47:14 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1byiOl-0000eR-GX for geb-bug-gnu-emacs@m.gmane.org; Mon, 24 Oct 2016 18:46:55 +0200 Original-Received: from localhost ([::1]:47642 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1byhcc-0003Ss-5E for geb-bug-gnu-emacs@m.gmane.org; Mon, 24 Oct 2016 11:57:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38632) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1byguz-0008V5-NQ for bug-gnu-emacs@gnu.org; Mon, 24 Oct 2016 11:12:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1byguw-0003r3-Gb for bug-gnu-emacs@gnu.org; Mon, 24 Oct 2016 11:12:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:38554) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1byguw-0003qE-DN for bug-gnu-emacs@gnu.org; Mon, 24 Oct 2016 11:12:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1byguw-0000sT-0K for bug-gnu-emacs@gnu.org; Mon, 24 Oct 2016 11:12:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michal Nazarewicz Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 24 Oct 2016 15:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24603 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 24603-submit@debbugs.gnu.org id=B24603.14773218933334 (code B ref 24603); Mon, 24 Oct 2016 15:12:01 +0000 Original-Received: (at 24603) by debbugs.gnu.org; 24 Oct 2016 15:11:33 +0000 Original-Received: from localhost ([127.0.0.1]:53949 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1byguT-0000ri-ER for submit@debbugs.gnu.org; Mon, 24 Oct 2016 11:11:33 -0400 Original-Received: from mail-lf0-f43.google.com ([209.85.215.43]:39589) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1byguR-0000rR-1F for 24603@debbugs.gnu.org; Mon, 24 Oct 2016 11:11:31 -0400 Original-Received: by mail-lf0-f43.google.com with SMTP id t133so1421102lff.6 for <24603@debbugs.gnu.org>; Mon, 24 Oct 2016 08:11:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:from:to:cc:subject:in-reply-to:organization:references :user-agent:face:date:message-id:mime-version :content-transfer-encoding; bh=WVEzj2XU1qW06XMi5nEKxqmcapSievA3c+uI907PToY=; b=QapJWv4pf5O7qE/PCNRVMW50nwb14rQiwigDvc03Q9wfpuLUR2EBLXDhLpgjpCwxE9 ap8bRlq0WpGwfTdfeCoxAXKKQcC9Laao9FuHjZyYYCgyPBuJrU81vTQn84F7IRzFjpz8 AyMa5FBKahawoNa4dos0LTaNmwQAZQ9zDxDMKfk1mq9RXSvQRcQeM1n2ZKV0TRkrdlVA kXDDowYYQcYGMaeoCUF/4cYb/sl25kcVbTIW9thWGWmyRlEPjE37uAsvIgKqpwDY82rH Kq7DcpKJXgq7lQWtXG1YdljSS1rBzFTsneQqv/fxr8xCZJZDXSN5WpLCalT7Smia4Vvj GMLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:in-reply-to :organization:references:user-agent:face:date:message-id :mime-version:content-transfer-encoding; bh=WVEzj2XU1qW06XMi5nEKxqmcapSievA3c+uI907PToY=; b=PF4f1pj5CTF3i1XxmrHzHrfQW3t5Z5fHk/jn8MrV0O1aagswtB0oP472ITFugq4T5z ZTrzrUWseU4+VbZ9+2nue8ix39aGzoeg2oOLXP51H/dJWnjnnpmY++oBgq8dyoeJhvoN HoS8QmSTUWAYzIZ3uHD6f7xbGrn0rK00NKisiqsJh1vGjhWq1aRp8N/NOKxhBchH6Ie1 glXnRSCYhIAi5tx2zuA92l52ekIJOKwb/g+GHpHTNtQKbuWk3F2ze8yAeWDVotqWYfMr SfFd+jwUWnQxMpC+6iVOm8LtP457qvDswx2+0j5/XrWXPSF4JRvabZpIRutGdTpupAhc Vx7g== X-Gm-Message-State: ABUngvc3LXQiCHXNd94OOz+cuXAoHXE9j5ic4tPhz60jaQO0BP1ixF6wUhq/S5m2PzG0s34U X-Received: by 10.194.85.193 with SMTP id j1mr12151038wjz.23.1477321884006; Mon, 24 Oct 2016 08:11:24 -0700 (PDT) Original-Received: from mpn-glaptop ([2620:0:105f:310:41b8:432b:33c9:ba68]) by smtp.gmail.com with ESMTPSA id im3sm19807763wjb.13.2016.10.24.08.11.23 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Mon, 24 Oct 2016 08:11:23 -0700 (PDT) In-Reply-To: <83bmyixixc.fsf@gnu.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAJFBMVEWbfGlUPDDHgE57V0jUupKjgIObY0PLrom9mH4dFRK4gmjPs41MxjOgAAACP0lEQVQ4T23Sv2vbQBQHcBk1xE6WyALX107VUEgmn6+ouUwpEQQ6uRjttkWP4CkBg2M0BQLBdPFZYPsyFYo7qEtKDQ7on+t7+nF2Ux8ahD587717OmNYrOvycHsZ+o2r051wHTHysAvGb8ygvgu4QWT0sCmkgZCIEnlV2X8BtyraazFGDuxhmKSQJMlwHQ7v5MHSNxmz78rfElwAa3ieVD9e+hBhjaPDDG6NgFo2f4wBMNIo5YmRtF0RyDgFjJjlMIWbnuM4x9MMfABGTlN4qgIQB4A1DEyA1BHWtfeWNUMwiVJKoqh97KrkOO+qzgluVYLvFCUKAX73nONeBr7BGMdM6Sg0kuep03VywLaIzRiVr+GAzKlpQIsAFnWAG2e6DT5WmWDiudZMIc6hYrMOmeMQK9WX0B+/RfjzL9DI7Y9/Iayn29Ci0r2i4f9gMimMSZLCDMalgQGU5hnUtqAN0OGvEmO1Wnl0C0wWSCEHnuHBqmygxdxA8oWXwbipoc1EoNR9DqOpBpOJrnr0criQab9ZT4LL+wI+K7GBQH30CrhUruilgP9DRTrhVWZCiAyILP+wiuLeCKGTD6r/nc8LOJcAwR6IBTUs+7CASw3QFZ0MdA2PI3zNziH4ZKVhXCRMBjeZ1DWMekKwDCASwExy+NQ86TaykaDAFHO4aP48y4 fIcDM5yOG8GcTLbOyp8A8azjJI93JFd1EA6yN8sSxMQJWoABqniRZVykYgRXErzrdqExAoUrRb0xfRp8p2A/4XmfilTtkDZ4cAAAAASUVORK5CYII= X-Face: -TR8(rDTHy/(xl?SfWd1|3:TTgDIatE^t'vop%*gVg[kn$t{EpK(P"VQ=~T2#ysNmJKN$"yTRLB4YQs$4{[.]Fc1)*O]3+XO^oXM>Q#b^ix, O)Zbn)q[y06$`e3?C)`CwR9y5riE=fv^X@x$y?D:XO6L&x4f-}}I4=VRNwiA^t1-ZrVK^07.Pi/57c_du'& X-PGP: 50751FF4 X-PGP-FP: AC1F 5F5C D418 88F8 CC84 5858 2060 4012 5075 1FF4 X-Hashcash: 1:20:161024:eliz@gnu.org::whiVeLXrVpCbYMM2:000000PBA X-Hashcash: 1:20:161024:24603@debbugs.gnu.org::NCe+AneP72Su5uYh:00000000000000000000000000000000000000002rb5 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:124966 Archived-At: On Tue, Oct 18 2016, Eli Zaretskii wrote: >> From: Michal Nazarewicz >> Cc: eliz@gnu.org >> Date: Tue, 18 Oct 2016 00:03:42 +0200 >>=20 >> As I continue working on the patchset, it keeps on growing. To >> somewhat limit that, I=E2=80=99ll start applying the patches. > > This is up to you to some degree, but I'd like to point out that it is > not necessary to apply patches piecemeal. You can merge to, or rebase > on, master everything in one go when you are done, there should be no > technical difficulties with that whatsoever. Correct. It=E2=80=99s more of a personal issue than technical one. The patchset keeps growing and it=E2=80=99s getting somewhat harder for me to k= eep of it. > Another potential issue I'd like us to avoid is to modify the same > parts of the code several times in related commits. If that happens, > I'd prefer a single commit that changes them only once. > > That said, separate pushes are justified if the parts you push provide > self-contained significant features or improvements. The second patch does add missing entries to case-table which is self-contained. The first patch is somehow more tricky in that regard since it has a lot of FIXME comments and it=E2=80=99s commit message mentions future patches. >> The first two map to the first two from original sumbission. The >> first gained tests for byte-8 characters and the second includes >> changes requested by Eli. >>=20 >> The third is a new patch. >>=20 >> Michal Nazarewicz (3): >> Add tests for casefiddle.c >> Generate upcase and downcase tables from Unicode data >> Don=E2=80=99t generate =E2=80=98X maps to X=E2=80=99 entries in case t= ables > > Can't the 3rd patch break some code which assumes the current state of > affairs, i.e. that the case-table entries for characters with no case > variants are identical to the character itself? IOW, this sounds like > an incompatible change, so it should be mentioned as such in NEWS, and > perhaps we should make sure we don't break too much code out there, > not sure if that is possible. I don=E2=80=99t think it can. The only place where I could find case-table= =E2=80=99s being used directly (as in values stored in it read) were functions in buffer.h and those have explicit path for missing entries: /* Downcase a character C, or make no change if that cannot be done. */ INLINE int downcase (int c) { Lisp_Object downcase_table =3D BVAR (current_buffer, downcase_table); Lisp_Object down =3D CHAR_TABLE_REF (downcase_table, c); return NATNUMP (down) ? XFASTINT (down) : c; } =20=20=20=20 /* Upcase a character C known to be not upper case. */ INLINE int upcase1 (int c) { Lisp_Object upcase_table =3D BVAR (current_buffer, upcase_table); Lisp_Object up =3D CHAR_TABLE_REF (upcase_table, c); return NATNUMP (up) ? XFASTINT (up) : c; } > What kind of memory savings does this produce, in terms of memory > footprint of a running Emacs process? Actually the more I think about it, the less I=E2=80=99m sure the savings a= re there. Since char tables allocate memory in batches, the space may still be allocated but simply unused. I=E2=80=99ll drop the patch for now. Maybe I=E2=80=99ll have time to investigate further at some future date. > I have no objections or comments to the other 2 patches. So yeah, I dunno how strongly you feel about it. I certainly can wait once the whole patchset is ready, but that may take a while. --=20 Best regards =E3=83=9F=E3=83=8F=E3=82=A6 =E2=80=9C=F0=9D=93=B6=F0=9D=93=B2=F0=9D=93=B7= =F0=9D=93=AA86=E2=80=9D =E3=83=8A=E3=82=B6=E3=83=AC=E3=83=B4=E3=82=A4=E3=83= =84 =C2=ABIf at first you don=E2=80=99t succeed, give up skydiving=C2=BB