From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.bugs Subject: bug#66711: treesit-default-defun-skipper moves to bol if there is any whitespace Date: Sun, 10 Dec 2023 17:45:18 -0800 Message-ID: References: <877cndme2j.fsf@honnef.co> <83jzr5bq6g.fsf@gnu.org> <837cmfo3ts.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33890"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: 66711-done@debbugs.gnu.org, dominik@honnef.co To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Dec 11 02:46:07 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 1rCVN0-0008cO-M9 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 11 Dec 2023 02:46:06 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rCVMo-00044l-HU; Sun, 10 Dec 2023 20:45:54 -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 1rCVMi-0003qX-83 for bug-gnu-emacs@gnu.org; Sun, 10 Dec 2023 20:45:50 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rCVMh-0000eV-Vk for bug-gnu-emacs@gnu.org; Sun, 10 Dec 2023 20:45:47 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rCVMw-0004xX-Dl for bug-gnu-emacs@gnu.org; Sun, 10 Dec 2023 20:46:02 -0500 Resent-From: Yuan Fu Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Mon, 11 Dec 2023 01:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 66711 X-GNU-PR-Package: emacs Mail-Followup-To: 66711@debbugs.gnu.org, casouri@gmail.com, dominik@honnef.co Original-Received: via spool by 66711-done@debbugs.gnu.org id=D66711.170225914219022 (code D ref 66711); Mon, 11 Dec 2023 01:46:02 +0000 Original-Received: (at 66711-done) by debbugs.gnu.org; 11 Dec 2023 01:45:42 +0000 Original-Received: from localhost ([127.0.0.1]:52170 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rCVMb-0004wk-Qd for submit@debbugs.gnu.org; Sun, 10 Dec 2023 20:45:42 -0500 Original-Received: from mail-yw1-x1135.google.com ([2607:f8b0:4864:20::1135]:61912) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rCVMZ-0004wW-CP for 66711-done@debbugs.gnu.org; Sun, 10 Dec 2023 20:45:41 -0500 Original-Received: by mail-yw1-x1135.google.com with SMTP id 00721157ae682-5d3c7ef7b31so36285727b3.3 for <66711-done@debbugs.gnu.org>; Sun, 10 Dec 2023 17:45:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702259119; x=1702863919; darn=debbugs.gnu.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=aUYkPzd1cV9dQrs+h138t+3pHqHa69qtqkXPqrdJymA=; b=YOYmbxmlGkL+6lb3SP1Ve+XPNe7xT16KpzMnQpKRNcrnk4xrdBrXOxWfdtIx4PkLI2 FkM+DtCHYHGh/hCMHmid4NK8xwXnOzQW3oTP2OmwgLZ9NsQBgxkzEsJnObfiAOf+CC0n b5GPriO2vIV6zxrSOidia0D9btTUM8LO4C4QOPPfmbBd4wnPLGjWuCXyS4ZPsJHHw4nD 02kPF/PcOnoh2hiWvO6YuWN4ttCjj+lkYiUcW3jFhy16hLENcKlGGZIhA5/6oq+6UE66 8A1sdICAl7PFopBFz3NO14bOjuO/ibjpt8bLMC0SNfs3zU4zCddOEdWWkqgTIQUG5eWT lPNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702259119; x=1702863919; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=aUYkPzd1cV9dQrs+h138t+3pHqHa69qtqkXPqrdJymA=; b=ZNLVdfnGssVXkgZrbcnnfUJcIzb4gDV9M4mJL2wavPJw5mNSd8D1mUM9URRu3K3uay 3SgRY8hNPA2K58ot8oNzd3pD6j4zfd2s9EB76q0J00NixsFFgIYxa5AI+RCTwyKsczxp EYg+VPL44Os2iVx8z0Bjgmnwpn2mPfsYARhR+Ihy08ER0Wip6+SAuuFTiqZ5KCBC4tM/ yY7PGanTygpggIH87sk91l180bdM9+UQN++zjxJoc255VPpx3BZpBm/zapHEymhd4N3W 3qzfxhPZE7bbd/SmSLRHdPg9GzVckQuHO1/UhJ8bsCryTZKWNsa+mHxts0WVyM39ZQow FhsA== X-Gm-Message-State: AOJu0YwFSaYR4fP6sFoeZPYJJB64St1OH3jjXJjo64kRSaV2177fVqzs Wip6JilRjMc3Tudmgacc6Y4= X-Google-Smtp-Source: AGHT+IEutEhYlNrvtaMcvOsM0FOhd1B3yKMI1d72CGvcoPHRhR2cdrwodLQFHL0pgYeY1cK/yI4jGQ== X-Received: by 2002:a81:9290:0:b0:5d3:d6c3:dce with SMTP id j138-20020a819290000000b005d3d6c30dcemr2011613ywg.12.1702259119386; Sun, 10 Dec 2023 17:45:19 -0800 (PST) Original-Received: from [192.168.1.7] (172-117-161-177.res.spectrum.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id iw1-20020a170903044100b001cc29ffcd96sm4962312plb.192.2023.12.10.17.45.18 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 10 Dec 2023 17:45:19 -0800 (PST) Content-Language: en-US In-Reply-To: <837cmfo3ts.fsf@gnu.org> 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:275958 Archived-At: On 11/18/23 12:36 AM, Eli Zaretskii wrote: > Ping! Yuan, any comments? > >> Cc: 66711@debbugs.gnu.org >> Date: Sun, 29 Oct 2023 13:53:27 +0200 >> From: Eli Zaretskii >> >>> From: Dominik Honnef >>> Date: Mon, 23 Oct 2023 19:41:24 +0200 >>> >>> treesit-default-defun-skipper has the following bit of code: >>> >>> ;; Moving backward, but there are some whitespace (and only >>> ;; whitespace) between point and BOL: go back to BOL. >>> ((looking-back (rx (+ (or " " "\t"))) >>> (line-beginning-position)) >>> (beginning-of-line)))) >>> >>> However, as written, the regexp matches if there is any whitespace >>> before point, not if there is only whitespace. >> Yuan, any comments? Thanks, Dominik and Eli. I applied a patch that should fix the regexp. Yuan