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: Fri, 03 Jan 2025 00:40:27 +0300 Message-ID: <62392708bba07f66bdd63a62eb556ce884935d70.camel@yandex.ru> References: <37733be4476e1c2b6e873c967c79cb0035959a9e.camel@yandex.ru> <86wmfdhwg7.fsf@gnu.org> <0347118b217c57e4e62018547883fad5f1d1e63e.camel@yandex.ru> 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="29843"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Evolution 3.54.2 Cc: emacs-devel@gnu.org, Jonas Bernoulli , Jim Porter To: Stefan Kangas , Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Jan 02 22:41:00 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 1tTSw7-0007Za-Cg for ged-emacs-devel@m.gmane-mx.org; Thu, 02 Jan 2025 22:40:59 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tTSvm-000763-Ep; Thu, 02 Jan 2025 16:40:38 -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 1tTSvk-00075U-Qg for emacs-devel@gnu.org; Thu, 02 Jan 2025 16:40:37 -0500 Original-Received: from forward501a.mail.yandex.net ([178.154.239.81]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tTSvi-0003cY-IW; Thu, 02 Jan 2025 16:40:36 -0500 Original-Received: from mail-nwsmtp-smtp-production-main-77.iva.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-77.iva.yp-c.yandex.net [IPv6:2a02:6b8:c0c:108e:0:640:8d65:0]) by forward501a.mail.yandex.net (Yandex) with ESMTPS id 4F25F60F50; Fri, 3 Jan 2025 00:40:29 +0300 (MSK) Original-Received: by mail-nwsmtp-smtp-production-main-77.iva.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id SeoRmdvMh0U0-gbfYky3R; Fri, 03 Jan 2025 00:40:28 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1735854028; bh=dwVyPrhUVHBPAiBtv1yqBBpGNMSv5pTfohUmSilKRMU=; h=References:Date:In-Reply-To:Cc:To:From:Subject:Message-ID; b=Sef+E4dPcHSDLcNLPLgvpKSF3OuCTO7sM/agZRiAKBspMvzruB5CtbF4eukB53m+g 4aYx/jBL15YiSvH++DB/GoxQobF8Ok40NzjUk0Qg7atCrrjndc+k0kjugcPJ1uOH6S sBlTuaYwG6069Imhl0Zq38ifXwI4TiS4YXto3c0k= Authentication-Results: mail-nwsmtp-smtp-production-main-77.iva.yp-c.yandex.net; dkim=pass header.i=@yandex.ru In-Reply-To: Received-SPF: pass client-ip=178.154.239.81; envelope-from=Hi-Angel@yandex.ru; helo=forward501a.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:327600 Archived-At: On Thu, 2025-01-02 at 14:10 -0600, Stefan Kangas wrote: > Konstantin Kharlamov writes: >=20 > > On Thu, 2025-01-02 at 21:01 +0200, Eli Zaretskii wrote: > > > > From: Konstantin Kharlamov > > > > Date: Thu, 02 Jan 2025 21:30:53 +0300 > > > >=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. > > > > 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 > It would be great to have something like that in Emacs by default, > indeed.=C2=A0 Even a simple mode with syntax highlighting would go a long > way. >=20 > Note that there is some prior work here, see `git-commit-mode' in > `magit`.=C2=A0 However, AFAIU, we recommend not looking at the > implementation > if you want to implement something like it, for reasons of copyright. > The reason is that once you look at its implementation it's hard to > write something original enough to be able to copyright assign the > result to the Free Software Foundation, and even if it is original it > can still (under some circumstances) be considered a derivative work > of > the code you have looked at. Thank you! Yeah, I figured I shouldn't look at magit for license reasons, so I was going to use VSCode's syntax highlight as a reference=C2=B9, since nowadays, at least from looking at other people, it seems to be the most popular editor, so presumably its support should be good. However, for now I'm assuming Jim is taking over the initiative as he has already written the mode. 1: https://github.com/microsoft/vscode/tree/2bdb3e9b41bd72048ea2067a350d8536c8= 2fc7f6/extensions/git-base