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: Sat, 04 Jan 2025 04:45:31 +0300 Message-ID: <48c9115e57a6abd19b4465ab5d97d15301c395dd.camel@yandex.ru> References: <37733be4476e1c2b6e873c967c79cb0035959a9e.camel@yandex.ru> <083310b3-a288-5c75-c835-84595e134682@gmail.com> <56c9eadd95367cd3fd7c8414dc3e86b243a4b3d7.camel@yandex.ru> <87v7uv9xub.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="39970"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Evolution 3.54.2 Cc: Jim Porter , emacs-devel@gnu.org, Jonas Bernoulli To: =?ISO-8859-1?Q?Bj=F6rn?= Bidar Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jan 04 02:46:23 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 1tTtF9-000AHX-0X for ged-emacs-devel@m.gmane-mx.org; Sat, 04 Jan 2025 02:46:23 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tTtEY-00044X-RK; Fri, 03 Jan 2025 20:45:46 -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 1tTtEV-00044M-R3 for emacs-devel@gnu.org; Fri, 03 Jan 2025 20:45:44 -0500 Original-Received: from forward502b.mail.yandex.net ([178.154.239.146]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tTtER-0007rN-M3 for emacs-devel@gnu.org; Fri, 03 Jan 2025 20:45:43 -0500 Original-Received: from mail-nwsmtp-smtp-production-main-22.iva.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-22.iva.yp-c.yandex.net [IPv6:2a02:6b8:c0c:14ad:0:640:8d35:0]) by forward502b.mail.yandex.net (Yandex) with ESMTPS id 62F0860BCA; Sat, 4 Jan 2025 04:45:33 +0300 (MSK) Original-Received: by mail-nwsmtp-smtp-production-main-22.iva.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id VjWqHNFMmCg0-94j3TZTT; Sat, 04 Jan 2025 04:45:32 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1735955132; bh=mYdIne9DDo381U4AIq6Ac6rxmzDlC1EyyHB1Fszd0wY=; h=References:Date:In-Reply-To:Cc:To:From:Subject:Message-ID; b=bwJYH1kqcIfWNPk8INyeyRp/JwvmhFgZLBsaMcqwnlx1UiGQPIerK5pFjC8lC6YXz 9XBY7lbTXveoA6i5SP4gfn7aK0onGq9hJm0lWInSMP4tzN2WQYSASjyl3IA5Q7RH97 Pm4s0q24ldLazaKZcH8slESfD8XExTvIOxhD6Kus= Authentication-Results: mail-nwsmtp-smtp-production-main-22.iva.yp-c.yandex.net; dkim=pass header.i=@yandex.ru In-Reply-To: <87v7uv9xub.fsf@> Received-SPF: pass client-ip=178.154.239.146; envelope-from=Hi-Angel@yandex.ru; helo=forward502b.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_MSPIKE_H2=-0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_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:327644 Archived-At: On Sat, 2025-01-04 at 03:22 +0200, Bj=C3=B6rn Bidar wrote: > Konstantin Kharlamov writes: >=20 > > On Fri, 2025-01-03 at 23:14 +0200, Bj=C3=B6rn Bidar wrote: > > > Jim Porter writes: > > >=20 > > > > On 1/2/2025 10:30 AM, Konstantin Kharlamov wrote: > > > > > 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 > > > > For what it's worth, I wrote a very simple package to do this > > > > for > > > > myself, since I don't use Magit. (I'm just so used to the Git > > > > command > > > > line that I've never taken the time to mess with Magit.) > > > >=20 > > >=20 > > > Is there a way we can do this without reinventing the wheel? E.g. > > > by > > > including Jonas's git-commit mode into Emacs? > >=20 > > Using Jim's mode comes as close as it gets to not reinventing the > > wheel. As mentioned by Stefan elsewhere in the thread, Jonas' git- > > commit that is part of magit can't be easily included for license > > reasons. >=20 > Most of the code was written by Jonas. If either the other authors > code > is replaced or they have also assigned their copyright to the FSF it > could be included. If you open this link https://github.com/magit/magit/blame/main/lisp/git-commit.el and look at the "contributors" text, it says "24". I think contacting 23 different people is so much work that you can rewrite the syntax highlight 5 times and still get spare time. > > > PS: It would be very beneficial to not uses Github for Emacs > > > development but other FOSS platforms such as Codeberg. No need to > > > feed > > > Copilot with our code to copy it into other non-FOSS code. > >=20 > > As mentioned by Dick, Emacs is mirrored to Github anyway. >=20 > Dicks rather trolling comment aside, I don't think that is a reason > to > use Github. >=20 > > search it seems neither Codeberg nor Gitlab has an active Emacs > > mirror, > > right? > > That means there's no other option besides Github for > > contributors to store their local changes to before sending them > > upstream. >=20 > I don't see a problem there, create an account on which server you > prefer and fetch from Savannah. > No need to use Github to download the Emacs repository. I guess you're right. > > Obviously, a new contributor wouldn't have an account to > > git.savannah, and even if they do, git.savannah doesn't allow to > > fork a > > repo, instead it requires to store everyone the changes to their > > local > > branch on a shared repo, which seems unsafe on a bigger scale. >=20 > This has nothing to do with Savannah, you don't have to "fork" a > repository that's a Forge thing to map pull requests (and to easier > map > commit refs between the source and the fork but that's OT). Forking is a solution to the problem where you don't want to grant an arbitrary person write access to a git repo. Though now that I think, theoretically it may be possible to implement similar workflow by only granting access to the `username/` sub-tree. Access management is done by a harness around git, and one can write it any way they want. Either way, I don't think such access management has been implemented by anyone, whereas "forking" workflow does have implementations.