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:42:47 +0200 Message-ID: <16376.8434709468$1736037819@news.gmane.org> References: <37733be4476e1c2b6e873c967c79cb0035959a9e.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="21797"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: emacs-devel@gnu.org To: Konstantin Kharlamov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Jan 05 01:43:30 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 1tUEjq-0005Y3-Ki for ged-emacs-devel@m.gmane-mx.org; Sun, 05 Jan 2025 01:43:30 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tUEjJ-0002Ao-Qw; Sat, 04 Jan 2025 19:42:58 -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 1tUEjH-0002AQ-2V for emacs-devel@gnu.org; Sat, 04 Jan 2025 19:42:55 -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 1tUEjE-0003z5-Kw for emacs-devel@gnu.org; Sat, 04 Jan 2025 19:42:54 -0500 Original-Received: from odin (dsl-trebng12-50dc7b-49.dhcp.inet.fi [80.220.123.49]) by thaodan.de (Postfix) with ESMTPSA id 618D7D0004C; Sun, 5 Jan 2025 02:42:48 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=thaodan.de; s=mail; t=1736037768; bh=YtK1hsHtAu99RVeGvyurjTjFFtUOfk7dz50ZSeTJxmI=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=p9acbkw8neA4I5uCKSXuG6J7uW2skxA5OuzugQl3dXGQt2iZeS1EfGuz+T/xBoaFK klFnfIyDbHRDRLjs3ExR22L4rEeX20DT1xUoxpXQpLS0t5LJSyj2LhaZioZ4/s1Xs7 r/gr8OyJmvBAazq35tJUTZS2TeCs4DfxILzDWeh7cTFyX3vc1qYFiUFPVCRas6BHqz /dNtWJRmrCksqI1ATLrKfph01hkjURKgbDl5K1fdulgGSi6uPccBKRtmb9lu5LrLjI RUs+YX4TGrH/cKWlN3uo1NAJxXR71mA+Q9bD8hdHxjMkJfvjyTXKo1hfnF67uUUsO1 oA5P1V3/+UxureXaIGz3Zqm8l9lD/KhVueo49RHLx8eGfrtEAnZMfRztHTE7I4gJaJ gSaGzKFl10xkdH0opTASuJT4m6BG1o7xBWoyiQWNQ9AsVipO0SrBwM8u5X7yI8y6Nn NnIzkB0DC2kuBkxlihtWOZIGTl4y/Tlw+b1CWN0ohrafhK5+dWEks0XS6SdGJUnyNx VcpATy1BPDXzb4Oy7vvdVWUkbO2KJrsWUpqr7mLDBWnQU3yHIrxP7Sy0zgHIcgKGBL d5IlBcJ9CVIh9FB+SsvVkbLFX7a0I1zMKrdnUyF5vBXVQVoGkgB3H7tpsA0CBEH0gh 2fJs1o0VdGiWU2r/7nwafumU= In-Reply-To: <37733be4476e1c2b6e873c967c79cb0035959a9e.camel@yandex.ru> (Konstantin Kharlamov's message of "Thu, 02 Jan 2025 21:30:53 +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:327696 Archived-At: Konstantin Kharlamov writes: > Hi, just wanted to ask this before potentially taking on the initiative > to only find the code will get rejected. > > I think a ballpark estimate of 90% of Git usage among CVSes in the > modern world is fair to assume. > > But Emacs seems to be the only widely popular editor that still doesn't > provide OOTB at least syntax highlight for git-commit format. Does it do that if you use Emacs to commit? I.e. use VC? > 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? 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). > > P.S.: to answer potential question "why not magit" =E2=80=94 first it's n= ot > 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. 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. > 1: > https://emacs.stackexchange.com/questions/82842/deferring-magit-load-with= out-breaking-highlight-in-git-commit