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: emacs-30 f0daa2f2153: Conservative heuristic for tree-sitter parser ranges (bug#73324) Date: Tue, 24 Sep 2024 09:10:49 +0200 Message-ID: <871q19zfuu.fsf@gmail.com> References: <172663360099.23732.9998257239822693024@vcs2.savannah.gnu.org> <20240918042641.56C7BC410E2@vcs2.savannah.gnu.org> <87v7yt322l.fsf@yahoo.com> <87y13kz1ji.fsf@yahoo.com> <4A9D96DA-C260-46B6-A3BC-E2F4A9E5C8E2@gmail.com> <87tte7mlhh.fsf@gmail.com> <867cb2h9on.fsf@gnu.org> <87wmj2uvtu.fsf@gmail.com> <864j66fct2.fsf@gnu.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="37189"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: casouri@gmail.com, luangruo@yahoo.com, stefankangas@gmail.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Sep 24 09:12:00 2024 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 1ssziI-0009Su-VZ for ged-emacs-devel@m.gmane-mx.org; Tue, 24 Sep 2024 09:11:59 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sszhM-0005p9-HI; Tue, 24 Sep 2024 03:11:00 -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 1sszhJ-0005oz-T9 for emacs-devel@gnu.org; Tue, 24 Sep 2024 03:10:57 -0400 Original-Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sszhH-0001xX-Jb; Tue, 24 Sep 2024 03:10:57 -0400 Original-Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-42cb1e3b449so7619455e9.3; Tue, 24 Sep 2024 00:10:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727161851; x=1727766651; darn=gnu.org; 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=bZGYzG+S81ErAAo69lUVqP/47W7N/V5mQfMr5jENUFM=; b=GH34w55krsDUs6/jZCl3WR7uk/PCAFKo9tT4lNEkJUoqa005NtITyJUSLk4kZpH1H/ qPABa0xBESOsZKxAmQ80UMu7mo1MylpMZE9QlG3pSebVwpHxJEnhPzszO3ibQRNs6+LK MT1SGgIv+LG0ky9Zqvm8kduqATrDSdF4yXpTGsFwLNFwcjw0Cpiud6cp4Swp1h9vh5jx 8LfQoXF02N9yUs39NA5t+Ram45PQovemeKuD0WFQZMyOx29no4fxeclIK+53ASiAw51V 9a5AaFl5t26AmPu1mhmxP6B8i/eIb9WUR06BgfCyY5BjssYjAA4jhxTXHjfHh/q4IbX2 02PQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727161851; x=1727766651; 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=bZGYzG+S81ErAAo69lUVqP/47W7N/V5mQfMr5jENUFM=; b=n84i76Rt3jBnBNX2Q9yYHZ7ZIoiZemimy6pyTBNed4yPv6NeAZ4/jtNn02ITt3KYHl glQYrVTiE4hPBv9pG585v9Yj1R88BECdl67d2IN8FuO4uAsqf5QikAFxXGEyv5UfOTIa pfkbZ0c0oILthJ5rt0e2ciQr6VhZK3dwnZYfBGY6WH7JJE4IEk1EN2Jl5GZCiSaYENlZ Jm1fZ4D+b1RJwIDz0Ikvh1BYnZv9GSK0ZagmYrhIOT3ERCXydA8fycZJM8U9sCFQ5n4d tCzNmhzEA39phKJUzY3DNFptH48CI12h+w50+uhjNMpGbqUM9mMU/+qjKrDW8/9/3YoL Ckyw== X-Forwarded-Encrypted: i=1; AJvYcCXi7wN+yBvMHvQNv+JdLy19QIuyHvwVQlx7kV+TXFGCqgWQ2PjvYoL81tI85nJUFyxULQFMip6FZoUKhA==@gnu.org X-Gm-Message-State: AOJu0YxW/CtWp4ymHY3NTj5BDGK54h0GkO4/VmaLNXh3Elt+ZGYPOcdA m8JtcB01gmHvPtZMv5MPg6gILHufCPMzhx/A8T1WQe4r/VWnjPFRgtyqnBqh X-Google-Smtp-Source: AGHT+IFPB1BfJ3ZsTA3ipR9lGnYOVzw/qPpQKBkZ/7AMf0QRqgh2m5219ICMh/5VBc2BUtTv2W9rlw== X-Received: by 2002:a7b:c398:0:b0:42c:bab1:b8cc with SMTP id 5b1f17b1804b1-42e7b04cf4amr42553005e9.4.1727161851263; Tue, 24 Sep 2024 00:10:51 -0700 (PDT) Original-Received: from amdahl30 ([2a01:e0a:253:fe0:2ef0:5dff:fed2:7b49]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37cbc2c2652sm781931f8f.46.2024.09.24.00.10.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Sep 2024 00:10:50 -0700 (PDT) In-Reply-To: <864j66fct2.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 23 Sep 2024 21:24:41 +0300") Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=kevin.legouguec@gmail.com; helo=mail-wm1-x32b.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:324010 Archived-At: Eli Zaretskii writes: >> From: K=C3=A9vin Le Gouguec >> Cc: casouri@gmail.com, luangruo@yahoo.com, stefankangas@gmail.com, >> emacs-devel@gnu.org >> Date: Mon, 23 Sep 2024 19:24:45 +0200 >>=20 >> > Isn't it a bug in magit that it doesn't do something like that >> > already? Fill column is just the tip of an iceberg, because a log >> > message is generally human-readable text, and so should benefit from >> > other features of Text mode and its descendants, like spell-checking >> > etc. >>=20 >> It does try to do "something like that"; AFAIU the two main knobs are: >>=20 >> * git-commit-major-mode lets users pick their preferred text-adjacent >> major mode (or it lets maintainers choose it, e.g. setting that variable >> in a checked-in .dir-locals.el; the default is text-mode), >>=20 >> * git-commit-setup-hook lets users turn on useful log-editing features; >> the defcustom includes various opt-in functions. Robert mentioned >> magit-generate-changelog; there's also git-commit-turn-on-flyspell and >> bug-reference-mode. >>=20 >> (There's also a mysterious git-commit-setup-changelog-support that >> checks for >>=20 >> (fboundp 'log-indent-fill-entry) ; New in Emacs 27 >>=20 >> but I can't find any trace of log-indent-fill-entry in the tree so not >> sure what that's about) > > That sounds to me like a heap of patches when just having a full-blown > mode like VC does would have done the job cleanly and seamlessly. That's how it was 10 years ago: there was a single major mode, git-commit-mode, which "did it all" (setup emacsclient as git's EDITOR, setup font-lock, provide key bindings, etc). Then the decision was taken to move to configurable-major-mode-plus-hook. The commit log for that change=C2=B9 focuses on the technical details over the motivation, but looking at the current defcustom's selection of major modes, I guess the use-case is obvious - let people pick their preferred markup for authoring messages, and tuck all the "VC-specific extra features" under a dedicated minor mode & hook. >> So what's "missing" from Magit's git-commit.el is a knob dedicated to >> the fill-column for commit messages. > > I'm quite sure that soon enough someone will come with more "missing" > stuff. I still think they should use something very similar to > log-edit-mode there. It doesn't make much sense not to. E.g., the > .dir-locals settings would have been in effect for magit users as > well. Right. And in principle users should be able to opt-in to log-edit-mode (or vc-git-log-edit-mode?) by configuring git-commit-major-mode. I just don't expect that to be seamless - because (AFAIR; apologies for inaccuracies) log-edit-mode depends on callbacks set by vc-$BACKEND.el, which in turn depend on bookkeeping usually managed by vc.el commands; Magit steers mostly clear of that bookkeeping. tl;dr I don't disagree but I don't see log-edit-mode integration into Magit to be the path of least resistance. (That shouldn't stop anyone from trying though, or submit a feature request; this is all just my 2=C2=A2 as a {heavy Magit,occasional VC} user) =C2=B9 2014-03-18 "git-commit: allow use of arbitrary major mode" (feb58998) https://github.com/magit/magit/commit/feb58998fc128824728959695a9448e7752= c2ca3.patch