From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jonas Bernoulli Newsgroups: gmane.emacs.devel Subject: Re: Adding git-commit highlight mode? Date: Fri, 03 Jan 2025 14:08:44 +0100 Message-ID: <87pll459k3.fsf@bernoul.li> References: <37733be4476e1c2b6e873c967c79cb0035959a9e.camel@yandex.ru> <86wmfdhwg7.fsf@gnu.org> <0347118b217c57e4e62018547883fad5f1d1e63e.camel@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12297"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Stefan Kangas , Konstantin Kharlamov , Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jan 03 14:25:11 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 1tThfq-000357-Ns for ged-emacs-devel@m.gmane-mx.org; Fri, 03 Jan 2025 14:25:10 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tThf4-0006bh-0l; Fri, 03 Jan 2025 08:24:22 -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 1tThQA-0004i7-3M for emacs-devel@gnu.org; Fri, 03 Jan 2025 08:08:58 -0500 Original-Received: from mail.hostpark.net ([212.243.197.30]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tThQ7-0001sX-A8; Fri, 03 Jan 2025 08:08:57 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by mail.hostpark.net (Postfix) with ESMTP id 77667164B1; Fri, 3 Jan 2025 14:08:46 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=bernoul.li; h= content-type:content-type:mime-version:message-id:date:date :references:in-reply-to:subject:subject:from:from; s=sel2011a; t=1735909726; bh=B2Wib8lM+/+17yQT+RlO0b0mXK+Dd66yG2IIc9bPM4U=; b= TyqBUoPxoVKwKDrKKTiWHM4ixAK/LO57ISlMq2GoXUq6FHHmrH6KCqYG+98XaBl5 eonEwP/O27Ol92kKnNEYCD8QNdf1iC6JOqSWx8lTEMWuVzTDSYS9O59KHjH9xto0 ksQnCwFmwM/N3EBxmNMc0Oq0tFjvWpc9QnzwhC5XlmA= X-Virus-Scanned: by Hostpark/NetZone Mailprotection at hostpark.net Original-Received: from mail.hostpark.net ([127.0.0.1]) by localhost (mail0.hostpark.net [127.0.0.1]) (amavisd-new, port 10224) with ESMTP id HRX0g_YRHckv; Fri, 3 Jan 2025 14:08:46 +0100 (CET) Original-Received: from customer (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.hostpark.net (Postfix) with ESMTPSA id 4D2CB1648A; Fri, 3 Jan 2025 14:08:45 +0100 (CET) In-Reply-To: Received-SPF: pass client-ip=212.243.197.30; envelope-from=jonas@bernoul.li; helo=mail.hostpark.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=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-Mailman-Approved-At: Fri, 03 Jan 2025 08:24:18 -0500 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:327625 Archived-At: > I'm copying in Jonas Bernoulli, in case he has any comments. I was under the impression that log-edit.el is Emacs's git-commit.el. I haven't looked at it in a long time, so maybe I don't remember this correctly, but doesn't that cover about the same ground? Modulo some quality of life improvements and bells and whistles maybe. One idea from git-commit.el that you might want to adapt in your alternative is to *not* center the package around a single major-mode. git-commit.el instead adds to find-file-hook a function, which checks if the visited file is one of those files used by Git to have to user write a commit message. If so, it enables the *minor*-mode git-commit-mode (which adds some additional font-lock and key bindings) but first *some* major-mode. The major-mode can be different for different repositories, which is quite useful, considering that different projects follow vastly different commit message conventions. Cheers, Jonas