From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: mvar Newsgroups: gmane.emacs.bugs Subject: bug#44465: 28.0.50; tcl-mode mismatched parenthesis for nested [strings] Date: Sun, 15 Aug 2021 01:22:50 +0300 Message-ID: <87zgtjwts5.fsf@cnu407c2zx.nsn-intra.net> References: <87eel8asmr.fsf@cnu407c2zx.nsn-intra.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17673"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: mvar , monnier@iro.umontreal.ca To: 44465@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Aug 15 00:24:10 2021 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 1mF24Y-0004Lb-Ef for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 15 Aug 2021 00:24:10 +0200 Original-Received: from localhost ([::1]:35004 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mF24X-0000qn-2v for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 14 Aug 2021 18:24:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46750) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mF24Q-0000qc-Cx for bug-gnu-emacs@gnu.org; Sat, 14 Aug 2021 18:24:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33948) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mF24Q-0005lS-6A for bug-gnu-emacs@gnu.org; Sat, 14 Aug 2021 18:24:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mF24P-0001cC-Ui for bug-gnu-emacs@gnu.org; Sat, 14 Aug 2021 18:24:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: mvar Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 14 Aug 2021 22:24:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44465 X-GNU-PR-Package: emacs Original-Received: via spool by 44465-submit@debbugs.gnu.org id=B44465.16289797856119 (code B ref 44465); Sat, 14 Aug 2021 22:24:01 +0000 Original-Received: (at 44465) by debbugs.gnu.org; 14 Aug 2021 22:23:05 +0000 Original-Received: from localhost ([127.0.0.1]:45494 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mF23V-0001ac-DM for submit@debbugs.gnu.org; Sat, 14 Aug 2021 18:23:05 -0400 Original-Received: from mail-wr1-f53.google.com ([209.85.221.53]:33649) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mF23S-0001Zl-PJ for 44465@debbugs.gnu.org; Sat, 14 Aug 2021 18:23:03 -0400 Original-Received: by mail-wr1-f53.google.com with SMTP id r7so18280481wrs.0 for <44465@debbugs.gnu.org>; Sat, 14 Aug 2021 15:23:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=RIr4Wc0F0yTBaFcPCfFOdCGotI0VDGKZRZv82j3fPvY=; b=LUfoAnV64xcNbqZGOQcGrid6jVdehIHBtfSB5+1eNV13UCRCTUohIebyHKJspK2HNZ wZ1i3eSuxSjPcJtF4txwYGLmCyy5vKBtSAIMgVJP3IEovTtgIuJdexXNaSU5bmsIyXw4 eVPwFqUPMpnXYa/VJhkHNTmSoPs+5Lk4H0nTwOQ4W3fnNdzD9jEmfw8S9gVw8iEgImGn yfLbPXTs/7EedkXCbh4TPvFhRbFEs/mWdFmymFVuqNW5EX7NZKeyWTqbRM1hDGBqMRJw ZkvcVyYMKlfxqkeSAPc4JergDfHACHGMIoDGbdAi5/BgaYRxSdpNATX6zxP1riXxrlZP BFAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=RIr4Wc0F0yTBaFcPCfFOdCGotI0VDGKZRZv82j3fPvY=; b=Hx37iL+vFQKny0fWTCQz37zQYPIvDo9F3FywX2EhyX1BOhwUf1aLzDJ3AktPtL70kg LUci8fSruh+cMJ0FcpXjko+7SZLwhP10i1Doq73f65lxlEd2Lm+5zqAh2OTdz37Gdm5f GAgYetSYSNVV/FUnuoQ6qvg7e0lijJ8b5mDCdSYOoNN4qNq+ZG91klwfDtY3mhGgOPPA B57lhuT+Ks9CxsG0vwXnlrxbFqz0dNref7zV9OVlwbW4Xhb5tCdrt4vT89K4LbbBx/s+ 0wf+JUJ+eI2BFlRR6xSqvmzA9k97Fq2VpOFb9dpeioaEWjwQXC07gseCW4MkKtbybTtC BWIg== X-Gm-Message-State: AOAM5324ojPv983UeVMqfnWusob8npwGl1va+/k6OsF09RyEXjP2Gbob fSSAhRfwBf6kYPfpU6PIKwc= X-Google-Smtp-Source: ABdhPJwVnTurb/E5n7ALTpGLCaURaL4hsy9u1EFpykJLVpOgVI/IEXdSNdKA1FcvD26A5bNu0q90VQ== X-Received: by 2002:adf:f290:: with SMTP id k16mr1306364wro.88.1628979776937; Sat, 14 Aug 2021 15:22:56 -0700 (PDT) Original-Received: from cnu407c2zx.nsn-intra.net (212.251.115.128.dsl.dyn.forthnet.gr. [212.251.115.128]) by smtp.gmail.com with ESMTPSA id z19sm6328052wma.0.2021.08.14.15.22.56 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 14 Aug 2021 15:22:56 -0700 (PDT) X-Google-Original-From: mvar In-Reply-To: <87eel8asmr.fsf@cnu407c2zx.nsn-intra.net> (mvar's message of "Thu, 05 Nov 2020 14:35:24 +0200") 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:211857 Archived-At: mvar writes: > After the applied fix in #39277, font locking fails in the following case: > > set a "Testing: [split "192.168.1.1/24" "/"] address" > > the last bracket ] reports "no matching parenthesis found" > > this part: > > 192.168.1.1/24" > > is not locked as a string, but "/" is. > > Note that the whole argument is evaluated properly by tclsh as a > single contiguous string: > > % set a "Testing: [split "192.168.1.1/24" "/"] address" > Testing: 192.168.1.1 24 address > > i can't find a way around this behavior even with escaping the double > quotes or using single quotes, because doing that will change how the > argument is evaluated by tcl (array instead of string): > > % set b "Testing: [split '192.168.1.1/24' '/'] address" > Testing: {} 192.168.1.1 24 {} address > % set a "Testing: [split \"192.168.1.1/24\" \"/\"] address" > Testing: {} 192.168.1.1 24 {} address > % > i've been trying every once in a while to figure out a solution to this bug but keep failing. @Stefan i've added you to cc: in case you can help a bit and provide some tips. In the fix for #39277 you've added tcl--syntax-of-quote and also this comment: (defconst tcl-syntax-propertize-function ;; FIXME: Handle the [...] commands nested inside "..." strings. so my question, is the problem described in this bug report supposed to be fixed as a regexp in the tcl-syntax-propertize-function rules list or should i try to extend tcl--syntax-of-quote to cover this case too? I've failed in both accounts so far, especially the regexp i can't find the proper pattern to fix this and not break something else (which kind of proves the saying "you fix 1 problem with regexp - you now have 2 problems" :) thank you in advance, Michalis