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: Adding git-commit highlight mode? Date: Thu, 02 Jan 2025 21:30:53 +0300 Message-ID: <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="21668"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Evolution 3.54.2 To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Jan 02 19:31:26 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 1tTPyg-0005TD-0u for ged-emacs-devel@m.gmane-mx.org; Thu, 02 Jan 2025 19:31:26 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tTPyP-0000WK-4g; Thu, 02 Jan 2025 13:31:09 -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 1tTPyM-0000Vz-2F for emacs-devel@gnu.org; Thu, 02 Jan 2025 13:31:06 -0500 Original-Received: from forward102b.mail.yandex.net ([178.154.239.149]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tTPyH-0000OW-Ab for emacs-devel@gnu.org; Thu, 02 Jan 2025 13:31:05 -0500 Original-Received: from mail-nwsmtp-smtp-production-main-10.sas.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-10.sas.yp-c.yandex.net [IPv6:2a02:6b8:c10:2222:0:640:c513:0]) by forward102b.mail.yandex.net (Yandex) with ESMTPS id 68A9060909 for ; Thu, 2 Jan 2025 21:30:56 +0300 (MSK) Original-Received: by mail-nwsmtp-smtp-production-main-10.sas.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id rUlnDc5OkCg0-3hmzJHJK; Thu, 02 Jan 2025 21:30:55 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1735842656; bh=12VnoSkHo5FEKM2Vpq0y10/PvjqQ385828k5pTlDe3E=; h=Date:To:From:Subject:Message-ID; b=NuojCffyyICzvrPuoblGUZuzlNvIXFh9pa9XyTVjxBGgYkmPQA4DecQ+Sp7vkeFpb WgoNuvDw+mwAiggoVkpcTRK2+sbFvR4E2kwJ2QvBpU8NLUJsATf6ORSRTjjonSg6vy aMF/W3V3ryJnO4thOSLo8WBpiXse4L338Kl+Chwc= Authentication-Results: mail-nwsmtp-smtp-production-main-10.sas.yp-c.yandex.net; dkim=pass header.i=@yandex.ru Received-SPF: pass client-ip=178.154.239.149; envelope-from=Hi-Angel@yandex.ru; helo=forward102b.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_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:327581 Archived-At: 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. 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? If there's no opposition, I could write such mode (it seems to be a simple one), but I don't promise anything because Idk how long this discussion will go and what's gonna happen tomorrow, etc=E2=80=A6 I just ha= d some spare time and motivation today, so decided to at least start the discussion. I don't have plans for adding complicated features besides just syntax highlight. I think if anyone wishes they could be added later. And indentation support from text-mode I think should be fine. 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), bu= t 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. 1: https://emacs.stackexchange.com/questions/82842/deferring-magit-load-withou= t-breaking-highlight-in-git-commit