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: Mon, 23 Sep 2024 19:24:45 +0200 Message-ID: <87wmj2uvtu.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> 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="16611"; 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 Mon Sep 23 19:25:48 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 1ssmom-0004B0-7l for ged-emacs-devel@m.gmane-mx.org; Mon, 23 Sep 2024 19:25:48 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ssmo1-00080n-CF; Mon, 23 Sep 2024 13:25:02 -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 1ssmnt-00080Q-PE for emacs-devel@gnu.org; Mon, 23 Sep 2024 13:24:54 -0400 Original-Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ssmnr-0006vo-EI; Mon, 23 Sep 2024 13:24:53 -0400 Original-Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-374b3632ef0so295754f8f.2; Mon, 23 Sep 2024 10:24:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727112288; x=1727717088; 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=MBO5G9QQZ/uqd43JA4UhGq4NwHbj4ABRGWiINvccKtQ=; b=iNOKKnLK9AaR3QawVJUlDtZxZbKiO5RjeiJn7FxUHXo+JnJuop8uHL1a0exwCd+CkB MY5aS9sBHr9GFdxKX9Qssmo+C60NGfFDQLJDkiefoZiY0F32J+qCHAZKBYCddNKnEWvq YadvUQCPpL2Ys2aVfGSzl7+2PYB47H6j5KsmmH8kKEArtn9os7Vbf+HawAt8O0JrZC+C +uH/6/D6AhOPObIk2gmCaebP/fhN7+GhH5c/prRTssHvStbn9raOKcq/KH7oKh1q6KO/ xMpFPJP0kwICIb6S8Xw/A+RW0EYlManNXuuswhMn8A+jb/JxJBzfHJYKctAGRHvdLaPK y+cA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727112288; x=1727717088; 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=MBO5G9QQZ/uqd43JA4UhGq4NwHbj4ABRGWiINvccKtQ=; b=Hbm0L6xcJtsiTYFNFT6VVLh34Vqtbf17Gpc7g61WE68Urmr7AIJXTcfnXEABtlWKAv MhfbUJrYcP3lJQEnK2ZcJDCTtV/onFStTRjdpMyIgfmahpj6cQ9jCbwYrjR1jJ7ViTAb FwrK/vHZ64GnykiFIxErMH/6nFeEseebSr1upQkn96vlh3FQi0Oc7GTwQwuTqWIfdqB+ pVbwpKyIGBNlBRtJymAfJajgbIxOmoOvWjoDC6kjZFnRDCzHL3koTIiU0oRpC03Ojt3Y GRVD6e6vEhtY/Rvn/+dxThuxBf2PaSZ6Cz6WJz+0ksVDbqb5CX2PCU2DHI3Ewu7FmQgi bGwA== X-Forwarded-Encrypted: i=1; AJvYcCWJqCu0Smmk5jjcoc+Nfa1kRxAkapd+JCANIKb4kpRS+vLbfJp7zsJr27PT5Mkt5LHQgUvu0xYWdl3pDA==@gnu.org X-Gm-Message-State: AOJu0YzvqQs3J07fuuy4G6qAuymyCDZzbhNd4lmf7VQMD/HP0SZ+KoAi wGR8LZug+QMivvNexA9SBR/4H7ODY9ZRU/7AtPmRw2noidFAHCpP64+8P3t0 X-Google-Smtp-Source: AGHT+IExW/AAQ54M35wtiOVktFyYSUCr5OOnOaevgoS1aXq0nR1LbcdoWDfX0uRkqWEh5cDAUTH3ag== X-Received: by 2002:a05:6000:4008:b0:374:c800:dc3d with SMTP id ffacd0b85a97d-37a422533c9mr3940291f8f.1.1727112288095; Mon, 23 Sep 2024 10:24:48 -0700 (PDT) Original-Received: from amdahl30 ([2a01:e0a:253:fe0:2ef0:5dff:fed2:7b49]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-378e73e844dsm24612832f8f.40.2024.09.23.10.24.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Sep 2024 10:24:46 -0700 (PDT) In-Reply-To: <867cb2h9on.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 23 Sep 2024 14:49:12 +0300") Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=kevin.legouguec@gmail.com; helo=mail-wr1-x434.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:323983 Archived-At: Eli Zaretskii writes: >> From: K=C3=A9vin Le Gouguec >> Cc: Po Lu , Stefan Kangas , >> emacs-devel@gnu.org >> Date: Sun, 22 Sep 2024 23:23:06 +0200 >>=20 >> Yuan Fu writes: >>=20 >> > I took a look and it=E2=80=99s set for log-edit-mode only. It would be= nice if magit can pick it up. I=E2=80=99m sure a lot of people (me include= d) use magit for developing Emacs. The only problem is magit=E2=80=99s comm= it message editing buffer doesn=E2=80=99t have a special major mode. It doe= s git-commit-mode which is a minor mode, and runs git-commit-setup-hook. Bu= t I=E2=80=99m not sure how to edit dir-locals to set fill-column using a ho= ok or minor mode. >>=20 >> Kludge from my personal config reproduced below=C2=B9, if it can help. = It >> adds a function to git-commit-setup-hook that sets fill-column when it >> detects that one of the remotes is Emacs's Savannah repo. >>=20 >> Thinking more about it, and considering the existence of the >> git-commit-major-mode variable, I guess one could also >>=20 >> 1) define a major mode derived from text-mode in their personal config; >> 2) add a .dir-locals-2.el file to their Emacs checkout that sets >> git-commit-major-mode to that-new-mode, and fill-column to >> *checks config* >> 63 >> *checks discussion* >> ^W64 >> *ponders git-blaming to see what Past Self has to say for himself* >> *looks at the time* >> *you're off the hook, Past Self* >> for that-new-mode. > > 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. It does try to do "something like that"; AFAIU the two main knobs are: * 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), * 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. (There's also a mysterious git-commit-setup-changelog-support that checks for (fboundp 'log-indent-fill-entry) ; New in Emacs 27 but I can't find any trace of log-indent-fill-entry in the tree so not sure what that's about) So what's "missing" from Magit's git-commit.el is a knob dedicated to the fill-column for commit messages. Quotes around "missing" because a dedicated git-commit-fill-column defcustom used to exist, but was eventually removed: (My takeaway skimming that thread: fill-column ought be enough) > Perhaps magit should simply use log-edit-mode? > > Should we perhaps submit a feature request to the magit developers? Maybe, though if core contributors are already using Magit and the only "clue" is the occasional mis-filled changelog, perhaps the status quo is not so bad, if we have a reliable answer to that problem. (I realize my previous message might have made it look inordinately hard to make git-commit do TRT for Emacs changelogs, but TBH a good chunk of that message was theory-crafting, and another chunk was my convoluted personal config; I think Robert's answer shows things can be simpler)