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.devel Subject: Re: emacs-30 f0daa2f2153: Conservative heuristic for tree-sitter parser ranges (bug#73324) Date: Thu, 26 Sep 2024 00:28:39 -0700 Message-ID: <6A185630-8BDC-4F9A-AC3F-7D386963D1DA@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> <871q19zfuu.fsf@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51\)) 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="18621"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , luangruo@yahoo.com, stefankangas@gmail.com, emacs-devel@gnu.org To: =?utf-8?Q?K=C3=A9vin_Le_Gouguec?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Sep 26 09:29:53 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 1stiwi-0004gG-JO for ged-emacs-devel@m.gmane-mx.org; Thu, 26 Sep 2024 09:29:52 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1stivp-00073L-U8; Thu, 26 Sep 2024 03:28:57 -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 1stivo-000738-8g for emacs-devel@gnu.org; Thu, 26 Sep 2024 03:28:56 -0400 Original-Received: from mail-pl1-x62e.google.com ([2607:f8b0:4864:20::62e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1stivl-0003qv-QG; Thu, 26 Sep 2024 03:28:55 -0400 Original-Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-2059204f448so5596105ad.0; Thu, 26 Sep 2024 00:28:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727335732; x=1727940532; darn=gnu.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=jGSBsWy9s24es/n7ZVZnFshyXcrLflM3TmQDgkRNe8E=; b=cPAu8bKmu5HQ16+5R1PjHnMzifF1TZNnHqotqM4zBIOHnI4e0OguQ5u3UbIrsWvsA3 YuqUJK1Y3p2UvjPUeTkdZm3m7o2XCFEfH+oNqnut1Zd4A5X6sqC5S/8J03nhp23GsMTq BAHBpavasqtRL/B9wr+TyqmW9GQsn4q+2zj6517ICMHHJnu2HStHUEY/BoX3fWa7QrCN kbQlANBUIT8hD2vqKnEcWycNP/OZCdvQmGp8E3mekEYuNQ2D0SsQPpPKVQiMJnC1r+ua gn9Rar+UFz+a+A8tDvUDpCbrFVhB0RqwlfB+X9TXav+IuZWWeTvsfbvtSNMYZSASt16P h2iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727335732; x=1727940532; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jGSBsWy9s24es/n7ZVZnFshyXcrLflM3TmQDgkRNe8E=; b=tsxoRwL0XY4fYGvv3+hAfsWQ9Sw8akUYgRnfgVwBXSqwkECvRTOd4rhjnczr/JJ6a0 z33ziBu3ds2Lh1NbflX1iyxGHr9l7weWoNozzfltjxaU9Bx2rua1mYHoy8bFU8/PvHb/ KOSDgfttx5RmCm4rl/3b+3sCIUBiyR+l6CRtswPG9nA9C/VgSFC5B8v2GzTxw/2m0kVp 27KSKwRSxSfKq6X7x60yo3i9hSXojQEHes5kVuN04gAP3jtw+nX1fbe6X5aXg5xgjfoi Jiii47REvX/BcCP6KFmKzwtIf/I2H8IeDpgV0JkmwAD2zKXWfSXSzXZZHtPcDYE0Z210 7fpA== X-Forwarded-Encrypted: i=1; AJvYcCVS/GLP6Lux/TCbhBrBwJ9tsE3RhHc/zd49obiGUt8CoC445OdJUG9dTvT2RVUUzPbfQ1W2DfAhwXsXWA==@gnu.org X-Gm-Message-State: AOJu0Yw9WDmETc7/V/4iMlgjJuI7iwMtV3V1r6joW97z2XzvnGxYCMU1 12bP5UNb7DlTKnevqddv2L5C8pDsv0gRJIT11hl79oKUcc0/e2LoLZcaPw== X-Google-Smtp-Source: AGHT+IFNJw1TOJ4JlUQ+Za77JhwRS5y3a8TNcy8gTCYyz/UE5w6dAixAEYP8WlM4Pg5o1kHrX2OmKQ== X-Received: by 2002:a17:902:da85:b0:202:508c:b5a6 with SMTP id d9443c01a7336-20afc5e322cmr74649485ad.46.1727335731782; Thu, 26 Sep 2024 00:28:51 -0700 (PDT) Original-Received: from smtpclient.apple ([2601:646:8f81:6120:b979:1835:aae4:102]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-20af1723f23sm33366305ad.95.2024.09.26.00.28.50 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Sep 2024 00:28:51 -0700 (PDT) In-Reply-To: <871q19zfuu.fsf@gmail.com> X-Mailer: Apple Mail (2.3776.700.51) Received-SPF: pass client-ip=2607:f8b0:4864:20::62e; envelope-from=casouri@gmail.com; helo=mail-pl1-x62e.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, 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:324101 Archived-At: > On Sep 24, 2024, at 12:10=E2=80=AFAM, K=C3=A9vin Le Gouguec = wrote: >=20 > Eli Zaretskii writes: >=20 >>> 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) >>=20 >> 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. >=20 > 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. >=20 > 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. >=20 >>> So what's "missing" from Magit's git-commit.el is a knob dedicated = to >>> the fill-column for commit messages. >>=20 >> 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. >=20 > 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. >=20 > 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. >=20 > tl;dr I don't disagree but I don't see log-edit-mode integration into > Magit to be the path of least resistance. >=20 > (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) >=20 >=20 > =C2=B9 2014-03-18 "git-commit: allow use of arbitrary major mode" = (feb58998) > = https://github.com/magit/magit/commit/feb58998fc128824728959695a9448e7752c= 2ca3.patch I was hoping for some config that we can put in .dir-locals.el that = works automatically for magit. That should prevent a lot of future = corrections on fill column. That doesn=E2=80=99t seem trivial, so I = guess I=E2=80=99ll just stick something into my config and call it a day = :-) Yuan