From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?K=C3=A9vin_Le_Gouguec?= Newsgroups: gmane.emacs.devel Subject: Re: [SPAM UNSURE] Re: Plug treesit.el into other emacs constructs Date: Sat, 17 Dec 2022 16:30:31 +0100 Message-ID: <87sfhe3v54.fsf@gmail.com> References: <87wn6whete.fsf@thornhill.no> <861qp1tvcw.fsf@stephe-leake.org> <87fsdfacoc.fsf@gmail.com> <86359fr2b2.fsf@stephe-leake.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8949"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Stefan Monnier , Theodor Thornhill , emacs-devel@gnu.org, eliz@gnu.org, casouri@gmail.com To: Stephen Leake Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Dec 17 16:31:39 2022 Return-path: Envelope-to: ged-emacs-devel@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 1p6ZA3-00027L-Du for ged-emacs-devel@m.gmane-mx.org; Sat, 17 Dec 2022 16:31:39 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p6Z98-00006A-B4; Sat, 17 Dec 2022 10:30:42 -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 1p6Z95-00005a-0B for emacs-devel@gnu.org; Sat, 17 Dec 2022 10:30:39 -0500 Original-Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p6Z91-0006fD-Js; Sat, 17 Dec 2022 10:30:37 -0500 Original-Received: by mail-wm1-x331.google.com with SMTP id i187-20020a1c3bc4000000b003d1e906ca23so3090495wma.3; Sat, 17 Dec 2022 07:30:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=L3c5+CSoLRmcFUUWfak59ciMNWsXl8KVB8XbKMZzOcU=; b=UzQOf8BQxic/KVI0luRKLAoEOHENqFtS4aqOkaY7s3U1bjuUHuiz9EV6CcN2UkUey+ cAGEPXidaz6R8piKGskmrMO4ncqR3N/ZkTud88puIhc6KkS2RVx65KAfbejlX3p3kbYt azqqt1EuMJ+JkYmdWlxppKWObJUlTVS7sWOsdjkfMPSqvcFHwyhZZ3PCBEAc8a20BlBr FdU0kZJvRmKQ268nwBtXwSjo2nxxVUWrdHpSAeKvuBJtQUGTMJVKe3IMlEJlDdFuIQ45 Dvnoml5b/3CQX+TU1DI6Mok5yLnUXx9/i/Bz8OBzAswpHUPX3iwmm9lLEnPv9NPnEUPV cAXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=L3c5+CSoLRmcFUUWfak59ciMNWsXl8KVB8XbKMZzOcU=; b=fxaGwjdLaxsYilVWDgYbrfL4BAzHHr7tzBa06qtIK65+XGPykljXu88xVwFn0HVlD/ TqVptM2XSxr/jhAXXohKpOAlMsHLfT15SFBybDOlqZcR12pxrKK6iZIn9zKgci84DOa7 5YJqtl+w7kcVmd4Eg/nsOUmNnzQfcVIQFk1epmlpGQ1dshwa+QN6w2/JR1SdAkZ7pwE2 NBEOqEdfe3tdRUmhONwBCcieSnoPyeK/PfTk0zYofpe8VjeQAHXZuXONxDXL61iVxMzA yNRFQ+fQZdO4MkmpvHOByZ51LyRx4So7SQTTHORhZnO4FQcKWAmrvIKp2TVBfyIWmexd iLNA== X-Gm-Message-State: ANoB5pkuAmBjCDY4bVJCoKZFp2LB4MVDy69eG/A0s1rObMgvuLGXg87M qVgv32PC4UTV3fmJ6R/qqOA= X-Google-Smtp-Source: AA0mqf5/dSILioMep0oF6Pu/IbLb1Q+8e/ZErD1GJ7GBBOF+VNESRUT/9vdABiY9j4QYi/pqkDh1Xw== X-Received: by 2002:a05:600c:3647:b0:3d2:3e73:7175 with SMTP id y7-20020a05600c364700b003d23e737175mr10317060wmq.40.1671291033036; Sat, 17 Dec 2022 07:30:33 -0800 (PST) Original-Received: from amdahl30 ([2a01:e0a:253:fe0:2ef0:5dff:fed2:7b49]) by smtp.gmail.com with ESMTPSA id j9-20020a05600c190900b003b4cba4ef71sm15220872wmq.41.2022.12.17.07.30.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Dec 2022 07:30:32 -0800 (PST) In-Reply-To: <86359fr2b2.fsf@stephe-leake.org> (Stephen Leake's message of "Fri, 16 Dec 2022 03:54:57 -0800") Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=kevin.legouguec@gmail.com; helo=mail-wm1-x331.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:301563 Archived-At: Stephen Leake writes: > K=C3=A9vin Le Gouguec writes: > >> Stephen Leake writes: >> >>> ada-mode has something similar; forward-sexp goes to the next labeled >>> keyword. That's more useful than stopping at every little AST node. It >>> relies on markup in the grammar to label the keywords; tree-sitter would >>> need another markup similar to the current indent markup. >> >> Chiming in since I got bitten by this in ada-mode right now: as someone >> used to mark long_identifiers_with_underscores with C-M-SPC in other >> modes, it's tripping me up that mark-sexp (and sexp movement in general) >> "overshoots" and goes over much bigger expressions in ada-mode. > > Sounds like we need an option for this in ada-mode? That'd be very welcome indeed, as far as I am concerned (no rush though; I can take a stab at it on a rainy day if no-one else is clamoring for it). > My solution to this is to bind C- to (forward-symbol 1), and > C- to (forward-symbol -1), so these keys move over whole > identifiers. Interesting; I don't think the *-symbol commands were on my radar (no mark-symbol though AFAICT). (I see now we also have {forward,backward}-list, bound to C-M-{n,p}; that's another pair I don't often use; I do use C-M-{d,u} a lot, but for "horizontal" traversal I usually rely on C-M-{f,b})