From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Protesilaos Stavrou Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] * vc-git.el (vc-git-log-edit-mode): Font lock long summary lines. Date: Sun, 04 Sep 2022 20:42:34 +0300 Message-ID: <87edwrf33p.fsf@protesilaos.com> References: <20220903170308.301805-1-spwhitton@spwhitton.name> <875yi3behv.fsf@gnus.org> <87wnaj124y.fsf@melete.silentflame.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7230"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Notmuch/0.37 (https://notmuchmail.org) Emacs/29.0.50 (x86_64-pc-linux-gnu) To: Sean Whitton , Lars Ingebrigtsen , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Sep 04 19:43:35 2022 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 1oUteg-0001k6-T6 for ged-emacs-devel@m.gmane-mx.org; Sun, 04 Sep 2022 19:43:35 +0200 Original-Received: from localhost ([::1]:33122 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oUtef-0003Vw-Th for ged-emacs-devel@m.gmane-mx.org; Sun, 04 Sep 2022 13:43:33 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49748) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oUtdt-0002o9-0T for emacs-devel@gnu.org; Sun, 04 Sep 2022 13:42:45 -0400 Original-Received: from relay1-d.mail.gandi.net ([217.70.183.193]:38823) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oUtdr-0006KG-1r for emacs-devel@gnu.org; Sun, 04 Sep 2022 13:42:44 -0400 Original-Received: (Authenticated sender: public@protesilaos.com) by mail.gandi.net (Postfix) with ESMTPSA id 3A018240005; Sun, 4 Sep 2022 17:42:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protesilaos.com; s=gm1; t=1662313357; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=TRNd6hli5P8tQPkb/1Dffh4E3/c36QIJb1YghpoEySs=; b=DUbaCEu5uwgYBX8Gn0t7vzy/SyS5og1KHeBjDaBuK+Vq1hJRhlNjvPXqFqTsTqMjrMeYjd XNFTFclnG5uDXB8gynqs0Sx5xfPdAnoHUK/NWuE142wvXl9zVDCO0ZYZ/wZp6xmRQsAcUT 2JO97iVeUqYSKt0WfkTcHcg804z9VhZ2/4nCgbVhfkndB4vgpu1a579uE47ecCxsmj5IOP 6aC8HJSfUs3C/tNh2IJozA6VhKxhm+WpJ3JZ1o5XXetpC0GgZAzP7DogvYmZnFBagTJCp7 1J5nTiI9xiqzh5zg/Zfu9wz7ny05mqSF4Od+M2FgK5oBwZhuhTU6HXcakU1N9Q== In-Reply-To: <87wnaj124y.fsf@melete.silentflame.com> Received-SPF: none client-ip=217.70.183.193; envelope-from=info@protesilaos.com; helo=relay1-d.mail.gandi.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.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01 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" Xref: news.gmane.io gmane.emacs.devel:294709 Archived-At: > From: Sean Whitton > Date: Sun, 04 Sep 2022 10:27:09 -0700 > > Hello, Hello Sean, > On Sun 04 Sep 2022 at 12:50PM +02, Lars Ingebrigtsen wrote: > >> Sean Whitton writes: >> >>> I'd like to install this patch to highlight long summary lines when composing >>> git commit messages. Comments welcome. >> >> What constitutes a too-long summary line varies by project, so I don't >> think doing this by default would be appreciated. But it would be a >> user option. > > Ah okay, I don't recall having myself seen anything written down other > than 50/68, though I know plenty of projects don't care about it at all. > > I'm thinking two defcustoms, then: > > vc-git-summary-target-length defaults to nil, > I'll make emacs.git's .dir-locals.el set it to 50 > > vc-git-summary-max-length defaults to 68. > > (The name of the latter is based on `git-commit-summary-max-length' from > git-commit.el on my system, which I believe is pulled in by Magit.) Please consider defining the relevant faces as well. The 'warning' and 'error' are not always appropriate here and by hardcoding them we no longer have the chance to modify them easily (thinking about themes). git-commit.el does this: (defface git-commit-overlong-summary '((t :inherit font-lock-warning-face)) "Face used for the tail of overlong commit message summaries." :group 'git-commit-faces) (defface git-commit-nonempty-second-line '((t :inherit font-lock-warning-face)) "Face used for non-whitespace on the second line of commit messages." :group 'git-commit-faces) The new faces can inherit from 'warning' and 'error', of course. All the best, Protesilaos (or simply "Prot") -- Protesilaos Stavrou https://protesilaos.com