From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Theodor Thornhill via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#61374: 30.0.50; Wrong mark-sexp with tree-sitter Date: Thu, 09 Feb 2023 10:41:52 +0100 Message-ID: <87y1p79nvj.fsf@thornhill.no> References: <875ycbitav.fsf.ref@aol.com> <875ycbitav.fsf@aol.com> <835ycbnxyc.fsf@gnu.org> <871qmzb56k.fsf@thornhill.no> <83fsbfmd75.fsf@gnu.org> Reply-To: Theodor Thornhill Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34515"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 61374@debbugs.gnu.org, spacibba@aol.com, casouri@gmail.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Feb 09 10:42:16 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 1pQ3RY-0008oM-1M for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 09 Feb 2023 10:42:16 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pQ3RN-00012x-C2; Thu, 09 Feb 2023 04:42:05 -0500 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 1pQ3RK-00012c-UB for bug-gnu-emacs@gnu.org; Thu, 09 Feb 2023 04:42:03 -0500 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 1pQ3RK-00006d-8B for bug-gnu-emacs@gnu.org; Thu, 09 Feb 2023 04:42:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pQ3RJ-0001hJ-T2 for bug-gnu-emacs@gnu.org; Thu, 09 Feb 2023 04:42:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Theodor Thornhill Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 09 Feb 2023 09:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61374 X-GNU-PR-Package: emacs Original-Received: via spool by 61374-submit@debbugs.gnu.org id=B61374.16759357186515 (code B ref 61374); Thu, 09 Feb 2023 09:42:01 +0000 Original-Received: (at 61374) by debbugs.gnu.org; 9 Feb 2023 09:41:58 +0000 Original-Received: from localhost ([127.0.0.1]:57540 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pQ3RG-0001h1-H8 for submit@debbugs.gnu.org; Thu, 09 Feb 2023 04:41:58 -0500 Original-Received: from out-192.mta0.migadu.com ([91.218.175.192]:54281) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pQ3RD-0001gs-W4 for 61374@debbugs.gnu.org; Thu, 09 Feb 2023 04:41:57 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thornhill.no; s=key1; t=1675935714; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=DlxBnS/PeFLddiaRQuDYTMATWdQ28s91eo9EDURHad8=; b=GWEir7zhhlzmQHXYMNABMX/0NZbXRf+WFz1KEF1R49BLmdbUSvhWtjzZghfTEPEO5uC6/Y GAnrEDQ04jYKAQ5LU4kF95XwHRDZAo+CL6GnlMi9mSFWGND7w3jMT/KyRmMxorqy/ITmOD 6pEpjddkTDBG8wZcg6qugSnfV4uTD1+lc4nFCc6wlL0e7lgZiQLSahhU5yky8RxhfFV94h Ha+NH+zPPGGSf1RE9/GX4TJV4TO1fWHYLW1ZElrODPd/7kwxxFfn4ZxvTP0z+ECzFFkzVw hsqqiWyrSciozS5wHGY1s8sZnVxyH4fVQGEjvXGkcQzJ8DmbLJLe3l+xiHfVEQ== In-Reply-To: <83fsbfmd75.fsf@gnu.org> X-Migadu-Flow: FLOW_OUT 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:255201 Archived-At: Eli Zaretskii writes: >> From: Theodor Thornhill >> Cc: 61374@debbugs.gnu.org >> Date: Thu, 09 Feb 2023 09:42:43 +0100 >> >> I think to remember why I decided on the current settings in >> 'treesit-sexp-type-regexp' - compound_statement is very frequently used >> in the c/c++ grammars, and iirc that makes sexp-moving almost always >> move to end of the next or current compound_statement. > > Can you show some examples that illustrate these issues? I'm not sure > I follow your line of reasoning, and thus cannot understand the > relevant considerations and decisions, and their expected effects on > behavior. > > Thanks. consider same code as in the first mail: { vector myvar; } If point is before the first curly, C-M-f will move to after the semi. if "compound_statement" is added to the regexps, it will move to after the closing curly - all good. Now if point is at the c in 'vector', now we will also move to after the closing curly, not the first space or after the semi. This will happen in many places iirc. I'm not saying it's unfixable, just that I need to think a little about it, and some expected examples would be nice. Did that help? Theo