From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: yordanm--- via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#63708: 29.0.60; rust-ts-mode not properly handling apostrophe Date: Fri, 26 May 2023 19:14:37 +0000 Message-ID: <8T8C4l5XryyVmB2cBTnmhGMnoELwHA2y1u1ZeMlg1WaQKzrPeOoe6L5hOQq3JPdsnG9r-puSlQfNZ091qBCGpVco-mC6ruhsQs0SvaPjkjQ=@proton.me> References: <83pm6pm0yz.fsf@gnu.org> <2MdRTHLlZtWDlCx6Ky-LFtla6-aBBs4PlNgTuatIC-h4OIuKdPmsmWsIokUQ9LBMHNvH_ooIvMUlQH8F8XOjNrEUUdC9FtR1l_e6RZSy7xU=@rjt.dev> <837cswmu5a.fsf@gnu.org> Reply-To: =?UTF-8?Q?=D0=99=D0=BE=D1=80=D0=B4=D0=B0=D0=BD_?= =?UTF-8?Q?=D0=9C=D0=B8=D0=BB=D0=B0=D0=B4=D0=B8=D0=BD=D0=BE=D0=B2?= Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="b1_xTsLUIjF7Wt77me3LKvISfRTN0SRTKtyOybkT1Q" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26693"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , 63708@debbugs.gnu.org, casouri@gmail.com To: Randy Taylor Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri May 26 21:15:23 2023 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 1q2cuJ-0006kw-5U for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 26 May 2023 21:15:23 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q2cu1-0007tl-QF; Fri, 26 May 2023 15:15:05 -0400 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 ) id 1q2cty-0007tO-IE for bug-gnu-emacs@gnu.org; Fri, 26 May 2023 15:15:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q2cty-0000YA-6T for bug-gnu-emacs@gnu.org; Fri, 26 May 2023 15:15:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q2ctx-0002Lj-Km for bug-gnu-emacs@gnu.org; Fri, 26 May 2023 15:15:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?=D0=99=D0=BE=D1=80=D0=B4=D0=B0=D0=BD_?= =?UTF-8?Q?=D0=9C=D0=B8=D0=BB=D0=B0=D0=B4=D0=B8=D0=BD=D0=BE=D0=B2?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 26 May 2023 19:15:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63708 X-GNU-PR-Package: emacs Original-Received: via spool by 63708-submit@debbugs.gnu.org id=B63708.16851284928997 (code B ref 63708); Fri, 26 May 2023 19:15:01 +0000 Original-Received: (at 63708) by debbugs.gnu.org; 26 May 2023 19:14:52 +0000 Original-Received: from localhost ([127.0.0.1]:50811 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q2ctn-0002L2-F2 for submit@debbugs.gnu.org; Fri, 26 May 2023 15:14:52 -0400 Original-Received: from mail-4325.protonmail.ch ([185.70.43.25]:59741) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q2ctk-0002Kl-8o for 63708@debbugs.gnu.org; Fri, 26 May 2023 15:14:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=proton.me; s=protonmail; t=1685128482; x=1685387682; bh=7F1UFO63s4tjKpPmEbZK7BXoIXkas0+eNIF00SJEym0=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=ifWW69mZKOJWgSxYMHCPQogt18+AyQwXfZL3oOpLI/NWmBGT415gTeDfGzmAIc9Bk qi16JLDMygKj/2ti8ZidJtLMcss9N0WmgBpTawKPI/HLCSCTAKFp3KyHFRg8JkXbFe 7JF3ZGCh4Gj6AayGgPQ+UgBZMPdFSwjXQ+BPWX7E/IfEZDmcOEpLSr63wJl3EGlaQ3 aB5HN4u5g5z6csgx1fZD30KyWHEr7ZJ/l3KXMz2TgrLoe7BPtIKNZsaInXBTDsVHXo QeqB1oZcyjr9fd2l3Q3wBEsebslkU8klEIUq6RkYH8PkWbCfl6rrnmTZVkpOIvVNHk OWVkJCtp5Vbbw== In-Reply-To: Feedback-ID: 46506384:user:proton 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:262450 Archived-At: This is a multi-part message in MIME format. --b1_xTsLUIjF7Wt77me3LKvISfRTN0SRTKtyOybkT1Q Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Here's a patch that implements Randy's idea. Sent with Proton Mail secure email. ------- Original Message ------- On Friday, May 26th, 2023 at 5:21 AM, Randy Taylor wrote: > On Thursday, May 25th, 2023 at 09:12, Eli Zaretskii eliz@gnu.org wrote: >=20 > > > Date: Thu, 25 May 2023 12:52:18 +0000 > >=20 > > > From: Randy Taylor dev@rjt.dev > > > Cc: =D0=99=D0=BE=D1=80=D0=B4=D0=B0=D0=BD =D0=9C=D0=B8=D0=BB=D0=B0= =D0=B4=D0=B8=D0=BD=D0=BE=D0=B2 yordanm@proton.me, 63708@debbugs.gnu.org, Yu= an Fu casouri@gmail.com > > >=20 > > > We probably need to augment rust-ts-mode--syntax-propertize where we = apply the string syntax property to any char_literal nodes. It would probab= ly be too late for emacs-29 though. > >=20 > > No, it won't be too late. rust-ts-mode is new in Emacs 29, so we > > should fix it in Emacs 29. So please try to find a fix for that; > > bonus points for making the fix as safe as possible for the release > > branch. > >=20 > > Thanks. >=20 >=20 > Sure, I'll take a look tomorrow or sometime during the weekend. --b1_xTsLUIjF7Wt77me3LKvISfRTN0SRTKtyOybkT1Q Content-Type: text/x-patch; name=0001-Fix-apostrophe-handling-in-rust-ts-mode.patch Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=0001-Fix-apostrophe-handling-in-rust-ts-mode.patch RnJvbSA2MTU5ZjUxNjI3NmEwNGU3ZTQ1ODg5ODJlODA2OTJjNjJjNmVhMjI5IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiA9P1VURi04P3E/PUQwPTk5PUQwPUJFPUQxPTgwPUQwPUI0PUQw PUIwPUQwPUJEPTIwPUQwPTlDPUQwPUI4PUQwPUJCPz0KID0/VVRGLTg/cT89RDA9QjA9RDA9QjQ9 RDA9Qjg9RDA9QkQ9RDA9QkU9RDA9QjI/PSA8eW9yZGFubUBwbS5tZT4KRGF0ZTogRnJpLCAyNiBN YXkgMjAyMyAxNzoyMzoyNiArMDMwMApTdWJqZ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AorY2hhcmFjdGVycyBhbmQgYXBwbGllcyB0aGUgYXBwcm9wcmlhdGUg dGV4dCBwcm9wZXJ0aWVzIHRvIHJlZmxlY3QKK3RoZWlyIHN5bnRhY3RpY2FsIG1lYW5pbmcuIgor ICAoZ290by1jaGFyIGJlZykKKyAgKHdoaWxlIChzZWFyY2gtZm9yd2FyZCAiJyIgZW5kIHQpCisg ICAgKHdoZW4gKHN0cmluZy1lcXVhbCAiY2hhcl9saXRlcmFsIgorICAgICAgICAgICAgICAgICAg ICAgICAgKHRyZWVzaXQtbm9kZS10eXBlCisgICAgICAgICAgICAgICAgICAgICAgICAgKHRyZWVz aXQtbm9kZS1hdCAobWF0Y2gtYmVnaW5uaW5nIDApKSkpCisgICAgICAocHV0LXRleHQtcHJvcGVy dHkgKG1hdGNoLWJlZ2lubmluZyAwKQorICAgICAgICAgICAgICAgICAgICAgICAgIChtYXRjaC1l bmQgMCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAnc3ludGF4LXRhYmxlCisgICAgICAgICAg ICAgICAgICAgICAgICAgJyg3KSkpKQogICAoZ290by1jaGFyIGJlZykKICAgKHdoaWxlIChyZS1z ZWFyY2gtZm9yd2FyZCAocnggKG9yICI8IiAiPiIpKSBlbmQgdCkKLSAgICAocGNhc2UgKHRyZWVz aXQtbm9kZS10eXBlCi0gICAgICAgICAgICAodHJlZXNpdC1ub2RlLXBhcmVudAotICAgICAgICAg ICAgICh0cmVlc2l0LW5vZGUtYXQgKG1hdGNoLWJlZ2lubmluZyAwKSkpKQotICAgICAgKCJ0eXBl X2FyZ3VtZW50cyIKLSAgICAgICAocHV0LXRleHQtcHJvcGVydHkgKG1hdGNoLWJlZ2lubmluZyAw KQotICAgICAgICAgICAgICAgICAgICAgICAgICAobWF0Y2gtZW5kIDApCi0gICAgICAgICAgICAg ICAgICAgICAgICAgICdzeW50YXgtdGFibGUKLSAgICAgICAgICAgICAgICAgICAgICAgICAgKHBj YXNlIChjaGFyLWJlZm9yZSkKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAoPzwgJyg0IC4g Pz4pKQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICg/PiAnKDUgLiA/PCkpKSkpKSkpCisg ICAgKGxldCAoKHBhcmVudC10eXBlICh0cmVlc2l0LW5vZGUtdHlwZQorICAgICAgICAgICAgICAg ICAgICAgICAgKHRyZWVzaXQtbm9kZS1wYXJlbnQKKyAgICAgICAgICAgICAgICAgICAgICAgICAo dHJlZXNpdC1ub2RlLWF0IChtYXRjaC1iZWdpbm5pbmcgMCkpKSkpKQorICAgICAgKHdoZW4gKG9y IChzdHJpbmctZXF1YWwgcGFyZW50LXR5cGUgInR5cGVfYXJndW1lbnRzIikKKyAgICAgICAgICAg ICAgICAoc3RyaW5nLWVxdWFsIHBhcmVudC10eXBlICJ0eXBlX3BhcmFtZXRlcnMiKSkKKyAgICAg ICAgKHB1dC10ZXh0LXByb3BlcnR5IChtYXRjaC1iZWdpbm5pbmcgMCkKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgIChtYXRjaC1lbmQgMCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICdz eW50YXgtdGFibGUKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIChwY2FzZSAoY2hhci1iZWZv cmUpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICg/PCAnKDQgLiA/PikpCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICg/PiAnKDUgLiA/PCkpKSkpKSkpCiAKIDs7OyMjI2F1dG9s b2FkCiAoZGVmaW5lLWRlcml2ZWQtbW9kZSBydXN0LXRzLW1vZGUgcHJvZy1tb2RlICJSdXN0Igot LSAKMi40MC4xCgo= --b1_xTsLUIjF7Wt77me3LKvISfRTN0SRTKtyOybkT1Q--