From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Konstantin Kharlamov Newsgroups: gmane.emacs.devel Subject: Re: Adding git-commit highlight mode? Date: Sun, 05 Jan 2025 06:49:56 +0300 Message-ID: <3403ac27981c4e3a97f8c8ba77c90876f2775ea0.camel@yandex.ru> References: <37733be4476e1c2b6e873c967c79cb0035959a9e.camel@yandex.ru> <875xmuum48.fsf@> 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="27739"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Evolution 3.54.2 Cc: emacs-devel@gnu.org To: =?ISO-8859-1?Q?Bj=F6rn?= Bidar Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Jan 05 04:50:38 2025 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 1tUHev-00073A-1U for ged-emacs-devel@m.gmane-mx.org; Sun, 05 Jan 2025 04:50:37 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tUHeY-0003a1-Nn; Sat, 04 Jan 2025 22:50:14 -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 1tUHeW-0003Yh-HU for emacs-devel@gnu.org; Sat, 04 Jan 2025 22:50:13 -0500 Original-Received: from forward500b.mail.yandex.net ([178.154.239.144]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tUHeS-0002KI-Gg for emacs-devel@gnu.org; Sat, 04 Jan 2025 22:50:12 -0500 Original-Received: from mail-nwsmtp-smtp-production-main-63.sas.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-63.sas.yp-c.yandex.net [IPv6:2a02:6b8:c08:1699:0:640:fad2:0]) by forward500b.mail.yandex.net (Yandex) with ESMTPS id CD54C60D4A; Sun, 5 Jan 2025 06:49:57 +0300 (MSK) Original-Received: by mail-nwsmtp-smtp-production-main-63.sas.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id unZHdSSOp0U0-zerukzOB; Sun, 05 Jan 2025 06:49:57 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1736048997; bh=h6hTAo2LHuLeVKQTD362wNxPR6RLYLH2YOEM9ALmB8g=; h=References:Date:In-Reply-To:Cc:To:From:Subject:Message-ID; b=RG5gZuw+nNkQ6RRj3O4ftsNend97rwOFZYT9qtiJxonMER77avd+tSoSjpGQguT9Y +DvRKtmzC+pIKlQnFz/VuAorgQcPJybyNPk9PHxvkTnAsnkaOBy7kxbloBTrg7viEW XKwJTcke11g72ZR9IqVw1MskGBW/SsPuSA4p7NFM= Authentication-Results: mail-nwsmtp-smtp-production-main-63.sas.yp-c.yandex.net; dkim=pass header.i=@yandex.ru In-Reply-To: <875xmuum48.fsf@> Received-SPF: pass client-ip=178.154.239.144; envelope-from=Hi-Angel@yandex.ru; helo=forward500b.mail.yandex.net 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_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=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:327700 Archived-At: On Sun, 2025-01-05 at 02:42 +0200, Bj=C3=B6rn Bidar wrote: > Konstantin Kharlamov writes: >=20 > > Hi, just wanted to ask this before potentially taking on the > > initiative > > to only find the code will get rejected. > >=20 > > I think a ballpark estimate of 90% of Git usage among CVSes in the > > modern world is fair to assume. > >=20 > > But Emacs seems to be the only widely popular editor that still > > doesn't > > provide OOTB at least syntax highlight for git-commit format. >=20 > Does it do that if you use Emacs to commit? I.e. use VC? I didn't try using VC as I don't know its functions to commit. But it's tangentially related (I have well optimized workflow with zsh, so I wouldn't need VC nor Magit): do you know that it has the highlight? > > So, does > > anyone have opposition to adding a major mode that would be bound > > to > > filenames like `COMMIT_EDITMSG` and others, and would provide the > > aforementioned highlight? >=20 > The question is how would that benefit someone besides those that do > not VC nor Magit. The mechanism of calling git commit having Emacs > depends at least on with-editor which makes likely that the user > would > use magit or maybe vc (IDK). Idk. I'm thinking here about the usecase where emacsclient is called as an editor, which I think is popular too. > >=20 > > P.S.: to answer potential question "why not magit" =E2=80=94 first it's= not > > OOTB experience. Second (but kinda related) it's a huge separate > > package which takes off some startup time (and as of writing the > > words > > commit highlight specifically doesn't work if you defer the load=C2=B9)= , > > but > > not everyone needs full git-interaction suite in Emacs. Magit is > > great, > > but I personally just grown over the years a bunch of zsh functions > > and > > aliases that automate my Git workflow as much as possible, so I > > don't > > think there's much to optimize still. I just want the highlight =F0=9F= =98=8A > > And > > I think, having it in Emacs would benefit the wider community too. >=20 > I might be that you load magit wrong since you seem to add :defer t > to > your configuration but also very likely use other options such as > :bind > which also enable deferred loading. That could mess up things. No, I don't use :bind. I only have :init and :config sections.