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?Bj=C3=B6rn?= Bidar Newsgroups: gmane.emacs.devel Subject: Re: Adding git-commit highlight mode? Date: Sun, 05 Jan 2025 02:46:32 +0200 Message-ID: <20069.5380962983$1736038021@news.gmane.org> References: <37733be4476e1c2b6e873c967c79cb0035959a9e.camel@yandex.ru> <083310b3-a288-5c75-c835-84595e134682@gmail.com> <56c9eadd95367cd3fd7c8414dc3e86b243a4b3d7.camel@yandex.ru> <48c9115e57a6abd19b4465ab5d97d15301c395dd.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="31758"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Jim Porter , emacs-devel@gnu.org, Jonas Bernoulli To: Konstantin Kharlamov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Jan 05 01:46:52 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 1tUEn6-00088E-MG for ged-emacs-devel@m.gmane-mx.org; Sun, 05 Jan 2025 01:46:52 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tUEmt-0002yB-MX; Sat, 04 Jan 2025 19:46:39 -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 1tUEmq-0002y0-7H for emacs-devel@gnu.org; Sat, 04 Jan 2025 19:46:37 -0500 Original-Received: from thaodan.de ([2a03:4000:4f:f15::1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tUEmo-0004Nj-FT for emacs-devel@gnu.org; Sat, 04 Jan 2025 19:46:35 -0500 Original-Received: from odin (dsl-trebng12-50dc7b-49.dhcp.inet.fi [80.220.123.49]) by thaodan.de (Postfix) with ESMTPSA id 0DDC6D0004C; Sun, 5 Jan 2025 02:46:33 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=thaodan.de; s=mail; t=1736037993; bh=EPldurtsmdBaPEumjI+hI1FOUakyjKoAoV5a5IlXQ6I=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=Gf1QzsA66qzDljP1Hef+zcekrETu0G1SI8wDl9pmy53GNNa2touRdiULbTSivpfuH tWf8kIQOM11eS+ur708ZjFjRiDcYpoNcvRHHO9MyyfYRKnW40SNFDjlZthr73CdzJa GI5TFkfFHyDlOrgcY34X/uhGaUK1QQnrepxlFvKslQsy18sF238LOyrFAVp4dS/ORL EUxSjfEwFhD35LSilN5a7Kc8OV4vnRNvyKhGn8XfVaE0+K5rQjX6H0FtBvx2JxZOJl lPneGjckurxFvifK3pjC1CQJNm1iGWss6MAPZOPaPhPYyozBt/qRscDYL/mf5tvogE aln/WKnZ964cYwBn7pDu078kXkDzaT1M4iEC9mgA5YUDVDxrnMOIx3KLnsbothjAC1 iO+I13Za7WNFV1lcWsTY7I9bxkuDMDJN7mpbxhiFc2CxrtAXZWMi90Gz+trYv/yFlm 8tc5hgVHw0MluIlQOTFa4JOaNxjhFXKfnBR5sw3/tZ3uQIsNN3fe5dQUmuPn5BkdKb 7AzTBPXFmU1sKroCsjhrXtmKMgaNMHbwohrL4LZnQpbQVfEpAzJRLUrBNF6DaZXTNH M1/OGcF9ibW3IL9kPsOOuIT4BPG0VTj/1ksoKsoDZTcC6SZAXE5K0yalTJyoj6PcaC n7QfyTwdHNtpRk4BnU82S3a4= In-Reply-To: <48c9115e57a6abd19b4465ab5d97d15301c395dd.camel@yandex.ru> (Konstantin Kharlamov's message of "Sat, 04 Jan 2025 04:45:31 +0300") Autocrypt: addr=bjorn.bidar@thaodan.de; prefer-encrypt=nopreference; keydata= mDMEZNfpPhYJKwYBBAHaRw8BAQdACBEmr+0xwIIHZfIDlZmm7sa+lHHSb0g9FZrN6qE6ru60JUJq w7ZybiBCaWRhciA8Ympvcm4uYmlkYXJAdGhhb2Rhbi5kZT6IlgQTFgoAPgIbAwULCQgHAgIiAgYV CgkICwIEFgIDAQIeBwIXgBYhBFHxdut1RzAepymoq1wbdKFlHF9oBQJk1/YmAhkBAAoJEFwbdKFl HF9oB9cBAJoIIGQKXm4cpap+Flxc/EGnYl0123lcEyzuduqvlDT0AQC3OlFKm/OiqJ8IMTrzJRZ8 phFssTkSrrFXnM2jm5PYDoiTBBMWCgA7FiEEUfF263VHMB6nKairXBt0oWUcX2gFAmTX6T4CGwMF CwkIBwICIgIGFQoJCAsCBBYCAwECHgcCF4AACgkQXBt0oWUcX2hbCQEAtru7kvM8hi8zo6z9ux2h K+B5xViKuo7Z8K3IXuK5ugwA+wUfKzomzdBPhfxDsqLcEziGRxoyx0Q3ld9aermBUccHtBxCasO2 cm4gQmlkYXIgPG1lQHRoYW9kYW4uZGU+iJMEExYKADsCGwMFCwkIBwICIgIGFQoJCAsCBBYCAwEC HgcCF4AWIQRR8XbrdUcwHqcpqKtcG3ShZRxfaAUCZNf2FQAKCRBcG3ShZRxfaCzSAP4hZ7cSp0YN XYpcjHdsySh2MuBhhoPeLGXs+2kSiqBiOwD/TP8AgPEg/R+SI9GI9on7fBJJ0mp2IT8kZ2rhDOjg gA6IkwQTFgoAOxYhBFHxdut1RzAepymoq1wbdKFlH Received-SPF: pass client-ip=2a03:4000:4f:f15::1; envelope-from=bjorn.bidar@thaodan.de; helo=thaodan.de X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 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, INVALID_MSGID=0.568, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no 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:327697 Archived-At: Konstantin Kharlamov writes: > 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. Jonas replied to to this comment better than me already. >> > > 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. You misunderstand me: You don't have "fork" anything, just create new repository with your desired name and fetch from which source you prefer. None of the "forking" workflow applies to Emacs development and fetching/cl= oning of repositories can be done without "forking". Just clone emacs.git and add your own remote, done.